* Re: ALC1150 COEF
[not found] ` <s5h8ujgrext.wl-tiwai@suse.de>
@ 2014-11-12 10:02 ` Kailang
2014-11-12 10:32 ` Takashi Iwai
2014-11-19 7:13 ` HP mute led for ALC286 Kailang
1 sibling, 1 reply; 8+ messages in thread
From: Kailang @ 2014-11-12 10:02 UTC (permalink / raw)
To: Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)
[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]
I merge all codec into alc_fill_eapd_coef().
Please see attach.
Many Thanks. ^^
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, November 12, 2014 4:39 PM
> To: Kailang
> Subject: Re: ALC1150 COEF
>
> At Wed, 12 Nov 2014 08:27:56 +0000,
> Kailang wrote:
> >
> > Hi Takashi,
> >
> > I cooked a patch for this issue as attach.
> > It is not include ALC26x ALC28x ALC29x.
> > If you agree this patch,
> > could it merge into one patch?
>
> Yes, it looks good. Could you submit it with proper
> changelog etc as usual to alsa-devel ML? Then I'll queue it
> for 3.18-rc5.
>
>
> thanks,
>
> Takashi
>
> >
> > BR,
> > Kailang
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > Sent: Wednesday, November 12, 2014 4:08 AM
> > > To: Kailang
> > > Subject: ALC1150 COEF
> > >
> > > Hi Kailang,
> > >
> > > we've got bug reports about the silent output on mobos
> with ALC1150
> > > after Windows reboot. It seems that COEF 0x07 bit
> > > 0x02 plays some role. Could you check it?
> > > https://bugzilla.kernel.org/show_bug.cgi?id=87771
> > >
> > > thanks,
> > >
> > > Takashi
> > >
> > > ------Please consider the environment before printing this e-mail.
> > >
> > [2 0000-reset-eapd-control.patch <application/octet-stream
> (base64)>]
> >
>
[-- Attachment #2: 0000-change-eapd-to-verb-control.patch --]
[-- Type: application/octet-stream, Size: 4416 bytes --]
From 8c10c3640ebf61400c9c703ba8da22037a838d24 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Wed, 12 Nov 2014 17:38:08 +0800
Subject: [PATCH] ALSA: hda/realtek - Change EAPD to verb control
This will fix no sound in Linux system after reboot from windows.
Change log:
- alc662_fill_coef() is replaced with alc_fill_eapd_coef_idx()
and move into alc_auto_init_amp().
- For ALC262, ALC267, ALC268, ALC269, ALC233, ALC255, ALC280, ALC282,
ALC283, ALC284, ALC285, ALC286, ALC288, ALC290, ALC292, ALC293, ALC294,
ALC668, ALC888VC, ALC888VD, ALC891, ALC892, ALC898 and ALC1150, add update
COEF control for EAPD setting.
- Remove alc269_fill_coef() for update EAPD control line.
Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index da03693..9fbcbbd 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -288,6 +288,80 @@ static void alc880_unsol_event(struct hda_codec *codec, unsigned int res)
snd_hda_jack_unsol_event(codec, res >> 2);
}
+/* Change EAPD to verb control */
+static void alc_fill_eapd_coef(struct hda_codec *codec)
+{
+ int coef;
+
+ coef = alc_get_coef0(codec);
+
+ switch (codec->vendor_id) {
+ case 0x10ec0262:
+ alc_update_coef_idx(codec, 0x7, 0, 1<<5);
+ break;
+ case 0x10ec0267:
+ case 0x10ec0268:
+ alc_update_coef_idx(codec, 0x7, 0, 1<<13);
+ break;
+ case 0x10ec0269:
+ if ((coef & 0x00f0) == 0x0010)
+ alc_update_coef_idx(codec, 0xd, 0, 1<<14);
+ if ((coef & 0x00f0) == 0x0020)
+ alc_update_coef_idx(codec, 0x4, 1<<15, 0);
+ if ((coef & 0x00f0) == 0x0030)
+ alc_update_coef_idx(codec, 0x10, 1<<9, 0);
+ break;
+ case 0x10ec0280:
+ case 0x10ec0284:
+ case 0x10ec0290:
+ case 0x10ec0292:
+ alc_update_coef_idx(codec, 0x4, 1<<15, 0);
+ break;
+ case 0x10ec0233:
+ case 0x10ec0255:
+ case 0x10ec0282:
+ case 0x10ec0283:
+ case 0x10ec0286:
+ case 0x10ec0288:
+ alc_update_coef_idx(codec, 0x10, 1<<9, 0);
+ break;
+ case 0x10ec0285:
+ case 0x10ec0293:
+ alc_update_coef_idx(codec, 0xa, 1<<13, 0);
+ break;
+ case 0x10ec0662:
+ if ((coef & 0x00f0) == 0x0030)
+ alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */
+ break;
+ case 0x10ec0272:
+ case 0x10ec0273:
+ case 0x10ec0663:
+ case 0x10ec0665:
+ case 0x10ec0670:
+ case 0x10ec0671:
+ case 0x10ec0672:
+ alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */
+ break;
+ case 0x10ec0668:
+ alc_update_coef_idx(codec, 0x7, 3<<13, 0);
+ break;
+ case 0x10ec0867:
+ alc_update_coef_idx(codec, 0x4, 1<<10, 0);
+ break;
+ case 0x10ec0888:
+ if ((coef & 0x00f0) == 0x0020 || (coef & 0x00f0) == 0x0030)
+ alc_update_coef_idx(codec, 0x7, 1<<5, 0);
+ break;
+ case 0x10ec0892:
+ alc_update_coef_idx(codec, 0x7, 1<<5, 0);
+ break;
+ case 0x10ec0899:
+ case 0x10ec0900:
+ alc_update_coef_idx(codec, 0x7, 1<<1, 0);
+ break;
+ }
+}
+
/* additional initialization for ALC888 variants */
static void alc888_coef_init(struct hda_codec *codec)
{
@@ -339,6 +413,7 @@ static void alc_eapd_shutup(struct hda_codec *codec)
/* generic EAPD initialization */
static void alc_auto_init_amp(struct hda_codec *codec, int type)
{
+ alc_fill_eapd_coef(codec);
alc_auto_setup_eapd(codec, true);
switch (type) {
case ALC_INIT_GPIO1:
@@ -5212,9 +5287,6 @@ static void alc269_fill_coef(struct hda_codec *codec)
}
}
- /* Class D */
- alc_update_coef_idx(codec, 0xd, 0, 1<<14);
-
/* HP */
alc_update_coef_idx(codec, 0x4, 0, 1<<11);
}
@@ -6124,29 +6196,6 @@ static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = {
{}
};
-static void alc662_fill_coef(struct hda_codec *codec)
-{
- int coef;
-
- coef = alc_get_coef0(codec);
-
- switch (codec->vendor_id) {
- case 0x10ec0662:
- if ((coef & 0x00f0) == 0x0030)
- alc_update_coef_idx(codec, 0x4, 1<<10, 0); /* EAPD Ctrl */
- break;
- case 0x10ec0272:
- case 0x10ec0273:
- case 0x10ec0663:
- case 0x10ec0665:
- case 0x10ec0670:
- case 0x10ec0671:
- case 0x10ec0672:
- alc_update_coef_idx(codec, 0xd, 0, 1<<14); /* EAPD Ctrl */
- break;
- }
-}
-
/*
*/
static int patch_alc662(struct hda_codec *codec)
@@ -6169,10 +6218,6 @@ static int patch_alc662(struct hda_codec *codec)
case 0x10ec0668:
spec->init_hook = alc668_restore_default_value;
break;
- default:
- spec->init_hook = alc662_fill_coef;
- alc662_fill_coef(codec);
- break;
}
snd_hda_pick_fixup(codec, alc662_fixup_models,
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: ALC1150 COEF
2014-11-12 10:02 ` ALC1150 COEF Kailang
@ 2014-11-12 10:32 ` Takashi Iwai
0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2014-11-12 10:32 UTC (permalink / raw)
To: Kailang; +Cc: (alsa-devel@alsa-project.org)
At Wed, 12 Nov 2014 10:02:33 +0000,
Kailang wrote:
>
>
> I merge all codec into alc_fill_eapd_coef().
> Please see attach.
> Many Thanks. ^^
Thanks, I applied the patch with a few additional notes about the
problem.
Unfortunately, this can't go to stable kernel cleanly because it
requires the recent COEF accessor changes.
Takashi
>
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Wednesday, November 12, 2014 4:39 PM
> > To: Kailang
> > Subject: Re: ALC1150 COEF
> >
> > At Wed, 12 Nov 2014 08:27:56 +0000,
> > Kailang wrote:
> > >
> > > Hi Takashi,
> > >
> > > I cooked a patch for this issue as attach.
> > > It is not include ALC26x ALC28x ALC29x.
> > > If you agree this patch,
> > > could it merge into one patch?
> >
> > Yes, it looks good. Could you submit it with proper
> > changelog etc as usual to alsa-devel ML? Then I'll queue it
> > for 3.18-rc5.
> >
> >
> > thanks,
> >
> > Takashi
> >
> > >
> > > BR,
> > > Kailang
> > >
> > > > -----Original Message-----
> > > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > > Sent: Wednesday, November 12, 2014 4:08 AM
> > > > To: Kailang
> > > > Subject: ALC1150 COEF
> > > >
> > > > Hi Kailang,
> > > >
> > > > we've got bug reports about the silent output on mobos
> > with ALC1150
> > > > after Windows reboot. It seems that COEF 0x07 bit
> > > > 0x02 plays some role. Could you check it?
> > > > https://bugzilla.kernel.org/show_bug.cgi?id=87771
> > > >
> > > > thanks,
> > > >
> > > > Takashi
> > > >
> > > > ------Please consider the environment before printing this e-mail.
> > > >
> > > [2 0000-reset-eapd-control.patch <application/octet-stream
> > (base64)>]
> > >
> >
> [2 0000-change-eapd-to-verb-control.patch <application/octet-stream (base64)>]
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* HP mute led for ALC286
[not found] ` <s5h8ujgrext.wl-tiwai@suse.de>
2014-11-12 10:02 ` ALC1150 COEF Kailang
@ 2014-11-19 7:13 ` Kailang
2014-11-19 11:27 ` Takashi Iwai
1 sibling, 1 reply; 8+ messages in thread
From: Kailang @ 2014-11-19 7:13 UTC (permalink / raw)
To: Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
Hi Takashi,
I had sent the discussion mail about the DMI string for HP.
But no body response.
So, I just send the patch to fix this issue.
BR,
Kailang
[-- Attachment #2: 0000-supported-HP-mute-led-alc286.patch --]
[-- Type: application/octet-stream, Size: 3423 bytes --]
From 9f64da905ec7dbfeaee67f1b1850d9e6db2b8571 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Wed, 19 Nov 2014 14:58:19 +0800
Subject: [PATCH] ALSA: hda/realtek - Supported HP mute Led for ALC286
New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.
Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1723954..b71ae7c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3448,6 +3448,60 @@ static void alc269_fixup_hp_line1_mic1_led(struct hda_codec *codec,
}
}
+static void alc286_fixup_hp_gpio_mute_hook(void *private_data, int enabled)
+{
+ struct hda_codec *codec = private_data;
+ struct alc_spec *spec = codec->spec;
+ unsigned int oldval = spec->gpio_led;
+
+ if (enabled)
+ spec->gpio_led &= ~0x02;
+ else
+ spec->gpio_led |= 0x02;
+ if (spec->gpio_led != oldval)
+ snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
+ spec->gpio_led);
+}
+
+/* turn on/off mic-mute LED per capture hook */
+static void alc286_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec,
+ struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ struct alc_spec *spec = codec->spec;
+ unsigned int oldval = spec->gpio_led;
+
+ if (!ucontrol)
+ return;
+
+ if (ucontrol->value.integer.value[0] ||
+ ucontrol->value.integer.value[1])
+ spec->gpio_led &= ~0x20;
+ else
+ spec->gpio_led |= 0x20;
+ if (spec->gpio_led != oldval)
+ snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
+ spec->gpio_led);
+}
+
+static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static const struct hda_verb gpio_init[] = {
+ { 0x01, AC_VERB_SET_GPIO_MASK, 0x22 },
+ { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x22 },
+ {}
+ };
+
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->gen.vmaster_mute.hook = alc286_fixup_hp_gpio_mute_hook;
+ spec->gen.cap_sync_hook = alc286_fixup_hp_gpio_mic_mute_hook;
+ spec->gpio_led = 0;
+ snd_hda_add_verbs(codec, gpio_init);
+ }
+}
+
static void alc_headset_mode_unplugged(struct hda_codec *codec)
{
static struct coef_fw coef0255[] = {
@@ -4300,6 +4354,7 @@ enum {
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
ALC282_FIXUP_ASPIRE_V5_PINS,
ALC280_FIXUP_HP_GPIO4,
+ ALC286_FIXUP_HP_GPIO_LED,
};
static const struct hda_fixup alc269_fixups[] = {
@@ -4767,6 +4822,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc280_fixup_hp_gpio4,
},
+ [ALC286_FIXUP_HP_GPIO_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc286_fixup_hp_gpio_led,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -4807,6 +4866,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: HP mute led for ALC286
2014-11-19 7:13 ` HP mute led for ALC286 Kailang
@ 2014-11-19 11:27 ` Takashi Iwai
2014-11-20 7:04 ` Kailang
0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2014-11-19 11:27 UTC (permalink / raw)
To: Kailang; +Cc: (alsa-devel@alsa-project.org)
At Wed, 19 Nov 2014 07:13:16 +0000,
Kailang wrote:
>
> Hi Takashi,
>
> I had sent the discussion mail about the DMI string for HP.
> But no body response.
> So, I just send the patch to fix this issue.
I'd like to avoid the duplicated open codes, so could you try the
patch below and rewrite your patch to follow this? You'd just need to
set like:
spec->gpio_mute_led_mask = 0x02;
spec->gpio_mic_led_mask = 0x20;
pec->mute_led_polarity = 0;
then you can use the existing alc_fixup_gpio_mute_hook and
alc_fixup_gpio_mic_mute_hook.
thanks,
Takashi
-- 8< --
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: hda/realtek - Clean up mute/mic GPIO LED handling
There are a few duplicated codes handling the mute and mic-mute LEDs
via GPIO pins. Let's consolidate to single helpers. Here we
introduced two new fields to alc_spec, gpio_mute_led_mask and
gpio_mic_led_mask, to contain the bit mask to set/clear. Also,
mute_led_polarity is evaluated as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/patch_realtek.c | 81 +++++++++++++++++++++----------------------
1 file changed, 40 insertions(+), 41 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1af917f58a70..3c29a558e7db 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -96,6 +96,8 @@ struct alc_spec {
hda_nid_t cap_mute_led_nid;
unsigned int gpio_led; /* used for alc269_fixup_hp_gpio_led() */
+ unsigned int gpio_mute_led_mask;
+ unsigned int gpio_mic_led_mask;
hda_nid_t headset_mic_pin;
hda_nid_t headphone_mic_pin;
@@ -3235,41 +3237,45 @@ static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec,
}
}
-/* turn on/off mute LED per vmaster hook */
-static void alc269_fixup_hp_gpio_mute_hook(void *private_data, int enabled)
+/* update LED status via GPIO */
+static void alc_update_gpio_led(struct hda_codec *codec, unsigned int mask,
+ bool enabled)
{
- struct hda_codec *codec = private_data;
struct alc_spec *spec = codec->spec;
unsigned int oldval = spec->gpio_led;
+ if (spec->mute_led_polarity)
+ enabled = !enabled;
+
if (enabled)
- spec->gpio_led &= ~0x08;
+ spec->gpio_led &= ~mask;
else
- spec->gpio_led |= 0x08;
+ spec->gpio_led |= mask;
if (spec->gpio_led != oldval)
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
spec->gpio_led);
}
-/* turn on/off mic-mute LED per capture hook */
-static void alc269_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec,
- struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
+/* turn on/off mute LED via GPIO per vmaster hook */
+static void alc_fixup_gpio_mute_hook(void *private_data, int enabled)
{
+ struct hda_codec *codec = private_data;
struct alc_spec *spec = codec->spec;
- unsigned int oldval = spec->gpio_led;
- if (!ucontrol)
- return;
+ alc_update_gpio_led(codec, spec->gpio_mute_led_mask, enabled);
+}
- if (ucontrol->value.integer.value[0] ||
- ucontrol->value.integer.value[1])
- spec->gpio_led &= ~0x10;
- else
- spec->gpio_led |= 0x10;
- if (spec->gpio_led != oldval)
- snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
- spec->gpio_led);
+/* turn on/off mic-mute LED via GPIO per capture hook */
+static void alc_fixup_gpio_mic_mute_hook(struct hda_codec *codec,
+ struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
+{
+ struct alc_spec *spec = codec->spec;
+
+ if (ucontrol)
+ alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
+ ucontrol->value.integer.value[0] ||
+ ucontrol->value.integer.value[1]);
}
static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
@@ -3283,9 +3289,12 @@ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
};
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
- spec->gen.vmaster_mute.hook = alc269_fixup_hp_gpio_mute_hook;
- spec->gen.cap_sync_hook = alc269_fixup_hp_gpio_mic_mute_hook;
+ spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
+ spec->gen.cap_sync_hook = alc_fixup_gpio_mic_mute_hook;
spec->gpio_led = 0;
+ spec->mute_led_polarity = 0;
+ spec->gpio_mute_led_mask = 0x08;
+ spec->gpio_mic_led_mask = 0x10;
snd_hda_add_verbs(codec, gpio_init);
}
}
@@ -3327,9 +3336,11 @@ static void alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
};
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
- spec->gen.vmaster_mute.hook = alc269_fixup_hp_gpio_mute_hook;
+ spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
spec->gen.cap_sync_hook = alc269_fixup_hp_cap_mic_mute_hook;
spec->gpio_led = 0;
+ spec->mute_led_polarity = 0;
+ spec->gpio_mute_led_mask = 0x08;
spec->cap_mute_led_nid = 0x18;
snd_hda_add_verbs(codec, gpio_init);
codec->power_filter = led_power_filter;
@@ -3348,9 +3359,11 @@ static void alc280_fixup_hp_gpio4(struct hda_codec *codec,
};
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
- spec->gen.vmaster_mute.hook = alc269_fixup_hp_gpio_mute_hook;
+ spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
spec->gen.cap_sync_hook = alc269_fixup_hp_cap_mic_mute_hook;
spec->gpio_led = 0;
+ spec->mute_led_polarity = 0;
+ spec->gpio_mute_led_mask = 0x08;
spec->cap_mute_led_nid = 0x18;
snd_hda_add_verbs(codec, gpio_init);
codec->power_filter = led_power_filter;
@@ -5624,22 +5637,6 @@ static void alc_fixup_bass_chmap(struct hda_codec *codec,
}
}
-/* turn on/off mute LED per vmaster hook */
-static void alc662_led_gpio1_mute_hook(void *private_data, int enabled)
-{
- struct hda_codec *codec = private_data;
- struct alc_spec *spec = codec->spec;
- unsigned int oldval = spec->gpio_led;
-
- if (enabled)
- spec->gpio_led |= 0x01;
- else
- spec->gpio_led &= ~0x01;
- if (spec->gpio_led != oldval)
- snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
- spec->gpio_led);
-}
-
/* avoid D3 for keeping GPIO up */
static unsigned int gpio_led_power_filter(struct hda_codec *codec,
hda_nid_t nid,
@@ -5662,8 +5659,10 @@ static void alc662_fixup_led_gpio1(struct hda_codec *codec,
};
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
- spec->gen.vmaster_mute.hook = alc662_led_gpio1_mute_hook;
+ spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
spec->gpio_led = 0;
+ spec->mute_led_polarity = 1;
+ spec->gpio_mute_led_mask = 0x01;
snd_hda_add_verbs(codec, gpio_init);
codec->power_filter = gpio_led_power_filter;
}
--
2.1.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: HP mute led for ALC286
2014-11-19 11:27 ` Takashi Iwai
@ 2014-11-20 7:04 ` Kailang
2014-11-20 10:05 ` Takashi Iwai
0 siblings, 1 reply; 8+ messages in thread
From: Kailang @ 2014-11-20 7:04 UTC (permalink / raw)
To: Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)
[-- Attachment #1: Type: text/plain, Size: 7456 bytes --]
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Wednesday, November 19, 2014 7:28 PM
> To: Kailang
> Cc: (alsa-devel@alsa-project.org)
> Subject: Re: HP mute led for ALC286
>
> At Wed, 19 Nov 2014 07:13:16 +0000,
> Kailang wrote:
> >
> > Hi Takashi,
> >
> > I had sent the discussion mail about the DMI string for HP.
> > But no body response.
> > So, I just send the patch to fix this issue.
>
> I'd like to avoid the duplicated open codes, so could you try
> the patch below and rewrite your patch to follow this? You'd
> just need to set like:
> spec->gpio_mute_led_mask = 0x02;
> spec->gpio_mic_led_mask = 0x20;
> pec->mute_led_polarity = 0;
> then you can use the existing alc_fixup_gpio_mute_hook and
> alc_fixup_gpio_mic_mute_hook.
I modified as attach patch. ^^
>
>
> thanks,
>
> Takashi
>
> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ALSA: hda/realtek - Clean up mute/mic GPIO
> LED handling
>
> There are a few duplicated codes handling the mute and
> mic-mute LEDs via GPIO pins. Let's consolidate to single
> helpers. Here we introduced two new fields to alc_spec,
> gpio_mute_led_mask and gpio_mic_led_mask, to contain the bit
> mask to set/clear. Also, mute_led_polarity is evaluated as well.
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/pci/hda/patch_realtek.c | 81
> +++++++++++++++++++++----------------------
> 1 file changed, 40 insertions(+), 41 deletions(-)
>
> diff --git a/sound/pci/hda/patch_realtek.c
> b/sound/pci/hda/patch_realtek.c index
> 1af917f58a70..3c29a558e7db 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -96,6 +96,8 @@ struct alc_spec {
> hda_nid_t cap_mute_led_nid;
>
> unsigned int gpio_led; /* used for alc269_fixup_hp_gpio_led() */
> + unsigned int gpio_mute_led_mask;
> + unsigned int gpio_mic_led_mask;
>
> hda_nid_t headset_mic_pin;
> hda_nid_t headphone_mic_pin;
> @@ -3235,41 +3237,45 @@ static void
> alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec,
> }
> }
>
> -/* turn on/off mute LED per vmaster hook */ -static void
> alc269_fixup_hp_gpio_mute_hook(void *private_data, int enabled)
> +/* update LED status via GPIO */
> +static void alc_update_gpio_led(struct hda_codec *codec,
> unsigned int mask,
> + bool enabled)
> {
> - struct hda_codec *codec = private_data;
> struct alc_spec *spec = codec->spec;
> unsigned int oldval = spec->gpio_led;
>
> + if (spec->mute_led_polarity)
> + enabled = !enabled;
> +
> if (enabled)
> - spec->gpio_led &= ~0x08;
> + spec->gpio_led &= ~mask;
> else
> - spec->gpio_led |= 0x08;
> + spec->gpio_led |= mask;
> if (spec->gpio_led != oldval)
> snd_hda_codec_write(codec, 0x01, 0,
> AC_VERB_SET_GPIO_DATA,
> spec->gpio_led);
> }
>
> -/* turn on/off mic-mute LED per capture hook */ -static void
> alc269_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec,
> - struct
> snd_kcontrol *kcontrol,
> - struct
> snd_ctl_elem_value *ucontrol)
> +/* turn on/off mute LED via GPIO per vmaster hook */ static void
> +alc_fixup_gpio_mute_hook(void *private_data, int enabled)
> {
> + struct hda_codec *codec = private_data;
> struct alc_spec *spec = codec->spec;
> - unsigned int oldval = spec->gpio_led;
>
> - if (!ucontrol)
> - return;
> + alc_update_gpio_led(codec, spec->gpio_mute_led_mask, enabled); }
>
> - if (ucontrol->value.integer.value[0] ||
> - ucontrol->value.integer.value[1])
> - spec->gpio_led &= ~0x10;
> - else
> - spec->gpio_led |= 0x10;
> - if (spec->gpio_led != oldval)
> - snd_hda_codec_write(codec, 0x01, 0,
> AC_VERB_SET_GPIO_DATA,
> - spec->gpio_led);
> +/* turn on/off mic-mute LED via GPIO per capture hook */ static void
> +alc_fixup_gpio_mic_mute_hook(struct hda_codec *codec,
> + struct snd_kcontrol *kcontrol,
> + struct
> snd_ctl_elem_value *ucontrol) {
> + struct alc_spec *spec = codec->spec;
> +
> + if (ucontrol)
> + alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
> + ucontrol->value.integer.value[0] ||
> + ucontrol->value.integer.value[1]);
> }
>
> static void alc269_fixup_hp_gpio_led(struct hda_codec
> *codec, @@ -3283,9 +3289,12 @@ static void
> alc269_fixup_hp_gpio_led(struct hda_codec *codec,
> };
>
> if (action == HDA_FIXUP_ACT_PRE_PROBE) {
> - spec->gen.vmaster_mute.hook =
> alc269_fixup_hp_gpio_mute_hook;
> - spec->gen.cap_sync_hook =
> alc269_fixup_hp_gpio_mic_mute_hook;
> + spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
> + spec->gen.cap_sync_hook = alc_fixup_gpio_mic_mute_hook;
> spec->gpio_led = 0;
> + spec->mute_led_polarity = 0;
> + spec->gpio_mute_led_mask = 0x08;
> + spec->gpio_mic_led_mask = 0x10;
> snd_hda_add_verbs(codec, gpio_init);
> }
> }
> @@ -3327,9 +3336,11 @@ static void
> alc269_fixup_hp_gpio_mic1_led(struct hda_codec *codec,
> };
>
> if (action == HDA_FIXUP_ACT_PRE_PROBE) {
> - spec->gen.vmaster_mute.hook =
> alc269_fixup_hp_gpio_mute_hook;
> + spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
> spec->gen.cap_sync_hook =
> alc269_fixup_hp_cap_mic_mute_hook;
> spec->gpio_led = 0;
> + spec->mute_led_polarity = 0;
> + spec->gpio_mute_led_mask = 0x08;
> spec->cap_mute_led_nid = 0x18;
> snd_hda_add_verbs(codec, gpio_init);
> codec->power_filter = led_power_filter; @@
> -3348,9 +3359,11 @@ static void alc280_fixup_hp_gpio4(struct
> hda_codec *codec,
> };
>
> if (action == HDA_FIXUP_ACT_PRE_PROBE) {
> - spec->gen.vmaster_mute.hook =
> alc269_fixup_hp_gpio_mute_hook;
> + spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
> spec->gen.cap_sync_hook =
> alc269_fixup_hp_cap_mic_mute_hook;
> spec->gpio_led = 0;
> + spec->mute_led_polarity = 0;
> + spec->gpio_mute_led_mask = 0x08;
> spec->cap_mute_led_nid = 0x18;
> snd_hda_add_verbs(codec, gpio_init);
> codec->power_filter = led_power_filter; @@
> -5624,22 +5637,6 @@ static void alc_fixup_bass_chmap(struct
> hda_codec *codec,
> }
> }
>
> -/* turn on/off mute LED per vmaster hook */ -static void
> alc662_led_gpio1_mute_hook(void *private_data, int enabled) -{
> - struct hda_codec *codec = private_data;
> - struct alc_spec *spec = codec->spec;
> - unsigned int oldval = spec->gpio_led;
> -
> - if (enabled)
> - spec->gpio_led |= 0x01;
> - else
> - spec->gpio_led &= ~0x01;
> - if (spec->gpio_led != oldval)
> - snd_hda_codec_write(codec, 0x01, 0,
> AC_VERB_SET_GPIO_DATA,
> - spec->gpio_led);
> -}
> -
> /* avoid D3 for keeping GPIO up */
> static unsigned int gpio_led_power_filter(struct hda_codec *codec,
> hda_nid_t nid,
> @@ -5662,8 +5659,10 @@ static void
> alc662_fixup_led_gpio1(struct hda_codec *codec,
> };
>
> if (action == HDA_FIXUP_ACT_PRE_PROBE) {
> - spec->gen.vmaster_mute.hook =
> alc662_led_gpio1_mute_hook;
> + spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
> spec->gpio_led = 0;
> + spec->mute_led_polarity = 1;
> + spec->gpio_mute_led_mask = 0x01;
> snd_hda_add_verbs(codec, gpio_init);
> codec->power_filter = gpio_led_power_filter;
> }
> --
> 2.1.3
>
>
> ------Please consider the environment before printing this e-mail.
>
[-- Attachment #2: 0001-supported-HP-mute-led-alc286.patch --]
[-- Type: application/octet-stream, Size: 3572 bytes --]
From 039b12f77fdcb1f75a964fbf781dcc57c4a18dee Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Thu, 20 Nov 2014 14:58:08 +0800
Subject: [PATCH] ALSA: hda/realtek - Supported HP mute Led for ALC286
New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.
Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8fea1b8..28316f8 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -92,6 +92,8 @@ struct alc_spec {
/* mute LED for HP laptops, see alc269_fixup_mic_mute_hook() */
int mute_led_polarity;
+ unsigned int gpio_spk_mute_led_mask;
+ unsigned int gpio_mic_mute_led_mask;
hda_nid_t mute_led_nid;
hda_nid_t cap_mute_led_nid;
@@ -3311,23 +3313,23 @@ static void alc269_fixup_hp_mute_led_mic2(struct hda_codec *codec,
}
/* turn on/off mute LED per vmaster hook */
-static void alc269_fixup_hp_gpio_mute_hook(void *private_data, int enabled)
+static void alc_fixup_hp_gpio_mute_hook(void *private_data, int enabled)
{
struct hda_codec *codec = private_data;
struct alc_spec *spec = codec->spec;
unsigned int oldval = spec->gpio_led;
if (enabled)
- spec->gpio_led &= ~0x08;
+ spec->gpio_led &= ~spec->gpio_spk_mute_led_mask;
else
- spec->gpio_led |= 0x08;
+ spec->gpio_led |= spec->gpio_spk_mute_led_mask;
if (spec->gpio_led != oldval)
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
spec->gpio_led);
}
/* turn on/off mic-mute LED per capture hook */
-static void alc269_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec,
+static void alc_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec,
struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
@@ -3339,9 +3341,9 @@ static void alc269_fixup_hp_gpio_mic_mute_hook(struct hda_codec *codec,
if (ucontrol->value.integer.value[0] ||
ucontrol->value.integer.value[1])
- spec->gpio_led &= ~0x10;
+ spec->gpio_led &= ~spec->gpio_mic_mute_led_mask;
else
- spec->gpio_led |= 0x10;
+ spec->gpio_led |= spec->gpio_mic_mute_led_mask;
if (spec->gpio_led != oldval)
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
spec->gpio_led);
@@ -3356,10 +3358,30 @@ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
{ 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x18 },
{}
};
+ spec->gpio_spk_mute_led_mask = 0x08;
+ spec->gpio_mic_mute_led_mask = 0x10;
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->gen.vmaster_mute.hook = alc_fixup_hp_gpio_mute_hook;
+ spec->gen.cap_sync_hook = alc_fixup_hp_gpio_mic_mute_hook;
+ spec->gpio_led = 0;
+ snd_hda_add_verbs(codec, gpio_init);
+ }
+}
- if (action == HDA_FIXUP_ACT_PRE_PROBE) {
- spec->gen.vmaster_mute.hook = alc269_fixup_hp_gpio_mute_hook;
- spec->gen.cap_sync_hook = alc269_fixup_hp_gpio_mic_mute_hook;
+static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static const struct hda_verb gpio_init[] = {
+ { 0x01, AC_VERB_SET_GPIO_MASK, 0x22 },
+ { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x22 },
+ {}
+ };
+ spec->gpio_spk_mute_led_mask = 0x02;
+ spec->gpio_mic_mute_led_mask = 0x20;
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->gen.vmaster_mute.hook = alc_fixup_hp_gpio_mute_hook;
+ spec->gen.cap_sync_hook = alc_fixup_hp_gpio_mic_mute_hook;
spec->gpio_led = 0;
snd_hda_add_verbs(codec, gpio_init);
}
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: HP mute led for ALC286
2014-11-20 7:04 ` Kailang
@ 2014-11-20 10:05 ` Takashi Iwai
2014-11-21 7:56 ` Kailang
0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2014-11-20 10:05 UTC (permalink / raw)
To: Kailang; +Cc: (alsa-devel@alsa-project.org)
At Thu, 20 Nov 2014 07:04:01 +0000,
Kailang wrote:
>
>
>
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Wednesday, November 19, 2014 7:28 PM
> > To: Kailang
> > Cc: (alsa-devel@alsa-project.org)
> > Subject: Re: HP mute led for ALC286
> >
> > At Wed, 19 Nov 2014 07:13:16 +0000,
> > Kailang wrote:
> > >
> > > Hi Takashi,
> > >
> > > I had sent the discussion mail about the DMI string for HP.
> > > But no body response.
> > > So, I just send the patch to fix this issue.
> >
> > I'd like to avoid the duplicated open codes, so could you try
> > the patch below and rewrite your patch to follow this? You'd
> > just need to set like:
> > spec->gpio_mute_led_mask = 0x02;
> > spec->gpio_mic_led_mask = 0x20;
> > pec->mute_led_polarity = 0;
> > then you can use the existing alc_fixup_gpio_mute_hook and
> > alc_fixup_gpio_mic_mute_hook.
>
> I modified as attach patch. ^^
Oh, no, I meant an additional patch on top of my previous patch, not
folding into that one.
For your ease, I applied my patch to for-next branch now, so that you
can rewrite the patch to be applicable to there.
thanks,
Takashi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HP mute led for ALC286
2014-11-20 10:05 ` Takashi Iwai
@ 2014-11-21 7:56 ` Kailang
2014-11-21 9:59 ` Takashi Iwai
0 siblings, 1 reply; 8+ messages in thread
From: Kailang @ 2014-11-21 7:56 UTC (permalink / raw)
To: Takashi Iwai; +Cc: (alsa-devel@alsa-project.org)
[-- Attachment #1: Type: text/plain, Size: 1671 bytes --]
Hi Takashi,
I'm sorry for that. Maybe I had not do git pull.
BR,
Kailang
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: Thursday, November 20, 2014 6:06 PM
> To: Kailang
> Cc: (alsa-devel@alsa-project.org)
> Subject: Re: HP mute led for ALC286
>
> At Thu, 20 Nov 2014 07:04:01 +0000,
> Kailang wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > Sent: Wednesday, November 19, 2014 7:28 PM
> > > To: Kailang
> > > Cc: (alsa-devel@alsa-project.org)
> > > Subject: Re: HP mute led for ALC286
> > >
> > > At Wed, 19 Nov 2014 07:13:16 +0000,
> > > Kailang wrote:
> > > >
> > > > Hi Takashi,
> > > >
> > > > I had sent the discussion mail about the DMI string for HP.
> > > > But no body response.
> > > > So, I just send the patch to fix this issue.
> > >
> > > I'd like to avoid the duplicated open codes, so could you try the
> > > patch below and rewrite your patch to follow this? You'd
> just need
> > > to set like:
> > > spec->gpio_mute_led_mask = 0x02;
> > > spec->gpio_mic_led_mask = 0x20;
> > > pec->mute_led_polarity = 0;
> > > then you can use the existing alc_fixup_gpio_mute_hook and
> > > alc_fixup_gpio_mic_mute_hook.
> >
> > I modified as attach patch. ^^
>
> Oh, no, I meant an additional patch on top of my previous
> patch, not folding into that one.
>
> For your ease, I applied my patch to for-next branch now, so
> that you can rewrite the patch to be applicable to there.
>
>
> thanks,
>
> Takashi
>
> ------Please consider the environment before printing this e-mail.
>
[-- Attachment #2: 0002-supported-HP-mute-led-alc286.patch --]
[-- Type: application/octet-stream, Size: 2562 bytes --]
From c88b23caee6287f9be4ebe4a33ad0a3a867df3a1 Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Fri, 21 Nov 2014 15:49:11 +0800
Subject: [PATCH] ALSA: hda/realtek - Supported HP mute Led for ALC286
New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.
Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cd08d8a..0c1cad5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3374,6 +3374,27 @@ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec,
}
}
+static void alc286_fixup_hp_gpio_led(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static const struct hda_verb gpio_init[] = {
+ { 0x01, AC_VERB_SET_GPIO_MASK, 0x22 },
+ { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x22 },
+ {}
+ };
+
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook;
+ spec->gen.cap_sync_hook = alc_fixup_gpio_mic_mute_hook;
+ spec->gpio_led = 0;
+ spec->mute_led_polarity = 0;
+ spec->gpio_mute_led_mask = 0x02;
+ spec->gpio_mic_led_mask = 0x20;
+ snd_hda_add_verbs(codec, gpio_init);
+ }
+}
+
/* turn on/off mic-mute LED per capture hook */
static void alc269_fixup_hp_cap_mic_mute_hook(struct hda_codec *codec,
struct snd_kcontrol *kcontrol,
@@ -4313,6 +4334,7 @@ enum {
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
ALC282_FIXUP_ASPIRE_V5_PINS,
ALC280_FIXUP_HP_GPIO4,
+ ALC286_FIXUP_HP_GPIO_LED,
};
static const struct hda_fixup alc269_fixups[] = {
@@ -4782,6 +4804,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc280_fixup_hp_gpio4,
},
+ [ALC286_FIXUP_HP_GPIO_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc286_fixup_hp_gpio_led,
+ },
};
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -4820,6 +4846,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x226e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2271, "HP", ALC286_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: HP mute led for ALC286
2014-11-21 7:56 ` Kailang
@ 2014-11-21 9:59 ` Takashi Iwai
0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2014-11-21 9:59 UTC (permalink / raw)
To: Kailang; +Cc: (alsa-devel@alsa-project.org)
At Fri, 21 Nov 2014 07:56:29 +0000,
Kailang wrote:
>
> Hi Takashi,
>
> I'm sorry for that. Maybe I had not do git pull.
Applied now, thanks.
Takashi
>
> BR,
> Kailang
>
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Thursday, November 20, 2014 6:06 PM
> > To: Kailang
> > Cc: (alsa-devel@alsa-project.org)
> > Subject: Re: HP mute led for ALC286
> >
> > At Thu, 20 Nov 2014 07:04:01 +0000,
> > Kailang wrote:
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Takashi Iwai [mailto:tiwai@suse.de]
> > > > Sent: Wednesday, November 19, 2014 7:28 PM
> > > > To: Kailang
> > > > Cc: (alsa-devel@alsa-project.org)
> > > > Subject: Re: HP mute led for ALC286
> > > >
> > > > At Wed, 19 Nov 2014 07:13:16 +0000,
> > > > Kailang wrote:
> > > > >
> > > > > Hi Takashi,
> > > > >
> > > > > I had sent the discussion mail about the DMI string for HP.
> > > > > But no body response.
> > > > > So, I just send the patch to fix this issue.
> > > >
> > > > I'd like to avoid the duplicated open codes, so could you try the
> > > > patch below and rewrite your patch to follow this? You'd
> > just need
> > > > to set like:
> > > > spec->gpio_mute_led_mask = 0x02;
> > > > spec->gpio_mic_led_mask = 0x20;
> > > > pec->mute_led_polarity = 0;
> > > > then you can use the existing alc_fixup_gpio_mute_hook and
> > > > alc_fixup_gpio_mic_mute_hook.
> > >
> > > I modified as attach patch. ^^
> >
> > Oh, no, I meant an additional patch on top of my previous
> > patch, not folding into that one.
> >
> > For your ease, I applied my patch to for-next branch now, so
> > that you can rewrite the patch to be applicable to there.
> >
> >
> > thanks,
> >
> > Takashi
> >
> > ------Please consider the environment before printing this e-mail.
> >
> [2 0002-supported-HP-mute-led-alc286.patch <application/octet-stream (base64)>]
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-11-21 9:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <s5hr3x9qz5j.wl-tiwai@suse.de>
[not found] ` <6FAB7C47BCF00940BB0999A99BE3547A179FB004@RTITMBSV09.realtek.com.tw>
[not found] ` <s5h8ujgrext.wl-tiwai@suse.de>
2014-11-12 10:02 ` ALC1150 COEF Kailang
2014-11-12 10:32 ` Takashi Iwai
2014-11-19 7:13 ` HP mute led for ALC286 Kailang
2014-11-19 11:27 ` Takashi Iwai
2014-11-20 7:04 ` Kailang
2014-11-20 10:05 ` Takashi Iwai
2014-11-21 7:56 ` Kailang
2014-11-21 9:59 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox