Re: [PATCH v5] thinkpad-acpi: Improve hardware volume controls

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

 



On Fri, Sep 12, 2014 at 4:32 PM, Henrique de Moraes Holschuh
<hmh@xxxxxxxxxx> wrote:
> On Fri, 12 Sep 2014, Andrew Lutomirski wrote:
>> I think that v5 doesn't change behavior anywhere except for fixing
>> broken things.  I could easily be wrong, though.
>
> Well, I can test it on a T43 (old-style hardware mixer), but not on anything
> else.  I'll need to port the patch to 3.10 for that, though.
>
>> I kind of suspect that all laptops that don't default to the "none"
>> mode are at least a little bit broken, though.  Any laptop on which
>> pressing mute mutes the hardware mixer *and* sends KEY_MUTE is going
>> to screw up if any modern GUI volume manager is running.
>
> Ideed.
>
>> Do you mean getting rid of latch mode and only keeping "none" and
>> "toggle"?  I don't think that would be much simpler.  The issue (from
>
> Then let's not do it.  Latch mode is the sane one.
>
>> So most of the complexity is in the code that eats KEY_MUTE events and
>> does the right thing with them.  I think that this is needed to get
>> "latch" and "toggle" right.
>
> Well, code complexity _is_ an acceptable price to get those right if we can
> manage it.
>
>> TBH, anyone running newish userspace probably wants the completely
>> non-magical "none" behavior.  PulseAudio seems to do the right thing
>> if the mute button generates KEY_MUTE and does nothing else.  I'm not
>> entirely convinced that there's any need to support the other modes,
>> but maybe I'm missing something, or maybe there are users with no
>> KEY_MUTE handler, or maybe there are users that just really like the
>> latching behavior where pressing the mute button never unmutes.
>
> Support for the other modes is optional, as long as the old thinkpads with
> full EC-driven behaviour still keep working in latch mode (which is the only
> one they support in firmware, anyway).

I remain unconvinced that the latch and toggle modes are very useful
given the state of existing userspace code.  PulseAudio, at least,
appears to be entirely unable to understand that, if the "ThinkPad
Console Audio Control" is muted, that there won't be any sound output.
The only reason that this appears to work on current kernels is that
the hardware mute button also sends KEY_MUTE, so if you press it, you
have some chance of getting lucky and managing to keep your userspace
code in sync with the hardware.  But it's very easy to find
combinations of keypresses and drags on the GUI volume slider that
break.

If we were to try to teach ALSA that the ThinkPad hardware mute switch
were a part of the system's audio mixer, I think that all the modes
would make sense.  But, given how everything works now, I'm still
leaning toward just forcing completely software-controlled mode.

--Andy

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel




[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux