* [PATCH] thinkpad-acpi: Enable microphone mute LED
@ 2011-05-24 19:41 Andy Lutomirski
2011-05-27 16:28 ` Matthew Garrett
0 siblings, 1 reply; 8+ messages in thread
From: Andy Lutomirski @ 2011-05-24 19:41 UTC (permalink / raw)
To: Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86
Cc: Andy Lutomirski
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@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
@@ -5074,8 +5074,10 @@ 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)
{
@@ -5297,7 +5299,7 @@ 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,
+ .quirks = 0x5fffU,
},
{ /* IBM ThinkPads with no EC version string */
.vendor = PCI_VENDOR_ID_IBM,
--
1.7.5.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] thinkpad-acpi: Enable microphone mute LED
2011-05-24 19:41 [PATCH] thinkpad-acpi: Enable microphone mute LED Andy Lutomirski
@ 2011-05-27 16:28 ` Matthew Garrett
2011-05-27 16:39 ` Andrew Lutomirski
0 siblings, 1 reply; 8+ messages in thread
From: Matthew Garrett @ 2011-05-27 16:28 UTC (permalink / raw)
To: Andy Lutomirski
Cc: Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86
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@srcf.ucam.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thinkpad-acpi: Enable microphone mute LED
2011-05-27 16:28 ` Matthew Garrett
@ 2011-05-27 16:39 ` Andrew Lutomirski
2011-05-27 16:48 ` Matthew Garrett
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Lutomirski @ 2011-05-27 16:39 UTC (permalink / raw)
To: Matthew Garrett
Cc: Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86
On Fri, May 27, 2011 at 12:28 PM, Matthew Garrett <mjg59@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@srcf.ucam.org
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thinkpad-acpi: Enable microphone mute LED
2011-05-27 16:39 ` Andrew Lutomirski
@ 2011-05-27 16:48 ` Matthew Garrett
2011-05-27 18:22 ` Andrew Lutomirski
0 siblings, 1 reply; 8+ messages in thread
From: Matthew Garrett @ 2011-05-27 16:48 UTC (permalink / raw)
To: Andrew Lutomirski
Cc: Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86
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@srcf.ucam.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thinkpad-acpi: Enable microphone mute LED
2011-05-27 16:48 ` Matthew Garrett
@ 2011-05-27 18:22 ` Andrew Lutomirski
2011-05-27 18:26 ` Matthew Garrett
2011-06-03 15:50 ` [alsa-devel] " Takashi Iwai
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Lutomirski @ 2011-05-27 18:22 UTC (permalink / raw)
To: Matthew Garrett, General PulseAudio Discussion, alsa-devel
Cc: Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86
On Fri, May 27, 2011 at 12:48 PM, Matthew Garrett <mjg59@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thinkpad-acpi: Enable microphone mute LED
2011-05-27 18:22 ` Andrew Lutomirski
@ 2011-05-27 18:26 ` Matthew Garrett
2011-06-03 15:50 ` [alsa-devel] " Takashi Iwai
1 sibling, 0 replies; 8+ messages in thread
From: Matthew Garrett @ 2011-05-27 18:26 UTC (permalink / raw)
To: Andrew Lutomirski
Cc: General PulseAudio Discussion, alsa-devel,
Henrique de Moraes Holschuh, ibm-acpi-devel, platform-driver-x86,
mzjro
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@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@srcf.ucam.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [alsa-devel] [PATCH] thinkpad-acpi: Enable microphone mute LED
2011-05-27 18:22 ` Andrew Lutomirski
2011-05-27 18:26 ` Matthew Garrett
@ 2011-06-03 15:50 ` Takashi Iwai
1 sibling, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2011-06-03 15:50 UTC (permalink / raw)
To: Andrew Lutomirski
Cc: Matthew Garrett, General PulseAudio Discussion, alsa-devel,
ibm-acpi-devel, Henrique de Moraes Holschuh, platform-driver-x86
At Fri, 27 May 2011 14:22:26 -0400,
Andrew Lutomirski wrote:
>
> On Fri, May 27, 2011 at 12:48 PM, Matthew Garrett <mjg59@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?
thanks,
Takashi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] thinkpad-acpi: Enable microphone mute LED
@ 2011-08-04 21:53 Manoj Iyer
0 siblings, 0 replies; 8+ messages in thread
From: Manoj Iyer @ 2011-08-04 21:53 UTC (permalink / raw)
To: platform-driver-x86-approval, linux-kernel; +Cc: luto
Can we please have an ACK on the following patch by Andy Lutomirski
submitted to this list on May 24, with this patch
echo "1" >
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness
echo "0" >
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::micmute/brightness
turns on and off the mic mute LED. I tested this on a Lenovo X220-Tablet.
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
@@ -5074,8 +5074,10 @@ 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)
{
@@ -5297,7 +5299,7 @@ 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,
+ .quirks = 0x5fffU,
},
{ /* IBM ThinkPads with no EC version string */
.vendor = PCI_VENDOR_ID_IBM,
--
--
====================
Manoj Iyer
Ubuntu/Canonical
Hardware Enablement
====================
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-08-04 22:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 19:41 [PATCH] thinkpad-acpi: Enable microphone mute LED Andy Lutomirski
2011-05-27 16:28 ` Matthew Garrett
2011-05-27 16:39 ` Andrew Lutomirski
2011-05-27 16:48 ` Matthew Garrett
2011-05-27 18:22 ` Andrew Lutomirski
2011-05-27 18:26 ` Matthew Garrett
2011-06-03 15:50 ` [alsa-devel] " Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2011-08-04 21:53 Manoj Iyer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.