[pulseaudio-discuss] Make discoverable PA network sound devices available locally results in huge network traffic

Maarten Bosmans mkbosmans at gmail.com
Wed Feb 9 08:13:31 PST 2011


2011/1/26 Colin Guthrie <gmane at colin.guthr.ie>:
> 'Twas brillig, and Maarten Bosmans at 26/01/11 10:49 did gyre and gimble:
>> 2011/1/22 Colin Guthrie <gmane at colin.guthr.ie>:
>>> 'Twas brillig, and Maarten Bosmans at 22/01/11 10:11 did gyre and gimble:
>>>> It turns out that (without pavucontrol loaded) starting an audio
>>>> stream on the client on the tunnel sink, makes the audio stream over
>>>> the network and stopping the program that is playing the music stop
>>>> the network usage again. So far so good, nothing unexpected. When
>>>> pavucontrol is opened, there is still no network usage. After playing
>>>> audio and then stopping the playback, the network usage does not stop,
>>>> however, until alsa pavucontrol is closed.
>>>>
>>>> So it seems that the source ouput of pavucontrol on the tunnel sink
>>>> monitor keeps the sink from suspending. (but only when the sink had
>>>> been running before, so the transition running -> idle is prevented)
>>>
>>> Very interesting. I wonder if it relates to the use or implementation of
>>> the DONT_INHIBIT_AUTO_SUSPEND flag... looking at the pavucontrol code,
>>> it seems it doesn't actually even pass
>>> PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND, so perhaps the solution is really
>>> simple... just add that flag (although perhaps we'd have to deal with it
>>> a bit more intelligently).
>>
>> Yup, adding that flag does the trick, see attached patch. Thanks for
>> the pointer.
>> I couldn't resist removing some duplicate code, I hope that's OK. If
>> not, I'll prepare a patch which only adds the flag.
>
> I've not looked properly yet, but I'm sure it's fine to de-dupe the code
> a bit. I've only really hacked on top and not really done any major
> re-factoring myself.

Does the patch look OK?

>>> I actually wonder if this is the cause of the vumeters sometimes not
>>> initialising properly at times... (I presume other people see this
>>> occasionally? It's never quite bothered me enough to look into it properly!)
>>
>> Well, I was pleasantly surprised to see that pavucontrol from git
>> master worked a lot better than the version packaged on Ubuntu
>> (0.9.9). I'll use the newest version for a while and look out for
>> little problems like you described.
>
> Yeah I've been meaning to push out a new release at some point (Lennart
> asked me a while back to handle that but I said I'd happily hack on it
> and let him do the releases, but I'll probably just take over the
> releases now :D)

If you'd care to add my patch and make a release, I'll poke whoever is
the maintainer of pavucontrol to include a newer version.

> I spent some time adding support for automatic reconnection in the event
> the daemon disappears (as it's handy to debug and closing and reopening
> pavucontrol was always a pain!) and I also added a "rename" option allow
> for device.description to be edited (and with module-device-manager,
> this should be saved permanently).
>
> So a few nice features in there.
>
> But I'm surprised Ubuntu has 0.9.9... 0.9.10 has been out for ages...
>
> Col
>

Maarten



More information about the pulseaudio-discuss mailing list