[pulseaudio-discuss] modified flat volume logic (was: native pulseaudio equalizer submission)

Lennart Poettering lennart at poettering.net
Sun Aug 16 15:31:49 PDT 2009


On Thu, 06.08.09 16:15, Marc-André Lureau (marcandre.lureau at gmail.com) wrote:

> > There are three issues I still want to fix before the final release:
> >
> > - There are two asserts in module-combine/module-sink-remap that can
> >  be hit and which should be fixed
> >
> > - I plan to make minor modifications to flat vol, so that volume
> >  increases are forwarded from the stream to the sink, but volume
> >  decreases are not.
> 
> Interesting, how is it going to drop the volume if ever? (i am affraid
> that it would mean that volume is all done in sw, in the end)

It will never drop the volume again. At least not the user visible
one. Only the user can lower it again. The hardware one will be
initialized as before as the max of all stream volumes.

The changes in comparison to the current code are actually not that
big. All that changes is:

1) that the user will see what we called the 'reference volume'. The
   'virtual volume' which we showed before, will be hidden.

   (This is basically just one s/TRUE/FALSE)

2) The volume changes induced from the sink input are not set directly
   on the sink but calculated of the max of the old and new sink
   volume. 

   (This is basically just replacing one line by another line)

3) The propagation of sink volume changes cannot multiply the soft
   volume by the new sink volume anymore, since we need to keep the
   relation in comparison to the reference volume not the virtual
   volume nnow.

   (This is a 5 lines of code or so, the most complex part)

4) We need to forward the 'save' bit from the sink input volume
   changes to the sink volume changes.

   (This is basically just one s/FALSE/save/)

And taht's it. Commit follows shortly.

This new logic defines the sink volume as "upper barrier" for
volumes. You cannot get higher than that with any stream. If you do
the barrier will be moved up, too. m-s-r will never do that.

I think this "barrier" meaning of PA makes a lot of sense from a user
perspective.

> > Other than that only minor fixes that might come up due to testing and
> > translations should find there way into 0.9.16.
> 
> Please consider additionally at least:
> 
> http://gitorious.org/~elmarco/pulseaudio/pa-work/commit/bb123ed30e9143aec1045381bc09c8270a2aae81
> 
> http://gitorious.org/~elmarco/pulseaudio/pa-work/commit/89c498d788e8e8216a7cd0ce5bd87ec4a973be8b
> 
> and perhaps a coverity found "used uninitialized variable" in some path:
> 
> http://gitorious.org/~elmarco/pulseaudio/pa-work/commit/85796a6ab1feddc97b66eb93ff0b85ef3e630a31

All three applied a few days ago. Thanks for the patches!

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list