[MPlayer-dev-eng] [PATCH] iec958

Clemens Ladisch cladisch at fastmail.net
Tue Aug 29 13:35:38 CEST 2006


Remus Koos wrote:
>   I posted this patch a while ago on this list and I was wondering if it could
> be included in the mainstream code. It's a very simple patch but it fixes a
> serious problem (at least for freevo users). It basically allows you to play
> all the files regardless if they have AC3 sound or not using the same sintax.
> 
>   What the patch does is basically disable suboption parsing for alsa if the
> stream type is AC3.

You're trying to ignore the "device" suboption, but you're disabling the
"noblock" suboption, too.

> This way if the device specified is iec958 but the stream type is AC3
> then the proper device will be selected by mplayer (iec958:{CARD 0
> AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02}).

Well, hardcoding the card number as zero isn't guaranteed to be correct.
This is one of the things I always wanted to change.

> If the stream is not AC3 then iec958 is used.

... if "iec958" was explicitly set as device name.


The problem is that the alsa driver is trying to do two things (the
user's device selection, and setting the non-audio bit) with one device
name string, with the consequence that the user's device string
overrides the AESx parameter setting.

What it should do is to set the AESx parameters for any device used for
AC3 playback, regardless of whether it is the default device name or was 
specified by the user.  (The user-specified device may not support the
AESx parameters, but there are ALSA functions to find out if this is the
case.)

I'll write a patch for this.


Regards,
Clemens



More information about the MPlayer-dev-eng mailing list