[pulseaudio-discuss] RFC: Change the device-restore database to allow per-port volumes

Colin Guthrie gmane at colin.guthr.ie
Fri Aug 26 06:05:43 PDT 2011


'Twas brillig, and Colin Guthrie at 25/08/11 17:17 did gyre and gimble:
> 'Twas brillig, and Arun Raghavan at 25/08/11 17:08 did gyre and gimble:
>> On Wed, 2011-08-24 at 22:58 +0100, Colin Guthrie wrote:
>>> Hi,
>>>
>>> This is a patch set that will likely mostly interest David, but also
>>> solves one of the remaining niggles I have for 1.0 - the fact that
>>> volumes are not set properly on port changes.
>>>
>>> Now this only "solves" that niggle when the module-device-restore is used,
>>> but I'm happy enough to rely on that for now seeing as it's the default
>>> on 99.999% of desktop installs.
>>>
>>> The overall benefit of this patch is that it allows different volumes
>>> to be saved and restored for different ports. Combine this with David's
>>> work on making jack-detection work (which triggers port changes) and you
>>> automatically get different volumes on headphones vs. speakers.
>>
>> My main concern is the following scenario:
>>
>> 0. Say we start with built-in speaker and headphone port and equal
>> (maybe 70%) volume
>> 1. With headphones plugged in, I've got the volume turned up while
>> playing something that's naturally not very loud
>> 2. I pull out headphones, start playing something that's quite loud, I
>> turn down the volume
>> 3. I put the headphones back, find the output too loud (since the port
>> volume was turned up for the previous stream)
>>
>> While the current scenario isn't ideal, it's easy for users to wrap
>> their head around (different devices have different loudness levels). If
>> we don't handle this sort of case in the per-port-volume case, IMO the
>> behaviour is potentially confusing/frustrating to users.
>>
>> Maybe there's a simple way to handle this that I'm missing ...
> 
> I'm not sure there is a way to handle this really. Either we want
> volumes per-port or we don't. IMO we do (this is how it works on my
> iPhone for example) and I think from the various mumblings I've heard
> over the years most people want this type of functionality.
> 
> But perhaps there is indeed some magic solution that we are both missing :p

Anyone else got any comments on this? I'd like to push it out if all is
well otherwise.


FWIW, to address Arun's concern somewhat, we could relatively easily
make a change here that kept the same volume for every port simply by
changing the key name used and then expose this as a module argument
should people really hate this behaviour.

Any comments on the code would be appreciated too :)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]



More information about the pulseaudio-discuss mailing list