PDA

View Full Version : Audio and playback issues with recent builds?


gateway69
2008-02-23, 08:11
It seems that their is something up or has changed with the audio, I had my set up playing digital out and the last few builds now my videos play really quickly and no audio, and then eventually barfs out with an error.

ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM IEC958:AES0=6
Segmentation fault (core dumped)

I have changed nothing but I was out at the game developers conference for a few days and just wanted to update.

FearlessSpiff
2008-02-23, 16:57
You're not alone:
http://xbmc.org/forum/showthread.php?t=31361

elupus
2008-02-23, 17:38
i'm going to revert this change now. should never require something to exist

<edit>
didn't revert, but commited an alternate approach, pleas test
</edit>

gateway69
2008-02-23, 22:07
hmm I seem to be getting the same results this morning.. Sat.

ALSA lib conf.c:3949:(snd_config_expand) Unknown parameters AES0=6
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM default:AES0=6
Segmentation fault (core dumped)


more info from the log

12:01:43 T:2948565904 M:129249280 DEBUG: Load DialogProgress.xml: 59.67ms (1.71 ms xml load)
12:01:43 T:2906602384 M:129249280 DEBUG: CDVDAudioCodecPassthrough: Synced to AC3 frame
12:01:43 T:2906602384 M:129249280 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
12:01:43 T:2906602384 M:129249280 DEBUG: CALSADirectSound::CALSADirectSound - opening alsa device
12:01:43 T:2906602384 M:129249280 DEBUG: CALSADirectSound - using alsa device default:AES0=6
12:01:43 T:2906602384 M:129249280 ERROR: CALSADirectSound - pcm_open_lconf, alsa error: Invalid argument
12:01:43 T:2906602384 M:129249280 ERROR: CALSADirectSound::AddPackets - sanity failed. no valid play handle!

and a bit further down when playing back a movie

12:01:43 T:2906602384 M:125472768 DEBUG: CDVDPlayerAudio:: Discontinuty - was:64191.097000, should be:96000.000000, error:31808.903000
12:01:43 T:2906602384 M:125472768 ERROR: CALSADirectSound::AddPackets - sanity failed. no valid play handle!
12:01:43 T:2906602384 M:125472768 DEBUG: CDVDPlayerAudio:: Discontinuty - was:96173.775000, should be:128000.000000, error:31826.225000
12:01:43 T:2906602384 M:125472768 ERROR: CALSADirectSound::AddPackets - sanity failed. no valid play handle!
12:01:43 T:2906602384 M:125472768 DEBUG: CDVDPlayerAudio:: Discontinuty - was:128213.168000, should be:160000.000000, error:31786.832000

elupus
2008-02-24, 14:37
wonder if i managed to commit. maybe i didn't.

<edit> i hadn't, now i have, try again </edit>

gateway69
2008-02-24, 21:06
Still not working, well let me rephrase that, AC3 or digital out audio doesn't work, normal 2 channel audio works.

with my .asoundrc enabled.. playing a video with ac3 audio.

ALSA lib conf.c:3840:(parse_args) Unknown parameter AES0
ALSA lib conf.c:3966:(snd_config_expand) Parse arguments error: No such file or directory
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM default:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
Segmentation fault (core dumped)



