Closed Brandon-McBride closed 5 years ago
Has anyone found a fix for this yet? Experiencing the exact same symptoms as described.
Hi Hunters! I'm actually experiencing the same issue. Here is my config:
I've installed NetHunter yesterday fixed differents littles bugs then I've installed the metapakages kaliFull make update/upgrade and dist-upgrade so now I have a full kali installation, everything works fine and i'm very happy about it! :-D But then I realized that I have no sound at all from my speakers in Android, if my plug my headphones the sound works fine.
I really dont want to flash nethunter again and loose all the updates wich take a while to install!
@lordcactus, I was wondering if you find a fix before I try to setup everything again from scratch.
Thanks in advance.
Edit Build Prop
I Forget Which Line
But Download BuildProp Editor By Jrummy
And Set Value Of Sound "0" If One And Set "1" is Already "0"
On Sat, 1 Sep 2018, 9:20 pm jcleberre22, notifications@github.com wrote:
Hi Hunters! I'm actually experiencing the same issue. Here is my config:
- Rooted Nexus 6 (Shamu) on Nougat 7.1.1 Stock
- NetHunter from https://build.nethunter.com/release/nougat/ flashed with TWRP.
I've installed NetHunter yesterday fixed differents littles bugs then I've installed the metapakages kaliFull make update/upgrade and dist-upgrade so now I have a full kali installation, everything works fine and i'm very happy about it! :-D But then I realized that I have no sound at all from my speakers in Android, if my plug my headphones the sound works fine.
I really dont want to flash nethunter again and loose all the updates wich take a while to install!
@lordcactus https://github.com/lordcactus, I was wondering if you find a fix before I try to setup everything again from scratch.
Thanks in advance.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/offensive-security/kali-nethunter/issues/916#issuecomment-417868369, or mute the thread https://github.com/notifications/unsubscribe-auth/AiQi32r5MHxDhPZnNviHp8q35gupMNSoks5uWqyygaJpZM4OLWKt .
If the solution given by @amzker doesn't work for you (it didn't for me, I tried it when trying to fix my nexus 6) my contrived solution is here https://github.com/offensive-security/kali-nethunter/issues/873 although you do reinstall nethunter in the process.
Hello guys, thank you for your quick replies. I've tried the build prop I've try to change these props : -persist.audio.fluence.speaker from false to true -fmas.spkr_sgain from 0 to 1 then restart the phone. But it didn't work and I don't see any other lines which could do the job :-( So I'm gonna try the solution from @lordcactus.
I've quickly check the thread and I see that your solution is to use another build wich is https://github.com/offensive-security/kali-nethunter/files/1846693/kernel-nethunter-shamu-nougat-20180317_185442.zip.
So I suppose that all I've to do is boot into TWRP and install this zip. Please tell me if i'm wrong or if I need to do something else before like uninstall NH, wipe a partition or whatever. And will I loose the updates from kali? I mean its already download into my phone and it took really long time so if I could save it and dont have to download all the packages again during the next installation it would be nice.
In an other hand I've tried: 'dmseg | grep audio' in anroidsu terminal and here is the result i found it maybe intresting to find a fix if someone have any idea:
Good info; and yes download the kernel for the specific build of nh linked in my comment https://github.com/offensive-security/kali-nethunter/issues/873#issuecomment-376067765 and then flash thru twrp. Let me know how you go bro.
I am not entirely sure, more testing needs to be completed; however, I believe this error is could be equivalent to an error code in https://github.com/torvalds/linux/blob/master/sound/soc/qcom/qdsp6/q6asm.c as per line 498 - 519. This explains what the error is doing https://stackoverflow.com/questions/2559602/spin-lock-irqsave-vs-spin-lock-irq. Essentially it locks the audio component until a new session is established.
Ok I will do it tomorrow because I need my phone up today then I'll tell you how it's going. Thanks for your time bro have a good evening.
Le dim. 2 sept. 2018 à 17:32, lordcactus notifications@github.com a écrit :
Good info; and yes download the kernel for the specific build of nh linked in my comment #873 (comment) https://github.com/offensive-security/kali-nethunter/issues/873#issuecomment-376067765 and then flash thru twrp. Let me know how you go bro.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/offensive-security/kali-nethunter/issues/916#issuecomment-417934926, or mute the thread https://github.com/notifications/unsubscribe-auth/ALJAfHIZfKN9DVB5W3wpoWOvVTO8JCLSks5uW-v6gaJpZM4OLWKt .
Cheers. Just to be all safe though and I'm sure you would have already but in case you haven't, just make a backup with titanium backup etc. This really needs to be resolved further up the chain and get a better fix than changing the build prop or flashing a working kernel with a working zimage-dtb.
Ok no problem I will do the backup and try to get little bit deeper on the code you've found see if we can fix it before flashing I'll keep you in touch ;-)
I've just check the code and i don't think it have something to do with the spin lock, the error is thrown because the session_id is set to -1 and its given in parameters to the function so we have to find out where the function is called and where the -1 comes from i've just downloded the kernel project and it's extracting but it takes a while when its finish i will open it in netbeans and try to find the calls you could do the same if you have time. to be continued...^^
Could you please post the output of 'dmseg | grep audio' while your headphones are working/in use? here is a link to the google library for android-msm-shamu-3.10-nougat-mr1.7, which might be helpful when looking for the calls: https://android.googlesource.com/kernel/msm/+/android-msm-shamu-3.10-nougat-mr1.7/sound/soc/msm/qdsp6v2/
I'm not sure what is setting the session_id value to -1; I'm going to keep looking through the objects in the link I just posted, and once we find it hopefully it'll just be a matter of updating the value.
Hi bro, I was looking to this repository aswell,
for the dmesg:
I start the phone, do dmesg its empty, then i open vlc and play a sound without headphone the 3 errors are sent from the kernel in this order:
then I plug my headphone press play then dmesg again no more messages are sent I unplug the headphone press play again the same 3 error are sent again.
So we are on the good way,
I found the 1st call msm_pcm_mmfx_enable_send in the file msm-compress-q6-v2.c:
there is also an audio_client object in this class which I think contain the session but I didn't find it yet
I find our session_id, in q6asm.c line 1157 & 1158:
sid = (data->token >> 8) & 0x0F; ac = q6asm_get_audio_client(sid);
but i dont know what is this data token maybe it's more clear for you
Also in line 4796 there is our 2nd error message: pr_err("%s: invalid session_id = %d\n", func, session_id);
And now I just found our last msg which is in msm-qti-pp-config.c line 105: pr_err("%s: Could not get audio client for session: %d\n",func, fe_dai.strm_id);
yay. it's a bitwise operation ^^ https://stackoverflow.com/questions/12989969/what-does-0x0f-mean-and-what-does-this-code-mean
ok i see but i think this is not our problem this is the main source of the messages now we have to go up to find what cause this in higher layers I've checked this fe_dai object and found it in msm_pcm_routing-v2.c I think this is more what we are looking for
I've maybe found where the problem could be, could you send me your /system/etc/mixer_paths.xml please
For sure man, this is just a logical operation and client and session id be being stored in the "ac" variable: _id = (data->token >> 8) & 0x0F; ac = q6asm_get_audioclient(sid);
I think you are right. I believe we need to establish why fe_dai.strm_id is producing a -1 value when the headphones are pulled out.
I'll send it thru now bro
our mixer paths are the same :(
ye I had a hunch. To get your phone working, try flashing the nh kernel. It shouldn't break anything but if it does, we can download the stock/similar kernel and flash that (or compile one from sources) and flash that.
yes i'm pretty sure it's gonna work by flashing NH but we won't know where the problem comes from...
Can you check your ALSA version, cat /proc/asound/version
shamu:/ # cat /proc/asound/version Advanced Linux Sound Architecture Driver Version k3.10.40-g29a4309-dirty. shamu:/ #
ah!
I have k3.10.40-g90f4f12.
this should be it!
we need to find out how to change the alsa driver on android and i put your version then see if it works
good thinking 99, I'll look into how to do that now
We can probably rule out the 'dmseg | grep audio' error as I checked the same command on my working phone and I got the error too? I only got it three times but still, my sound is working
Does your /system/bin/audioserver start when you play something? idk youtube etc. to check use top, htop or just ps | grep audio
ok good to know so know just focus on the Alsa driver and if it doesnt work i will flash NH. I've find two alsa library files in system/lib: libalsautils.so and libtinyalsa.so maybe replacing them by yours could do the job but I'm not sure at least we could try and yes my audioserver is running
something may break so definitely create a backup of the .so* files. alsa_object_files.zip
yes i did already thanks
after change the so files and reboot youtube and vlc crashes if i try to play a sound. then i've replace by the backuped files and restart again android does not start anymore^^
my /system is empty in TWRP I think it didnt like it
you have to mount /system for system to populate.
ok it's back
so i think i'm gonna flash NH now
Yeah, see how it goes. The change in shared objects might have done something spooky. I don't know. Either way, assuming you still have a backup of your system, it shouldn't be too hard to reverse. So if flashing the nh kernel doesnt work now, try it once your system has been restored.
No I've tried and it's the same works only with headphones
That's weird, but your phone boots again? ^
Nh flashed and sound works!!!
yes it was booting after i went to twrp delete the so files an put my backuped so files again
surprise, surprise lmfao. it's definitely a problem with something in the zImage-dtb (which is very general, but eh). It's been interesting hashing this stuff out though, and looking at some possible root causes. glad we solved your problem though bro :)
Yes it's been very intresting looking in the depth of linux kernel and android source code. And the best thing in all of that is that i didnt loose anything all my updates in kali chroot are still there and everything looks fine! :) It was also cool to work with you, i've seen that your working on a personnal assistant project in your repo, I'm also working on a AI's project based on python scripts it could be nice to speak together about other stuff if you want tell me and I'll share more personal contact with you ;-) Anyway thanks a lot for your precious help and your time bro
Yeah, I suspected that would be the case. The kernel doesn't interact with application level stuffs directly. Thanks, yeah, likewise. Ah yeah, my github page is very lowkey. indeed, I asked that they update a few lines of code over a year ago to something I wrote haha. Cheers.
Device:
Nexus 6 Shamu
OS version (KitKat/Lollipop/Marshmallow/Nougat):
Nougat Rom Pure Nexus 7.1.2_r17 https://forum.xda-developers.com/nexus-6/development/rom-pure-nexus-project-t3148214
Built from repo (date and build command) or downloaded from website (links):
https://build.nethunter.com/nightly/3.15.4-20170629-1630/
kernel-nethunter-shamu-nougat-3.15.4-20170629-1630.zip nethunter-generic-armhf-kalifs-full-rolling-3.15.4-20170629-1630.zip
Output of
cat /proc/version
in adb shell or NetHunter Terminal:Linux version 3.10.40-g90f4f12 (root@nh-buildbox) (gcc version 4.7 (GCC) ) #1 SMP PREEMPT Wed Jan 25 18:18:56 CST 2017
Issue:
I am not getting any sound at all i tried rebooting/reinstalling I also tried it on LineageOS 14.1 and i dont have any sound on that either.
The sound does work with headphones. The sound also worked before i installed Nethunter. i flashed the nighlty before this one and that one also has no sound.