Open AndreiLux opened 11 years ago
Do you mean even kernel compiled from official Samsung's open source have this issue? Never had this problem before, but got it 2 times today (not usual using, so probably phone was raped to much today). I will try to investigate this issue if i will find pattern to reproduce this issue.
Yes. Wanam is having the same issue on the stock sources.
I have not found any pattern to it - it seems to happen haphazardly. My theory is something is wrong with the register caches to the audio chip. (the register maps are not updated if the regmap cache thinks the target already has the same value)
Generally if you pull the battery out and leave it out for a bit, then it will work again 100%.
I'm also currently doing the audio engine for the WM5102, however the userspace module works, it bypasses the codec's own write function and uses something else to write to the registers via the regmap. This is a really odd behaviour, I had to intercept calls in the regmap driver to find out what userspace is doing.
I've been made aware that if you simply turn all your volumes down to mute, reboot, turn them up again, that things will work again. Just tested it now when I had the bug and seemed to work.
Oh man, i'm so happy that i helped a little... of course it's not a solution, but just to know that i was of a little help is good...
i'm not good in programing and stuff like that, but i'm looking forward to find the final solution to this bug.
Hey Andrei, thank you for listening and trying my workaround.
Did anybody encounter this bug ever since 3.4? Because I somehow didn't. MF3 ROM.
not yet... have you changed something?
The sound controls are kinda overwriting the ALSA settings so I might be inadvertently fixing the issue without knowing what it is.
I've just encountered it. alpha4 sources, MF8 ROM.
In my case (alpha0/alpha4 on MDK):
Hope it will give you a clue :)
Got problem with sound again. ROM is MG1. After reboot i've got sounds played around 2x times higher pitch. After next reboot - got no sound at all. Then turn off and on, got normal sound.
Hope it can give some ideas.
Btw, I've did neither remove battery nor turned volume off. Just turned my phone off and then on.
May be samsung uses some specific compilation flags to eliminate this problem?
I didn't occur this for at least 3 or 4 weeks, and I reflash a damn lot.
i not quite sure if this helps but everytime i play this specifc game https://play.google.com/store/apps/details?id=net.alienbug.AlphaQuadrant&hl=pt_BR my sound stop working in any version of your kernel!
It really stops the common sounds from playing, but not all of them... I don't know what happens in other kernels, but it just seem a bug from the game itself. I don't really know.
yeah but if samsung stock kernel i play this game i dont have any problem !
It really could lead to some king of hint for a solution. The sound missing is the "drop" sounds, like when we press the soft buttons.
Off topic: what kind of addictive game is that? kkkkk
Andrei, it doesn't depend on flashing. It just happens while normal usage. Btw, the game posted above really screw sound system on this kernel (i cannot try on stock kernel, though) after exit. Problem is not exactly the same, because only system sounds disappear (click sound disappear). But anyway, may be it's worth to look at this game - may be it will give some clue.
After brainstorming this, i've got an idea why this issue is present on all custom kernels. May be it sounds crazy, but i think the source of problem is ARM TrustedZone OS. As we know, TZ doesn't work (at least doesn't service requests) if you flash custom kernel or recovery. This is only common thing for all custom kernels. Probably, it's not caused by TZ itself, but some android service or application misbehave because of non-working TZ.
P.S.: i've used Adam kernel couple of weeks just to check if this issue present there. I din't get muted sound, but i've got 2x pitch sound issue which is the same issue actually. On Perseus kernel i have 2x higher or lower sound pitch time after time. Usually after reboot i have no sound at all. Second reboot fixes the issue.
I came from Adam kernel and using it for couple of days. Sometimes sounds are not working for me either. Rebooting device fix this issue but that's too much to ask when I receive a phone call and I am not able to attend it.
I thought it's issue with all custom kernel based on stock Samsung. But surprisingly, this issue is not present in Adam Kernel.
Not true. I've used Adam kernel several days just to check if issue is present. And yes - i've got this problem on Adam kernel as well. This bug is very hard to catch and hard to even reproduce, but it presents on both kernels.
Well then I think I am lucky enough that I never got any sound issue with Adam kernel before. I was using Adam kernel for nearly 3 months before switching to Perseus. I wanted to use Perseus because I used it on my S3 and I was very satisfied with it's performance.
After flashing Perseus, everything went great for couple of days or may be a week but suddenly one day I noticed that speaker sound was missing. I thought I might have broken my phone speaker but then mic was also not working. Because when I received phone calls, person at the other end could not hear me. So I flashed stock firmware with odin and Perseus kernel again, now everything was ok. But after a day or two, sound went missing again. At that time I didn't know it was caused by custom kernel. I was searching for solution on google and could not find anything useful, except that rebooting my device can fix this issue, so I was doing that since then.
But last week I was reading Perseus discussion thread on XDA, then I get to know it's caused by custom kernel. So I flashed back Adam kernel, and everything is set again. No missing sound so far. fingers crossed.
Do u have some more technical explanation how recovery can affect normal booting? I'm still thinking audio issue can be related to SELinux(or some security services related to SELinux)/TrustZone misbehave on custom kernels. Issue may happens because some service starts earlier or too late. Kind of racing condition because of SELinux/TrustZone.
I don't think it has anything to do with the security services, but I don't have any proper explanation myself; I just know that having identical kernel images in recovery & boot makes the issue non-reproducible.
Do u mean recovery and boot compiled from the same sources? If yes, then it's my case. My recovery and boot compiled from the same sources (perseus). Sometimes they have a little different build versions, but not that much to call them as different. In this setup i have sound issue sometimes. It's very rare, but still happens sometimes.
Then I don't know. I haven't had the sound issue in 4+ months.
Andrei you mentioned in your XDA thread that you posted a recompiled Philz recovery that sorted out the issue do you still have it? I have searched that XDA thread from start to finish and I can't find it. I have the issue with Philz & TWRP but I never had it when using stock recovery with CF-Autoroot and your post mentioned that the recompiled recovery seems to have fixed the issue.
Finally if the problem occurs again for me is there any way I could try and trouble shoot for you? Would logcats be enough or is there another log that should be retreived?
It's right there in the download folder... https://www.dropbox.com/sh/l9iwbpelw3fz1d6/lwwcWk8UHO
Don't bother troubleshooting it.
Why did I not see that folder before... Sorry about that. I will give that a flash through Odin and see if I get any issues thank you :).
Okay so update time :).
I am on the latest Wanam ROM that was installed by doing a proper cleanup in recovery (all the wipes) and I let it boot to the Welcome screen. I then switched the phone off and booted into download mode and Odin'ed Perseus and I get the no sound bug. I have tried many different recoveries and the problem persists even with your custom recovery Andrei. I then tried Adam Kernel (this was 2 weeks ago) and to date I have not had a single no sound bug.
Andrei could it be possible the CM branch in the kernel is causing the issue? Could we try a kernel for only Samsung and see if that resolves the problem? As I said if I knew how to troubleshoot it I would gladly help, I am just posting what I have found.
PS: I see you are no longer banned :).
There is no CM branch.
Oh I thought you had made it universal for the CM guys to use as well. Next thing I want to ask, the kernel will run fine without Synapse installed?
The CM people just use a different ramdisk. It'll run fine without Synapse..
Ummm how do I uninstall Synapse? If I go to Titanium Backup and remove Synapse after reboot it comes back again <_<. The reason why I want to remove Synapse is because I am wondering if that time delay or boot check is causing the sound to fail and want to test that.
Synapse has nothing to do with the sound.
I use a custom flag in /data/nosynapse to prevent the kernel to push the APK. Create that file and it won't install again.
Andrei I know you told me to not bother troubleshooting the issue, but I think I found something. I compared Adam & Perseus according to "common" settings and the one item that stood out was that Adam uses CFQ while you are using noop & sio. When I made the change to CFQ I never once experienced a drop in sound when I rebooted the phone or switched it on and off, when I change to defaults (noop&sio) after a while I will experience a sound drop. Is it possible that the scheduler is causing the issue? Maybe I need to set a bigger cache value?
Also I did a logcat run while the phone was booting with no sound do you want this logcat? A small piece from it has this error:
"E/AudioRil( 2594): Connect_RILD() error
E/AudioRil( 2594): audio secril init failed."
A couple of lines below that you get this:
"I/AudioFlinger( 2594): AudioFlinger's thread 0xb4067008 ready to run
W/AudioFlinger( 2594): Thread AudioOut_2 cannot connect to the power manager service"
It does not show up on a normal boot log.
Hope this helpful :).
/again sorry for going on with this but I hate not trying to solve a puzzle...
Hi Andrei.I want to uninstall synapse.You've said in previous posts create nosynapse file.How I can create nosynapse file?Can you help me?Thanks.
touch /data/nosynapse Or use a file explorer.
Thank you Andrei,it works. Using rootexplorer and go to Root/data/ and I create file,rename nosynapse after uninstall synapse.(After reboot synapse is gone-but the sound is gone too,Where did I go wrong)
Please misunderstanding me,synapse is very useful,but last month my little son playing with sTweaks and my GPU or (screen) is burning :((
Sound bug is still be worked on hopefully. But to get sound back, switch the phone off and leave it off for a short time +-2 minutes normally works and then switch it on again.
I won't be spending any time on this, marked as wontfix.
Thank you Anakha56.it works.I had uninstall synapse and the sound was come back.
This seems to be an issue of compiled kernels in general, cause unknown.
A solution is to shut off the phone completely, and turn it on again.