[mythtv-users] New spdif setup suggestions

Allen Edwards allen.p.edwards at gmail.com
Tue Feb 10 21:04:58 UTC 2009


On Tue, Feb 10, 2009 at 11:11 AM, James Crow <james at ultratans.com> wrote:
> I do not use digital audio at all, however I do help less knowledgeable
> users most every day as part of my job. I noticed a couple of things
> that could be made more clear for those just starting out with Linux or
> Myth.
>
> Under Step 1 explain where .asoundrc might be located.
>
> Under Step 4 explain where asound.conf might be located.
>
> Cheers,
> James
>
>
>

Great suggestions, thanks.

Allen

-------------------------revised
version------------------------------------------
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) Update your system
Update alsa
	$ sudo apt-get upgrade alsa
Update nvidia drivers.  Mythbuntu users can use "envyng -t" from the
command line.
Run alsamixer and enable iec958.  Use the right arrow key to see it.
	$ alsamixer
Remove or rename .asoundrc if it exists.  It probably does not exist.
	$ locate .asoundrc
	$


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

Edit the ALSA config files using your favorite editor.
For example:

$ sudo nano /etc/asound.conf

pcm.!default {
        type hw
        card 0
        device 1
}

Where you use the card and device numbers from step 3.


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