Open smallint opened 10 years ago
Hi Jan, I don't know this issue...
Excuse me my bad english.
Using a wandboard, I think I have the same issue (or almost the same issue).
In april, CruX put a patch in Wandboard forum to "fix" the issue: http://forums.wandboard.org/viewtopic.php?f=12&t=364&st=0&sk=t&sd=a&sid=8a62dfae88ba017676d5935def6ec207#p1554
My latest kernel was made in may or june, I dont remember and that patch worked.
Today I made a new kernel, with latest patches from Wandboard, but the problem still happen. The patch from Crux dont apply anymore - or at least I am unable to appy it.
I dont know if this is an issue with wandboard or xbmc.
My config: wandboard quad, kernel 3.10.17 from arch, compiled today, xbmc-imx-git-13.20140806 .
I am using the wandboard plugged to a Sony TV by HDMI. The audio goes by HDMI, so I am using the TV audio.
Hi
In fact Crux patch was a porting of a workaround I posted for 3.0.35 kernel because there was an issue with 24 bits samples But now this issue is solved in helix (see this thread : https://github.com/xbmc-imx6/xbmc/commit/fd3d7aa53fb2ae45533bd9d65af35adb222898b3#commitcomment-6753474) It was also fixed on Gotham by Rudi (not fully aligned with upstream) but that also works (https://github.com/xbmc-imx6/xbmc/pull/59)
Can you confirm whether you use PCM or non audio (dolby/dts passthrough) on hdmi please ?
Sorry, but I dont know how to give an answer... XBMC config is: Audio output device = imx-hdmi-soc, HDMI Number of channels =2.0 Output configuration =optimized Stereo upmix off Normalize.... off Resample quality high Enable passthrough OFF
And in audio menu (when playing a video), XBMC shows this: audio stream: Unknown - AC3 5.1 (1/1) Enable passthrough off
Any plans to get the fix from Rudi in your main branch ?
OK so in your configuration, XBMC decodes the AC3 stream and sends it as PCM to HDMI Really strange : I very often use a similar conf (yet not on wandboard but it should not behave differently) could you post your xbmc.log file on a online paste service please ?
Done: http://pastebin.com/3zM6n9sH
With audio debug enabled http://pastebin.com/s2jkwEde
I found something. For the first time, I tried XBMC in Windows. Using the same settings and the same video, I got the same noise. But with this config, the audio is perfect: system-> audio output -> enable passthrough (on) Passthroug output device -> DirectSound:HDMI -1- Sony TV (AMD HIGH DEFINITION AUDIO DEVICE).... Dolby Digital AC3 capable receiver - ON DTS capable device - OFF Enable Dolby Digital transcoding - Off
But, with the same settings (but for arm) in wandboard, I get a very strange noise, something like a analogic tv almost out of sync - "pupupupupu" fast. I can record the sound if you wish. This is the log from wandboard: http://pastebin.com/eN6GcF1P
Hey there, I can confirm that I had the noise audio issue as well a few days ago. Sadly, I don't know how to reproduce it.
I watched multiple files yesterday and the issue was non-existent. I'll try to reproduce it tonight but I really can't promise anything.
I'm using a wandboard quad and audio through HDMI. No passthrough though.
Cheers
@LeoKesler : Please install the ALSA configuration files mentioned in this comment. Also apply this patch to your XBMC source. After re-selecting your audio device, passthrough mode should work.
The descriptions here seem to imply that there is probably a generic bug when decoding AC3 in software. I have not tried this, as I always use passthrough.
Installing only the alsa configs duplicate the devices. In xbmc, I have now in both audio output and passthrough audio device:
imx-spdif, S/PDIF # and imx-spdif, S/PDIF #0
imx-hdmi-soc, HDMI # and imx-hdmi-soc #0
For sound work, I need to select imx-hdmi-soc #0 in both audio output and passthrough, with passthrough ON and Dolby AC3 on. The sound works correctly.
The patch is already installed, because it is available in master branch (10/08/2014).
Off topic, is possible to connect my wandboard to my TV, directly, using the spdif ? The sound will work or I need a receiver ?
If you have duplicate audio devices then the patch is not installed. It was merged into master 12/08/2014. If it's installed, your xbmc.log should not show any 'sysdefault:' devices.
TVs usually have SPDIF out, not SPDIF in. So I would be very surprised that works. And why would you want to do that if you have HDMI?
@LeoKesler which distro do you use ? The patch pointed by Rudi has been merged and the ALSA configuration were provided as samples so that distro can package them properly so you should have all of this "out of the box"
Also to come back to your issue and give you a little understanding : You are no longer hurt by the 24 bits samples issue that was worked around in the initial path you mention at the beginning. When you select passthrough, the AC3 stream is sent as if to your receiver which decodes it. Without good alsa configuration odds are you remained in audio mode which created the "pupupupupu" noise ;) When you don't select passthrough, AC3 is decoded by xbmc which sends pcm 2.0 streams to your receiver If you have noise even with windows then there might be something bad with xbmc... could you share your "bad" sample ?
If your TV has an SDPIF input, it can work but it general TV have spdif output... But anyway HDMI is as good as spdif (and even better if high bit rate is supported) and handier so why would you want to do this ?
@warped-rudi , the patch are merged in main xbmc-imx6. XBMC log shows 5 devices. Check my log: http://pastebin.com/5pwytitC About the spdif, thanks for the explanation. I never had a receiver and almost all time, I only use wireless headphones.
@wolfgar , I am starting to understand. Thank you for using your time to give some info. The spidf thing is just a curiosity, because I never used or have experience/knowledge about it.
Here is the problematic file: https://www.mediafire.com/?5i5rmb5gburjp0m Look at 00:15-00:25 aprox. There is a picture too, from XBMC windows, with the (problematic) audio settings . The same noise happen.
Your logs http://pastebin.com/3zM6n9sH and http://pastebin.com/eN6GcF1P say:
Starting XBMC (13.0-RC1 Git:20140501-87ad7ff). Platform: ARM Linux 32-bit
This is by far not the latest version we have! It does not contain the mentioned patch and misses a lot more enhancements. Where did you get it from? Our master is at 13.2-BETA1.
@warped-rudi good question, I got from https://github.com/archlinuxarm/PKGBUILDs/tree/master/alarm/xbmc-imx. I installed correctly in Arch and in my Debian. I will double check. edit: Ok, found the issue with old version: a crazy simbolic link going to my backup. I already remove the link and the old xbmc from my backup. Sorry.
Using the correct version, the issue with noise still happens if I dont enable the passthrough.
Anyway, I would like to apologize to everyone because I made a stupid mistake on my system and due to this error, I was using an older version of the program.I'm very ashamed.
@LeoKesler , no problem : I was surprised because I know @warped-rudi shared and explained these ALSA configuration in another thread. And I also saw that archarmlinux was properly updated accordingly...
As a funny side note, it is amazing to read how rudi's and my comments were close regarding hdmi (I had not read his answer before posting mine...)
So I can close this issue now, right ?
If I use HDMI without enable passthrough, the noise still happen. If you wish, you can test using this file: https://www.mediafire.com/?5i5rmb5gburjp0m . If I use HDMI with passthrough enabled, there is no noise.
The user @CrawX have issues with noise too.
The file plays flawless here on CuBox-i kernel 3.14.14.
The same here : no issue on 3.0.35 kernel neither with the master-pr branch (helix) nor with the master branch (gotham)
Sorry to disappoint, but the file provided by @LeoKesler doesn't have any noise audio for me.
However, I still experience noise problems with various files (1080p with dts/ac3 audio). The only related messages I can see in the logs are multiple occurences of
10:40:23 T:1559733280 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:139023229.559498, should be:138910666.666667, error:-112562.892831
10:40:23 T:1559733280 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:139022486.999667, should be:138910666.666667, error:-111820.333000
10:40:25 T:1559733280 DEBUG: CDVDPlayerAudio:: Discontinuity2 - was:140926559.333667, should be:140894904.877300, error:-31654.456366
10:40:47 T:1559733280 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:162766862.879300, should be:162655666.666667, error:-111196.212634
10:40:47 T:1559733280 DEBUG: CDVDPlayerAudio:: Discontinuity1 - was:162769116.666667, should be:162655666.666667, error:-113450.000000
10:40:49 T:1559733280 DEBUG: CDVDPlayerAudio:: Discontinuity2 - was:164673721.333667, should be:164642814.292010, error:-30907.041656
By load I mean really minor stuff, like downloading with speeds of a few MB/s and stuff like that. Stopping that activitiy seems to stop the error messages which in turn does stop the audio problems.
After putting some load on the device, the error messages come back. At first, I cant notice anything. After a few min, the audio starts getting weird (like buzzing when the volume gets louder). From time to time there are parts of the audio that get played twice. Just a split second (like a word being repeated).
The log entries I posted seem directly related to the distortion. As soon as one of those messages occurs, the audio seems to get distorted.
Restarting the playback does fix those issues, but just for a few mins.
Im using xbmc (newest rev) on a wandboard quad, kernel 3.10.17 on archlinux. Audio via HDMI, no passthrough. I hope this helps
Cheers
@CrawX thanks for your feedback, your tests make sense and you likely experience audio underrun issues.. It also explains why we are not able to reproduce as easily the issue We can very likely solve the issue by increasing buffering and/or by setting a higher priority to the audio thread ... I will try to reproduce to check if I can fix ...
Okay great. I'd be happy to test. Thanks.
In my Arch installation running the lastest Git on a cubox I am facing noisy audio after some minutes watching e.g. livetv. It sounds like a radio station slighty tuned off its frequency. It recovers after some minutes. Does anyone experience that as well? I don't remember such issue on my wandboard installation running an older xbmc and kernel 3.0.17.