From: SourceForge.net <no...@so...> - 2005-08-01 21:33:07
|
Bugs item #1226595, was opened at 2005-06-23 23:17 Message generated for change (Comment added) made by skandalfo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109655&aid=1226595&group_id=9655 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: xine Group: xine failure Status: Open Resolution: None Priority: 5 Submitted By: Karsten Jeppesen (bjowulf) Assigned to: Nobody/Anonymous (nobody) Summary: libxine fails to switch from alsa 2.0 to alsa 5.1 Initial Comment: If a movie ( ex Phantom of the Opera ) has 2.0 sound during the menu, but 5.1 sound during the movie, and 5.1 sound is requsted, then libxine will fail to open the plug:surround51 due to the resource being busy. Apparently xine fails to close the 2.0 stream before starting the 5.1 stream. I verified this by stripping the 2.0 sound off the menu system. Then the menu will be mute, but the 5.1 sound of the movie will play corectly and xine will not crash. ---------------------------------------------------------------------- Comment By: Juan Jesús García de Soria Lucen (skandalfo) Date: 2005-08-01 23:33 Message: Logged In: YES user_id=95940 It happens to me too. It seems that the /usr/share/alsa/cards/NFORCE.conf I'm using for my Nforce3 Athlon64 Gentoo system actually seems to use dmix for the default (2.0) PCM. Actually I don't know whether the fix should belong rather to alsa-lib: snd_pcm_open() should block until any "pending" snd_pcm_close() completes; actually it should be snd_pcm_close() the one to block until proper completion. ---------------------------------------------------------------------- Comment By: Daniel Hulme (zuluone) Date: 2005-07-08 00:42 Message: Logged In: YES user_id=841268 It seems to be caused by dmix. Here it works fine with dmix turned off but breaks in the manner described with it turned on. ---------------------------------------------------------------------- Comment By: Karsten Jeppesen (bjowulf) Date: 2005-06-25 02:42 Message: Logged In: YES user_id=604647 Possibly solved: I came up with a workaround and when it is tested, then I will post it. The misery starts because the snd_pcm_open fails in audio_alsa_out.c Most likely it fails because not enough time has passed since the 2.0 stream was closed. So there might still be sound in the buffers. I tried inserting snd_pcm_drop calls just before the snd_pcm_close calls, but that didn't make one bit difference. Then I thought - let us put in a loop on this one, and replaced the snd_pcm_open with a looped structure repeating the open and just sleeping a second until the snd_pcm_open succeedes. That made the difference. So I have it running, I just need to find out if the snd_pcm_drop calls can be eliminated. Karsten ---------------------------------------------------------------------- Comment By: Karsten Jeppesen (bjowulf) Date: 2005-06-24 21:51 Message: Logged In: YES user_id=604647 I made a test dvd if anybody is interested: I got it down to 30MB+ and packaged it up to 29M. <http://jeppesens.com/testdvd.bz2> These are just the raw files. If I had made an iso it would have been bigger. So unpack using tar -xjf testdvd.bz2 and burn the video files to a DVD. TEST Procedure: The dvd contains just the menu system plus a few seconds on the main title. The menu system is in 2.0 sound The movie is in 5.1 sound. The Menu should come up fine. Select "Play Movie" The trailer part of the menu should play fine. (still 2.0) Then xine will fail opening the plug:surround51 when starting the movie. If you see the Warner Brothers logo (which is the only thing included in the movie part) then your implementation is better than mine. If the test goes as here then you will not see the Warber Bros logo. Note that I have a 5.1 sound system attached to the analog outputs from my built-in sound card. Xine is set to use 5.1 sound. I have (to the best of my abilities at this time) verified that Xine opens "default" to play the menu sound. It then closes this stream and attempts to open "plug:surround51", but fails - getting a "device unavailable or resource busy" error Karsten ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=109655&aid=1226595&group_id=9655 |