aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-10-23 16:28:39 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-23 16:49:34 -0400
commitc3fa32b9764dc45dcf8a2231b1c110abc4a63e0b (patch)
tree6cf2896a77b65bec64284681e1c3851eb3263e09 /sound/pci/hda/patch_realtek.c
parent34d92d5315b64a3e5292b7e9511c1bb617227fb6 (diff)
parent320437af954cbe66478f1f5e8b34cb5a8d072191 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/usb/qmi_wwan.c include/net/dst.h Trivial merge conflicts, both were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0e303b99a47c..bf313bea7085 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2819,6 +2819,15 @@ static void alc269_fixup_hweq(struct hda_codec *codec,
2819 alc_write_coef_idx(codec, 0x1e, coef | 0x80); 2819 alc_write_coef_idx(codec, 0x1e, coef | 0x80);
2820} 2820}
2821 2821
2822static void alc269_fixup_headset_mic(struct hda_codec *codec,
2823 const struct hda_fixup *fix, int action)
2824{
2825 struct alc_spec *spec = codec->spec;
2826
2827 if (action == HDA_FIXUP_ACT_PRE_PROBE)
2828 spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
2829}
2830
2822static void alc271_fixup_dmic(struct hda_codec *codec, 2831static void alc271_fixup_dmic(struct hda_codec *codec,
2823 const struct hda_fixup *fix, int action) 2832 const struct hda_fixup *fix, int action)
2824{ 2833{
@@ -3496,6 +3505,15 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec,
3496 } 3505 }
3497} 3506}
3498 3507
3508static void alc290_fixup_mono_speakers(struct hda_codec *codec,
3509 const struct hda_fixup *fix, int action)
3510{
3511 if (action == HDA_FIXUP_ACT_PRE_PROBE)
3512 /* Remove DAC node 0x03, as it seems to be
3513 giving mono output */
3514 snd_hda_override_wcaps(codec, 0x03, 0);
3515}
3516
3499enum { 3517enum {
3500 ALC269_FIXUP_SONY_VAIO, 3518 ALC269_FIXUP_SONY_VAIO,
3501 ALC275_FIXUP_SONY_VAIO_GPIO2, 3519 ALC275_FIXUP_SONY_VAIO_GPIO2,
@@ -3507,6 +3525,7 @@ enum {
3507 ALC271_FIXUP_DMIC, 3525 ALC271_FIXUP_DMIC,
3508 ALC269_FIXUP_PCM_44K, 3526 ALC269_FIXUP_PCM_44K,
3509 ALC269_FIXUP_STEREO_DMIC, 3527 ALC269_FIXUP_STEREO_DMIC,
3528 ALC269_FIXUP_HEADSET_MIC,
3510 ALC269_FIXUP_QUANTA_MUTE, 3529 ALC269_FIXUP_QUANTA_MUTE,
3511 ALC269_FIXUP_LIFEBOOK, 3530 ALC269_FIXUP_LIFEBOOK,
3512 ALC269_FIXUP_AMIC, 3531 ALC269_FIXUP_AMIC,
@@ -3519,9 +3538,11 @@ enum {
3519 ALC269_FIXUP_HP_GPIO_LED, 3538 ALC269_FIXUP_HP_GPIO_LED,
3520 ALC269_FIXUP_INV_DMIC, 3539 ALC269_FIXUP_INV_DMIC,
3521 ALC269_FIXUP_LENOVO_DOCK, 3540 ALC269_FIXUP_LENOVO_DOCK,
3541 ALC286_FIXUP_SONY_MIC_NO_PRESENCE,
3522 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, 3542 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
3523 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, 3543 ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
3524 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, 3544 ALC269_FIXUP_DELL2_MIC_NO_PRESENCE,
3545 ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
3525 ALC269_FIXUP_HEADSET_MODE, 3546 ALC269_FIXUP_HEADSET_MODE,
3526 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, 3547 ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC,
3527 ALC269_FIXUP_ASUS_X101_FUNC, 3548 ALC269_FIXUP_ASUS_X101_FUNC,
@@ -3535,6 +3556,7 @@ enum {
3535 ALC283_FIXUP_CHROME_BOOK, 3556 ALC283_FIXUP_CHROME_BOOK,
3536 ALC282_FIXUP_ASUS_TX300, 3557 ALC282_FIXUP_ASUS_TX300,
3537 ALC283_FIXUP_INT_MIC, 3558 ALC283_FIXUP_INT_MIC,
3559 ALC290_FIXUP_MONO_SPEAKERS,
3538}; 3560};
3539 3561
3540static const struct hda_fixup alc269_fixups[] = { 3562static const struct hda_fixup alc269_fixups[] = {
@@ -3603,6 +3625,10 @@ static const struct hda_fixup alc269_fixups[] = {
3603 .type = HDA_FIXUP_FUNC, 3625 .type = HDA_FIXUP_FUNC,
3604 .v.func = alc269_fixup_stereo_dmic, 3626 .v.func = alc269_fixup_stereo_dmic,
3605 }, 3627 },
3628 [ALC269_FIXUP_HEADSET_MIC] = {
3629 .type = HDA_FIXUP_FUNC,
3630 .v.func = alc269_fixup_headset_mic,
3631 },
3606 [ALC269_FIXUP_QUANTA_MUTE] = { 3632 [ALC269_FIXUP_QUANTA_MUTE] = {
3607 .type = HDA_FIXUP_FUNC, 3633 .type = HDA_FIXUP_FUNC,
3608 .v.func = alc269_fixup_quanta_mute, 3634 .v.func = alc269_fixup_quanta_mute,
@@ -3712,6 +3738,15 @@ static const struct hda_fixup alc269_fixups[] = {
3712 .chained = true, 3738 .chained = true,
3713 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC 3739 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
3714 }, 3740 },
3741 [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = {
3742 .type = HDA_FIXUP_PINS,
3743 .v.pins = (const struct hda_pintbl[]) {
3744 { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */
3745 { }
3746 },
3747 .chained = true,
3748 .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC
3749 },
3715 [ALC269_FIXUP_HEADSET_MODE] = { 3750 [ALC269_FIXUP_HEADSET_MODE] = {
3716 .type = HDA_FIXUP_FUNC, 3751 .type = HDA_FIXUP_FUNC,
3717 .v.func = alc_fixup_headset_mode, 3752 .v.func = alc_fixup_headset_mode,
@@ -3720,6 +3755,15 @@ static const struct hda_fixup alc269_fixups[] = {
3720 .type = HDA_FIXUP_FUNC, 3755 .type = HDA_FIXUP_FUNC,
3721 .v.func = alc_fixup_headset_mode_no_hp_mic, 3756 .v.func = alc_fixup_headset_mode_no_hp_mic,
3722 }, 3757 },
3758 [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = {
3759 .type = HDA_FIXUP_PINS,
3760 .v.pins = (const struct hda_pintbl[]) {
3761 { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */
3762 { }
3763 },
3764 .chained = true,
3765 .chain_id = ALC269_FIXUP_HEADSET_MIC
3766 },
3723 [ALC269_FIXUP_ASUS_X101_FUNC] = { 3767 [ALC269_FIXUP_ASUS_X101_FUNC] = {
3724 .type = HDA_FIXUP_FUNC, 3768 .type = HDA_FIXUP_FUNC,
3725 .v.func = alc269_fixup_x101_headset_mic, 3769 .v.func = alc269_fixup_x101_headset_mic,
@@ -3804,6 +3848,12 @@ static const struct hda_fixup alc269_fixups[] = {
3804 .chained = true, 3848 .chained = true,
3805 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST 3849 .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
3806 }, 3850 },
3851 [ALC290_FIXUP_MONO_SPEAKERS] = {
3852 .type = HDA_FIXUP_FUNC,
3853 .v.func = alc290_fixup_mono_speakers,
3854 .chained = true,
3855 .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE,
3856 },
3807}; 3857};
3808 3858
3809static const struct snd_pci_quirk alc269_fixup_tbl[] = { 3859static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -3845,6 +3895,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3845 SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3895 SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3846 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3896 SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3847 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 3897 SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE),
3898 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS),
3848 SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), 3899 SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
3849 SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), 3900 SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE),
3850 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), 3901 SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),
@@ -3867,6 +3918,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
3867 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 3918 SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
3868 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), 3919 SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC),
3869 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), 3920 SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101),
3921 SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE),
3870 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), 3922 SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2),
3871 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 3923 SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
3872 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 3924 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
@@ -3952,6 +4004,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
3952 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, 4004 {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"},
3953 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, 4005 {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"},
3954 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, 4006 {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"},
4007 {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"},
3955 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, 4008 {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"},
3956 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, 4009 {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"},
3957 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, 4010 {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
@@ -4569,6 +4622,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
4569 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4622 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4570 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), 4623 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
4571 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), 4624 SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
4625 SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4),
4572 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), 4626 SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT),
4573 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), 4627 SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2),
4574 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), 4628 SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD),