aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-08-11 02:45:11 -0400
committerTakashi Iwai <tiwai@suse.de>2009-08-11 02:45:11 -0400
commitdd704698f56c1451fc9c5daadcd6e3a089de2c40 (patch)
tree7bff685dfde51f46ba424fa194b52e2966ef36f1
parent100d5eb36ba20dc0b99a17ea2b9800c567bfc3d1 (diff)
ALSA: hda - Don't override ADC definitions for ALC codecs
ALC269 and ALC861-VD parsers override the ADC definitions unconditionally without checking the spec definition. This causes the problem when any inconsistent ADC is set up in the device quirk (like ALC272 with digital-mic). This patch avoids the overriding by adding the proper checks. Reference: Novell bnc#529467 https://bugzilla.novell.com/show_bug.cgi?id=529467 Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 5cc927f47837..fea976793ae5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -15579,9 +15579,12 @@ static int patch_alc861vd(struct hda_codec *codec)
15579 spec->stream_digital_playback = &alc861vd_pcm_digital_playback; 15579 spec->stream_digital_playback = &alc861vd_pcm_digital_playback;
15580 spec->stream_digital_capture = &alc861vd_pcm_digital_capture; 15580 spec->stream_digital_capture = &alc861vd_pcm_digital_capture;
15581 15581
15582 spec->adc_nids = alc861vd_adc_nids; 15582 if (!spec->adc_nids) {
15583 spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids); 15583 spec->adc_nids = alc861vd_adc_nids;
15584 spec->capsrc_nids = alc861vd_capsrc_nids; 15584 spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids);
15585 }
15586 if (!spec->capsrc_nids)
15587 spec->capsrc_nids = alc861vd_capsrc_nids;
15585 15588
15586 set_capture_mixer(spec); 15589 set_capture_mixer(spec);
15587 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 15590 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
@@ -17498,9 +17501,12 @@ static int patch_alc662(struct hda_codec *codec)
17498 spec->stream_digital_playback = &alc662_pcm_digital_playback; 17501 spec->stream_digital_playback = &alc662_pcm_digital_playback;
17499 spec->stream_digital_capture = &alc662_pcm_digital_capture; 17502 spec->stream_digital_capture = &alc662_pcm_digital_capture;
17500 17503
17501 spec->adc_nids = alc662_adc_nids; 17504 if (!spec->adc_nids) {
17502 spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids); 17505 spec->adc_nids = alc662_adc_nids;
17503 spec->capsrc_nids = alc662_capsrc_nids; 17506 spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids);
17507 }
17508 if (!spec->capsrc_nids)
17509 spec->capsrc_nids = alc662_capsrc_nids;
17504 17510
17505 if (!spec->cap_mixer) 17511 if (!spec->cap_mixer)
17506 set_capture_mixer(spec); 17512 set_capture_mixer(spec);