(2016-05-30, 03:03)Manolete Wrote: (2016-05-22, 10:24)etharendil Wrote: Hello,
I'm having same issue when running android 5.1 on MXQ box with Amlogic S905. Kodi version is 16.1
There is and audio drop every 7 second with DTS soundtrack when passthrough is enabled (tested with HDMI and coax S/PDIF).
The workaround I've found is echo 2 > /sys/class/audiodsp/digital_codec then start kodi.
For some reason this stopped to work and there is no sound at all when I ran echo 2... so currently I need to do this:
start SPMC; echo 2 > /sys/class/audiodsp/digital_codec while is SPMC running, exit SPMC, start Kodi, then I have no sound drops with DTS and Dolby..
I saved sys/class/audiodsp values on clean start and compared them with values when was Kodi running without sound drops
/sys/class/audiodsp/audio_samesource before 2 then 1
/sys/class/audiodsp/digital_raw before 2 then 0
/sys/class/audiodsp/digital_codec before 0 then 2
after reboot I tried to chagned this values:
echo 1 >/sys/class/audiodsp/audio_samesource
echo 0 >/sys/class/audiodsp/digital_raw
echo 2>/sys/class/audiodsp/digital_codec
but it didn't worked and there were still drops.
my debug log (clean box start, no changes, DTS sound drops occurring every 7 seconds)
http://xbmclogs.com/pixnlqqoj
*edit
I did more digging and found out that the issue has nothing to with SPMC.
value of /sys/class/audiodsp/audio_samesource is set to 2 on box start and I'm not able to change it:
130|root@p200:/ # cat /sys/class/audiodsp/audio_samesource
2
root@p200:/ # echo 1 >/sys/class/audiodsp/audio_samesource
root@p200:/ # cat /sys/class/audiodsp/audio_samesource
2
I have to start Kodi which is changing the value 1 after start
root@p200:/ # cat /sys/class/audiodsp/audio_samesource
1
then change digital_codec to 2
root@p200:/ # echo 2 >/sys/class/audiodsp/digital_codec
restart kodi and issue with sound drops is gone..
Anyone have idea what this can be and how to fix it?
After reading this, I can confirm that this work.
For me I only had to change the /sys/class/audiodsp/digital_codec file from 0 to 2. The other two files are correct. So I think the very problem is /sys/class/audiodsp/digital_codec
I tried to change permissions to /sys/class/audiodsp/digital_codec from read/write to read only, but same as you, after a reboot all is broken again.
And this is because in every time the system boot, the init is giving again read/write permissions to that file, among others.
I found that in the init.amlogic.rc file is written the following line: chmod 666 /sys/class/audiodsp/digital_codec
but no matter if you delete this line, or if you change permission to 444 (read only) or if you write "#" before the line, it will not work, because this file (init.amlogic.rc) is rewritten every time the system boot.
So someone who had more knowlege in Android should know which part of init is writing or modifying this file, or how to change this behavior.
I hope this can be useful to someone, because we are at only one step to correct this problem.
I've got the KIII Amlogic 905 TV Box & have the spdif passtrough problem (like a click every couple of seconds & voice signal stutter every couple of minutes - 4 times - and than everything is back to normal until next stutter). I've read that thread & it looks like this is the hardware/Android OS problem. I've got also the MINIX Neo X8-H & there is no such problem. However, I had another hardware issue with it, so that is why I decided to buy a new device (KIII Amlogic).
I checked the etharendil's & Manolete's work around - it works very well! Thank you guys! Actually I needed to modify the /sys/class/audiodsp/digital_codec file from 0 to 2 only. The problem is, that as already mentioned here, the /sys/class/audiodsp/digital_codec file is created at every boot, so every time it needs to be modified manually (value 0 to 2). Therefore I would like kindly request anybody who is capable to write a script or something for permanent work around. I hope this is not much to ask - I am not able to do this by myself, because I am not a developer. I've tried to add the line:
write /sys/class/audiodsp/digital_codec 2
to init.amlogic.rc file. First of all I didn't know which location (sorry again - I am not a developer), and secondly this file (init.amlogic.rc) is also newly created at every boot, so my changes were gone & the /sys/class/audiodsp/digital_codec file is created with 0 value. Could anybody take care of this or instruct at least how to write such a script & always to have the /sys/class/audiodsp/digital_codec file created with 2 value?
Thanks in advance. Btw, I am new here, but I found this forum & this thread very helpful.
Regards