[mythtv-users] New spdif setup suggestions

Allen Edwards allen.p.edwards at gmail.com
Tue Feb 10 17:34:52 UTC 2009


I have put together a new simplified version of my digital audio setup
post.  I send it out when a new myth user posts saying they can't get
spdif to work.

It combines what has been learned of late in setting up hdmi boards
and uses that basic setup for straight
spdif as well.  I think it will be easier for people and more
compatible in general.  It works on my spdif system using an onboard
Intel HDA chipset.

If anyone sees problems or errors in it please reply.  If you want to
test it and it works, please let me know that
as well.

Allen
----------------------------------------------------------------------------------------------------------------------
This is the new and simplified audio interface tutorial for digital
sound with MythTV
This is a five step approach:
1) Set up your system
2) Set Myth up for digital sound
3) Discover what settings your sound card wants
4) Set up ALSA for these settings
5) Special system specific things


OVERVIEW.
The goal here is to set up myth to output the digital stream without
doing anything with it.  Myth passes
this stream to ALSA where a new default configuration will cause that
stream to pass to the sound card
digital output also without modification.  This will ensure that the
fidelity of the digital stream
is not changed by the computer and puts the burden of decoding,
changing volume, determining speaker setup, etc on the sound processor
preamp.


1) Set up your system
Update alsa
Update nvidia drivers.  Mythbuntu users can use "envyng -t" from the
command line after installing it.
Run alsamixer and enable iec958.  Use the right arrow key to see it.
Remove or rename .asoundrc if it exists.  It probably does not exist.


2) Set Myth up for digital sound
Audio output device: ALSA:default
Passthrough output device: ALSA:default
Max Audio Channels: Stereo (MUST BE SET IN STEREO as of 2/10/2009 as
there is a bug in surround)
Upmix: Passive
Enable AC3 to SPDIF passthrough checked
Enable DTS to SPDIF passthrough checked
Aggressive sound card buffering off
Use internal volume controls off


3) Discover what settings your sound card wants
run aplay -l and look for an output like this:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC883 Analog [ALC883 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC883 Digital [ALC883 Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
If you have HDMI, you might see something like this:
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
You need to find the digital output you want to use, Digital or HDMI
and note the card and device numbers.
In my case it is card 0 and device 1


4) Set up ALSA for these settings
Take the above settings and modify the ALSA configuration file to match.
asound.conf:
pcm.!default {
        type hw
        card 0
        device 1
}


5) Special system specific things

------------------troubleshooting-----------------------------
If you have problems test without myth (this is for the hdmi example
above with card 0 device 3)
mplayer -ao alsa:device=hw=0.3 -afm hwac3 /some/dolbydigital/audio/file.wav
This will verify the hardware

------------------m3n78-em------------------------------------
1st post:
For the m3n78-em with the optical spdif connector on the MB the kernel
module must be loaded with this option:
options snd-hda-intel model=6stack-dig
2nd post:
in MythBuntu i added the same line to /etc/modprobe.d/alsa-base, or, i
should say, the script i ran to update my alsa drivers added it for
me.
----------------fedora-----------------------------------------
If you are running Fedora, remove pulseaudio and all its files.
There was a post that outlined the process but it is gone.  A copy is below.

-----------------------------Fedora and pulse audio
removal------------------------------------
The steps I followed were:
-1- Rename (add "-orig") to cripple:    /etc/pulse
                                       /etc/pulse/default.pa
                                       /root/pulse-cookie
                                       /home/<user name>/.pulse-cookie
-2- Run   rpm -qa | grep "pulse"   and   rpm -qa | grep "pa"    to find
the stuff loaded for pulse audio.  Remove it via yum ("yum remove xxx"),
one item below per run:
                       pulseaudio
                       alsa-plugins-pulseaudio
                       pavucontrol
                       pulseaudio-utils
                       gstreamer-plugins-pulse
                       pulseaudio-core-libs
                       akode-pulseaudio
This leaves:    libflashsupport
               pulseaudio-libs
               akode-pulseaudio
To remove these would take too many other dependencies.
IIRC, there were subsequent notes on several sites that removing only
alsa-plugins-pulseaudio was enough.  I'm not certain that "I recall
correctly" and even if I do, it might not be enough for Fedora 9.  But
I'd probably try that first to see if it (alone) works.  Besides, since
you'll eventually need to do it, there's no harm.


More information about the mythtv-users mailing list