diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-07-09 08:42:25 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-09 08:42:25 -0400 |
commit | 017f2a104c7fed53a9b2534f0795f1f5af87674f (patch) | |
tree | 5641403da5186a17e3b758b1beca2c1738e09c51 /sound/pci | |
parent | 9975c2e4c3e4fc26148723dc99b5f0667716a249 (diff) |
ALSA: hda - Implement 44kHz workaround for IdeadPad as fixup
Instead of checking the model quirk, use a fixup table for workaround
of 44kHz-fixed PCM for Lenovo IdeaPad with ALC269.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index aaa27557e04f..124c63f4c457 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4460,6 +4460,21 @@ static void alc271_fixup_dmic(struct hda_codec *codec, | |||
4460 | snd_hda_sequence_write(codec, verbs); | 4460 | snd_hda_sequence_write(codec, verbs); |
4461 | } | 4461 | } |
4462 | 4462 | ||
4463 | static void alc269_fixup_pcm_44k(struct hda_codec *codec, | ||
4464 | const struct alc_fixup *fix, int action) | ||
4465 | { | ||
4466 | struct alc_spec *spec = codec->spec; | ||
4467 | |||
4468 | if (action != ALC_FIXUP_ACT_PROBE) | ||
4469 | return; | ||
4470 | |||
4471 | /* Due to a hardware problem on Lenovo Ideadpad, we need to | ||
4472 | * fix the sample rate of analog I/O to 44.1kHz | ||
4473 | */ | ||
4474 | spec->stream_analog_playback = &alc269_44k_pcm_analog_playback; | ||
4475 | spec->stream_analog_capture = &alc269_44k_pcm_analog_capture; | ||
4476 | } | ||
4477 | |||
4463 | enum { | 4478 | enum { |
4464 | ALC269_FIXUP_SONY_VAIO, | 4479 | ALC269_FIXUP_SONY_VAIO, |
4465 | ALC275_FIXUP_SONY_VAIO_GPIO2, | 4480 | ALC275_FIXUP_SONY_VAIO_GPIO2, |
@@ -4469,6 +4484,7 @@ enum { | |||
4469 | ALC269_FIXUP_LENOVO_EAPD, | 4484 | ALC269_FIXUP_LENOVO_EAPD, |
4470 | ALC275_FIXUP_SONY_HWEQ, | 4485 | ALC275_FIXUP_SONY_HWEQ, |
4471 | ALC271_FIXUP_DMIC, | 4486 | ALC271_FIXUP_DMIC, |
4487 | ALC269_FIXUP_PCM_44K, | ||
4472 | }; | 4488 | }; |
4473 | 4489 | ||
4474 | static const struct alc_fixup alc269_fixups[] = { | 4490 | static const struct alc_fixup alc269_fixups[] = { |
@@ -4527,9 +4543,14 @@ static const struct alc_fixup alc269_fixups[] = { | |||
4527 | .type = ALC_FIXUP_FUNC, | 4543 | .type = ALC_FIXUP_FUNC, |
4528 | .v.func = alc271_fixup_dmic, | 4544 | .v.func = alc271_fixup_dmic, |
4529 | }, | 4545 | }, |
4546 | [ALC269_FIXUP_PCM_44K] = { | ||
4547 | .type = ALC_FIXUP_FUNC, | ||
4548 | .v.func = alc269_fixup_pcm_44k, | ||
4549 | }, | ||
4530 | }; | 4550 | }; |
4531 | 4551 | ||
4532 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 4552 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
4553 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | ||
4533 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), | 4554 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), |
4534 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 4555 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
4535 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 4556 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
@@ -4541,7 +4562,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4541 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), | 4562 | SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE), |
4542 | SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), | 4563 | SND_PCI_QUIRK(0x17aa, 0x21ca, "Thinkpad L412", ALC269_FIXUP_SKU_IGNORE), |
4543 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), | 4564 | SND_PCI_QUIRK(0x17aa, 0x21e9, "Thinkpad Edge 15", ALC269_FIXUP_SKU_IGNORE), |
4544 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 4565 | SND_PCI_QUIRK(0x17aa, 0x3bf8, "Lenovo Ideapd", ALC269_FIXUP_PCM_44K), |
4545 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), | 4566 | SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), |
4546 | {} | 4567 | {} |
4547 | }; | 4568 | }; |
@@ -4678,16 +4699,6 @@ static int patch_alc269(struct hda_codec *codec) | |||
4678 | if (board_config != ALC_MODEL_AUTO) | 4699 | if (board_config != ALC_MODEL_AUTO) |
4679 | setup_preset(codec, &alc269_presets[board_config]); | 4700 | setup_preset(codec, &alc269_presets[board_config]); |
4680 | 4701 | ||
4681 | #if 0 | ||
4682 | if (board_config == ALC269_QUANTA_FL1) { | ||
4683 | /* Due to a hardware problem on Lenovo Ideadpad, we need to | ||
4684 | * fix the sample rate of analog I/O to 44.1kHz | ||
4685 | */ | ||
4686 | spec->stream_analog_playback = &alc269_44k_pcm_analog_playback; | ||
4687 | spec->stream_analog_capture = &alc269_44k_pcm_analog_capture; | ||
4688 | } | ||
4689 | #endif | ||
4690 | |||
4691 | if (!spec->no_analog && !spec->adc_nids && spec->input_mux) { | 4702 | if (!spec->no_analog && !spec->adc_nids && spec->input_mux) { |
4692 | alc_auto_fill_adc_caps(codec); | 4703 | alc_auto_fill_adc_caps(codec); |
4693 | alc_rebuild_imux_for_auto_mic(codec); | 4704 | alc_rebuild_imux_for_auto_mic(codec); |