All of lore.kernel.org
 help / color / mirror / Atom feed
* ALC268 - Driving mute led with GPIO
@ 2010-02-04 16:44 Ozan Çağlayan
  2010-02-04 16:48 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Ozan Çağlayan @ 2010-02-04 16:44 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai >> Takashi Iwai

Hi,

We have a laptop here (a local brand) which has a mute button with a LED. Currently the mute button works correctly but the
led is non-functional.

I've played through hda-analyzer and found out that it's enabled when you enable gpio3 and click out_dir. Clicking out_dir
again and again switches it on and off.

There's a mute led stuff in patch_sigmatel, sigmatel_spec has gpio_led and gpio_polarity information but alc_spec doesn't have.

How should we hook/patch that information into the codec?

I'll try to send the alsa-info output tomorrow.

Thanks.
Ozan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ALC268 - Driving mute led with GPIO
  2010-02-04 16:44 ALC268 - Driving mute led with GPIO Ozan Çağlayan
@ 2010-02-04 16:48 ` Takashi Iwai
  2010-02-04 17:04   ` Ozan Çağlayan
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2010-02-04 16:48 UTC (permalink / raw)
  To: Ozan Çağlayan; +Cc: alsa-devel

At Thu, 04 Feb 2010 18:44:48 +0200,
Ozan Çağlayan wrote:
> 
> Hi,
> 
> We have a laptop here (a local brand) which has a mute button with a LED. Currently the mute button works correctly but the
> led is non-functional.
> 
> I've played through hda-analyzer and found out that it's enabled when you enable gpio3 and click out_dir. Clicking out_dir
> again and again switches it on and off.
> 
> There's a mute led stuff in patch_sigmatel, sigmatel_spec has gpio_led and gpio_polarity information but alc_spec doesn't have.
> 
> How should we hook/patch that information into the codec?

This can be rather controlled in a different way, such as GPIO.

For example, if it's a HP machine, usually one of GPIO line
corresponds to the mute LED (sometimes it mutes the speaker via
BIOS).


Takashi


_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ALC268 - Driving mute led with GPIO
  2010-02-04 16:48 ` Takashi Iwai
@ 2010-02-04 17:04   ` Ozan Çağlayan
  2010-02-04 17:11     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Ozan Çağlayan @ 2010-02-04 17:04 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:
> At Thu, 04 Feb 2010 18:44:48 +0200,

> 
> This can be rather controlled in a different way, such as GPIO.
> 
> For example, if it's a HP machine, usually one of GPIO line
> corresponds to the mute LED (sometimes it mutes the speaker via
> BIOS).
> 

Um, that was what I thought and tried to ask too :)

So how should I proceed to make it work upon mutes? There are 4 GPIO lines and the last one seems to control
the mute LED but it doesn't mute the speaker.

Can it be done asynchronously with a callback which will send 1/0 to the GPIO channel on every mute/unmute?

Or should that be done synchronously in the code where the mute/unmute verbs are executed?

There are currently mute LED handlings only in sigmatel for some HP laptops which parses DMI data for the
exact GPIO channel.

If there are any other examples in the ALSA stack, that would be helpful too.

Regards,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ALC268 - Driving mute led with GPIO
  2010-02-04 17:04   ` Ozan Çağlayan
@ 2010-02-04 17:11     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2010-02-04 17:11 UTC (permalink / raw)
  To: Ozan Çağlayan; +Cc: alsa-devel

At Thu, 04 Feb 2010 19:04:50 +0200,
Ozan Çağlayan wrote:
> 
> Takashi Iwai wrote:
> > At Thu, 04 Feb 2010 18:44:48 +0200,
> 
> > 
> > This can be rather controlled in a different way, such as GPIO.
> > 
> > For example, if it's a HP machine, usually one of GPIO line
> > corresponds to the mute LED (sometimes it mutes the speaker via
> > BIOS).
> > 
> 
> Um, that was what I thought and tried to ask too :)
> 
> So how should I proceed to make it work upon mutes? There are 4 GPIO lines and the last one seems to control
> the mute LED but it doesn't mute the speaker.
> 
> Can it be done asynchronously with a callback which will send 1/0 to the GPIO channel on every mute/unmute?
> 
> Or should that be done synchronously in the code where the mute/unmute verbs are executed?

Simply depending on the implementation.
Either change the control put callback to toggle the GPIO in sync with
the mute state, or use power check callback like in patch_sigmatel.c.

> There are currently mute LED handlings only in sigmatel for some HP laptops which parses DMI data for the
> exact GPIO channel.

A similar thing is found for AD198x HP laptops.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-02-04 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04 16:44 ALC268 - Driving mute led with GPIO Ozan Çağlayan
2010-02-04 16:48 ` Takashi Iwai
2010-02-04 17:04   ` Ozan Çağlayan
2010-02-04 17:11     ` Takashi Iwai

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.