Re: [PATCH] Add LED support for mic mute button

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

 



Funny enough I was thinking about it and the speaker mute actually works
in the same way I described how the micmute should work (well kind of
except for the Thinkpads)...

Think you know this but figured would be good to go through for
everybody. 

So when you press the speaker mute:

1) Sends a speaker mute key press to userspace
  - Something sees the keypress and mutes at Pulse Audio layer
	- Which then in turn mutes the Master volume for the
          sound card at the Alsa Layer.
          
  - But ALL speakers are muted including bluetooth devices, usb, etc.
    Which are handled by Pulse Audio layer. 


-- From most laptops just follow step 1 and the word is great 
   .... though Thinkpad makes things real screwy from here --


2) The Thinkpad also does a Hardware Mute
   * This is where things get screwy and is a implication issue.
     Though it really comes from when IBM did Thinkpads.
   - Now you have the actual hardware circuit cut to the speakers
     * Though this may not cut the headphone jack (noticed this
       on my Thinkpad X301).

3) Because of the Hardware Mute the EC then turns the Light on to the
Speaker mute button.
   - Again this is where things get screwy. Because what you end up is
     with 2 states
           - Software sound state
           - Hardware sound state that only effects the internal speaker
             & maybe the headphone jack

   * A side case
   - While in this state if a user goes the software route and unmutes
     the mixer. Now things are out of sync.
           - The the Hardware mute is still on and light. Even though
             user sees in the software it's unmuted
           - Lenovo has a daemon/trigger in Windows you have to install
             that keeps this situation from happening. But it will
             happen if you don't install their tools.
           - Basically the only way to get them back in sync is to
             press the volume up or down key. To undo the hardware
             mute
           - Also if user is using other devices like bluetooth or
             usb speakers they will be following what software state
             is.

4) If user unmutes by pressing the mute button again

   * Assuming the user does not do the side case mentioned

     1) Mute Keypress is sent to userspace. It treats this as a toggle
        so userspace will then unmute the speaker mixer. Unmuting
        all speakers at the software level.

     --- Again most laptops stop at step 1 --

     2) The Hardware will then uncut the circuit to the speaker and/or
         headphone jack. Allowing them to be unmuted from hardware
         level.

     3) The EC will the turn the light off that is on the speaker
        volume key.
	 
 

On Mon, 2011-11-14 at 17:58 -0200, Henrique de Moraes Holschuh wrote:
> On Mon, 14 Nov 2011, Jerone Young wrote:
> > Back to the Thinkpad. If the microphone mute light is just triggered via
> > Alsa .. you have a few issues:
> > 
> >      - Which microphone are you mutting. At the AlSA level there is not
> > a clear way to mute them all. Also what if the microphones are not all
> > on the same sound device. But different sound devices. Even though
> > exposed through ALSA it's very difficult given the ALSA infrastructure
> > to say everything is muted.
> 
> I don't really care if everything is muted.  I care if the internal
> microfone is NOT muted.  If it is NOT muted, I don't want that LED
> telling the user that it is mute.
> 
> You have physical control over every other MIC, that's why the internal
> one is special.  It is the one MIC that will be used to spy on you.
> 
> I actually like the idea of making it a global "everything muted" thing,
> though.
> 
> > End users will expect that if the light is on that ALL microphones are
> > muted to the machine. 
> 
> I am not so sure, but if that's the way it is, I'd have to force that
> LED to off until we are actually able to have all ALSA soundcards and
> external applications vote to set that led to some state.  Only when all
> votes are set to "mute", should it indicate "muting".
> 
> This would actually make my life much easier, as that means I don't have
> to fix the current breakage that we do not differentiate embedded
> platform devices from random external devices very well.  I'd just not
> signal "mute" unless all known MICs are reported by ALSA to be muted.
> 
> I would not object to providing a sysfs node (led class or otherwise)
> for userspace to report about virtual MICs, either.
> 
> > Though by giving the power to the sound server (ex. Pulse Audio) it can
> > easily say mute all possible microphones.
> 
> If I just export it trough the LED class, we'd be giving power to every
> crap under the sun, not just to Pulse Audio, to set that LED to anything
> they might want.  I'd like to see us do better.
> 



------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
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