yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] marcachas:
Greetings to all forum and a special greeting to ottmi and siljaer, large and prominent developers.

I want to comment on two faults that I have detected in the ROM, but first I want to acknowledge and thank their hard work, no doubt that the ROM has evolved incredibly, to the point of being a stable ROM, which can be used in day to day without any problems, so before saying the two failures, i want to acknowledge the work and dedication you have given to this project, that and more, THANK yOU!

Turning to the latter and in order to help solve these two problems, I will be as detailed as possible.

1. Audio (AudioFX): I found an error in the equalizer or AudioFX, when playing a song with any player, is Play Music or PowerAMP, and connect any handset or headset, this is maintained speaker configuration, if I change manually handset, this does not have any change, even I modify different bands equalizer and bass without getting any change, I close the equalizer, so I open and this is in speaker, keeping this option selected if I change the equalizer bands but being in speakerphone mode can not change the bass and treble.

Summary: AudioFX is locked Speaker only and can not be modified in other configurations as headset or bluetooth. I restarted and the problem persists. It should be noted that only about AudioFX, the independent equalizer PowerAMP functioning normally.

2. Memory SD: For several versions of the ROM I've been reporting this ruling, which is simply the non-detection of the removable memory, this error is temporarily solved by restarting the phone until magically SD is recognized, but I bring important information that can help identify the problem.

I have seen that the detection of the removable memory starts from the recovery, you have to reboot several times to recognize the removable card, which I imagine to be a driver problem or something.

I use the original ROM or ROM Stock not experience any problems, my memory Micro SD Kingston 32 gigas brand is recognized always and at all times without any problems.

The problems start from the recovery TWRP and then held in the ROM, reboot 15 times for the memory to be recognized, and if by accident the phone restarts or turned off, the memory will not be recognized, so that the phone never You should go out.

Note that the removable memory once recognized in the ROM or the recovery, this function normally, without cuts or faults.

Therefore completely rule out an error removable card reader from my phone as well as a failure of the card itself. I truly hope the solution to this problem is found.

I think I've been as explicit as possible, if I can help, I'll do it gladly. These are the only two faults I have found, if solved, could move from Beta to Stable in my opinion.

A hug from Mexico.

Postscript. - Write in Spanish, this text was translated by google translator.

Comment added: Thanking his great work again, I leave a question in the air, would there be the possibility of seeing the near future Android 7 in our phone?
[Miscellaneous Android Development] cool400:
I have the same problem with my SD card - I lost all my pics when it disappeared suddenly after I set it up as internal memory.

I thought I made a mistake, but so far I haven't been able to re-use any SD card again, no matter what I tried.

It's just not recognized by my Trunk.

Running latest CM13 with fix from ottmi, BTW.

Any help would be really much appreciated!

Thanks for your work and your help.
[Miscellaneous Android Development] siljaer:
Thanks to you, but my contribution to the project has been quite limited in scope. I must praise the effort and the commitment of [MENTION=7319300]ottmi[/MENTION]. Since I've been trying an experiment (code aurora forum on the trunk), I have appreciated even more his work and that of the people before you. As an example, I realized that the driver for the touch screen wasn't compiling because of some errors (and that were Qualcomm's sources!), so I went to to the cyanogen's version. Guess who fixed that driver? :) [MENTION=7319300]ottmi[/MENTION], of course, one month ago :D

I don't use AudioFX, I'll have to try...

Yes, you can. dmesg and logcat right after a boot when the sd card is not mounted. If you can use adb, it' simple.

It depends on Cyanogenmod :) As for plain Android, IF Qualcomm releases CAF Android 7 for MSM8916, and IF our binary blobs still work with Android 7, it could be possible in THEORY :)

UPDATE: Official Android 7 build is ready for General Mobile 4G, just another name for Wileyfox Swift. Since &#781 [MENTION=7319300]ottmi[/MENTION]'s work relies on several binary blobs (not camera, unfortunately) for the Swift, at least one of the problems is solved.
[Miscellaneous Android Development] blahmartinblah:
To gain some more info on the problem many have with accessing the SD card [MENTION=7319300]ottmi[/MENTION], Here are my dmesg and logcat, taken immediately after a reboot. An SD card was installed, but it was not accessible.

https://justpaste.it/xm94

https://justpaste.it/xm95
[Miscellaneous Android Development] siljaer:
It's weird. This is you:

