[pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support

Michael Rans mcarans at yahoo.co.uk
Sat Jul 10 01:05:50 PDT 2010


Hi,

Great news that AC3 passthrough is working. Well done!

Are there any issues with AC3 encoding as I am using the A52 plugin from 
Pulseaudio (without your patch) and required the following "hacks":
a. A rate converter in asoundrc:
# Rate Converter to 48kHz, needed for Pulseaudio it seems
pcm.Filter_
RateConvert {
    type rate slave {
        pcm "Filter_A52Encode" rate 48000
    }
}
b. A timeout=0 in default.pa

load-module module-suspend-on-idle timeout=0              # timeout=0 required

Even with these "hacks", I found that sometimes I see:
I: module.c: Unloading "module-alsa-sink" (index: #4).
D: module-always-sink.c: Autoloading null-sink as no other  sinks detected.
After I see that, the sink disappears and cannot be selected any more in sound 
properties.

1. Does the ac3-iec958 profile resolve any of these issues?
2. Jack has ac3jack. What would be the pros and cons of doing the AC3 encoding 
in Pulseaudio instead of in Alsa?

Cheers,
Mike




________________________________
From: pl bossart <bossart.nospam at gmail.com>
To: General PulseAudio Discussion <pulseaudio-discuss at mail.0pointer.de>
Sent: Fri, 9 July, 2010 18:43:55
Subject: Re: [pulseaudio-discuss] {PATCH][RFC] AC3 passthrough support

> 1. I was wondering if MP3/DTS/AC3 passthrough is at the discussion point
> only or is someone actively looking at developing it?

AC3 passthrough works (see patches at start of thread). That said
there are still some opens and feedback is still welcome. I guess this
will be part of Meego at some point, but since there''s nothing hw
specific the discussion takes place in the open.

> 2. I think that encoding needs to be considered as part of the design ie.
> the possibility of AC3 or MP3 encoding before output to SPDIF.

AC3 encoding can be done by selecting the relevant profile
(ac3-iec958). The encoding takes place in alsa-lib a52 plugin. I
initially removed these profiles but took some flak for it, apparently
some people encode their multichannel streams prior to SPDIF
transmission.
I am afraid MP3 encoding in PulseAudio doesn't make sense, not
supported either by SPDIF or HDMI. And for BT use cases, you might as
well encode in SBC if you have PCM in the first place.

> Perhaps you're already past this point, but there is an Alsa utility iecset
> which returns (and can set) whether raw data or PCM is being passed to
> SPDIF. So presumably the Pulseaudio passthrough for Alsa just needs to call
> the same function that utility does.

iecset sets the AES0-3 bytes, but does not handle actual data
formatting which is done by the gstreamer ac3iec958 element and by the
alsa-lib iec958 plugin. For now I don't even bother to set these bits,
they are so unreliable that receivers usually ignore them.

> Can someone point me to any design and API docs for Pulseaudio as I'm
> interested in learning where and how it connects to Alsa?

No real docs. See the code in src/modules/alsa. Only took me a year to
figure things out :-(
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss at mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20100710/c6d59d4c/attachment.htm>


More information about the pulseaudio-discuss mailing list