aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2016-02-25 03:37:05 -0500
committerTakashi Iwai <tiwai@suse.de>2016-02-25 04:24:29 -0500
commit2ae955774f29bbd7d16149cb0ae8d0319bf2ecc4 (patch)
treeab9ff28eaffaba978478170fa21e3d28f19fb14d
parent3b43b71f05d3ecd01c4116254666d9492301697d (diff)
ALSA: hda - Fixup speaker pass-through control for nid 0x14 on ALC225
On one of the machines we enable, we found that the actual speaker volume did not always correspond to the volume set in alsamixer. This patch fixes that problem. This patch was orginally written by Kailang @ Realtek, I've rebased it to fit sound git master. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1549660 Co-Authored-By: Kailang <kailang@realtek.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 72fa58dd7723..7fded69fb58e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3801,6 +3801,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
3801 3801
3802static void alc_headset_mode_default(struct hda_codec *codec) 3802static void alc_headset_mode_default(struct hda_codec *codec)
3803{ 3803{
3804 static struct coef_fw coef0225[] = {
3805 UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
3806 {}
3807 };
3804 static struct coef_fw coef0255[] = { 3808 static struct coef_fw coef0255[] = {
3805 WRITE_COEF(0x45, 0xc089), 3809 WRITE_COEF(0x45, 0xc089),
3806 WRITE_COEF(0x45, 0xc489), 3810 WRITE_COEF(0x45, 0xc489),
@@ -3842,6 +3846,9 @@ static void alc_headset_mode_default(struct hda_codec *codec)
3842 }; 3846 };
3843 3847
3844 switch (codec->core.vendor_id) { 3848 switch (codec->core.vendor_id) {
3849 case 0x10ec0225:
3850 alc_process_coef_fw(codec, coef0225);
3851 break;
3845 case 0x10ec0255: 3852 case 0x10ec0255:
3846 case 0x10ec0256: 3853 case 0x10ec0256:
3847 alc_process_coef_fw(codec, coef0255); 3854 alc_process_coef_fw(codec, coef0255);
@@ -4750,6 +4757,7 @@ enum {
4750 ALC293_FIXUP_LENOVO_SPK_NOISE, 4757 ALC293_FIXUP_LENOVO_SPK_NOISE,
4751 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY, 4758 ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
4752 ALC255_FIXUP_DELL_SPK_NOISE, 4759 ALC255_FIXUP_DELL_SPK_NOISE,
4760 ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
4753}; 4761};
4754 4762
4755static const struct hda_fixup alc269_fixups[] = { 4763static const struct hda_fixup alc269_fixups[] = {
@@ -5375,6 +5383,17 @@ static const struct hda_fixup alc269_fixups[] = {
5375 .chained = true, 5383 .chained = true,
5376 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE 5384 .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
5377 }, 5385 },
5386 [ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
5387 .type = HDA_FIXUP_VERBS,
5388 .v.verbs = (const struct hda_verb[]) {
5389 /* Disable pass-through path for FRONT 14h */
5390 { 0x20, AC_VERB_SET_COEF_INDEX, 0x36 },
5391 { 0x20, AC_VERB_SET_PROC_COEF, 0x57d7 },
5392 {}
5393 },
5394 .chained = true,
5395 .chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
5396 },
5378}; 5397};
5379 5398
5380static const struct snd_pci_quirk alc269_fixup_tbl[] = { 5399static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -5646,10 +5665,10 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
5646 {0x21, 0x03211020} 5665 {0x21, 0x03211020}
5647 5666
5648static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { 5667static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
5649 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 5668 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
5650 ALC225_STANDARD_PINS, 5669 ALC225_STANDARD_PINS,
5651 {0x14, 0x901701a0}), 5670 {0x14, 0x901701a0}),
5652 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 5671 SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
5653 ALC225_STANDARD_PINS, 5672 ALC225_STANDARD_PINS,
5654 {0x14, 0x901701b0}), 5673 {0x14, 0x901701b0}),
5655 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE, 5674 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,