* [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) @ 2013-11-06 13:21 David Henningsson 2013-11-06 17:27 ` Takashi Iwai 0 siblings, 1 reply; 6+ messages in thread From: David Henningsson @ 2013-11-06 13:21 UTC (permalink / raw) To: alsa-devel, tiwai, alex.hung; +Cc: hui.wang, yk, David Henningsson There are many Lenovo machines with mute and/or mic-mute LEDs, so a quirk list with every SSID would be a lot of maintenance. Instead make a vendor quirk in combination with letting the most common existing quirks also chain to the thinkpad_acpi quirk. Signed-off-by: David Henningsson <david.henningsson@canonical.com> --- sound/pci/hda/patch_realtek.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) @Takashi, So, when we had a look at which machines we wanted to add support for, we found about 10 - 15 machines right away, and that's just the tip of the iceberg. So adding machine quirks just doesn't seem like the right way to go. I think our quirking system is becoming a bit limited here - as the "limit mic boost" quirk was used by several vendors I did an hackish chain instead of the normal .chain method. Open for less hackish solutions if you have any? @Alex Hung, this will start to hit Ideapads also, not only Thinkpads. Do you think there is any harm in that happening to Ideapads and similar, or do we have a good way to avoid machines that are not Thinkpads (and thus shouldn't call thinkpad-acpi, I assume)? diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 215db60..ce30bc4 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3424,6 +3424,10 @@ static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, struct auto_pin_cfg *cfg = &spec->gen.autocfg; int i; + /* Chain to thinkpad_acpi, only if Lenovo */ + if (codec->bus->pci->subsystem_vendor == 0x17aa) + alc_fixup_thinkpad_acpi(codec, fix, action); + /* The mic boosts on level 2 and 3 are too noisy on the internal mic input. Therefore limit the boost to 0 or 1. */ @@ -3697,6 +3701,8 @@ static const struct hda_fixup alc269_fixups[] = { [ALC269_FIXUP_SKU_IGNORE] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_sku_ignore, + .chained = true, + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, }, [ALC269_FIXUP_ASUS_G73JW] = { .type = HDA_FIXUP_PINS, @@ -3823,6 +3829,8 @@ static const struct hda_fixup alc269_fixups[] = { [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { .type = HDA_FIXUP_FUNC, .v.func = alc269_fixup_pincfg_no_hp_to_lineout, + .chained = true, + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, }, [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { .type = HDA_FIXUP_PINS, @@ -3970,8 +3978,6 @@ static const struct hda_fixup alc269_fixups[] = { [ALC269_FIXUP_THINKPAD_ACPI] = { .type = HDA_FIXUP_FUNC, .v.func = alc_fixup_thinkpad_acpi, - .chained = true, - .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST }, }; @@ -4057,7 +4063,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), - SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), + SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), @@ -4065,6 +4071,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), + SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", ALC269_FIXUP_THINKPAD_ACPI), SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ #if 0 -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) 2013-11-06 13:21 [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) David Henningsson @ 2013-11-06 17:27 ` Takashi Iwai 2013-11-06 17:42 ` Takashi Iwai 2013-11-07 2:38 ` Hui Wang 0 siblings, 2 replies; 6+ messages in thread From: Takashi Iwai @ 2013-11-06 17:27 UTC (permalink / raw) To: David Henningsson; +Cc: hui.wang, alsa-devel, yk, alex.hung At Wed, 6 Nov 2013 14:21:36 +0100, David Henningsson wrote: > > There are many Lenovo machines with mute and/or mic-mute LEDs, so > a quirk list with every SSID would be a lot of maintenance. > > Instead make a vendor quirk in combination with letting the most > common existing quirks also chain to the thinkpad_acpi quirk. > > Signed-off-by: David Henningsson <david.henningsson@canonical.com> > --- > sound/pci/hda/patch_realtek.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > @Takashi, > So, when we had a look at which machines we wanted to add support for, we found > about 10 - 15 machines right away, and that's just the tip of the iceberg. So > adding machine quirks just doesn't seem like the right way to go. > > I think our quirking system is becoming a bit limited here - as the "limit mic > boost" quirk was used by several vendors I did an hackish chain instead of the > normal .chain method. Open for less hackish solutions if you have any? > > @Alex Hung, > this will start to hit Ideapads also, not only Thinkpads. Do you think > there is any harm in that happening to Ideapads and similar, or do we have a > good way to avoid machines that are not Thinkpads (and thus shouldn't call > thinkpad-acpi, I assume)? There are lots of old Ideapads with ALC269, and I don't think they have ACPI mute control. Takashi > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index 215db60..ce30bc4 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -3424,6 +3424,10 @@ static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, > struct auto_pin_cfg *cfg = &spec->gen.autocfg; > int i; > > + /* Chain to thinkpad_acpi, only if Lenovo */ > + if (codec->bus->pci->subsystem_vendor == 0x17aa) > + alc_fixup_thinkpad_acpi(codec, fix, action); > + > /* The mic boosts on level 2 and 3 are too noisy > on the internal mic input. > Therefore limit the boost to 0 or 1. */ > @@ -3697,6 +3701,8 @@ static const struct hda_fixup alc269_fixups[] = { > [ALC269_FIXUP_SKU_IGNORE] = { > .type = HDA_FIXUP_FUNC, > .v.func = alc_fixup_sku_ignore, > + .chained = true, > + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, > }, > [ALC269_FIXUP_ASUS_G73JW] = { > .type = HDA_FIXUP_PINS, > @@ -3823,6 +3829,8 @@ static const struct hda_fixup alc269_fixups[] = { > [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { > .type = HDA_FIXUP_FUNC, > .v.func = alc269_fixup_pincfg_no_hp_to_lineout, > + .chained = true, > + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, > }, > [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { > .type = HDA_FIXUP_PINS, > @@ -3970,8 +3978,6 @@ static const struct hda_fixup alc269_fixups[] = { > [ALC269_FIXUP_THINKPAD_ACPI] = { > .type = HDA_FIXUP_FUNC, > .v.func = alc_fixup_thinkpad_acpi, > - .chained = true, > - .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST > }, > }; > > @@ -4057,7 +4063,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { > SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), > SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > - SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), > + SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), > @@ -4065,6 +4071,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { > SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), > SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), > + SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", ALC269_FIXUP_THINKPAD_ACPI), > SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ > > #if 0 > -- > 1.7.9.5 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) 2013-11-06 17:27 ` Takashi Iwai @ 2013-11-06 17:42 ` Takashi Iwai 2013-11-07 1:58 ` Alex Hung 2013-11-07 2:38 ` Hui Wang 1 sibling, 1 reply; 6+ messages in thread From: Takashi Iwai @ 2013-11-06 17:42 UTC (permalink / raw) To: David Henningsson; +Cc: hui.wang, alsa-devel, yk, alex.hung At Wed, 06 Nov 2013 18:27:52 +0100, Takashi Iwai wrote: > > At Wed, 6 Nov 2013 14:21:36 +0100, > David Henningsson wrote: > > > > There are many Lenovo machines with mute and/or mic-mute LEDs, so > > a quirk list with every SSID would be a lot of maintenance. > > > > Instead make a vendor quirk in combination with letting the most > > common existing quirks also chain to the thinkpad_acpi quirk. > > > > Signed-off-by: David Henningsson <david.henningsson@canonical.com> > > --- > > sound/pci/hda/patch_realtek.c | 13 ++++++++++--- > > 1 file changed, 10 insertions(+), 3 deletions(-) > > > > @Takashi, > > So, when we had a look at which machines we wanted to add support for, we found > > about 10 - 15 machines right away, and that's just the tip of the iceberg. So > > adding machine quirks just doesn't seem like the right way to go. > > > > I think our quirking system is becoming a bit limited here - as the "limit mic > > boost" quirk was used by several vendors I did an hackish chain instead of the > > normal .chain method. Open for less hackish solutions if you have any? > > > > @Alex Hung, > > this will start to hit Ideapads also, not only Thinkpads. Do you think > > there is any harm in that happening to Ideapads and similar, or do we have a > > good way to avoid machines that are not Thinkpads (and thus shouldn't call > > thinkpad-acpi, I assume)? > > There are lots of old Ideapads with ALC269, and I don't think they > have ACPI mute control. BTW, an easier way to identify Thinkpad is to just check DMI string. But, for Ideapads, this isn't really safe, I guess. If any, you should check the year, too, for excluding the old models. Takashi > > > Takashi > > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > > index 215db60..ce30bc4 100644 > > --- a/sound/pci/hda/patch_realtek.c > > +++ b/sound/pci/hda/patch_realtek.c > > @@ -3424,6 +3424,10 @@ static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, > > struct auto_pin_cfg *cfg = &spec->gen.autocfg; > > int i; > > > > + /* Chain to thinkpad_acpi, only if Lenovo */ > > + if (codec->bus->pci->subsystem_vendor == 0x17aa) > > + alc_fixup_thinkpad_acpi(codec, fix, action); > > + > > /* The mic boosts on level 2 and 3 are too noisy > > on the internal mic input. > > Therefore limit the boost to 0 or 1. */ > > @@ -3697,6 +3701,8 @@ static const struct hda_fixup alc269_fixups[] = { > > [ALC269_FIXUP_SKU_IGNORE] = { > > .type = HDA_FIXUP_FUNC, > > .v.func = alc_fixup_sku_ignore, > > + .chained = true, > > + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, > > }, > > [ALC269_FIXUP_ASUS_G73JW] = { > > .type = HDA_FIXUP_PINS, > > @@ -3823,6 +3829,8 @@ static const struct hda_fixup alc269_fixups[] = { > > [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { > > .type = HDA_FIXUP_FUNC, > > .v.func = alc269_fixup_pincfg_no_hp_to_lineout, > > + .chained = true, > > + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, > > }, > > [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { > > .type = HDA_FIXUP_PINS, > > @@ -3970,8 +3978,6 @@ static const struct hda_fixup alc269_fixups[] = { > > [ALC269_FIXUP_THINKPAD_ACPI] = { > > .type = HDA_FIXUP_FUNC, > > .v.func = alc_fixup_thinkpad_acpi, > > - .chained = true, > > - .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST > > }, > > }; > > > > @@ -4057,7 +4063,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { > > SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), > > SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > > SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > > - SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), > > + SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > > SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > > SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > > SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), > > @@ -4065,6 +4071,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { > > SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > > SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), > > SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), > > + SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", ALC269_FIXUP_THINKPAD_ACPI), > > SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ > > > > #if 0 > > -- > > 1.7.9.5 > > > > _______________________________________________ > > Alsa-devel mailing list > > Alsa-devel@alsa-project.org > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) 2013-11-06 17:42 ` Takashi Iwai @ 2013-11-07 1:58 ` Alex Hung 2013-11-07 8:34 ` David Henningsson 0 siblings, 1 reply; 6+ messages in thread From: Alex Hung @ 2013-11-07 1:58 UTC (permalink / raw) To: Takashi Iwai; +Cc: Hui Wang, alsa-devel, YK, David Henningsson @Takashi and David, DMI is a good way to check models, and we may not need to check the years as older Thinkpads with no mute led do not have "MMTS" and "SSMS" control methods in ACPI DSDT. Checking their existence before making the actual calls in thinkpad-acpi avoids this problems. Cheers, Alex Hung On Thu, Nov 7, 2013 at 1:42 AM, Takashi Iwai <tiwai@suse.de> wrote: > At Wed, 06 Nov 2013 18:27:52 +0100, > Takashi Iwai wrote: >> >> At Wed, 6 Nov 2013 14:21:36 +0100, >> David Henningsson wrote: >> > >> > There are many Lenovo machines with mute and/or mic-mute LEDs, so >> > a quirk list with every SSID would be a lot of maintenance. >> > >> > Instead make a vendor quirk in combination with letting the most >> > common existing quirks also chain to the thinkpad_acpi quirk. >> > >> > Signed-off-by: David Henningsson <david.henningsson@canonical.com> >> > --- >> > sound/pci/hda/patch_realtek.c | 13 ++++++++++--- >> > 1 file changed, 10 insertions(+), 3 deletions(-) >> > >> > @Takashi, >> > So, when we had a look at which machines we wanted to add support for, we found >> > about 10 - 15 machines right away, and that's just the tip of the iceberg. So >> > adding machine quirks just doesn't seem like the right way to go. >> > >> > I think our quirking system is becoming a bit limited here - as the "limit mic >> > boost" quirk was used by several vendors I did an hackish chain instead of the >> > normal .chain method. Open for less hackish solutions if you have any? >> > >> > @Alex Hung, >> > this will start to hit Ideapads also, not only Thinkpads. Do you think >> > there is any harm in that happening to Ideapads and similar, or do we have a >> > good way to avoid machines that are not Thinkpads (and thus shouldn't call >> > thinkpad-acpi, I assume)? >> >> There are lots of old Ideapads with ALC269, and I don't think they >> have ACPI mute control. > > BTW, an easier way to identify Thinkpad is to just check DMI string. > > But, for Ideapads, this isn't really safe, I guess. If any, you > should check the year, too, for excluding the old models. > > > Takashi > >> >> >> Takashi >> >> > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >> > index 215db60..ce30bc4 100644 >> > --- a/sound/pci/hda/patch_realtek.c >> > +++ b/sound/pci/hda/patch_realtek.c >> > @@ -3424,6 +3424,10 @@ static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, >> > struct auto_pin_cfg *cfg = &spec->gen.autocfg; >> > int i; >> > >> > + /* Chain to thinkpad_acpi, only if Lenovo */ >> > + if (codec->bus->pci->subsystem_vendor == 0x17aa) >> > + alc_fixup_thinkpad_acpi(codec, fix, action); >> > + >> > /* The mic boosts on level 2 and 3 are too noisy >> > on the internal mic input. >> > Therefore limit the boost to 0 or 1. */ >> > @@ -3697,6 +3701,8 @@ static const struct hda_fixup alc269_fixups[] = { >> > [ALC269_FIXUP_SKU_IGNORE] = { >> > .type = HDA_FIXUP_FUNC, >> > .v.func = alc_fixup_sku_ignore, >> > + .chained = true, >> > + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, >> > }, >> > [ALC269_FIXUP_ASUS_G73JW] = { >> > .type = HDA_FIXUP_PINS, >> > @@ -3823,6 +3829,8 @@ static const struct hda_fixup alc269_fixups[] = { >> > [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { >> > .type = HDA_FIXUP_FUNC, >> > .v.func = alc269_fixup_pincfg_no_hp_to_lineout, >> > + .chained = true, >> > + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, >> > }, >> > [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { >> > .type = HDA_FIXUP_PINS, >> > @@ -3970,8 +3978,6 @@ static const struct hda_fixup alc269_fixups[] = { >> > [ALC269_FIXUP_THINKPAD_ACPI] = { >> > .type = HDA_FIXUP_FUNC, >> > .v.func = alc_fixup_thinkpad_acpi, >> > - .chained = true, >> > - .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST >> > }, >> > }; >> > >> > @@ -4057,7 +4063,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { >> > SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), >> > SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> > SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> > - SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), >> > + SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> > SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> > SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> > SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), >> > @@ -4065,6 +4071,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { >> > SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> > SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), >> > SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), >> > + SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", ALC269_FIXUP_THINKPAD_ACPI), >> > SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ >> > >> > #if 0 >> > -- >> > 1.7.9.5 >> > >> > _______________________________________________ >> > Alsa-devel mailing list >> > Alsa-devel@alsa-project.org >> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >> > >> _______________________________________________ >> Alsa-devel mailing list >> Alsa-devel@alsa-project.org >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >> -- Cheers, Alex Hung ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) 2013-11-07 1:58 ` Alex Hung @ 2013-11-07 8:34 ` David Henningsson 0 siblings, 0 replies; 6+ messages in thread From: David Henningsson @ 2013-11-07 8:34 UTC (permalink / raw) To: Alex Hung, Takashi Iwai; +Cc: Hui Wang, alsa-devel, YK On 11/07/2013 02:58 AM, Alex Hung wrote: > @Takashi and David, > > DMI is a good way to check models, and we may not need to check the > years as older Thinkpads with no mute led do not have "MMTS" and > "SSMS" control methods in ACPI DSDT. Checking their existence before > making the actual calls in thinkpad-acpi avoids this problems. So, the only thing we want to avoid is to load the module if it should not be loaded, and the symbol_request call will always load the module. So we want to avoid calling symbol_request if it's not a hardware that is supported by thinkpad-acpi (and I assume that means Ideapads). Should we check the DMI information to distinguish between Thinkpads and Ideapads (and potentially others), and what DMI string would be best to look for? -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) 2013-11-06 17:27 ` Takashi Iwai 2013-11-06 17:42 ` Takashi Iwai @ 2013-11-07 2:38 ` Hui Wang 1 sibling, 0 replies; 6+ messages in thread From: Hui Wang @ 2013-11-07 2:38 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel, yk, alex.hung, David Henningsson On 11/07/2013 01:27 AM, Takashi Iwai wrote: > At Wed, 6 Nov 2013 14:21:36 +0100, > David Henningsson wrote: >> There are many Lenovo machines with mute and/or mic-mute LEDs, so >> a quirk list with every SSID would be a lot of maintenance. >> >> Instead make a vendor quirk in combination with letting the most >> common existing quirks also chain to the thinkpad_acpi quirk. >> >> Signed-off-by: David Henningsson <david.henningsson@canonical.com> >> --- >> sound/pci/hda/patch_realtek.c | 13 ++++++++++--- >> 1 file changed, 10 insertions(+), 3 deletions(-) >> >> @Takashi, >> So, when we had a look at which machines we wanted to add support for, we found >> about 10 - 15 machines right away, and that's just the tip of the iceberg. So >> adding machine quirks just doesn't seem like the right way to go. >> >> I think our quirking system is becoming a bit limited here - as the "limit mic >> boost" quirk was used by several vendors I did an hackish chain instead of the >> normal .chain method. Open for less hackish solutions if you have any? >> >> @Alex Hung, >> this will start to hit Ideapads also, not only Thinkpads. Do you think >> there is any harm in that happening to Ideapads and similar, or do we have a >> good way to avoid machines that are not Thinkpads (and thus shouldn't call >> thinkpad-acpi, I assume)? > There are lots of old Ideapads with ALC269, and I don't think they > have ACPI mute control. I think it doesn't matter, the current design is we will unconditionally call alc_fixup_thinkpad_acpi() for all lenovo machines, in this function has the following code snippet, on a machine without mute led control, the led_set_func() will reutrn -ENODEV, this can guarantee to skip the setting hook to the vmaster or capture. + if (led_set_func(TPACPI_LED_MUTE, false) >= 0) { + spec->gen.vmaster_mute.hook = update_tpacpi_mute_led; + removefunc = false; + } + if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0) { + if (spec->gen.num_adc_nids > 1) + snd_printdd("Skipping micmute LED control due to several ADCs"); + else { + spec->gen.cap_sync_hook = update_tpacpi_micmute_led; + removefunc = false; + } + } Regards, Hui. > > Takashi > >> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c >> index 215db60..ce30bc4 100644 >> --- a/sound/pci/hda/patch_realtek.c >> +++ b/sound/pci/hda/patch_realtek.c >> @@ -3424,6 +3424,10 @@ static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec, >> struct auto_pin_cfg *cfg = &spec->gen.autocfg; >> int i; >> >> + /* Chain to thinkpad_acpi, only if Lenovo */ >> + if (codec->bus->pci->subsystem_vendor == 0x17aa) >> + alc_fixup_thinkpad_acpi(codec, fix, action); >> + >> /* The mic boosts on level 2 and 3 are too noisy >> on the internal mic input. >> Therefore limit the boost to 0 or 1. */ >> @@ -3697,6 +3701,8 @@ static const struct hda_fixup alc269_fixups[] = { >> [ALC269_FIXUP_SKU_IGNORE] = { >> .type = HDA_FIXUP_FUNC, >> .v.func = alc_fixup_sku_ignore, >> + .chained = true, >> + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, >> }, >> [ALC269_FIXUP_ASUS_G73JW] = { >> .type = HDA_FIXUP_PINS, >> @@ -3823,6 +3829,8 @@ static const struct hda_fixup alc269_fixups[] = { >> [ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT] = { >> .type = HDA_FIXUP_FUNC, >> .v.func = alc269_fixup_pincfg_no_hp_to_lineout, >> + .chained = true, >> + .chain_id = ALC269_FIXUP_THINKPAD_ACPI, >> }, >> [ALC269_FIXUP_DELL1_MIC_NO_PRESENCE] = { >> .type = HDA_FIXUP_PINS, >> @@ -3970,8 +3978,6 @@ static const struct hda_fixup alc269_fixups[] = { >> [ALC269_FIXUP_THINKPAD_ACPI] = { >> .type = HDA_FIXUP_FUNC, >> .v.func = alc_fixup_thinkpad_acpi, >> - .chained = true, >> - .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST >> }, >> }; >> >> @@ -4057,7 +4063,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { >> SND_PCI_QUIRK(0x17aa, 0x2208, "Thinkpad T431s", ALC269_FIXUP_LENOVO_DOCK), >> SND_PCI_QUIRK(0x17aa, 0x220c, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> SND_PCI_QUIRK(0x17aa, 0x2212, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> - SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_THINKPAD_ACPI), >> + SND_PCI_QUIRK(0x17aa, 0x2214, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> SND_PCI_QUIRK(0x17aa, 0x2215, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> SND_PCI_QUIRK(0x17aa, 0x5013, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), >> @@ -4065,6 +4071,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { >> SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), >> SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), >> SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), >> + SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", ALC269_FIXUP_THINKPAD_ACPI), >> SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */ >> >> #if 0 >> -- >> 1.7.9.5 >> >> _______________________________________________ >> Alsa-devel mailing list >> Alsa-devel@alsa-project.org >> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel >> ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-11-07 8:34 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-06 13:21 [RFC] ALSA: hda - check for mute/micmute LEDs on all Lenovo machines (Realtek) David Henningsson 2013-11-06 17:27 ` Takashi Iwai 2013-11-06 17:42 ` Takashi Iwai 2013-11-07 1:58 ` Alex Hung 2013-11-07 8:34 ` David Henningsson 2013-11-07 2:38 ` Hui Wang
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.