[ 0.681933] mmc0: new HS200 MMC card at address 0001
[ 0.682295] mmcblk0: mmc0:0001 R821MB 14.5 GiB
[ 0.682464] mmcblk0rpmb: mmc0:0001 R821MB partition 3 4.00 MiB
[ 0.684420] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30
[ 0.691477] BMS: bms_load_hw_defaults: BMS_EN=1 Sample_Interval-S1=[100]S2=[70] Sample_Count-S1=[256]S2=[128] Fifo_Length-S1=[5]S2=[5] FSM_state=2
[ 0.700864] BMS: calculate_initial_soc: warm_reset=1 est_ocv=0 shutdown_soc_invalid=0 shutdown_ocv=3778000 shutdown_soc=34 last_soc=34 calculated_soc=34 last_ocv_uv=3778000
[ 0.734020] BMS: qpnp_vm_bms_probe: probe success: soc=34 vbatt=3732918 ocv=3778000 warm_reset=1
[ 0.734166] CHG: qpnp_lbc_main_probe: use external ic to control ovp function.
[ 0.734174] CHG: use_external_ic_control_ovp: usbin_ovp_irq = -2
[ 0.734179] CHG: use_external_ic_control_ovp: usbin_ovp_irq is n-valid
[ 0.762947] CHG: qpnp_lbc_main_probe: Probe chg_dis=0 bpd=1 usb=1 batt_pres=1 batt_volt=3733212 soc=34

no error messages.

This is me with an SD card in:

[ 0.678748] mmc0: new HS200 MMC card at address 0001
[ 0.679079] mmcblk0: mmc0:0001 R821MB 14.5 GiB
[ 0.679250] mmcblk0rpmb: mmc0:0001 R821MB partition 3 4.00 MiB
[ 0.680885] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30
[ 0.683958] BMS: bms_load_hw_defaults: BMS_EN=1 Sample_Interval-S1=[100]S2=[70] Sample_Count-S1=[256]S2=[128] Fifo_Length-S1=[5]S2=[5] FSM_state=2
[ 0.694473] BMS: calculate_initial_soc: warm_reset=0 est_ocv=0 shutdown_soc_invalid=1 shutdown_ocv=65535 shutdown_soc=255 last_soc=-22 calculated_soc=69 last_ocv_uv=3968028
[ 0.694580] BMS: check_eoc_condition: Unable to read battery status
[ 0.721883] BMS: qpnp_vm_bms_probe: probe success: soc=69 vbatt=3925569 ocv=3968028 warm_reset=0
[ 0.722007] CHG: qpnp_lbc_main_probe: use external ic to control ovp function.
[ 0.722013] CHG: use_external_ic_control_ovp: usbin_ovp_irq = -2
[ 0.722018] CHG: use_external_ic_control_ovp: usbin_ovp_irq is n-valid
[ 0.753822] mmc1: new high speed SD card at address b368
[ 0.754431] mmcblk1: mmc1:b368 00000 1.83 GiB
[ 0.755336] msm_otg 78d9000.usb: USB in low power mode
[ 0.755821] mmcblk1: p1
[ 0.765548] CHG: qpnp_lbc_main_probe: Probe chg_dis=0 bpd=1 usb=0 batt_pres=1 batt_volt=3909366 soc=69

my logcat also shows:

