EmbER-Dev / EmbER

EmbER - Open Source XBMC OS for Amlogic (formally Mx Linux)
http://goo.gl/2Axk0b
GNU General Public License v2.0
30 stars 28 forks source link

Music playback crackling (mp3) #8

Closed Ilia closed 10 years ago

Ilia commented 10 years ago

found an issue when you queue a few mp3 files, the first plays fine and the second file will start with crackling noise, this happens on the MX box with latest git source.

I also found that crackling stays even though you stop the music playback, none of the xbmc music settings have any effect (afaik). Changing settings will stop the crackling (i assume it restarts teh AE)

I don't see any issues in the xbmc logs

All files have; Sample rate : 44100 Audio channels : 2

Please let me know if you need more info, i am happy to test/research.

Also some background on this thread: http://forum.xbmc.org/showthread.php?tid=192034&pid=1721634#pid1721634

Ilia commented 10 years ago

I found some error logs in dmesg:

.... [ 1729.056503] audio data unligned: pos=2872, n=928, align=16 [ 1729.086414] audio data unligned: pos=3896, n=2080, align=16 [ 1729.126441] audio data unligned: pos=4920, n=4096, align=16 [ 1729.126536] audio data unligned: pos=5944, n=992, align=16 [ 1729.156429] audio data unligned: pos=6968, n=2144, align=16 ....

j1nx commented 10 years ago

I have reproduced the same errors with multiple streaming sources. They only show on UART, not on the xbmc.log So it has to be kernel/amlplayer related.

Keep digging ...

Ilia commented 10 years ago

If it is the kernel/amlplayer then i am not sure if i would be much help.

On the other hand - i test m3 builds as well and your previous builds from buildroot_Amlogic with frodo 12.2 works with no issues - I assume it uses an old kernel. I used that kernel to build with xbmc 13 and still had same issues.

R2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/j1nx/buildroot-linux-kernel-m3.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="90ed253180dd4a9239d79c74294b3644c6bb58c5"

In terms of amlplayer googling i only found reference to this error in: https://github.com/fards/AMlogic_Meson6_030812release/blob/master/sound/soc/aml/aml_pcm.c

Ilia commented 10 years ago

Also could it be something with ALSA?

Stane1983 commented 10 years ago

I did not test that, will do in near future. Maybe to try with: libplayer - https://github.com/Stane1983/amlogic-libplayer m3 kernel - https://github.com/Stane1983/amlogic-m3 (be careful on selecting branch - different Mali driver versions)

Ilia commented 10 years ago

new libplayer doesn't seem to help :( on m3 will try new kernel next.

j1nx commented 10 years ago

@Ilia ; Funny that it actually narrows down the function because of the typo (missing 'a') in that aml_pcm.c file ;)

Ilia commented 10 years ago

@j1nx - It does help, but without understanding how it works it's not much help to me :(

And it looks like the same typo is still there: https://github.com/Stane1983/amlogic-m3/blob/2.6.34.15-mali19/sound/soc/aml/aml_pcm.c

C-Prime90 commented 10 years ago

https://github.com/CoreTech-Development/xbmc/commit/5f8b058670f274c428ed716be796f4fdc41d3661#diff-0

Ilia commented 10 years ago

Apologies for resurrecting this issue, but so far with M3 and MX with these patches i had no success. I can see patches are definitely applied but music is still crackling.

Can anyone else confirm that this has been fixed or not?

j1nx commented 10 years ago

Tested this on the TLBB and have no longer the "audio data unligned" errors on any of the streams I had issues with?

Ilia commented 10 years ago

Ok, I will do more testing then