diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-04 10:50:46 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-04 12:15:57 -0400 |
commit | e0b27167c2d6464ff7ae7e35725024349e44596b (patch) | |
tree | 8475882e9d41f96b5edb21fd610ba9b5f716f517 | |
parent | 36ad45309be840d652394cfb032b592b6a20a3dd (diff) |
ALSA: hda - Convert the static quirk for Samsung Q1 Ultra
... to a fixup entry.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_analog.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 7777a3a5f59a..056810c14e71 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -1063,17 +1063,6 @@ static const struct hda_verb ad1986a_automic_verbs[] = { | |||
1063 | {} | 1063 | {} |
1064 | }; | 1064 | }; |
1065 | 1065 | ||
1066 | /* Ultra initialization */ | ||
1067 | static const struct hda_verb ad1986a_ultra_init[] = { | ||
1068 | /* eapd initialization */ | ||
1069 | { 0x1b, AC_VERB_SET_EAPD_BTLENABLE, 0x00 }, | ||
1070 | /* CLFE -> Mic in */ | ||
1071 | { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2 }, | ||
1072 | { 0x1d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, | ||
1073 | { 0x1d, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, | ||
1074 | { } /* end */ | ||
1075 | }; | ||
1076 | |||
1077 | /* pin sensing on HP jack */ | 1066 | /* pin sensing on HP jack */ |
1078 | static const struct hda_verb ad1986a_hp_init_verbs[] = { | 1067 | static const struct hda_verb ad1986a_hp_init_verbs[] = { |
1079 | {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1986A_HP_EVENT}, | 1068 | {0x1a, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1986A_HP_EVENT}, |
@@ -1110,7 +1099,6 @@ enum { | |||
1110 | AD1986A_LAPTOP, | 1099 | AD1986A_LAPTOP, |
1111 | AD1986A_LAPTOP_EAPD, | 1100 | AD1986A_LAPTOP_EAPD, |
1112 | AD1986A_LAPTOP_AUTOMUTE, | 1101 | AD1986A_LAPTOP_AUTOMUTE, |
1113 | AD1986A_ULTRA, | ||
1114 | AD1986A_SAMSUNG, | 1102 | AD1986A_SAMSUNG, |
1115 | AD1986A_SAMSUNG_P50, | 1103 | AD1986A_SAMSUNG_P50, |
1116 | AD1986A_MODELS | 1104 | AD1986A_MODELS |
@@ -1123,7 +1111,6 @@ static const char * const ad1986a_models[AD1986A_MODELS] = { | |||
1123 | [AD1986A_LAPTOP] = "laptop", | 1111 | [AD1986A_LAPTOP] = "laptop", |
1124 | [AD1986A_LAPTOP_EAPD] = "laptop-eapd", | 1112 | [AD1986A_LAPTOP_EAPD] = "laptop-eapd", |
1125 | [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute", | 1113 | [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute", |
1126 | [AD1986A_ULTRA] = "ultra", | ||
1127 | [AD1986A_SAMSUNG] = "samsung", | 1114 | [AD1986A_SAMSUNG] = "samsung", |
1128 | [AD1986A_SAMSUNG_P50] = "samsung-p50", | 1115 | [AD1986A_SAMSUNG_P50] = "samsung-p50", |
1129 | }; | 1116 | }; |
@@ -1149,7 +1136,6 @@ static const struct snd_pci_quirk ad1986a_cfg_tbl[] = { | |||
1149 | SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK), | 1136 | SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK), |
1150 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), | 1137 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), |
1151 | SND_PCI_QUIRK(0x144d, 0xc024, "Samsung P50", AD1986A_SAMSUNG_P50), | 1138 | SND_PCI_QUIRK(0x144d, 0xc024, "Samsung P50", AD1986A_SAMSUNG_P50), |
1152 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), | ||
1153 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_SAMSUNG), | 1139 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_SAMSUNG), |
1154 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), | 1140 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), |
1155 | SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP), | 1141 | SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP), |
@@ -1203,6 +1189,7 @@ static void ad_fixup_inv_jack_detect(struct hda_codec *codec, | |||
1203 | 1189 | ||
1204 | enum { | 1190 | enum { |
1205 | AD1986A_FIXUP_INV_JACK_DETECT, | 1191 | AD1986A_FIXUP_INV_JACK_DETECT, |
1192 | AD1986A_FIXUP_ULTRA, | ||
1206 | }; | 1193 | }; |
1207 | 1194 | ||
1208 | static const struct hda_fixup ad1986a_fixups[] = { | 1195 | static const struct hda_fixup ad1986a_fixups[] = { |
@@ -1210,9 +1197,18 @@ static const struct hda_fixup ad1986a_fixups[] = { | |||
1210 | .type = HDA_FIXUP_FUNC, | 1197 | .type = HDA_FIXUP_FUNC, |
1211 | .v.func = ad_fixup_inv_jack_detect, | 1198 | .v.func = ad_fixup_inv_jack_detect, |
1212 | }, | 1199 | }, |
1200 | [AD1986A_FIXUP_ULTRA] = { | ||
1201 | .type = HDA_FIXUP_PINS, | ||
1202 | .v.pins = (const struct hda_pintbl[]) { | ||
1203 | { 0x1b, 0x90170110 }, /* speaker */ | ||
1204 | { 0x1d, 0x90a7013e }, /* int mic */ | ||
1205 | {} | ||
1206 | }, | ||
1207 | }, | ||
1213 | }; | 1208 | }; |
1214 | 1209 | ||
1215 | static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { | 1210 | static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { |
1211 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_FIXUP_ULTRA), | ||
1216 | SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo N100", AD1986A_FIXUP_INV_JACK_DETECT), | 1212 | SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo N100", AD1986A_FIXUP_INV_JACK_DETECT), |
1217 | {} | 1213 | {} |
1218 | }; | 1214 | }; |
@@ -1395,15 +1391,6 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
1395 | */ | 1391 | */ |
1396 | spec->inv_jack_detect = 1; | 1392 | spec->inv_jack_detect = 1; |
1397 | break; | 1393 | break; |
1398 | case AD1986A_ULTRA: | ||
1399 | spec->mixers[0] = ad1986a_laptop_eapd_mixers; | ||
1400 | spec->num_init_verbs = 2; | ||
1401 | spec->init_verbs[1] = ad1986a_ultra_init; | ||
1402 | spec->multiout.max_channels = 2; | ||
1403 | spec->multiout.num_dacs = 1; | ||
1404 | spec->multiout.dac_nids = ad1986a_laptop_dac_nids; | ||
1405 | spec->multiout.dig_out_nid = 0; | ||
1406 | break; | ||
1407 | } | 1394 | } |
1408 | 1395 | ||
1409 | /* AD1986A has a hardware problem that it can't share a stream | 1396 | /* AD1986A has a hardware problem that it can't share a stream |