No subject


Thu Aug 5 16:39:05 UTC 2010


solely analogue output, analogue output and only stereo AC3 over digital; or
no analogue output and all types over digital.

On Fri, 14 Jan 2011, Jean-Yves Avenard wrote:

> On 14 January 2011 08:53, Alex Butcher <mythlist at assursys.co.uk> wrote:
>
> Because you've set:
>
>>
>> | AC3PassThru            | 0
>> | DTSPassThru            | 0
>
> then
>
>> | PassThruOutputDevice   | ALSA:iec958:AES0=6
>> | PassThruDeviceOverride | 1
>
> will never be used.

That's to be expected. I worked backwards from your recommended
configuration, and found that setting AC3PassThru resulted in silence
analogue output when playing UK DVB-T recordings (MPEG2, 2.0 audio). I'd
rather have working analogue than >2.0 channel over digital.

I was hopeful that if I left AC3PassThru unset, unset StreoPCM, and set
DTSPassThru, I could at least get DTS over digital from DVDs, but the sound
from my receiver's speakers was distorted unless I also disabled
MythControlsVolume (you alluded to this) but also silenced the analogue
output when playing UK DVB-T recordings.

> And if:
>
>> | MaxChannels            | 6
>
> and
>
>> | StereoPCM              | 1
>
> then you never get more than stereo. So just as well set MaxChannels to
> stereo.

Yes, I read the note in the GUI that setting StereoPCM recodes >2.0 channel
audio to 2.0 AC3.

>> | AudioOutputDevice      | ALSA:ajb
>> | MythControlsVolume     | 1
>> | MixerDevice            | ALSA:default
>> | MixerControl           | PCM
>>
>> Together, this provides simultaneous stereo output on both the S/PDIF and
>> the analogue front channels from my (stereo) UK DVB-T recordings and from
>> DD2.0/DD5.1/DTS DVD sources. :-)
>
> yes, because you've configured the audio in such a way that
> multichannels audio is just not possible
>
>>
>> Because StereoPCM is set to 1 (enabled), multi-channel audio (e.g.  from
>> Dolby Digital 5.1/DTS DVDs) is re-encoded to stereo.  Ah well, I've got a
>> real DVD player for when I want surround sound from DVDs.  Setting
>> AC3PassThru and/or DTSPassThru to 1 (enabled) silences the analogue output.
>> :-(
>
> this is to be expected. I already mentioned that:
> -Stereo will go to both analog+spdif
> -Multichannels will only go out via spdif
>
>> If I unset StereoPCM and set AC3PassThru and DTSPassThru, I merely get
>> distorted versions of the DD5.1 and DTS soundtracks on both S/PDIF and the
>
> you can not unset stereoPCM, as iec958 output only supports stereo.

That must be a MythTV (0.24-fixes vs your tree or -trunk?) limitation then,
as doing

wget \
"http://www.lynnepublishing.com/surround/www_lynnemusic_com_surround_test.ac3"

mplayer -ao alsa:device=iec958 -ac hwac3 www_lynnemusic_com_surround_test.ac3

works as one might expect, i.e. every channel gets the test sound that is
intended for it, and only that sound.  Substituting 'alsa:device=digital-hw'
for 'alsa:device=iec958' works the same way.  Substituting
'alsa:device=digital' works the way you describe (albeit with some strange
mute/unmute sounds on the rear channels), presumably because that ALSA
device is a plug device, unlike the other two.

>> If I set StereoPCM, AC3PassThru and DTSPassThru to 1 (enabled) and unset
>> MythControlsVolume, thereby disabling MythTV's internal volume controls,
>> i.e.  completely to Jean-Yves' recommendations, then the analogue outputs
>> remain silent, but the AC3 and DTS passthru seems to work correctly apart
>> from no LFE output.  Maybe that's the source DVD I was using, but I don't
>> think so. I'd rather have analogue output and only 2.0 digital output from
>> DD5.1/DTS sources.
>
> if StereoPCM is set, and you have put a digital passthrough override,
> then only the iec958 output will output something when playing
> multichannels audio.
>
> If you want to try digital passthrough through both analog and digital
> (e.g. hear static on the analog), then disable the digital passthrough
> override ; but to be honest, I have doubt digital audio will survive
> being mixed by alsa like that.
> I don't know why would you want to do that, it would sound awful anyway.

I might give that a try. I think I'll only get 2 channel PCM, though.

>> Maybe there's a tweak someone can suggest to my .asoundrc that will allow
>> AC3 and DTS passthru to work with >2 channel output, without silencing the
>> output to the analogue channels, but unless that happens, I think I've had
>
> again, you can't. I thought this was pretty clear why.
>
> if you have set digital passthrough override *and* configure AC3/DTS
> passthrough, then multi-channels audio will use the device configured
> for digital and not the main audio device.

The core of the trouble seems to be that having MythControlsVolume is
essential for working analogue output, but that it's incompatible with
AC3/DTS passthru producing undistorted sound.

>> enough of fiddling with ALSA for the forseeable future.  Or maybe it's just
>> a bug in 0.24-fixes and the StereoPCM stuff. I'll let others pick through
>> that.
>
> certainly isn't.
>
> Why would you expect audio to go out your analog device, when you've
> configured it to go through another one (ALSA:iec958:AES0-6)

I'd expect <=2 channel MPEG2 audio to always go out the default MythTV
device (i.e. ALSA:ajb) and only >2 channel audio to go to the
PassThruOutputDevice.

> If stereo then audio goes out through ALSA:ajb

Not always, or at least, if it does, ALSA silences the analogue part.

> if 5.1 and audio is AC3 or DTS audio goes out through ALSA:iec958:AES0=6

Perfect.

> If 5.1 and audio is not AC3 or DTS or if any audio processing is to be
> performed, then audio gets re-encoded to AC3 and go out through
> ALSA:iec958:AES0=6 (as StereoPCM is set)

Perfect.

> You can NOT have multichannels digital audio working as the same time
> as analog audio other than getting static (well, not exactly static,
> just an AC3/DTS encoded stream).

That would be tolerable, but inferior to the job cheap DVD players and game
consoles can perform.

> Myth only output one stream of data at any given time.

I guess this would need to change to facilitate the ideal I described in my
fourth paragraph above. It'd be nice if it could be configured something
like this:

---------------------
|Add Analogue Output|
---------------------
[x] Enabled  Analogue Device: [e.g ALSA:default or ALSA:surround51]
Channels ::2.0::
[x] remix >::2.0:: channel audio to ::2.0:: channels

   ----------------------------------
   |Advanced Default Channel Mapping|
   ----------------------------------

   If source is: [5.1] then:
   Front Left Out  = [(Front Left*0.33)+(Rear Left*0.33)+(Front Center*0.33)]
   Front Right Out = [(Front Right*0.33)+(Rear Right*0.33)+(Front Center*0.33)]
   Center Out      = [0]
   Rear Left Out   = [0]
   Rear Right Out  = [0]

   {This would configure MythTV to generate fake 2.0 from 5.1 content}

   ------------------------
   |Default Mixer Controls|
   ------------------------
   Master: 100
   PCM: 70
   ...

--------------------
|Add Digital Output|
--------------------
[x] Enabled  Digital Device: [ALSA:iec958]  Channels: [5.1]
[x] send raw AC3  [x] send raw DTS  [ ] recode DTS to [AC3]
[x] recode 2.0 to [AC3]  [x] recode >2.0 to [AC3]  [x] recode other to [AC3]
[x] remix >::5.1:: channel audio to ::5.1:: channels

   ------------------------------------------------
   |Advanced Default Channel Mapping for Recoding |
   ------------------------------------------------

   If source is [7.1] then:
   Front Left Out  = [(Front Left*1.0]
   Front Right Out = [(Front Right*1.0)]
   Center Out      = [(Front Center*1.0)]
   Rear Left Out   = [(Rear Left*0.5)+(Side Left*0.5)]
   Rear Right Out  = [(Rear Right*0.5)+(Side Right*0.5)]

   {This would configure MythTV to fake 5.1 from 7.1 content}

[x] Enabled  Digital Device: [ALSA:hdmi]  Channels: [2.0]
[x] send raw [AC3]  [ ] send raw DTS  [x] recode DTS to [AC3]
[x] recode 2.0 to [AC3]  [x] recode >2.0 to [AC3]  [x] recode other to [AC3]
[x] remix >::2.0:: channel audio to ::2.0:: channels

   {e.g. for a TV with stereo speakers and an HDMI input}

Best Regards,
Alex
--8323328-555316039-1295005324=:4133--


More information about the mythtv-users mailing list