[mythtv-users] alsa rate change on via8237 spdif

Michael T. Dean mtdean at thirdcontact.com
Thu Jun 21 23:04:57 UTC 2007


On 06/21/2007 06:02 PM, Robin Gilks wrote:
>> On 06/21/2007 12:59 AM, Robin Gilks wrote:
>>     
>>> I've been playing with asoundrc file on and off for 2 years trying to
>>> sort
>>> this out.
>> ...
>>     
>>> The problem is that all the examples I've seen quote nvidia sound chips
>>> which allow the spdif port to be addressed as device 1:0 but I can't do
>> Don't know if it's a typo here, or if you also have it wrong in your
>> device names, but that's actually "hw:0,1" (the separators are dependent
>> on the app, but the important part is that it should be card 0, device
>> 1).  For example, MPlayer uses the ugly string "alsa:device=hw=0.1".
>> Myth uses "ALSA:hw:0,1".
> Yup - typo - hw:0,1 it is...except its now. For passthru I have to specify
> the device as ALSA:iec958:{ AES0 0x02 }. Does that provide any assistance?
>> Anyway, IEC958 unmuted, IEC958 Playback AC97-SPSA on 0 ("volume off" in
>> alsamixer), IEC958 Playback Source on PCM.  And (here's the part you're
>> not expecting), use the ALSA device hw:0,0.  I.e. set up Myth with
>> "ALSA:hw:0,0".
>>     
> Ah - there is the first problem of someone using nvidia knowledge

That so-called "nvidia knowledge" is actually more correctly Realtek
knowledge.  It just so happens that the Realtek ALC CODEC chips are used
by most NVIDIA /and/ Via "cards" (where card includes integrated
audio).  So, this knowledge shouldn't be a "problem."

> - I have
> no option to set the IEC958 Playback source in alsamixer. On my nvidia box
> I have a Analog to IEC958 Output switch but nowt on the Via box (both
> running the same version of alsa 1.0.14rc2).
>   

You're using a Via 8237 (with the Realtek ALC850 CODEC), right?  I see
the control in my alsamixer on my Via 8273/Realtek ALC850 system that
uses the snd_via82xx kernel module...  I see the setting in the ALSA
configuration files that are distributed with ALSA 1.0.14rc4 (haven't
checked rc2, but I'm pretty sure it hasn't just recently appeared on my
system...).  Mine's a rev 0 chip, but I really don't see things changing
that much from rev to rev and would guess you also have a rev 0,
anyway.  (Perhaps you might see a change like that going from 8237 to
8239 or something, but even that's rather unlikely.)

You are using alsamixer, right?  The setting is hidden by "smart"
applications like GNOME's mixer and perhaps KDE's mixer (i.e.
"user-friendly" ones).

Anyway, these commands should do it for you:

amixer sset 'IEC958' unmute
amixer sset 'IEC958 Output' unmute
amixer sset 'IEC958 Playback AC97-SPSA' 0
amixer sset 'IEC958 Playback Source' 'PCM'

>> Once you set the ALSA IEC958 settings, you can simply use the asoundrc
>> on the wiki with analog-hw /and/ digital-hw both set to:
>>
>> pcm.<analog or digital>-hw {
>>   type hw
>>   card 0
>>   # The default value for device is 0, so no need to specify
>>   device 0
>> }
>>     
> Note that I can use the spdif out OK on AC3 recordings in passthrough mode
> so I know the hardware works - I just can't address it from a config file
> it seems.

If the above description doesn't work, use the ALSA configuration from
the wiki and set digital-hw to:

pcm.digital-hw {
  type hw
  card 0
  # The default value for device is 0, so no need to specify
  device 0
  subdevice 3
}

and IEC958 unmuted, IEC958 Playback AC97-SPSA on 100 ("full" volume in
alsamixer), IEC958 Playback Source on IEC958 In.  Then set up Myth to
use ALSA:digital or ALSA:mixed-digital.

amixer sset 'IEC958' unmute
amixer sset 'IEC958 Output' unmute
amixer sset 'IEC958 Playback AC97-SPSA' 3
amixer sset 'IEC958 Playback Source' 'IEC958 In'

At least one of the two configurations will work.  I.e. device should be
0 and subdevice should be either 0 (default) or 3 in digital-hw.  You
should use the configuration file from the wiki, where the only
modification is to the device (and possibly adding a subdevice) for
digital-hw.  Then specify either ALSA:digital or ALSA:mixed-digital as
your "Audio output device" in Myth.

The IEC958 settings will differ depending on which approach you use, so
ensure they're as specified.

If both approaches work, use the second as it may allow you to do nice
things like 32kHz or 44.1kHz AC-3 passthrough (but doing so would
require additional plumbing), which you probably couldn't do with the first.

Mike


More information about the mythtv-users mailing list