[mythtv-users] ALSA and real AC3 passthrough

Petr Stehlik pstehlik at sophics.cz
Wed Jan 11 00:16:05 UTC 2006


Petr Stehlik píše v Čt 29. 12. 2005 v 14:21 +0100:

> yesterday I switched my myth box from analog to digital sound output
> (Asus K8V SE motherboard with its onboard sound). I got it working
> relatively quickly with "ALSA:digital" driver (also "ALSA:default"
> worked) but couldn't get the "AC3 passthrough" working correctly - on
> AC3 DVB-S channels I heard only a noise. At last I managed to get the
> AC3 passthrough (DVB-S ASTRA HD AC3 5.1 sound) working by setting
> "ALSA:spdif" in myth. But that broke analog sound (analog TV capture to
> 32000 Hz MP3). Some analog sounds sometime work for a while if they are
> 44.1 kHz and the receiver is in a good mood (but it probably plays it a
> bit faster since 44.1 is replayed as 48 kHz).
> 
> So basically I can get everything but real DVB-S AC3 passthrough working
> with "ALSA:digital" or I can get everything but analog sound with
> "ALSA:spdif".
> 
> I copied the .asoundrc from the Digital Sound Howto.
> Xine works properly with MP3 and AC3 sound.
> 
> My question is whether it's possible to set up the .asoundrc in a way
> that it handles both DVB-S AC3 real passthrough and also analog->digital
> conversion plus 32kHz->48kHz resampling.

To answer myself my own question: yes, it is possible. The
following .asoundrc (have spent whole evening on figuring it out :-)
does exactly what I always wanted:
=========
pcm.!default {
    type plug
    slave {
    	pcm "spdif"
	rate 48000
	format S16_LE
    }
}
=========
BTW, the "format" line might not even be necessary. The key is the "rate
48000" (converts 32 and 44 kHz to SPDIF's 48 kHz) and pcm
"spdif" (routes sound via the digital out). With this and "ALSA:default"
set up everywhere (both TV and Music) everything plays correctly via the
digital out, including real digital AC3 5.1 passthrough sound from HD
channels. I am excited!

Petr




More information about the mythtv-users mailing list