[pulseaudio-discuss] [PATCH 6/6] pactl, pacmd, cli-command: Added set-(sink|source)-latency-offset commands.

Chris Billington chrisjbillington at gmail.com
Fri Jan 22 17:49:00 PST 2016


Hi Tanu, Peter,

The preceding patches are for implementing setting latency offsets of
individual sources and sinks, as discussed after the previous patch I made
a few weeks ago.

Two of the patches are trivial bugfixes:

patch 5/6 is using int64s for latency offsets in pactl and pacmd instead of
int32s, as pointed out by Peter.

Patch 1/6 is having sources update the latency offsets they inherit from a
port when the active port changes - previously they didn't do so. I assume
this is a bug, but perhaps there is some reason this was not done that I am
not aware of.

The other four patches are implementing the setting of individual latency
offsets of sinks and sources. This now plays nicely with port latency
offsets. The way I've done this is to rename everything pertaining to the
latency offsets inherited from ports, so that they are all called
sink->port_latency_offset etc. Then I've introduced a new latency offset
for sinks and sources, called just sink->latency_offset etc, which is for
the latency offset set on that sink or source alone. The total latency
reported by the device then includes the sum of both of them.

As suggested by Tanu, shell completion for pacmd and pactl has been
included, and the protocol change is in a separate commit.

The only thing I didn't do was restoring from disk. Tanu, you said this
might be tricky, but I wasn't able to understand module-device-restore
enough to even see the trickiness you were talking about, I wasn't able to
get that far! I'm not very familiar with the codebase - I'm just here
selfishly to try and get my feature in so my application works better :p.
So apologies for that, I hope the changes are worthy without it.

Please advise if there's anything else I ought to do with this, I can
refactor commits if they're split up too much or little, or whatever.

Cheers,

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20160123/acf5a232/attachment.html>


More information about the pulseaudio-discuss mailing list