Andy Lutomirski | 24 May 21:41 2011
Picon

[PATCH] thinkpad-acpi: Enable microphone mute LED

I don't know exactly which models have this LED or how to identify
them in the quirk table, so I just enabled it for all unquirked
Lenovo models.

Signed-off-by: Andy Lutomirski <luto <at> mit.edu>
---
 drivers/platform/x86/thinkpad_acpi.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 2797a97..40723a6 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
 <at>  <at>  -5074,8 +5074,10  <at>  <at>  static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = {
 	"tpacpi::unknown_led2",
 	"tpacpi::unknown_led3",
 	"tpacpi::thinkvantage",
+	"tpacpi::unknown_led4",
+	"tpacpi::micmute",
 };
-#define TPACPI_SAFE_LEDS	0x1081U
+#define TPACPI_SAFE_LEDS	0x5081U

 static inline bool tpacpi_is_led_restricted(const unsigned int led)
 {
 <at>  <at>  -5297,7 +5299,7  <at>  <at>  static const struct tpacpi_quirk led_useful_qtable[] __initconst = {
 	{ /* Lenovo */
 	  .vendor = PCI_VENDOR_ID_LENOVO,
 	  .bios = TPACPI_MATCH_ANY, .ec = TPACPI_MATCH_ANY,
-	  .quirks = 0x1fffU,
(Continue reading)

Matthew Garrett | 27 May 18:28 2011

Re: [PATCH] thinkpad-acpi: Enable microphone mute LED

On Tue, May 24, 2011 at 03:41:02PM -0400, Andy Lutomirski wrote:
> I don't know exactly which models have this LED or how to identify
> them in the quirk table, so I just enabled it for all unquirked
> Lenovo models.

Is there any chance that this is meant to be controlled via ALSA, in a 
similar way to the mute LED?

--

-- 
Matthew Garrett | mjg59 <at> srcf.ucam.org
Andrew Lutomirski | 27 May 18:39 2011
Picon

Re: [PATCH] thinkpad-acpi: Enable microphone mute LED

On Fri, May 27, 2011 at 12:28 PM, Matthew Garrett <mjg59 <at> srcf.ucam.org> wrote:
> On Tue, May 24, 2011 at 03:41:02PM -0400, Andy Lutomirski wrote:
>> I don't know exactly which models have this LED or how to identify
>> them in the quirk table, so I just enabled it for all unquirked
>> Lenovo models.
>
> Is there any chance that this is meant to be controlled via ALSA, in a
> similar way to the mute LED?

I don't have docs so I don't really know.  But the mute LED does not
appear to be controllable from the LED interface and when mute is lit
there's no sound regardless of what ALSA thinks.  When I light the
micmute light, I can still record sound just fine.

The mic mute button does nothing on Windows unless the special driver
is installed, and that driver seems to mute the Windows mixer, so I
think there's nothing special other than a little userspace helper
going on.

--Andy

>
> --
> Matthew Garrett | mjg59 <at> srcf.ucam.org
>
Matthew Garrett | 27 May 18:48 2011

Re: [PATCH] thinkpad-acpi: Enable microphone mute LED

On Fri, May 27, 2011 at 12:39:10PM -0400, Andrew Lutomirski wrote:

> I don't have docs so I don't really know.  But the mute LED does not
> appear to be controllable from the LED interface and when mute is lit
> there's no sound regardless of what ALSA thinks.  When I light the
> micmute light, I can still record sound just fine.
> 
> The mic mute button does nothing on Windows unless the special driver
> is installed, and that driver seems to mute the Windows mixer, so I
> think there's nothing special other than a little userspace helper
> going on.

Hm. That makes things kind of tricky. While it's easy to just expose the 
LED, really we want to do it in such a way that userspace knows which 
LEDs it should be toggling while setting the microphone mute.

--

-- 
Matthew Garrett | mjg59 <at> srcf.ucam.org
Andrew Lutomirski | 27 May 20:22 2011
Picon

Re: [PATCH] thinkpad-acpi: Enable microphone mute LED

On Fri, May 27, 2011 at 12:48 PM, Matthew Garrett <mjg59 <at> srcf.ucam.org> wrote:
> On Fri, May 27, 2011 at 12:39:10PM -0400, Andrew Lutomirski wrote:
>
>> I don't have docs so I don't really know.  But the mute LED does not
>> appear to be controllable from the LED interface and when mute is lit
>> there's no sound regardless of what ALSA thinks.  When I light the
>> micmute light, I can still record sound just fine.
>>
>> The mic mute button does nothing on Windows unless the special driver
>> is installed, and that driver seems to mute the Windows mixer, so I
>> think there's nothing special other than a little userspace helper
>> going on.
>
> Hm. That makes things kind of tricky. While it's easy to just expose the
> LED, really we want to do it in such a way that userspace knows which
> LEDs it should be toggling while setting the microphone mute.

One thought: call the thing laptop::micmute and teach userspace to
look for an led with that name.

Do any of the ALSA or PulseAudio people have any preferences?

--Andy
Matthew Garrett | 27 May 20:26 2011

Re: [PATCH] thinkpad-acpi: Enable microphone mute LED

On Fri, May 27, 2011 at 02:22:26PM -0400, Andrew Lutomirski wrote:
> On Fri, May 27, 2011 at 12:48 PM, Matthew Garrett <mjg59 <at> srcf.ucam.org> wrote:
> > Hm. That makes things kind of tricky. While it's easy to just expose the
> > LED, really we want to do it in such a way that userspace knows which
> > LEDs it should be toggling while setting the microphone mute.
> 
> One thought: call the thing laptop::micmute and teach userspace to
> look for an led with that name.

Yes, I think standardised naming is going to be necessary to make this 
kind of thing work. That just leaves us with the additional problem of 
figuring out who has responsibility for toggling it and maanging 
permissions appropriately, but we'll get to that.

> Do any of the ALSA or PulseAudio people have any preferences?

Cc:ed Lennart to get his perspective.

--

-- 
Matthew Garrett | mjg59 <at> srcf.ucam.org
Takashi Iwai | 3 Jun 17:50 2011
Picon

Re: [alsa-devel] [PATCH] thinkpad-acpi: Enable microphone mute LED

At Fri, 27 May 2011 14:22:26 -0400,
Andrew Lutomirski wrote:
> 
> On Fri, May 27, 2011 at 12:48 PM, Matthew Garrett <mjg59 <at> srcf.ucam.org> wrote:
> > On Fri, May 27, 2011 at 12:39:10PM -0400, Andrew Lutomirski wrote:
> >
> >> I don't have docs so I don't really know.  But the mute LED does not
> >> appear to be controllable from the LED interface and when mute is lit
> >> there's no sound regardless of what ALSA thinks.  When I light the
> >> micmute light, I can still record sound just fine.
> >>
> >> The mic mute button does nothing on Windows unless the special driver
> >> is installed, and that driver seems to mute the Windows mixer, so I
> >> think there's nothing special other than a little userspace helper
> >> going on.
> >
> > Hm. That makes things kind of tricky. While it's easy to just expose the
> > LED, really we want to do it in such a way that userspace knows which
> > LEDs it should be toggling while setting the microphone mute.
> 
> One thought: call the thing laptop::micmute and teach userspace to
> look for an led with that name.
> 
> Do any of the ALSA or PulseAudio people have any preferences?

I don't know of any machines but Thinkpad providing such a LED
control, so I'm fine with any naming basically :)  Though, if there
are many of such mute LEDs, any parseable form like laptop::xxx-mute
would be better for future?

(Continue reading)

Sebastian Reichel | 5 Jun 08:24 2011
Picon

Re: [alsa-devel] [PATCH] thinkpad-acpi: Enable microphone mute LED

On Fri, Jun 03, 2011 at 05:50:42PM +0200, Takashi Iwai wrote:
> At Fri, 27 May 2011 14:22:26 -0400,
> Andrew Lutomirski wrote:
> > 
> > On Fri, May 27, 2011 at 12:48 PM, Matthew Garrett <mjg59@...> wrote:
> > > On Fri, May 27, 2011 at 12:39:10PM -0400, Andrew Lutomirski wrote:
> > >
> > >> I don't have docs so I don't really know.  But the mute LED does not
> > >> appear to be controllable from the LED interface and when mute is lit
> > >> there's no sound regardless of what ALSA thinks.  When I light the
> > >> micmute light, I can still record sound just fine.
> > >>
> > >> The mic mute button does nothing on Windows unless the special driver
> > >> is installed, and that driver seems to mute the Windows mixer, so I
> > >> think there's nothing special other than a little userspace helper
> > >> going on.
> > >
> > > Hm. That makes things kind of tricky. While it's easy to just expose the
> > > LED, really we want to do it in such a way that userspace knows which
> > > LEDs it should be toggling while setting the microphone mute.
> > 
> > One thought: call the thing laptop::micmute and teach userspace to
> > look for an led with that name.
> > 
> > Do any of the ALSA or PulseAudio people have any preferences?
> 
> I don't know of any machines but Thinkpad providing such a LED
> control, so I'm fine with any naming basically :)  Though, if there
> are many of such mute LEDs, any parseable form like laptop::xxx-mute
> would be better for future?
(Continue reading)


Gmane