Re: mplayer destroys PCM output over SPDIF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Artem Makhutov wrote:
> Hello,
> 
> I have an Asrock ALiveSATA2-GLAN mainboard with the onboard ALC888
> soundcard. The soundcard is connected by SPDIF to an external decoder.
> 
> AC3 and PCM playback works fine with xine and mplayer, but after playing
> a movie with AC3 sound by using mlpayer it destroys the PCM output. So I
> don't get any PCM / stereo sound out of the card any more (by using
> xine/mplayer/aplay). AC3 sound still works perfect.
> 
> To get PCM working again, I have to restore my asound.state and reload
> the mixer. I can't see any differences in the mixer (by using alsamixer)
> before and after playing an AC3 file with mplayer, but there is a
> difference in the asound.state file.
> 
> I have attached the both files, and a diff between them. Any
> suggestions, how to make mplayer/alsa not destoying my PCM output?
> 
> Thanks, Artem
> 

I haven't a suggestion, but I have attached below a couple of email 
messages from the alsa-devel list that seem to have a direct 
relationship to your problem.  Takashi's suggestion is to use the 
iecset utility from alsa-utils.

> Dear alsa-devel,
> 
> I recently advised this list of some problems I experienced with the
> SPDIF audio / non-audio bit being set inappropriately while using the
> ca0106 driver [1]. Seeing as I got no replies, I am trying again.
> 
> When playing AC3 encoded streams (Dolby Digital, DTS), the SPDIF
> non-audio bit is set. Otherwise, for PCM streams, the SPDIF is set to
> audio.
> 
> Could someone explain to me what part of the software is responsible for
> correctly setting the SPDIF audio / non-audio bit? Is it
> * alsa-driver
> * alsa-lib
> * application  ?
> 
> It seems to me that currently some applications (MythTV, xine) set it
> correctly, but most other applications ignore it. So if it is set to
> non-audio (because for example MythTV crashed before re-setting it to
> audio), then all applications that are not aware of the setting have
> their audio broken.
> 
> Could someone set me straight here so that I can try to produce a
> permanent fix for this?
> 
> Thanks,
> Ben Stanley.
> 
> [1] http://thread.gmane.org/gmane.linux.alsa.devel/54398/focus=55188

Here is Takashi's response.

> At Fri, 15 Aug 2008 00:48:41 +1000,
> Ben Stanley wrote:
>> > 
>> > Dear alsa-devel,
>> > 
>> > I recently advised this list of some problems I experienced with the
>> > SPDIF audio / non-audio bit being set inappropriately while using the
>> > ca0106 driver [1]. Seeing as I got no replies, I am trying again.
>> > 
>> > When playing AC3 encoded streams (Dolby Digital, DTS), the SPDIF
>> > non-audio bit is set. Otherwise, for PCM streams, the SPDIF is set to
>> > audio.
>> > 
>> > Could someone explain to me what part of the software is responsible for
>> > correctly setting the SPDIF audio / non-audio bit? Is it
>> > * alsa-driver
>> > * alsa-lib
>> > * application  ?
> 
> It's application, basically.  The app can let alsa-lib set the default
> values, though.
> 
>> > It seems to me that currently some applications (MythTV, xine) set it
>> > correctly, but most other applications ignore it. So if it is set to
>> > non-audio (because for example MythTV crashed before re-setting it to
>> > audio), then all applications that are not aware of the setting have
>> > their audio broken.
> 
> Some drivers have the independent PCM IEC958 status bits while many
> have only the default IEC958 status bits.  In the former case, the
> driver resets automatically the status bits after closing the PCM
> stream.  Your case is the latter one, which doesn't reset.  In this
> case, usually alsa-lib takes the old setting back.  But when the
> program crashes (or aborted unexpectedly), the new setting is kept
> even after that, as you described in the above.
> 
>> > Could someone set me straight here so that I can try to produce a
>> > permanent fix for this?
> 
> You can change the status easily via iecset program in alsa-utils.
> 
> Maybe it's safer to have an independent PCM iec958 setting on all
> drivers.  But this requires the change in alsa-lib (system) config,
> i.e. it may cause an incompatibility with older alsa-lib configs.
> This is an only drawback, I think.
> 
> 
> Takashi




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux