[RFC] Source Output Volumes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-05-20 at 09:50 +0100, Colin Guthrie wrote:
> Hello,
> 
> As some of you know I've been working on restoring a little more
> symmetry to our API to allow the adjustment of source output (capture
> stream) volumes.

This is really nice to have - thanks!

> In the past, when stream volumes were added to sink inputs, it was
> thought that this feature wouldn't be overly useful for capture streams
> and while this argument still holds true, there is one feature that has
> since been added to PA that would make it useful - flat volumes.
> 
> Flat volumes allow for multiple streams to be connected to the same
> device and when they differ in stream volume, the maximum one is chosen
> and the h/w is set to that, with the difference in volume between the
> streams applied in software. This in theory allows for optimum power
> efficiency where the software stays out of the loop whenever possible.
> 
> With flat volumes, adding per-stream volumes to capture streams makes sense.
> 
> It does also simplify client code when they want to adjust their own
> volumes, they don't have to implement their own asymmetry to deal with ours.
> 
> 
> So I am proud to announce my work to try and achieve this. There are no
> doubt still bugs, so a thorough review is very much appreciated.
[...]

I've not been able to test things extensively yet, but some comments:

I've pushed a couple of patches on top of your tree, one trivial, one
adds a set-source-output-volume to pactl at
http://cgit.collabora.com/git/user/arun/pulseaudio.git/log/?h=master-source-volume

29cd2d78 capture: Add the passthrough format negitiation to capture
streams.
* There's typo in the commit message
* Just in case I forget, the fix we were discussion for ownwership of
the formats idxset in pa_sink_input_new_data_set_formats() needs to be
added to pa_source_output_new_data_set_formats() as well
* This is tangential to your work, but maybe we should just break
compatibility with versions older than 0.9.20? (protocol version < 17)
It'll make the code easier to read.

o94d2b5 capture: Implement per-stream volume control for capture
streams.
* I don't see the source output changes actually show up in the samples
(I'm opening two gnome-volume-recorder instances, doing a pactl
set-source-output-volume on one, but the levels are identical before and
after). Is there a missing pa_volume_memchunk in pa_source_output_push()
or am I just doing something stupid?
* module-echo-cancel.c - there's an s->volume inside #if 0
* [Not actually from your changes] pa_source_process_msg() - does it
matter that  the order of detach and set state within thread inverted
compared to sink-input?
* Again, this is for later, but we should eventually stop suspending
monitors and change the source format dynamically.

Will do some more extensive testing and port pulsesrc when I get some
time as well.

Cheers,
Arun




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux