[pulseaudio-discuss] [WIP] Passthrough support

Kelly Anderson kelly at silka.with-linux.com
Tue Mar 15 22:19:16 PDT 2011


On 03/15/11 23:13, Kelly Anderson wrote:
> On 03/15/11 22:04, Arun Raghavan wrote:
>> On Tue, 2011-03-15 at 18:50 -0600, Kelly Anderson wrote:
>>> On 03/09/11 03:10, Arun Raghavan wrote:
>>>> Hello all,
>>>> Based on the RFC I posted earlier, I've implemented basic passthrough
>>>> support in some usable shape. It's up on the passthrough branch of 
>>>> each
>>>> of:
>>>>
>>>> PulseAudio:
>>>> http://git.collabora.co.uk/?p=user/arun/pulseaudio.git;a=shortlog;h=refs/heads/passthrough 
>>>>
>>>> gst-plugins-base:
>>>> http://git.collabora.co.uk/?p=user/arun/gst-plugins-base.git;a=shortlog;h=refs/heads/passthrough 
>>>>
>>>> gst-plugins-good:
>>>> http://git.collabora.co.uk/?p=user/arun/gst-plugins-good.git;a=shortlog;h=refs/heads/passthrough 
>>>>
>>>>
>>>
>
> Hey Arun,
>
> I've built and installed the passthrough branch.
>
> Isn't changing sample rates supported yet?  So far I can only 
> passthrough sample rates that match the default-sample-rate in 
> daemon.conf.  Changeable rates is critical to being able to support 
> for example dts-hd at 192khz, when standard dts will be 48khz.
>
> I'm using paplay for basic functionality checks.
>
I forgot to mention that I patched alsa-sink.c with extended rates as per:

--- ./src/modules/alsa/alsa-sink.c.orig    2011-03-15 22:15:20.701558916 
-0600
+++ ./src/modules/alsa/alsa-sink.c    2011-03-15 22:37:57.437394161 -0600
@@ -1436,6 +1436,7 @@ static pa_idxset* sink_get_formats(pa_si
  {
      pa_idxset *ret = pa_idxset_new(NULL, NULL);
      pa_format_info *f;
+    const char *dev_nam = ((struct userdata*)s->userdata)->device_name;

      pa_assert(s);

@@ -1444,12 +1445,12 @@ static pa_idxset* sink_get_formats(pa_si
      pa_idxset_put(ret, f, NULL);

      /* FIXME: is there no better way to check for this? */
-    if (strncmp("iec958", ((struct userdata*)s->userdata)->device_name, 
6) == 0) {
+    if ( ! strncmp("iec958", dev_nam, 6) || ! strncmp("hdmi", dev_nam, 
4) ) {
          /* FIXME: Eventually, we want the list of supported formats to 
be set
           * as properties by the GUI based on what the user says is 
supported by
           * the receiver */
          /* FIXME: How do we figure out supported rates? :( */
-        unsigned int i, rates[] = { 32000, 44100, 48000 };
+        unsigned int i, rates[] = { 32000, 44100, 48000, 96000, 192000, 
384000 };

          /* FIXME: Make only one format_info once we've resolved how to do
           * lists/ranges in proplists */






More information about the pulseaudio-discuss mailing list