[mythtv-users] Simultaneous analogue (analog) and S/PDIF output

Alex Butcher mythlist at assursys.co.uk
Mon Jan 10 16:00:16 UTC 2011


Hi -

I've recently upgraded my MythTV setup from 0.21-fixes on Fedora 8 to
0.24-fixes (from the 0.24-2 rpmfusion packages, i.e.  svn 27317, plus patch
from ticket #9256, and alsa passthru device patches from trunk r27306 and
r27307, as per package changelog).

With 0.21, I had mythfrontend outputting audio to both analogue (for my SD
TV, connected via SCART) and S/PDIF going to my AV receiver.  I recall that
both Dolby Digital and DTS passthru from DVDs worked fine, too (not that my
MythTV box plays >2 channel audio at all often).

My config (i.e. .asoundrc and MythTV setup information) for that can be
found at <http://www.mythtv.org/wiki/User:Cowbutt#Sound>. I'm not really
sure how the .asoundrc works as I put it together by trial and error. MythTV
was configured as follows:

AudioOutputDevice = ALSA:default
PassThruOutputDevice = ALSA:iec958:{ AES0 0x02 }
AC3PassThru = Enabled
DTSPassThru = Enabled
MixerDevice = Default
MixerControl = Master
MasterMixerVolume = 100

I've upgraded in place (effectively) but with new motherboard/on-board
sound. I've adjusted my .asoundrc accordingly, and simultaneous output works
for apps like play/aplay. From my MythTV settings table:

AC3PassThru                       | 1
AudioOutputDevice                 | ALSA:default
DTSPassThru                       | 1
MasterMixerVolume                 | 100
MaxChannels                       | 6
MixerControl                      | PCM
  # If I set this to Master, I seem to recall the analogue channel
  # is completely silent
MixerDevice                       | ALSA:default
PassThruDeviceOverride            | 0
  # I think PassThruDeviceOverride is normally 1, but is 0 to allow
  # analogue to work normally until I get simultaneous output working.
PassThruOutputDevice              | ALSA:iec958:{ AES0 0x02 }
PCMMixerVolume                    | 74
SRCQuality                        | 1
SRCQualityOverride                | 0

I've also tried the following (cleaner) .asoundrc with the same behaviour:

#from <http://ubuntuforums.org/showpost.php?p=5794935&postcount=4>
pcm.!default {
 	type plug
 	slave.pcm ttable

}

pcm.ana {
         type hw
         card 0
         device 0
#AJB20110109 attempting to fix clicking on analogue from mythfrontend (only)
#	format S16_LE
#	rate 48000
}

pcm.digi {
         type hw
         card 0
         device 1
         format S16_LE
         rate 48000
}

pcm.both {
         type multi
         slaves {
                 a {
                         pcm "digi"
                         channels 2
                 }
                 b {
                         pcm "ana"
                         channels 2
                 }
         }
         bindings {
                 0 {
                         slave a
                         channel 0
                 }
                 1 {
                         slave a
                         channel 1
                 }
                 2 {
                         slave b
                         channel 0
                 }
                 3 {
                         slave b
                         channel 1
                 }
         }
}

pcm.ttable {
   type route
   slave.pcm "both"
   ttable.0.0 1
   ttable.1.1 1
   ttable.0.2 1
   ttable.1.3 1
}

The same poster's alternative:

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

pcm.copper {
         type copy
         slave.pcm "hw:0,0"
         slave.pcm "hw:0,1"
         slave.pcm "hw:0,0"
}

doesn't work for me; I either get S/PDIF or analogue, depending on whether I
comment the last slave.pcm "hw:0,0" or not.

Anyone got any tips on how to get this working?

Thanks,
Alex (aka hashbang on #mythtv-users)


More information about the mythtv-users mailing list