Closed ngoquang2708 closed 8 years ago
Working now with this 71d544bfe690c8cec1699e4988bea30358a0b28a. Need a better solution.
Stop working again after rebase upstream.
@koquantam This thing look like crap again :(
We're back with CM-11.0 :D
Did you tried REmarking mediaserver as root user?
OMG, sound back again. I hate it so much.
How? Randomly?
Recompile the source again, and it work again. Don't know why :(
Found some interesting things. We didn't use audio_policy.*.so
at all since CM-12.1. Deleted all of them, and sound stills working.
Then, I discovered that, CM-12.1 use libaudiopolicymanagerdefault.so
. So we should focus on them.
The source is located at frameworks/av/services/audiopolicy
.
Lol, I known that lib :D but thought it was in hardware frameworks
Found some thing interesting. I can route audio from mic to speaker by echo 1,2,7 > /dev/pipe/mmi.audio.ctrl
, route to earpiece by echo 1,1,7 > /dev/pipe/mmi.audio.ctrl
. I don't known the way android route app's sound to speaker. Any ideas?
@koquantam
@corphish
Seem this fix our issue completely https://github.com/ngoquang2708/android_device_samsung_vivalto3gvn/commit/0f9e32856267bac253ccb3bd07dc869604177464. I try 1 clean build with that flag enabled and another clean build with that flag disabled to confirm it. @koquantam If you have time, pleases confirm this.
OK, CM12.1 is done with me, now I'm doing for our vivalto
Making clean build now
This situation was just like RIL :D One BoardConfig flag solves all
Hope so :)
Confirmed
I think we have already known this happen while reading the commit message from your referenced commit
Hmm... somehow audio doesn't work again o.O
Aggh, just happened to me with the last build, again. Doing a clean build, again :(
Since CM-11.0, this audio issue is always suck.
Totally sucks
But at least it works for you the first time, right :)
I guess, this is our problem
06-28 11:50:49.637 251 251 E TinyAlsaUtils: open snd control failed.
I just restart an audio is working again, what the heck! FALSE ALARM~
Oh you've told in description :D
About this:
06-28 12:01:30.284 148 148 E TinyAlsaUtils: open snd control failed: No such file or directory
I have it too, it just cannot open one card, we have 3 we have 4:
06-28 12:01:30.284 148 148 I audio_hw_primary: s_tinycard = 0, s_vaudio = -1,s_voip = 2, s_bt_sco = 3,s_vaudio_w is 1
Should we use again the mediaserver hack?
mediaserver
already had the right permission to access /dev/snd/*
. The fact is that audio work for some times.
But we should try.
About my previous comment about sound working again after reboot, sorry, false alarm. I am using my other build that with audio working, not my latest build :(
Can I ask you that your audio stop working with different builds or with the same build?
It work for the first time in the last build from yesterday, then stopped working after ONE RESTART LOL
OK, one more clue.
That's all :D
If we have to touch mediaserver again, then I think it's init problem (system/core)
Edit: The hack isn't working anymore LOL
Try this magic.diff.zip.
Is that real magic? :D
Yes
OK, gonna try with my Core Prime :D
Seems everything in our tree works with it
Do not need to make a clean build, just rebuild audio.primary.scx15.so
.
Right
Btw, how to rebuild a blob only? Just "mka bacon" or something else?
cd to that audio dir
then mm
Use mmp
, it will push to your phone automatically using adb
.
Wow, thanks
You never read CM's Wiki, right :)
Tons of great things there.
I just know basic parameters, like mka :D
I've read it, and I missed that mka
, until you told me.
LOL
Audio is not work because the audio module cannot access
/dev/snd/controlC%d
due to permission denies. Need to find out what service load audio module and set a proper user or group for it. My first guess ismediaserver
, but it already hadsystem
group, which is/dev/snd/controlC%d
has. Don't know why audio module cannot access it though.