[mythtv-users] Audio Channels and Setup

Johan mythtv at vulturest.com
Sun May 13 04:06:48 UTC 2007


Hi all,

I am using ALSA and have the following setup:
    - SB Audigy 4 (EMU10K1 alsa driver)

    - a 5.1 speaker setup plugged into the three (green, black, orange)
      jacks on the sound card

    - an asound.conf which
	1. plugs default pcm to surround51
         2. has a separate ch51dup device defined which duplicates
            FL to RL, FR to RR and mixes FL/FR in various amounts for
            the center and LFE channels.

All of this works perfectly. The following applies:

   1. Playing a 2channel stereo file through the default device I get
      playback in FL and FR.

   2. Playing a 5.1 file through the default device I get properly
      software decoded AC3/DTS in all speakers (sounds nice).

   3. Playing a 2channel stereo file through the ch51dup device I get
      the mix as specified earlier in all channels.

   4. Playing a 5.1 file through the ch51dup I lose whatever was
      coming from RR/RL/LFE/center channels in favour of the FL/FR->all
      mix (expected, sounds bad).

Obviously I can't use passthrough in myth because I don't have a 
hardware decoder. My options are then as follows:

   1. Set the audio device to default: 2ch audio stays in front
      speakers, 5.1channel audio correctly plays in all speakers.

   2. Set the audio device to ch51dup: 2ch audio plays in all
      speakers 5.1channel audio plays badly in all speakers.

The ideal setup here would be if the recording/LiveTV/etc only has 2 
channels of audio, play through the ch51dup device for duplicated all
speaker goodness, and if >2channels is detected, use the 
surround51/default device.

Is there any way to achieve this in myth? Ideally it would be nice to 
setup 3 audio devices: stereo device, multi-channel device, passthrough 
device.

Browsing through the myth source it looks like this would be a bit of an 
effort to implement as the passthrough device is selected based on the 
codec id being CODEC_ID_AC3 or CODEC_ID_DTS instead of on the number of 
channels in the audio - looks like lots of classes to touch.

So before I go and hack myself a solution in the code, I thought I'd try 
here and see if anyone has any ideas.

Regards,
Johan.


More information about the mythtv-users mailing list