diff options
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 7a426ed491f2..df3652ad15ef 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -244,6 +244,19 @@ static void ad_fixup_inv_jack_detect(struct hda_codec *codec, | |||
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
247 | /* Toshiba Satellite L40 implements EAPD in a standard way unlike others */ | ||
248 | static void ad1986a_fixup_eapd(struct hda_codec *codec, | ||
249 | const struct hda_fixup *fix, int action) | ||
250 | { | ||
251 | struct ad198x_spec *spec = codec->spec; | ||
252 | |||
253 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
254 | codec->inv_eapd = 0; | ||
255 | spec->gen.keep_eapd_on = 1; | ||
256 | spec->eapd_nid = 0x1b; | ||
257 | } | ||
258 | } | ||
259 | |||
247 | enum { | 260 | enum { |
248 | AD1986A_FIXUP_INV_JACK_DETECT, | 261 | AD1986A_FIXUP_INV_JACK_DETECT, |
249 | AD1986A_FIXUP_ULTRA, | 262 | AD1986A_FIXUP_ULTRA, |
@@ -251,6 +264,7 @@ enum { | |||
251 | AD1986A_FIXUP_3STACK, | 264 | AD1986A_FIXUP_3STACK, |
252 | AD1986A_FIXUP_LAPTOP, | 265 | AD1986A_FIXUP_LAPTOP, |
253 | AD1986A_FIXUP_LAPTOP_IMIC, | 266 | AD1986A_FIXUP_LAPTOP_IMIC, |
267 | AD1986A_FIXUP_EAPD, | ||
254 | }; | 268 | }; |
255 | 269 | ||
256 | static const struct hda_fixup ad1986a_fixups[] = { | 270 | static const struct hda_fixup ad1986a_fixups[] = { |
@@ -311,6 +325,10 @@ static const struct hda_fixup ad1986a_fixups[] = { | |||
311 | .chained_before = 1, | 325 | .chained_before = 1, |
312 | .chain_id = AD1986A_FIXUP_LAPTOP, | 326 | .chain_id = AD1986A_FIXUP_LAPTOP, |
313 | }, | 327 | }, |
328 | [AD1986A_FIXUP_EAPD] = { | ||
329 | .type = HDA_FIXUP_FUNC, | ||
330 | .v.func = ad1986a_fixup_eapd, | ||
331 | }, | ||
314 | }; | 332 | }; |
315 | 333 | ||
316 | static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { | 334 | static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { |
@@ -318,6 +336,7 @@ static const struct snd_pci_quirk ad1986a_fixup_tbl[] = { | |||
318 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8100, "ASUS P5", AD1986A_FIXUP_3STACK), | 336 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8100, "ASUS P5", AD1986A_FIXUP_3STACK), |
319 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8200, "ASUS M2", AD1986A_FIXUP_3STACK), | 337 | SND_PCI_QUIRK_MASK(0x1043, 0xff00, 0x8200, "ASUS M2", AD1986A_FIXUP_3STACK), |
320 | SND_PCI_QUIRK(0x10de, 0xcb84, "ASUS A8N-VM", AD1986A_FIXUP_3STACK), | 338 | SND_PCI_QUIRK(0x10de, 0xcb84, "ASUS A8N-VM", AD1986A_FIXUP_3STACK), |
339 | SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba Satellite L40", AD1986A_FIXUP_EAPD), | ||
321 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_FIXUP_LAPTOP), | 340 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_FIXUP_LAPTOP), |
322 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_FIXUP_SAMSUNG), | 341 | SND_PCI_QUIRK_MASK(0x144d, 0xff00, 0xc000, "Samsung", AD1986A_FIXUP_SAMSUNG), |
323 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_FIXUP_ULTRA), | 342 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_FIXUP_ULTRA), |
@@ -472,6 +491,8 @@ static int ad1983_add_spdif_mux_ctl(struct hda_codec *codec) | |||
472 | static int patch_ad1983(struct hda_codec *codec) | 491 | static int patch_ad1983(struct hda_codec *codec) |
473 | { | 492 | { |
474 | struct ad198x_spec *spec; | 493 | struct ad198x_spec *spec; |
494 | static hda_nid_t conn_0c[] = { 0x08 }; | ||
495 | static hda_nid_t conn_0d[] = { 0x09 }; | ||
475 | int err; | 496 | int err; |
476 | 497 | ||
477 | err = alloc_ad_spec(codec); | 498 | err = alloc_ad_spec(codec); |
@@ -479,8 +500,14 @@ static int patch_ad1983(struct hda_codec *codec) | |||
479 | return err; | 500 | return err; |
480 | spec = codec->spec; | 501 | spec = codec->spec; |
481 | 502 | ||
503 | spec->gen.mixer_nid = 0x0e; | ||
482 | spec->gen.beep_nid = 0x10; | 504 | spec->gen.beep_nid = 0x10; |
483 | set_beep_amp(spec, 0x10, 0, HDA_OUTPUT); | 505 | set_beep_amp(spec, 0x10, 0, HDA_OUTPUT); |
506 | |||
507 | /* limit the loopback routes not to confuse the parser */ | ||
508 | snd_hda_override_conn_list(codec, 0x0c, ARRAY_SIZE(conn_0c), conn_0c); | ||
509 | snd_hda_override_conn_list(codec, 0x0d, ARRAY_SIZE(conn_0d), conn_0d); | ||
510 | |||
484 | err = ad198x_parse_auto_config(codec, false); | 511 | err = ad198x_parse_auto_config(codec, false); |
485 | if (err < 0) | 512 | if (err < 0) |
486 | goto error; | 513 | goto error; |