[PATCH v5] ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760

dengxiang posted 1 patch 2 years, 7 months ago
sound/pci/hda/patch_realtek.c | 9 +++++++++
1 file changed, 9 insertions(+)
[PATCH v5] ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760
Posted by dengxiang 2 years, 7 months ago
These models use NSIWAY amplifiers for internal speaker, but cannot put
sound outside from these amplifiers. So eapd verbs are needed to initialize
the amplifiers. They can be added during boot to get working sound out
of internal speaker.

---
V5:
- remove pci ssid 0x10ec0897 for specific unis device.
V4:
- put at the right position to keep the PCI SSID order for the whole.
V3:
- do some adjustment for eapd verbs and keep the capital letters for
  ALC_* enums.
v2:
- remove warning about unused variable 'spec'.

Signed-off-by: dengxiang <dengxiang@nfschina.com>
---
 sound/pci/hda/patch_realtek.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index afe8253f9a4f..cbfb3260ab6d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -11286,6 +11286,7 @@ enum {
 	ALC897_FIXUP_HP_HSMIC_VERB,
 	ALC897_FIXUP_LENOVO_HEADSET_MODE,
 	ALC897_FIXUP_HEADSET_MIC_PIN2,
+	ALC897_FIXUP_UNIS_H3C_X500S,
 };
 
 static const struct hda_fixup alc662_fixups[] = {
@@ -11725,6 +11726,13 @@ static const struct hda_fixup alc662_fixups[] = {
 		.chained = true,
 		.chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE
 	},
+	[ALC897_FIXUP_UNIS_H3C_X500S] = {
+		.type = HDA_FIXUP_VERBS,
+		.v.verbs = (const struct hda_verb[]) {
+			{ 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 },
+			{}
+		},
+	},
 };
 
 static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -11886,6 +11894,7 @@ static const struct hda_model_fixup alc662_fixup_models[] = {
 	{.id = ALC662_FIXUP_USI_HEADSET_MODE, .name = "usi-headset"},
 	{.id = ALC662_FIXUP_LENOVO_MULTI_CODECS, .name = "dual-codecs"},
 	{.id = ALC669_FIXUP_ACER_ASPIRE_ETHOS, .name = "aspire-ethos"},
+	{.id = ALC897_FIXUP_UNIS_H3C_X500S, .name = "unis-h3c-x500s"},
 	{}
 };
 
-- 
2.30.2
Re: [PATCH v5] ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760
Posted by Takashi Iwai 2 years, 7 months ago
On Mon, 03 Jul 2023 04:17:51 +0200,
dengxiang wrote:
> 
> These models use NSIWAY amplifiers for internal speaker, but cannot put
> sound outside from these amplifiers. So eapd verbs are needed to initialize
> the amplifiers. They can be added during boot to get working sound out
> of internal speaker.
> 
> ---
> V5:
> - remove pci ssid 0x10ec0897 for specific unis device.
> V4:
> - put at the right position to keep the PCI SSID order for the whole.
> V3:
> - do some adjustment for eapd verbs and keep the capital letters for
>   ALC_* enums.
> v2:
> - remove warning about unused variable 'spec'.
> 
> Signed-off-by: dengxiang <dengxiang@nfschina.com>

Applied now, but I had to edit manually to move this Signed-off-by
line.  As mentioned in the previous post, the Signed-off-by line must
be *before* the line "---"; git-am truncates the lines after "---",
so Signed-off-by tag will be missing otherwise.  Please put at the
right position at the next time.


thanks,

Takashi
Re: [PATCH v5] ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760
Posted by dengxiang 2 years, 7 months ago
> Applied now, but I had to edit manually to move this Signed-off-by
> line. As mentioned in the previous post, the Signed-off-by line must
> be *before* the line "---"; git-am truncates the lines after "---",
> so Signed-off-by tag will be missing otherwise. Please put at the
> right position at the next time.

Ok, i got it. Thanks for your help. I will notice it at the next time. Thank you very much.