01-01 01:00:31.201 735 3257 D VoldConnector: RCV <- {644 disk:179_64 /sys//devices/soc.0/7864900.sdhci/mmc_host/mmc1/mmc1:b368/block/mmcblk1}

while your logcat doesn't, and there are no error messages.

My 2 cents are that there is a low-level issue... we're waiting for [MENTION=7319300]ottmi[/MENTION] :)
[Miscellaneous Android Development] marcachas:
Thank you for your response, I send you a hug with love.

Retaking the drawbacks.

1. AudioFX: I reinstalled the ROM with another version of Google Apps, the problem persists, I invite you to try this equalizer system and can understand me better, I repeat, the problem is that it lets you choose another setting than Speaker. I hope it is resolved soon.

2. Micro SD: Thank blahmartinblah for their support and contribution. I found another indicator or anything else that can lead us to a solution.

Summary of the above, the removable memory is not recognized by the phone, or in recovery, or the ROM itself, for it to be recognized needs to restart the phone many times, once recognized this works totally fine, if it restarts by accident, this stop again recognized and must be restarted again several times the phone.

This happens with the ROM, the Recovery, if the Stock ROM is used, there is no problem.

New track: Out of curiosity enter the removable memory on my tablet, is the recognized without problems, I also asked if I want to use internal storage, then I'll adjustments and cast out manually, recall the memory of the tablet, the entry phone and Oh surprise !, this is recognized first, perform the experiment in the ROM and the Recovery, giving the same results.

I explain better: Memory is recognized if before I insert into the tablet and then on the phone, but if the phone is turned off or rebooted, this again becomes unrecognizable.

I do not know much about this, but imagine the following. -

Something in the ROM and the recovery creates some type of temporary file that does not allow reading the removable memory, when inserted into my tablet this file is deleted, so the phone detects no problems, but when you restart the file becomes to create and reoccurs this bug, I guess after rebooting many times the file is deleted and that after several restarts the phone recognizes memory.

I hope to be helpful, a greeting.

I found a third problem: Windows does not detect the phone memory.

I tried four different computers, four with the same results.

start in recovery mode and in that mode if it recognizes the device memory, enabling file sharing.

I returned to the oiginal ROM and the device is recognized without problems.

Abstract: The computer does not recognize the phone memory, but if it detects that a device is connected in MTP (well, gives the option to eject safely)
[Miscellaneous Android Development] blahmartinblah:
I think I recall something similar with my SD card.

When I first noticed the issue, I removed it, put it into my card reader on the PC and formatted it. When I put it back in the phone, it seemed to work initially. But then after rebooting, the card would still not be visible.

I am trying to reboot the phone now (multiple times, 10+ so far!) to get a dmesg and logcat while the card is working to compare.

It was suggested by another person that reverting to an earlier version of TWRP fixes the SD card issue - in Recovery at least.

My guess it is kernel related?

Martin
[Miscellaneous Android Development] siljaer:
I have tried: yes, you are right. I don't know whether this is a problem with the port, though. I have checked logcat: when you turn on audio fx it switches to low latency. Low latency is enabled for headset too, though... I will research on it....

Not my case: I rebooted and the SD kept working.

However, I've found something to try: in the stock rom there is a file, /etc/vold.fstab with a single line:

dev_mount sdcard /storage/sdcard1 auto /devices/msm_sdcc.2/mmc_host

you could try creating this file, then rebooting. I would do it, but since I am not experiencing the issue, it would be useless. It's probably useless, since card is not detected at device level...

What are your card's brand and specifications?

This is actually not an issue (it's a feature :) ), you just need to click on the notification "USB for charging" and select "File Transfers". If you like, you can set it permanently in developer options -> networking -> select USB configuration.

I didn't because I like it this way.
[Miscellaneous Android Development] cool400:
I tried this - created the vold.fstab in /etc (well, its a symlink to /system/etc), put the rights -rw-r--r-- and rebooted.

Unfortunately my SD card is still not recognizd :(
[Miscellaneous Android Development] ottmi:
Thanks [MENTION=722204]blahmartinblah[/MENTION] for the dmesg and logcat. It seems that the kernel doesn't detect the sdcard at all - no error, nothing. The reason why earlier versions of TWRP might detect the sdcard is probably due to the fact that it uses the stock kernel whereas later versions don't. I digged a bit deeper in the device tree of the stock kernel and in fact found some settings related to the sdcard that I don't have in my kernel. I will compile a new kernel with this as soon as possible, but currently have some issues with my build environment.. Not sure whether I will be able to do this before the weekend.

Regarding AudioFX: I'm not sure whether I understood the problem correctly. When I connect my Bluetooth headphones, AudioFX switches to Bluetooth and I can make all sort of changes to the settings. I'm not sure though whether it has any impact - I don't hear any change.
[Miscellaneous Android Development] 21prods:
To be honest, I never appreciated any difference either and I've been using CM with different phones for some time now. I transfer music through BT and then I use a proper EQ if needed.

Enviado desde mi Nexus 5 mediante Tapatalk

---------- Post added at 09:15 PM ---------- Previous post was at 08:56 PM ----------

I haven't installed any update since June, now I understand why there is a problem that I never suffered.

In any event, thank you for all your hard work. This might finally be one of the best ports I've ever tried, even if unofficial.

Enviado desde mi Nexus 5 mediante Tapatalk
[Miscellaneous Android Development] siljaer:
I have made some experiments and research about the AudioFX problem.

The facts:

- the only changes that have effect are the ones made for speaker settings. They affect also headphones, though. I have tried speaker and headphones though.

- logcat shows that eq parameters are changed only when using speaker settings. No error messages when using headphone settings

- when you turn off AudioFx for speaker leaving it on for headphones, AudioFx keeps not to work with headphones

- disabling offload effects in build.prop and switching from low-latency to deep buffer in audio_policy.conf has no effect

Research and ideas:

- for some devices offload effects aren't supported in AudioFx. Several workarounds exist, I haven't foud any form MSM8916 yet, and I am not sure that they are needed.

- MSM8916 has less hw resources than other SoC. That would explain the odd behaviour (sharing, multiplexing, etc).

However, wcd9311, that has more resources (and documentation) also shares one of the two headphone's RX interpolators with speaker, like MSM8916 does. I don't know for sure how eq works, but my guess is that it happens digitally (it has 5 bands just like the IIR filters), that is, before the DACs.

- maybe the problem lies in routing, these are the comments in /src/org/cyanogenmod/audiofx/HeadsetService.java:

/**

* There appears to be no way to find out what the current actual audio routing is.

* For instance, if a wired headset is plugged in, the following objects/classes are involved:

* </p>

* <ol>

* <li>wiredaccessoryobserver</li>

* <li>audioservice</li>

* <li>audiosystem</li>

* <li>audiopolicyservice</li>

* <li>audiopolicymanager</li>

* </ol>

* <p>Once the decision of new routing has been made by the policy manager, it is relayed to

* audiopolicyservice, which waits for some time to let application buffers drain, and then

* informs it to hardware. The full chain is:</p>

* <ol>

* <li>audiopolicymanager</li>

* <li>audiopolicyservice</li>

* <li>audiosystem</li>

* <li>audioflinger</li>

* <li>audioeffect (if any)</li>

* </ol>

* <p>However, the decision does not appear to be relayed to java layer, so we must

* make a guess about what the audio output routing is.</p>

lolgcat shows that headphone is detected. However, I have to investigate the matter of routing.

Finally, IF it's not an AudioFX bug, there are mainly two things to research on: audio routing and hw offload effects. I will make some more experiments.

---------- Post added at 21:50 ---------- Previous post was at 21:38 ----------

Yet there's something I cannot understand: mmc0 and mmc1 use the same sdhci driver, and both the devices are recognized in [MENTION=722204]blahmartinblah[/MENTION] dmesg logs. I am mounting the card without problems, and sometimes even the people who are reporting the bugs can...
[Miscellaneous Android Development] siljaer:
AudioFx is working now :)

It was offload effects. If you want to fix it right now, just apply these changes:

http://review.cyanogenmod.org/#/c/110705/3/configs/audio_effects.conf

(from here: http://review.cyanogenmod.org/#/c/110705/basically you have to delete all hw effects implementations)

I am still working with deep buffer instead of low-latency, but I don't think it really matters.

I am wondering whether this is really needed or is a workaround. However, it looks like there is no routing problem.
[Miscellaneous Android Development] ottmi:
[MENTION=722204]blahmartinblah[/MENTION] or anybody else with sdcard problems: could you please try whether it works with this kernel?

https://drive.google.com/open?id=0BwV0Nb8HTEBwa1RUZlU4RGhMckU

It's just a boot.img, not a full image. No need to flash it, just reboot the phone to Fastboot and then load it to RAM:

# adb reboot bootloader
# fastboot boot boot.img
[Miscellaneous Android Development] ottmi:
Thanks a lot ! It's really good to have somebody on board who actually bothered to make himself familiar with the inner workings of the audio subsystem :good:
[Miscellaneous Android Development] cool400:
Hi ottmi,

I'm one of the unfortunate guys whose SD card isn't recognized correctly.

I downloaded your boot.img, loaded it to RAM like you said, then my phone rebooted, but the SD card, which was still installed, wasn't recognized. Even after another reboot it's not recognized so far ????

Any other ideas? My memory is running lower every day - damn Spotify ??
[Miscellaneous Android Development] siljaer:
Quick fix? Buy a Sandisk Ultra 16GB Class 10 (it's working on mine). Better, buy a SD card from a vendor (e.g. Amazon) who allows you to return it if it doesn't work.

I think the SD problem is quite complex and lies in the kernel. I've found that kernel configs are different in the MMC/SD section: stock has some settings that cyanogen hasn't:

stock:

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set
# CONFIG_SDIO_UART is not set
CONFIG_MMC_TEST=m
CONFIG_MMC_BLOCK_TEST=m

CM13:

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_BLOCK_BOUNCE=y
CONFIG_MMC_BLOCK_DEFERRED_RESUME=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set

I don't know what these options mean, though.

I've checked the kernel sources. Keeping in mind that the source kernel of the march stock rom should be virtually identical to cyanogen's in the mmc/sdhci part (both caf), the culprit must be searched in the kernel changes of the last months (about 6, maybe even a little more). That part of the kernel is quite old, but a few changes occurred in sdhci and sdhci-msm drivers in that period. It's interesting that they're dealing with timing issues (in my opinion, due to the erratic nature of the issue, a timing problem is likely). As last resort, older versions of those drivers could be tried.

Unfortunately, I cannot understand the working of those drivers, but I have found that further changes have been made for the linux versions...

However, I think that it would help if people with defective card detection would report model, brand and specs of their cards. I do think that the problem is with some particular chip(s).
[Miscellaneous Android Development] todoss:
I was flash this kermel amd problem with sd card is stil here!
[Miscellaneous Android Development] blahmartinblah:
Thanks others for trying the new boot.img. I was trying to do the same, but I can't boot my phone into fastboot. After issuing the command "adb reboot bootloader" the phone rebooted but sticks on the Cyanogenmod 13 screen. It's got hisname's TWRP recovery on it. Any ideas how to fix this?

The SD card I'm currently using which only after multiple reboot attempts is a Sandisk Ulta 32Gb, class 10. I had the same problem with a Sandisk Ulta 16Gb card.

Both were purchased and order fulfilled by Amazon UK, came in retail packaging and are believed to be genuine Sandisk products.

Martin
[Miscellaneous Android Development] siljaer:
Really strange: this is my Sandisk Ultra 16GB, no problem:

[ 0.776581] mmc1: new ultra high speed DDR50 SDHC card at address aaaa
[ 0.777521] msm8x16-asoc-wcd sound.71: ASoC: CODEC (null) not registered
[ 0.777547] msm8x16-asoc-wcd sound.71: snd_soc_register_card failed (-517)
[ 0.777576] platform sound.71: Driver msm8x16-asoc-wcd requests probe deferral
[ 0.777633] spmi msm8x16_wcd_codec-ffffffc07456d000: Driver wcd-spmi-core requests probe deferral
[ 0.777664] spmi msm8x16_wcd_codec-ffffffc07456d400: Driver wcd-spmi-core requests probe deferral
[ 0.777709] mmcblk1: mmc1:aaaa SL16G 14.8 GiB
[ 0.778038] Registering SWP/SWPB emulation handler
[ 0.789943] mmcblk1: p1
[ 0.864139] vdd_vreg: disabling
[ 0.864169] mem_acc_corner: disabling
[ 0.864175] regulator-dummy: disabling
[Miscellaneous Android Development] blahmartinblah:
Thanks.

I previously tried 8Gb and 16Gb cards (also Sandisk) and experienced the same issues. The cards all work OK when I connect them to my PC in a card reader.

M.
[Miscellaneous Android Development] ottmi:
I don't think it has anything to do with the actual sdcard, this gotta be a kernel problem. I've compiled a new kernel with some debug output:

https://drive.google.com/open?id=0BwV0Nb8HTEBwTmlnX1VnTk1QQkU

Could somebody please try booting this and get me an "adb shell dmesg|grep mmc1" as soon as the blue Cyanogenmod droid pops up? You have to be quick as the kernel output is quite verbose and if you are to slow it will be missing the beginning where the sdcard initialization takes place..
[Miscellaneous Android Development] ottmi:
That's exactly what it's supposed to do :) ! It's in fastboot mode now and you should be able to issue the "fastboot boot boot.img" command. If it doesn't succeed, what does "fastboot devices" tell?
[Miscellaneous Android Development] todoss:
I'm not at home to do this, but this information may be helpful: when sd card is not mounted, I Turn of my phone, pull out sd card and push back. After that sd card is mounted properly.
[Miscellaneous Android Development] blahmartinblah:
How funny :) I feel a little silly now! When I type fastboot devices returns the ID of the connected device as I believe it should, and fastboot boot boot.img worked also. I think I just confused yesterday by the image being stuck on the screen. I'm sure my previous devices have had some kind of indication that they were in fastboot mode.

As already reported by [MENTION=3230868]cool400[/MENTION] though, the boot.img file you shared on August 25th does not resolve the SD card issue.

Here is the output from dmesg with todays kernel with verbose debugging. Doesn't look to me much of use here. Did I miss the correct timing?

[ 0.601902] mmc1: no vqmmc regulator found
[ 0.601914] mmc1: no vmmc regulator found
[ 0.631625] mmc1: SDHCI controller on 7864900.sdhci [7864900.sdhci] using 32-bit ADMA
[Miscellaneous Android Development] ottmi:
Now I'm feeling silly. The link I posted earlier today was to the boot.img from August 25th that didn't have the debug output. I've corrected the link in my post above. Could you please try again with this kernel?

https://drive.google.com/open?id=0BwV0Nb8HTEBwTmlnX1VnTk1QQkU