[lug] ac3 on spdif (chaintech av-710)

Ben bluey at iguanaworks.net
Sat Oct 28 15:41:34 MDT 2006


Anyone have experience getting ac3 pass-through to spdif working with
alsa / mplayer? I just bought a chaintech av-710 (chipset envy24pt) and
I've got alsa setup with it (ice1724 module). I can output to the spdif
optical output and get pcm/stereo fine. But I cannot play a dvd with ac3
pass-through (surround sound). When I run

mplayer -ao alsa:device=spdif -ac hwac3 -aid 128 dvd://1

I get 

...
hwac3: switched to AC3, 384000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, ac3, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)

...

alsa-init: using device spdif
alsa-init: format ac3 are not supported by hardware, trying default
alsa-init: unable to set format: Invalid argument
Could not open/initialize audio device -> no sound.


If I'm reading that right, mplayer see ac3 on the dvd fine, (and outputs
to spdif) but alsa doesn't think my sound card to handle the ac3. How
can I get alsa to access ac3 audio? Seems odd that I can get digital
output, but only in stereo format. 

Also, "aplay -L" shows items for surround sound, which seems good. 

side 'cards.pcm.side'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
surround71 'cards.pcm.surround71'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'


aplay -l:
**** List of PLAYBACK Hardware Devices ****
card 0: AV710 [Chaintech AV-710], device 0: ICE1724 [ICE1724]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AV710 [Chaintech AV-710], device 1: IEC1724 IEC958 [IEC1724
IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


Attached is my /etc/asound.conf file

Any ideas welcome.

Thanks,

Ben

-------------- next part --------------
# copy this file in /etc/asound.conf (for all users) or $HOME/.asoundrc (just for you)
#
# this file map uses mixer as explained in
# http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php
# and explain what I discovered with trial and error
#
# I have Mandrake 9.2, Alsa 1.0.0.rc2, kernel 2.4.23,
# 6 channel amplifier connected to the card digital out (optical / red light)
# 2 channels connected to the analogic out
#
# run alsamixer from a terminal or konsol. Set everything to "PCM Out". 
# (but see below at KsCD)
#
# I have aRTs NOT enabled.
# If you want otherwise go to KDE Control Center, Sound Sytem, flag the field 
#       "Start aRTs soundserver on KDE startup".
# In the tab "Sound I/O" in the field 
#       " Use Custom Sound Device"
# insert /dev/sound/adsp to have output to the digital
# otherwise do not flag the field or use /dev/sound/dsp (without the 'a') 
# to use analog output
# use bottum "test" to test :)
#
# Also test sounds with KDE Control Center, LookNFeel, 
# System Notification, 
# Actions Play a Sound
# If you don't want to use aRTs but you do still want to have 
# KDE Sounds System Notification
# (I don't see any reason to do it) be sure to press "Player Settings..." 
# button and in the
# popup window use external player and type /usr/bin/aplay
# aRTs does not care about this configuration file
#
# in xmms 
#
#       press ctl+P, output plugin = Alsa 0.9, 
#       configure, user defined: default, 0, PCM.
#
# Output goes to Digital because of pcm.!default setting below.
# aRTs settings before explained do not affect xmms
#
# Totem Media Player: output goes to digital (because of pcm.!default setting below).
# aRTs setting before explained do not affect Totem
#
# my KsCD works if, within alsamixer, at least "IEC958" or "IEC958 1" is setted
# as "H/W in 0" or "H/W in 1". 
# You can even set both but in this case
# this setting (instead of "PCM out") void other digital sounds.
# aRTs setting before explained do not affect KsCD
# KsCD not care about this configuration file.
#
# mplayer (from terminal or konsole) works with: mplayer -ao alsa9:default avi1.avi
# if the option ao=alsa9:default is set in mplayer.conf it works 
# also with mplayer avi1.avi
# mplayer.conf is in /etc/mplayer/mplayer.conf (but read notes in the 
# files itself: there are other files as well)
#
# the gui version of mplayer (gmplayer) seeks the file /etc/mplayer/mplayer.conf 
# and then in your home .mplayer/config and then .mplayer/gui.conf.
# if the sound is not working verify ao option there.
# I did not understand everything here, but if you delete gui.conf 
# the file is recreated
# by gmplayer. In my experience it creates also an entry ao_driver = "alsa9" that must
# be corrected as ao_driver = "alsa9:default"
# if you launch via command line you can use gmplayer -ao alsa9:default avi1.avi
# or use MenuDrake to add the -ao option to the menu command.
# Running from a terminal or konsole I have several warning messages like:
# alsa-control: mixer attach default error: Invalid argumentA:   5,5 V:   5,5 A-V:
# or
# alsa-control: unable to find simple control 'PCM',0 3%  4%  0,9% 3 0 92%
# but the system seems to work fine
#
# A note about mixers.
# Mixer allow you to share the sound device between different applications 
# and have different
# sounds mixed toghether. aRTs is a mixer. This configuration file provide a 
# mixer as well.
# I don't have problems not using aRTs.
#
# Take care
# Alessandro Vallega

pcm.!default {
        type plug
        slave.pcm "dmixer"
}

pcm.dmixer  {
        type dmix
        ipc_key 1024
        slave {
                pcm "hw:0,0"
                format S32_LE
                period_time 0
                period_size 1024

# increased buffer_size because in my system 1024 cause bad
# audio performance (for totem media player and mplayer)
                buffer_size 8096

                rate 44100
        }
        bindings {
                0 0
                1 1
        }
}

ctl.dmixer {
        type hw
        card 0
        device 0
}




More information about the LUG mailing list