diff options
author | Hui Wang <hui.wang@canonical.com> | 2015-06-15 05:43:39 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-06-15 05:49:08 -0400 |
commit | 6ab42ff44864d26e8e498b8ac655d24ee389d267 (patch) | |
tree | 0e6f64599f4452b61ab8d382a362491320519479 /sound/pci | |
parent | 535115b5ff51c702a9a22feb918707c2fe1fbd17 (diff) |
ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine
On a HP Envy TouchSmart laptop, there are 2 speakers (main speaker
and subwoofer speaker), 1 headphone and 2 DACs, without this fixup,
the headphone will be assigned to a DAC and the 2 speakers will be
assigned to another DAC, this assignment makes the surround-2.1
channels invalid.
To fix it, here using a DAC/pin preference map to bind the main
speaker to 1 DAC and the subwoofer speaker will be assigned to another
DAC.
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 6833c74ed6ff..6c66d7e16439 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -100,6 +100,7 @@ enum { | |||
100 | STAC_HP_ENVY_BASS, | 100 | STAC_HP_ENVY_BASS, |
101 | STAC_HP_BNB13_EQ, | 101 | STAC_HP_BNB13_EQ, |
102 | STAC_HP_ENVY_TS_BASS, | 102 | STAC_HP_ENVY_TS_BASS, |
103 | STAC_HP_ENVY_TS_DAC_BIND, | ||
103 | STAC_92HD83XXX_GPIO10_EAPD, | 104 | STAC_92HD83XXX_GPIO10_EAPD, |
104 | STAC_92HD83XXX_MODELS | 105 | STAC_92HD83XXX_MODELS |
105 | }; | 106 | }; |
@@ -2171,6 +2172,22 @@ static void stac92hd83xxx_fixup_gpio10_eapd(struct hda_codec *codec, | |||
2171 | spec->eapd_switch = 0; | 2172 | spec->eapd_switch = 0; |
2172 | } | 2173 | } |
2173 | 2174 | ||
2175 | static void hp_envy_ts_fixup_dac_bind(struct hda_codec *codec, | ||
2176 | const struct hda_fixup *fix, | ||
2177 | int action) | ||
2178 | { | ||
2179 | struct sigmatel_spec *spec = codec->spec; | ||
2180 | static hda_nid_t preferred_pairs[] = { | ||
2181 | 0xd, 0x13, | ||
2182 | 0 | ||
2183 | }; | ||
2184 | |||
2185 | if (action != HDA_FIXUP_ACT_PRE_PROBE) | ||
2186 | return; | ||
2187 | |||
2188 | spec->gen.preferred_dacs = preferred_pairs; | ||
2189 | } | ||
2190 | |||
2174 | static const struct hda_verb hp_bnb13_eq_verbs[] = { | 2191 | static const struct hda_verb hp_bnb13_eq_verbs[] = { |
2175 | /* 44.1KHz base */ | 2192 | /* 44.1KHz base */ |
2176 | { 0x22, 0x7A6, 0x3E }, | 2193 | { 0x22, 0x7A6, 0x3E }, |
@@ -2686,6 +2703,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = { | |||
2686 | {} | 2703 | {} |
2687 | }, | 2704 | }, |
2688 | }, | 2705 | }, |
2706 | [STAC_HP_ENVY_TS_DAC_BIND] = { | ||
2707 | .type = HDA_FIXUP_FUNC, | ||
2708 | .v.func = hp_envy_ts_fixup_dac_bind, | ||
2709 | .chained = true, | ||
2710 | .chain_id = STAC_HP_ENVY_TS_BASS, | ||
2711 | }, | ||
2689 | [STAC_92HD83XXX_GPIO10_EAPD] = { | 2712 | [STAC_92HD83XXX_GPIO10_EAPD] = { |
2690 | .type = HDA_FIXUP_FUNC, | 2713 | .type = HDA_FIXUP_FUNC, |
2691 | .v.func = stac92hd83xxx_fixup_gpio10_eapd, | 2714 | .v.func = stac92hd83xxx_fixup_gpio10_eapd, |
@@ -2764,6 +2787,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = { | |||
2764 | "HP bNB13", STAC_HP_BNB13_EQ), | 2787 | "HP bNB13", STAC_HP_BNB13_EQ), |
2765 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190e, | 2788 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190e, |
2766 | "HP ENVY TS", STAC_HP_ENVY_TS_BASS), | 2789 | "HP ENVY TS", STAC_HP_ENVY_TS_BASS), |
2790 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1967, | ||
2791 | "HP ENVY TS", STAC_HP_ENVY_TS_DAC_BIND), | ||
2767 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1940, | 2792 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1940, |
2768 | "HP bNB13", STAC_HP_BNB13_EQ), | 2793 | "HP bNB13", STAC_HP_BNB13_EQ), |
2769 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1941, | 2794 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1941, |