with the .asoundrc removed playing a ac3 movie.

ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM IEC958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
Segmentation fault (core dumped


some info from the xbmc log

10:55:14 T:3056138080 M: 91267072 NOTICE: Getting hardware information now...
10:55:14 T:3056138080 M: 91267072 INFO: Using digital output
10:55:14 T:3056138080 M: 91267072 INFO: AC3 pass through is enabled
10:55:14 T:3056138080 M: 91267072 INFO: DTS pass through is enabled


10:55:23 T:2931043216 M: 61046784 NOTICE: Opening audio stream: 1 source: 256
10:55:23 T:2931043216 M: 61046784 NOTICE: Finding audio codec for: 86020
10:55:23 T:2931043216 M: 61046784 DEBUG: FactoryCodec - Audio: passthrough - Opening
10:55:23 T:2931043216 M: 61046784 DEBUG: SECTION:LoadDLL(Q:\system\players\dvdplayer\libdts-i486-linux.so)
10:55:23 T:2931043216 M: 61046784 DEBUG: Loading: /home/gateway/XBMC/BUILD/system/players/dvdplayer/libdts-i486-linux.so
10:55:23 T:2931043216 M: 61046784 DEBUG: SECTION:LoadDLL(Q:\system\players\dvdplayer\liba52-i486-linux.so)
10:55:23 T:2931043216 M: 61046784 DEBUG: Loading: /home/gateway/XBMC/BUILD/system/players/dvdplayer/liba52-i486-linux.so
10:55:23 T:2931043216 M: 61046784 DEBUG: FactoryCodec - Audio: passthrough - Opened
10:55:23 T:2931043216 M: 61046784 NOTICE: Creating audio thread
10:55:23 T:2914106256 M: 60358656 DEBUG: CDVDAudioCodecPassthrough: Synced to AC3 frame
10:55:23 T:2914106256 M: 60358656 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-throug
h
10:55:23 T:2914106256 M: 60358656 DEBUG: CALSADirectSound::CALSADirectSound - opening alsa device
10:55:23 T:2914106256 M: 60358656 DEBUG: CALSADirectSound - using alsa device IEC958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
10:55:23 T:2914106256 M: 60358656 ERROR: CALSADirectSound - pcm_open_lconf, alsa error: No such file or directory
10:55:23 T:2914106256 M: 60358656 ERROR: CALSADirectSound::AddPackets - sanity failed. no valid play handle!
10:55:23 T:2914106256 M: 60358656 DEBUG: CDVDPlayerAudio:: Resync - clock:0.000000, delay:-32000.000000



then a bunch of this

10:55:23 T:2914106256 M: 58548224 ERROR: CALSADirectSound::AddPackets - sanity failed. no valid play handle!
10:55:23 T:2914106256 M: 58548224 DEBUG: CDVDPlayerAudio:: Discontinuty - was:928090.520000, should be:960000.000000, error:31909
.480000


if i hit x to stop the video it core dumps..

this is w/o .asoundrc

with .asoundrc set same file played, no audio, hitting x also core dumps

ALSA lib conf.c:3949:(snd_config_expand) Unknown parameters AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM default:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
Segmentation fault (core dumped)


11:02:25 T:2928544656 M: 54738944 NOTICE: Opening audio stream: 1 source: 256
11:02:25 T:2928544656 M: 54738944 NOTICE: Finding audio codec for: 86020
11:02:25 T:2928544656 M: 54738944 DEBUG: FactoryCodec - Audio: passthrough - Opening
11:02:25 T:2928544656 M: 54738944 DEBUG: SECTION:LoadDLL(Q:\system\players\dvdplayer\libdts-i486-linux.so)
11:02:25 T:2928544656 M: 54738944 DEBUG: Loading: /home/gateway/XBMC/BUILD/system/players/dvdplayer/libdts-i486-linux.so
11:02:25 T:2928544656 M: 54599680 DEBUG: SECTION:LoadDLL(Q:\system\players\dvdplayer\liba52-i486-linux.so)
11:02:25 T:2928544656 M: 54599680 DEBUG: Loading: /home/gateway/XBMC/BUILD/system/players/dvdplayer/liba52-i486-linux.so
11:02:25 T:2920151952 M: 54599680 DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
11:02:25 T:2928544656 M: 54599680 DEBUG: FactoryCodec - Audio: passthrough - Opened
11:02:25 T:2928544656 M: 54599680 NOTICE: Creating audio thread
11:02:25 T:2911607696 M: 54599680 DEBUG: Running thread 2911607696
11:02:25 T:2911607696 M: 54599680 DEBUG: thread start, auto delete: 0
11:02:25 T:2911607696 M: 54599680 NOTICE: running thread: CDVDPlayerAudio::Process()
11:02:25 T:2928544656 M: 54599680 DEBUG: Playback has started
11:02:25 T:2928544656 M: 54599680 INFO: Loading skin file: DialogProgress.xml
11:02:25 T:2928544656 M: 54599680 DEBUG: GL: Sharing screen surface for thread 2928544656
11:02:25 T:2928544656 M: 54599680 DEBUG: Load DialogProgress.xml: 57.47ms (0.79 ms xml load)
11:02:25 T:2911607696 M: 53346304 DEBUG: CDVDAudioCodecPassthrough: Synced to AC3 frame
11:02:25 T:2911607696 M: 53346304 NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-throug
h
11:02:25 T:2911607696 M: 53346304 DEBUG: CALSADirectSound::CALSADirectSound - opening alsa device
11:02:25 T:2911607696 M: 53346304 DEBUG: CALSADirectSound - using alsa device default:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
11:02:25 T:2911607696 M: 53346304 ERROR: CALSADirectSound - pcm_open_lconf, alsa error: Invalid argument


conclusion.

2 channel audio files work, anything with digital audio ac3, dolby plays fast with no audio.

sorry for all the pastes, if you need more info i can submit all data to a pastbin

FearlessSpiff
2008-02-25, 19:10
Just made a test with build 11793 and i have the exact same results as gateway69. But i tested only without .asoundrc because i don't have one...

elupus
2008-02-25, 19:20
stupid damn alsa. why are they segfaulting on invalid device string...

oh and why are you guys using default as device? it doesn't work with the default of iec958?

I should probably only apply those options if it is iec958 thou. So if you use a custom string, it won't be overridden.

gateway69
2008-02-25, 23:36
Originally way back when it was recommended to use the demo-asoundrc or what ever the file was to your root, I made a small change since my digital out was on device 1 and not 0, so I just use default for both options in XBMC, I can remove it if its not needed anymore, but thats not the issue since I tried it with out both options.

was their a Ubuntu update recently with a new alsa driver or something?

let me know if you want me to test anything new.

elupus
2008-02-26, 04:14
now it only applies the AESX=XX options if your devicestring is iec958, (since that is probably the only one that can take those options)

on my ubuntu the iec958 pcm device is defined in /usr/share/alsa/pcm/iec958.conf

Coca Cola Zero
2008-02-26, 05:25
oh and why are you guys using default as device? it doesn't work with the default of iec958?



On my HTPC with AuzenTech X-Mystique sound card, using iec958 as the passthrough device does not work -- it results in the fast video/no sound problem. Using 'default' works fine and the sound appears to be passing through my toslink out as expected into the audio receiver.

On my HTPC with Sondigo Inferno sound card, using default as the passthrough device does not work. Using 'iec958' works fine and the sound appears to be passing my toslink out as expected into the audio receiver.

Both systems are running Ubuntu 7.10. The system with the Inferno sound card has a newer build of ALSA (1.0.16) since the one that ships with Ubuntu 7.10 (1.0.14) doesn't support the Inferno but 1.0.16 does. I'm not sure if it that or just the difference in the sound card modules that cause the discrepancy as to what device I have to use to get good sound from XBMC passthru. I just tinkered around with each box enough to get things running well and called it a day, but if you need any debug info that is specific to either of the two sound cards I run, let me know.

gateway69
2008-02-26, 05:58
my problem seems to be fixed with the audio and fast playing videos that are non a3c both of my xbmc settings are set to default.

BLKMGK
2008-02-27, 02:25
I'm not getting fast video but I do not think I'm getting full surround properly either. IMO we need a set of test sounds to check for proper playback while we're at it :(

Hippo
2008-02-27, 04:44
Here's a test sound you can use:
http://www.lynnepublishing.com/surround/www_lynnemusic_com_surround_test.ac3
It's my standard to make sure I'm getting sound to all the channels.

She has some neat surround sound music to download too.

BLKMGK
2008-02-27, 05:13
Thank you!

Edit: Okay, it's coming across as Dolby Digital playing those samples so it looks like my encoding is at fault. Might try muxing one of them with a vid and see how that works out - perhaps it's just my tools. Oddly when I play the surround test as THX it's fine but as Dolby Digital it's not playing the rear channels. Probably something stupid on my part, I admit some of this sound stuff screws with my head. That sample does appear to be a good one for testing. Has to be played as "music" FWIW.

soder
2008-02-27, 10:54
Maybe you can help me with my problem. I installed Ubuntu 7.10 this weekend, and I cant get sound working. Only through my analog headphones.
In mp3s, vidoes, and videos with ac3.
BUT, in XBMC, the latest, or at least the version from this weekend, I get sound from i.e some .mkv-movies in ac3, through my coax to my reciever, but not mp3s and soo...

What do I have do in Ubuntu to make the sound work in digital?
I use the automatic options in preferences.
/Söder

althekiller
2008-02-27, 19:38
@soder, please resolve your ubuntu problems in their forums. If the problem persists only in XBMC then ask here.

Noodle
2008-03-20, 07:24
I had same issue as soder. and fixed by turn IEC958 on.

Soder, you can use amixer to check if IEC958 is off (just type "amixer" in terminal). if so, use some command line like: "amixer IEC958 Playback on" to turn it on. You can test it from "system" -> "preference" -> "Sound", and then press "Test" button, if you can hear sound, Music play in XBMC should be fine.

Noodle
2008-03-20, 08:52
Ok, the command is:
amixer sget IEC958
to check.
amixer sset IEC958 Playback on
to turn it on.