[pulseaudio-discuss] 7.1 surround problem

Colin Guthrie gmane at colin.guthr.ie
Wed Jun 23 00:43:05 PDT 2010

'Twas brillig, and Brendon Costa at 23/06/10 06:36 did gyre and gimble:
> Hi all,
> I have an app that is using the async interface of pulse that comes
> with Ubuntu 10.04
> Server Version: 0.9.21-63-gd3efa-dirty
> Linked to Library Version: 0.9.21-63-gd3efa-dirty
> Compiled with Library Version: 0.9.14
> The sink info structure reports that it has 8 channels available
> (which is expected as it is using a 7.1 surround sound device). I find
> that if I try to open a stream to the sink with 1 - 6 channels
> everything works as expected, but if I try to open 7 or 8 channels,
> then pa_stream_new() returns NULL with "Invalid argument" set in the
> context errno.
> Are there any known issues with using Pulse with a 7.1 surround system?

I've not heard of any specific issue, but I wouldn't rule it out. 7.1
wont have had nearly as much testing as say, 5.1 or stereo.

Looking at the code for pa_stream_new_with_proplist (pa_stream_new just
calls this) there are a few test cases at the top:

    PA_CHECK_VALIDITY_RETURN_NULL(c, ss && pa_sample_spec_valid(ss),
    PA_CHECK_VALIDITY_RETURN_NULL(c, !map || (pa_channel_map_valid(map)
&& map->channels == ss->channels), PA_ERR_INVALID);
    PA_CHECK_VALIDITY_RETURN_NULL(c, name || (p &&
pa_proplist_contains(p, PA_PROP_MEDIA_NAME)), PA_ERR_INVALID);

    if (!map)
pa_channel_map_init_auto(&tmap, ss->channels, PA_CHANNEL_MAP_DEFAULT),

So chances are it's one of these that you're running up against. Perhaps
try the tests in your calling code to make sure they pass before calling
pa_stream_new and that may highlight a client-side bug or point at
where, specifically, the server side bug may lie.



Colin Guthrie

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

More information about the pulseaudio-discuss mailing list