For those of you with the best-bang-for-buck-SPDIF card, the Chaintech AV710 / AV-710 [redundancy added to help people searching for either], this post is to help you configure it. In Dapper Drake, the solution is quite simple.
Assuming you have alsa as your sound driver (default in Ubuntu6), you need to add an asound.conf to /etc. Alsa will check this before it does anything with the sound next time. Paste this into your asound.conf file (will probably have to create it) and then your SPDIF should work:
Code:
# 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,1"
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 1
}
#
I haven't bothered trying to get the AC3 passthrough to work, I might try later. But for now, video and sound work so I'm happy. But please post if you do get Dolby Digital passthrough working.
I did not make this config file, Alessandro Vallega did. So kudos to him for making this work.