diff mbox series

[1/1] ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook 845 G8

Message ID 20210422043443.117325-2-kai.heng.feng@canonical.com
State New
Headers show
Series Enable mute/micmute LEDs and limit mic boost on EliteBook 845 G8 | expand

Commit Message

Kai-Heng Feng April 22, 2021, 4:34 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1925415

On HP EliteBook 845 G8, the audio LEDs can be enabled by
ALC285_FIXUP_HP_MUTE_LED. So use it accordingly.

In addition to that, the mic captures lots of noises, so also limits the
mic boost. The quality of capture audio becomes crystal clear after
limiting the mic boost.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20210420115530.1349353-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(backported from commit bd15b15523fd3197d1bb46403e02e92877a4f412 linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/pci/hda/patch_realtek.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Stefan Bader April 22, 2021, 8:15 a.m. UTC | #1
On 22.04.21 06:34, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1925415
> 
> On HP EliteBook 845 G8, the audio LEDs can be enabled by
> ALC285_FIXUP_HP_MUTE_LED. So use it accordingly.
> 
> In addition to that, the mic captures lots of noises, so also limits the
> mic boost. The quality of capture audio becomes crystal clear after
> limiting the mic boost.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Link: https://lore.kernel.org/r/20210420115530.1349353-1-kai.heng.feng@canonical.com
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (backported from commit bd15b15523fd3197d1bb46403e02e92877a4f412 linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>   sound/pci/hda/patch_realtek.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index a7544b77d3f7..c71f1f2b6a8c 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -6427,6 +6427,7 @@ enum {
>   	ALC282_FIXUP_ACER_DISABLE_LINEOUT,
>   	ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
>   	ALC256_FIXUP_ACER_HEADSET_MIC,
> +	ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
>   };
>   
>   static const struct hda_fixup alc269_fixups[] = {
> @@ -7901,6 +7902,12 @@ static const struct hda_fixup alc269_fixups[] = {
>   		.chained = true,
>   		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
>   	},
> +	[ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
> +		.type = HDA_FIXUP_FUNC,
> +		.v.func = alc269_fixup_limit_int_mic_boost,
> +		.chained = true,
> +		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
> +	},
>   };
>   
>   static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -8079,6 +8086,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>   	SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
>   	SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
>   	SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
> +	SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
>   	SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
>   	SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
>   	SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
>
Colin King April 22, 2021, 8:36 a.m. UTC | #2
On 22/04/2021 05:34, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1925415
> 
> On HP EliteBook 845 G8, the audio LEDs can be enabled by
> ALC285_FIXUP_HP_MUTE_LED. So use it accordingly.
> 
> In addition to that, the mic captures lots of noises, so also limits the
> mic boost. The quality of capture audio becomes crystal clear after
> limiting the mic boost.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Link: https://lore.kernel.org/r/20210420115530.1349353-1-kai.heng.feng@canonical.com
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> (backported from commit bd15b15523fd3197d1bb46403e02e92877a4f412 linux-next)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  sound/pci/hda/patch_realtek.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index a7544b77d3f7..c71f1f2b6a8c 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -6427,6 +6427,7 @@ enum {
>  	ALC282_FIXUP_ACER_DISABLE_LINEOUT,
>  	ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
>  	ALC256_FIXUP_ACER_HEADSET_MIC,
> +	ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
>  };
>  
>  static const struct hda_fixup alc269_fixups[] = {
> @@ -7901,6 +7902,12 @@ static const struct hda_fixup alc269_fixups[] = {
>  		.chained = true,
>  		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
>  	},
> +	[ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
> +		.type = HDA_FIXUP_FUNC,
> +		.v.func = alc269_fixup_limit_int_mic_boost,
> +		.chained = true,
> +		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
> +	},
>  };
>  
>  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
> @@ -8079,6 +8086,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
>  	SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
>  	SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
>  	SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
> +	SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
>  	SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
>  	SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
>  	SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
> 

new device ID quirk, so regression potential is very low.

Acked-by: Colin Ian King <colin.king@canonical.com>
diff mbox series

Patch

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a7544b77d3f7..c71f1f2b6a8c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6427,6 +6427,7 @@  enum {
 	ALC282_FIXUP_ACER_DISABLE_LINEOUT,
 	ALC255_FIXUP_ACER_LIMIT_INT_MIC_BOOST,
 	ALC256_FIXUP_ACER_HEADSET_MIC,
+	ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -7901,6 +7902,12 @@  static const struct hda_fixup alc269_fixups[] = {
 		.chained = true,
 		.chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
 	},
+	[ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc269_fixup_limit_int_mic_boost,
+		.chained = true,
+		.chain_id = ALC285_FIXUP_HP_MUTE_LED,
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -8079,6 +8086,7 @@  static const struct snd_pci_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP),
 	SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED),
+	SND_PCI_QUIRK(0x103c, 0x8898, "HP EliteBook 845 G8 Notebook PC", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
 	SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
 	SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
 	SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),