Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#197 closed defect (fixed)

hwac3 is broken on at least SBLive

Reported by: david@… Owned by: alex@…
Priority: normal Component: ao
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Using a MPlayer checkout from just a few minutes ago (or yesterday) and alsa
1.0.7 or 1.0.8_rc1 I'm getting:
alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3822:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3916:(snd_config_expand) Parse arguments error: Invalid argument
ALSA lib pcm.c:2068:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Invalid argument

AC3 passthrough does work in xine and my alsa installation was the same (and
working) for some time until I know tried it with 1.0.8_rc1 to see wheter it
makes a difference or not.

Attachments (1)

alsa.conf (8.2 KB ) - added by stranche@… 19 years ago.
completely untouched alsa.conf (Fedora Core 3 on a AMD64 with SB-Live platinium)

Download all attachments as: .zip

Change History (27)

comment:1 by reimar, 19 years ago

I don't think that device string was changed recently... Can you ask on the ALSA
list what is going wrong and how it would be correct (especially with that
device string)?
The alternative is to wait for some MPlayer developer with knowledge of ALSA -
and I currently have doubts that there is one at all...

comment:2 by stranche@…, 19 years ago

I don't think it's ALSA related, to correct the #207 bug (see at
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=207) I tryed to compile the
pre5try2, pre6 and CVS version yesterday.

I worked fine with the pre versions but does the following with CVS :

Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big-endian AC3
AF_pre: 48000Hz 2ch big-endian AC3
alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3818:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3912:(snd_config_expand) Parse arguments error: Argument invalide
ALSA lib pcm.c:1972:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Argument invalide
Could not open/initialize audio device -> no sound.
Audio: no sound

I used yesterday's MPlayer and FFmpeg CVS at something like 8pm (Paris time)

comment:3 by reimar, 19 years ago

I _think_ that actually the fact that it worked in the old versions is a bug,
because alsa should use S/PDIF by default for hwac3. You must use -ao
alsa:device=default I think...
Does that fix it?

comment:4 by stranche@…, 19 years ago

Okay, I found the way to play it, but it was painfull...
Here's the process :

mplayer -ao alsa:device=default -ac hwac3 <file> gives an horrible cracked
sound ! (in fact the AC3 stream as is, bad for ears)

mplayer -ao alsa -ac hwac3 <file> gives such output

alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3818:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3912:(snd_config_expand) Parse arguments error: Argument invalide
ALSA lib pcm.c:1972:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Argument invalide
Could not open/initialize audio device -> no sound.

Then I tryed the following
mplayer -ao alsa:device=iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2 -ac hwac3
<file> wich gave me this hint :

Could not parse arguments at the position indicated below:
device=iec958:AES0:0x2


So I had to understand that I needed one bit of the above line, making the
command as such :

mplayer -ao alsa:device=iec958 -ac hwac3 <file> and it plays (at last) fine.

Shouldn't there be something to automate a bit more the playing process or at
least show more explicitely what are the valid options to set at -ao
alsa:device=<option> for our system ?

comment:5 by david@…, 19 years ago

I can confirm that the solution in comment 4 works for me as well and I also
hope that MPlayer will start to set the correct values automatically (again).

comment:6 by reimar, 19 years ago

(In reply to comment #4)

mplayer -ao alsa:device=default -ac hwac3 <file> gives an horrible cracked
sound ! (in fact the AC3 stream as is, bad for ears)

ok, I thought that was what you wanted ;-)

mplayer -ao alsa -ac hwac3 <file> gives such output

alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3818:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3912:(snd_config_expand) Parse arguments error: Argument invalide
ALSA lib pcm.c:1972:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Argument invalide

Could you please tell me what string the old version used? mplayer -v should
show it.

Then I tryed the following
mplayer -ao alsa:device=iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2 -ac hwac3
<file> wich gave me this hint :

Could not parse arguments at the position indicated below:
device=iec958:AES0:0x2


Well, as described in the manpage you must replace ',' with '.' and ':' with '=' :-)

So I had to understand that I needed one bit of the above line, making the
command as such :

mplayer -ao alsa:device=iec958 -ac hwac3 <file> and it plays (at last) fine.

Shouldn't there be something to automate a bit more the playing process or at
least show more explicitely what are the valid options to set at -ao
alsa:device=<option> for our system ?

Yes, certainly. But I just can't imagine that the AES... flags are completely
unneeded. The biggest problem is that I don't really know how this is supposed
to work and I don't have any hardware I could test on...

comment:7 by stranche@…, 19 years ago

mplayer -ao alsa -ac hwac3 <file> gives such output

alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3818:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3912:(snd_config_expand) Parse arguments error: Argument

invalide

ALSA lib pcm.c:1972:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Argument invalide

Could you please tell me what string the old version used? mplayer -v should
show

Hmmmm doesn't show such thing...

Here's the output of the audio initialise on pre6

Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020 and bps = 2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big endian AC3
AF_pre: 48000Hz 2ch AC3
alsa-init: requested format: 48000 Hz, 2 channels, AC3
alsa-init: compiled for ALSA-1.0.6
alsa-init: setup for 1/2 channel(s)
alsa-spdif-init: playing AC3, 2 channels
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch AC3 (1 bps)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@…>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020 and bps = 2
[libaf] Adding filter format
[format] Sample format big endian AC3 not yet supported
Couldn't find matching filter/ao format!


Then I tryed the following
mplayer -ao alsa:device=iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2 -ac hwac3
<file> wich gave me this hint :

Could not parse arguments at the position indicated below:
device=iec958:AES0:0x2


Well, as described in the manpage you must replace ',' with '.' and ':' with

'=' :-)

You mean doing this ??
mplayer -ao alsa:device=iec958=AES0:0x2.AES1=0x82.AES2=0x0.AES3=0x2 -ac hwac3 <file>

With this I get no sound and the following :

Could not parse arguments at the position indicated below:
device=iec958=AES0:0x2.AES1=0x82.AES2=0x0.AES3=0x2


comment:8 by reimar, 19 years ago

(In reply to comment #7)

Hmmmm doesn't show such thing...

Here's the output of the audio initialise on pre6

Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020 and bps = 2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big endian AC3
AF_pre: 48000Hz 2ch AC3
alsa-init: requested format: 48000 Hz, 2 channels, AC3
alsa-init: compiled for ALSA-1.0.6
alsa-init: setup for 1/2 channel(s)
alsa-spdif-init: playing AC3, 2 channels
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch AC3 (1 bps)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@…>
AO: Comment: under developement
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020 and bps = 2
[libaf] Adding filter format
[format] Sample format big endian AC3 not yet supported
Couldn't find matching filter/ao format!

Um... that doesn't look like it works... Or if it works it doesn't use hwac3.

Well, as described in the manpage you must replace ',' with '.' and ':' with

'=' :-)

With this I get no sound and the following :

Could not parse arguments at the position indicated below:
device=iec958=AES0:0x2.AES1=0x82.AES2=0x0.AES3=0x2

Look closely. Very closely. You missed a ':' that needs to be replaced. Anyway,
I don't think it will work, but trying can't hurt.

comment:9 by reimar, 19 years ago

(In reply to comment #2)

ALSA lib conf.c:3818:(parse_args) Parameter DEV must be an integer

I had a look at the alsa-lib source, and I think there is something wrong in
your alsa.conf, as that file is parsed in conf.c

comment:10 by stranche@…, 19 years ago

Hmmmmm you're right should be

device=iec958=AES0=0x2.AES1=0x82.AES2=0x0.AES3=0x2

and not

device=iec958=AES0:0x2.AES1=0x82.AES2=0x0.AES3=0x2

Anyway, doesn't work as you can see here :

Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big-endian AC3
AF_pre: 48000Hz 2ch big-endian AC3
alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3818:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3912:(snd_config_expand) Parse arguments error: Argument invalide
ALSA lib pcm.c:1972:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Argument invalide
Could not open/initialize audio device -> no sound.
Audio: no sound

(Odd, it is showned with : and , instead of = and . )

by stranche@…, 19 years ago

Attachment: alsa.conf added

completely untouched alsa.conf (Fedora Core 3 on a AMD64 with SB-Live platinium)

comment:11 by stranche@…, 19 years ago

comment:12 by stranche@…, 19 years ago

I posted in attachment my alsa.conf, please have a look

comment:13 by stranche@…, 19 years ago

attachments.description: completely untouched alsa.conf (Fedora Core 3 on a AMD64 with Audigy)completely untouched alsa.conf (Fedora Core 3 on a AMD64 with SB platinium)

comment:14 by stranche@…, 19 years ago

attachments.description: completely untouched alsa.conf (Fedora Core 3 on a AMD64 with SB platinium)completely untouched alsa.conf (Fedora Core 3 on a AMD64 with SB-Live platinium)

comment:15 by stranche@…, 19 years ago

(In reply to comment #8)
Oh yes, it does work !

I tryed
mplayer -ao alsa -ac hwac3 <file>
and
mplayer -ao alsa:device=iec958 -ac hwac3 <file>

in pre6 both works, but in CVS the device need to be specified

in pre6 the difference shows as follow :

without device specified
alsa-init: requested format: 48000 Hz, 2 channels, AC3
alsa-init: compiled for ALSA-1.0.6
alsa-init: setup for 1/2 channel(s)
alsa-spdif-init: playing AC3, 2 channels
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian

with device specified
alsa-init: requested format: 48000 Hz, 2 channels, AC3
alsa-init: compiled for ALSA-1.0.6
alsa-init: soundcard set to iec958
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536

and in CVS :

without device specified
alsa-init: requested format: 48000 Hz, 2 channels, 100
alsa-init: compiled for ALSA-1.0.6
alsa-spdif-init: playing AC3, 2 channels
alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3818:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3912:(snd_config_expand) Parse arguments error: Argument invalide
ALSA lib pcm.c:1972:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Argument invalide
Could not open/initialize audio device -> no sound.
Uninit audio filters...

with device specified
alsa-init: requested format: 48000 Hz, 2 channels, 100
alsa-init: compiled for ALSA-1.0.6
alsa-spdif-init: playing AC3, 2 channels
alsa-init: 1 soundcard found, using: iec958
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian

comment:16 by reimar, 19 years ago

I got a hint that this is supposed to work:
-ao alsa:device="iec958={CARD 0 AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02}"
Can you please test? And tell me which alsa versions you have (to make sure it
works with alsa 1.0 and 0.9)

comment:17 by david@…, 19 years ago

This does work with alsa-1.0[.8]. It's a bit cumbersome to use though. :-)

comment:18 by stranche@…, 19 years ago

(In reply to comment #14)

I got a hint that this is supposed to work:
-ao alsa:device="iec958={CARD 0 AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02}"
Can you please test? And tell me which alsa versions you have (to make sure it
works with alsa 1.0 and 0.9)

Works with pre6 and CVS
kernel-2.6.10-1.741_FC3 on x86_64 with alsa 1.0.6

comment:19 by reimar, 19 years ago

(In reply to comment #15)

This does work with alsa-1.0[.8]. It's a bit cumbersome to use though. :-)

I intend to replace the current, non-working string with this. But I'd prefer to
hear that it works with alsa 0.9, too, before.

comment:20 by stranche@…, 19 years ago

(In reply to comment #17)

I intend to replace the current, non-working string with this. But I'd prefer to
hear that it works with alsa 0.9, too, before.

Well, is that really a problem ?
As same as Alsa 0.5 isn't any longer supported, is it a major trouble to drop
the 0.9 support (in the worst case scenario) ?

All the major distributions are now based on a 1.0.* version, and the other have
the sources or packages available, could be a good oportunity to move forward
the newest alsa support instead of trying to not break things (of course some
people would deseagree :p).

comment:21 by reimar, 19 years ago

(In reply to comment #18)
[...]

As same as Alsa 0.5 isn't any longer supported, is it a major trouble to drop
the 0.9 support (in the worst case scenario) ?

alsa 0.5 still is supported (although not maintained).

comment:22 by stranche@…, 19 years ago

(In reply to comment #19)

alsa 0.5 still is supported (although not maintained).


hmmm, yes that's what I meaned, "drop" with the meaning of "not maintained", and
not the meaning of "removed".

comment:23 by stranche@…, 19 years ago

(In reply to comment #17)

This does work with alsa-1.0[.8]. It's a bit cumbersome to use though. :-)

I intend to replace the current, non-working string with this. But I'd prefer to
hear that it works with alsa 0.9, too, before.

Okay here's what you need

kernel-2.4.22-1.2115.nptl on a Fedora Core 1 + Alsa 0.9.8
System is P4
MPlayer CVS 20050127

*with mplayer -ao alsa -ac hwac3 <file>
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big-endian AC3
AF_pre: 48000Hz 2ch big-endian AC3
alsa-init: 1 soundcard found, using: iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
ALSA lib conf.c:3810:(parse_args) Parameter DEV must be an integer
ALSA lib conf.c:3904:(snd_config_expand) Parse arguments error: Invalid argument
ALSA lib pcm.c:1906:(snd_pcm_open_noupdate) Unknown PCM
iec958:AES0:0x2,AES1:0x82,AES2:0x0,AES3:0x2
alsa-init: playback open error: Invalid argument
Could not open/initialize audio device -> no sound.
Audio: no sound

*With mplayer -ao alsa:device="iec958={CARD 0 AES0 0x02 AES1 0x82 AES2 0x00
AES3 0x02}" -ac hwac3 <file>
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big-endian AC3
AF_pre: 48000Hz 2ch big-endian AC3
alsa-init: 1 soundcard found, using: iec958:{CARD 0 AES0 0x02 AES1 0x82 AES2
0x00 AES3 0x02}
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch big-endian AC3 (1 bps)
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[format] Sample format big-endian AC3 not yet supported
Couldn't find matching filter/ao format!

(Works even with the warning of the 2 last lines, non blocker)

comment:24 by reimar, 19 years ago

Resolution: fixed
Status: newclosed

Should be fixed in CVS unless I made a typing mistake ;-)
Btw.: adding
ac=hwac3,
should make MPlayer try to use hwac3 when possible and fallback to normal
decoding when the sound isn't ac3.

comment:25 by stranche@…, 19 years ago

Resolution: fixed
Status: closedreopened

(In reply to comment #22)
I guess there is a typo :pp

with mplayer -ao alsa -ac hwac3 <file>

Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big-endian AC3
AF_pre: 48000Hz 2ch big-endian AC3
alsa-init: 1 soundcard found, using: iec958:{CARD 0 AES0 0x 2 AES1 0x82 AES2 0x
0 AES3 0x 2}
ALSA lib conf.c:1565:(snd_config_load1) _toplevel_:1:46:Unexpected end of file
ALSA lib conf.c:3912:(snd_config_expand) Parse arguments error: Unknown error
ALSA lib pcm.c:1972:(snd_pcm_open_noupdate) Unknown PCM iec958:{CARD 0 AES0 0x 2
AES1 0x82 AES2 0x 0 AES3 0x 2}
alsa-init: playback open error: Unknown error
Could not open/initialize audio device -> no sound.
Audio: no sound

with mplayer -ao alsa:device="iec958={CARD 0 AES0 0x2 AES1 0x82 AES2 0x0 AES3
0x2}" -ac hwac3 <file>
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big-endian AC3
AF_pre: 48000Hz 2ch big-endian AC3
alsa-init: 1 soundcard found, using: iec958:{CARD 0 AES0 0x2 AES1 0x82 AES2 0x0
AES3 0x2}
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch big-endian AC3 (1 bps)
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[format] Sample format big-endian AC3 not yet supported
Couldn't find matching filter/ao format!

comment:26 by reimar, 19 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.