aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f141395dfee6..344b221d2102 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -203,6 +203,7 @@ struct alc_spec {
203 unsigned int shared_mic_hp:1; /* HP/Mic-in sharing */ 203 unsigned int shared_mic_hp:1; /* HP/Mic-in sharing */
204 unsigned int inv_dmic_fixup:1; /* has inverted digital-mic workaround */ 204 unsigned int inv_dmic_fixup:1; /* has inverted digital-mic workaround */
205 unsigned int inv_dmic_muted:1; /* R-ch of inv d-mic is muted? */ 205 unsigned int inv_dmic_muted:1; /* R-ch of inv d-mic is muted? */
206 unsigned int no_primary_hp:1; /* Don't prefer HP pins to speaker pins */
206 207
207 /* auto-mute control */ 208 /* auto-mute control */
208 int automute_mode; 209 int automute_mode;
@@ -4323,7 +4324,8 @@ static int alc_parse_auto_config(struct hda_codec *codec,
4323 return 0; /* can't find valid BIOS pin config */ 4324 return 0; /* can't find valid BIOS pin config */
4324 } 4325 }
4325 4326
4326 if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT && 4327 if (!spec->no_primary_hp &&
4328 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT &&
4327 cfg->line_outs <= cfg->hp_outs) { 4329 cfg->line_outs <= cfg->hp_outs) {
4328 /* use HP as primary out */ 4330 /* use HP as primary out */
4329 cfg->speaker_outs = cfg->line_outs; 4331 cfg->speaker_outs = cfg->line_outs;
@@ -5050,6 +5052,7 @@ enum {
5050 ALC889_FIXUP_MBP_VREF, 5052 ALC889_FIXUP_MBP_VREF,
5051 ALC889_FIXUP_IMAC91_VREF, 5053 ALC889_FIXUP_IMAC91_VREF,
5052 ALC882_FIXUP_INV_DMIC, 5054 ALC882_FIXUP_INV_DMIC,
5055 ALC882_FIXUP_NO_PRIMARY_HP,
5053}; 5056};
5054 5057
5055static void alc889_fixup_coef(struct hda_codec *codec, 5058static void alc889_fixup_coef(struct hda_codec *codec,
@@ -5171,6 +5174,17 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec,
5171 spec->keep_vref_in_automute = 1; 5174 spec->keep_vref_in_automute = 1;
5172} 5175}
5173 5176
5177/* Don't take HP output as primary
5178 * strangely, the speaker output doesn't work on VAIO Z through DAC 0x05
5179 */
5180static void alc882_fixup_no_primary_hp(struct hda_codec *codec,
5181 const struct alc_fixup *fix, int action)
5182{
5183 struct alc_spec *spec = codec->spec;
5184 if (action == ALC_FIXUP_ACT_PRE_PROBE)
5185 spec->no_primary_hp = 1;
5186}
5187
5174static const struct alc_fixup alc882_fixups[] = { 5188static const struct alc_fixup alc882_fixups[] = {
5175 [ALC882_FIXUP_ABIT_AW9D_MAX] = { 5189 [ALC882_FIXUP_ABIT_AW9D_MAX] = {
5176 .type = ALC_FIXUP_PINS, 5190 .type = ALC_FIXUP_PINS,
@@ -5357,6 +5371,10 @@ static const struct alc_fixup alc882_fixups[] = {
5357 .type = ALC_FIXUP_FUNC, 5371 .type = ALC_FIXUP_FUNC,
5358 .v.func = alc_fixup_inv_dmic_0x12, 5372 .v.func = alc_fixup_inv_dmic_0x12,
5359 }, 5373 },
5374 [ALC882_FIXUP_NO_PRIMARY_HP] = {
5375 .type = ALC_FIXUP_FUNC,
5376 .v.func = alc882_fixup_no_primary_hp,
5377 },
5360}; 5378};
5361 5379
5362static const struct snd_pci_quirk alc882_fixup_tbl[] = { 5380static const struct snd_pci_quirk alc882_fixup_tbl[] = {
@@ -5391,6 +5409,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
5391 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), 5409 SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC),
5392 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), 5410 SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601),
5393 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), 5411 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT),
5412 SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP),
5394 5413
5395 /* All Apple entries are in codec SSIDs */ 5414 /* All Apple entries are in codec SSIDs */
5396 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF), 5415 SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
@@ -5432,6 +5451,7 @@ static const struct alc_model_fixup alc882_fixup_models[] = {
5432 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"}, 5451 {.id = ALC882_FIXUP_ACER_ASPIRE_8930G, .name = "acer-aspire-8930g"},
5433 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"}, 5452 {.id = ALC883_FIXUP_ACER_EAPD, .name = "acer-aspire"},
5434 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"}, 5453 {.id = ALC882_FIXUP_INV_DMIC, .name = "inv-dmic"},
5454 {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"},
5435 {} 5455 {}
5436}; 5456};
5437 5457