Created
December 23, 2023 17:46
-
-
Save sarfarazahmad89/db276cb34555ec1bcee477bc94fba651 to your computer and use it in GitHub Desktop.
Slim 7 16APH8 Audio on Linux-6.6.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6ee3013cdb3fd750fdbe175f275214fbfc3b3992 Mon Sep 17 00:00:00 2001 | |
From: nobody <[email protected]> | |
Date: Sat, 23 Dec 2023 17:29:23 +0100 | |
Subject: [PATCH 1/3] patch from gmires | |
--- | |
sound/pci/hda/cs35l41_hda_property.c | 7 +++++++ | |
sound/pci/hda/patch_realtek.c | 30 +++------------------------- | |
2 files changed, 10 insertions(+), 27 deletions(-) | |
diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c | |
index b62a4e696..dcda359a1 100644 | |
--- a/sound/pci/hda/cs35l41_hda_property.c | |
+++ b/sound/pci/hda/cs35l41_hda_property.c | |
@@ -38,6 +38,10 @@ static int lenovo_legion_no_acpi(struct cs35l41_hda *cs35l41, struct device *phy | |
hw_cfg->bst_type = CS35L41_EXT_BOOST; | |
hw_cfg->gpio1.func = CS35l41_VSPK_SWITCH; | |
hw_cfg->gpio1.valid = true; | |
+ } else if (strcmp(hid, "CSC3551") == 0) { | |
+ hw_cfg->bst_type = CS35L41_EXT_BOOST; | |
+ hw_cfg->gpio1.func = CS35l41_VSPK_SWITCH; | |
+ hw_cfg->gpio1.valid = true; | |
} | |
return 0; | |
@@ -84,6 +88,7 @@ struct cs35l41_prop_model { | |
static const struct cs35l41_prop_model cs35l41_prop_model_table[] = { | |
{ "CLSA0100", NULL, lenovo_legion_no_acpi }, | |
{ "CLSA0101", NULL, lenovo_legion_no_acpi }, | |
+ { "CSC3551", NULL, lenovo_legion_no_acpi }, | |
{ "CSC3551", "103C89C6", hp_vision_acpi_fix }, | |
{} | |
}; | |
@@ -93,6 +98,8 @@ int cs35l41_add_dsd_properties(struct cs35l41_hda *cs35l41, struct device *physd | |
{ | |
const struct cs35l41_prop_model *model; | |
+ dev_info(cs35l41->dev, "Adding DSD properties for %s\n", cs35l41->acpi_subsystem_id); | |
+ | |
for (model = cs35l41_prop_model_table; model->hid; model++) { | |
if (!strcmp(model->hid, hid) && | |
(!model->ssid || | |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c | |
index 9677c09cf..053dc9b0f 100644 | |
--- a/sound/pci/hda/patch_realtek.c | |
+++ b/sound/pci/hda/patch_realtek.c | |
@@ -7078,24 +7078,6 @@ static void alc287_fixup_bind_dacs(struct hda_codec *codec, | |
0x0); /* Make sure 0x14 was disable */ | |
} | |
} | |
-/* Fix none verb table of Headset Mic pin */ | |
-static void alc_fixup_headset_mic(struct hda_codec *codec, | |
- const struct hda_fixup *fix, int action) | |
-{ | |
- struct alc_spec *spec = codec->spec; | |
- static const struct hda_pintbl pincfgs[] = { | |
- { 0x19, 0x03a1103c }, | |
- { } | |
- }; | |
- | |
- switch (action) { | |
- case HDA_FIXUP_ACT_PRE_PROBE: | |
- snd_hda_apply_pincfgs(codec, pincfgs); | |
- alc_update_coef_idx(codec, 0x45, 0xf<<12 | 1<<10, 5<<12); | |
- spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; | |
- break; | |
- } | |
-} | |
enum { | |
@@ -7362,7 +7344,6 @@ enum { | |
ALC245_FIXUP_HP_X360_MUTE_LEDS, | |
ALC287_FIXUP_THINKPAD_I2S_SPK, | |
ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD, | |
- ALC2XX_FIXUP_HEADSET_MIC, | |
}; | |
/* A special fixup for Lenovo C940 and Yoga Duet 7; | |
@@ -9467,10 +9448,6 @@ static const struct hda_fixup alc269_fixups[] = { | |
.chained = true, | |
.chain_id = ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI, | |
}, | |
- [ALC2XX_FIXUP_HEADSET_MIC] = { | |
- .type = HDA_FIXUP_FUNC, | |
- .v.func = alc_fixup_headset_mic, | |
- }, | |
}; | |
static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |
@@ -9745,7 +9722,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |
SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED), | |
SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), | |
SND_PCI_QUIRK(0x103c, 0x89d3, "HP EliteBook 645 G9 (MB 89D2)", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), | |
- SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), | |
SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), | |
SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST), | |
SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED), | |
@@ -9815,7 +9791,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |
SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), | |
SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301V", ALC285_FIXUP_ASUS_HEADSET_MIC), | |
SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), | |
- SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZV", ALC285_FIXUP_ASUS_HEADSET_MIC), | |
SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2), | |
SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), | |
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), | |
@@ -10055,6 +10030,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |
SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), | |
SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), | |
SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6), | |
+ | |
+ SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), | |
+ | |
SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), | |
SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C), | |
SND_PCI_QUIRK(0x17aa, 0x387e, "Yoga S780-16 pro Quad YC", ALC287_FIXUP_TAS2781_I2C), | |
@@ -10775,8 +10753,6 @@ static const struct snd_hda_pin_quirk alc269_fallback_pin_fixup_tbl[] = { | |
SND_HDA_PIN_QUIRK(0x10ec0274, 0x1028, "Dell", ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, | |
{0x19, 0x40000000}, | |
{0x1a, 0x40000000}), | |
- SND_HDA_PIN_QUIRK(0x10ec0256, 0x1043, "ASUS", ALC2XX_FIXUP_HEADSET_MIC, | |
- {0x19, 0x40000000}), | |
{} | |
}; | |
-- | |
2.43.0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 74461dc770b638cb3cff9587df0b4c8e57b1d2ea Mon Sep 17 00:00:00 2001 | |
From: nobody <[email protected]> | |
Date: Sat, 23 Dec 2023 17:30:47 +0100 | |
Subject: [PATCH 2/3] Patch for slim 7 amd | |
--- | |
sound/pci/hda/patch_realtek.c | 2 ++ | |
1 file changed, 2 insertions(+) | |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c | |
index 053dc9b0f..e0f155c40 100644 | |
--- a/sound/pci/hda/patch_realtek.c | |
+++ b/sound/pci/hda/patch_realtek.c | |
@@ -10032,6 +10032,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |
SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6), | |
SND_PCI_QUIRK(0x17aa, 0x38b4, "Legion 7 16IRH8", ALC287_FIXUP_CS35L41_I2C_2), | |
+ //http://alsa-project.org/db/?f=178d24861b92f1da8ac12efacb04ed40fd6c4797 | |
+ SND_PCI_QUIRK(0x17aa, 0x38b7, "Legion 7 16APH8", ALC287_FIXUP_CS35L41_I2C_2), | |
SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), | |
SND_PCI_QUIRK(0x17aa, 0x387d, "Yoga S780-16 pro Quad AAC", ALC287_FIXUP_TAS2781_I2C), | |
-- | |
2.43.0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 67bd758509e7334b7cd9926288d5cb05fdbad42f Mon Sep 17 00:00:00 2001 | |
From: nobody <[email protected]> | |
Date: Sat, 23 Dec 2023 18:11:23 +0100 | |
Subject: [PATCH 3/3] use revision id | |
--- | |
sound/pci/hda/cs35l41_hda_property.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c | |
index dcda359a1..6154c07aa 100644 | |
--- a/sound/pci/hda/cs35l41_hda_property.c | |
+++ b/sound/pci/hda/cs35l41_hda_property.c | |
@@ -88,7 +88,7 @@ struct cs35l41_prop_model { | |
static const struct cs35l41_prop_model cs35l41_prop_model_table[] = { | |
{ "CLSA0100", NULL, lenovo_legion_no_acpi }, | |
{ "CLSA0101", NULL, lenovo_legion_no_acpi }, | |
- { "CSC3551", NULL, lenovo_legion_no_acpi }, | |
+ { "CSC3551", "17AA38B7", lenovo_legion_no_acpi }, | |
{ "CSC3551", "103C89C6", hp_vision_acpi_fix }, | |
{} | |
}; | |
-- | |
2.43.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment