diff options
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 47d6ffc9b5b5..c45f3e69bcf0 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -375,7 +375,7 @@ static int is_ext_mic(struct hda_codec *codec, unsigned int idx) | |||
375 | static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, | 375 | static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, |
376 | unsigned int *idxp) | 376 | unsigned int *idxp) |
377 | { | 377 | { |
378 | int i; | 378 | int i, idx; |
379 | hda_nid_t nid; | 379 | hda_nid_t nid; |
380 | 380 | ||
381 | nid = codec->start_nid; | 381 | nid = codec->start_nid; |
@@ -384,9 +384,11 @@ static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, | |||
384 | type = get_wcaps_type(get_wcaps(codec, nid)); | 384 | type = get_wcaps_type(get_wcaps(codec, nid)); |
385 | if (type != AC_WID_AUD_IN) | 385 | if (type != AC_WID_AUD_IN) |
386 | continue; | 386 | continue; |
387 | *idxp = snd_hda_get_conn_index(codec, nid, pin, false); | 387 | idx = snd_hda_get_conn_index(codec, nid, pin, false); |
388 | if (*idxp >= 0) | 388 | if (idx >= 0) { |
389 | *idxp = idx; | ||
389 | return nid; | 390 | return nid; |
391 | } | ||
390 | } | 392 | } |
391 | return 0; | 393 | return 0; |
392 | } | 394 | } |
@@ -533,7 +535,7 @@ static int add_volume(struct hda_codec *codec, const char *name, | |||
533 | int index, unsigned int pval, int dir, | 535 | int index, unsigned int pval, int dir, |
534 | struct snd_kcontrol **kctlp) | 536 | struct snd_kcontrol **kctlp) |
535 | { | 537 | { |
536 | char tmp[32]; | 538 | char tmp[44]; |
537 | struct snd_kcontrol_new knew = | 539 | struct snd_kcontrol_new knew = |
538 | HDA_CODEC_VOLUME_IDX(tmp, index, 0, 0, HDA_OUTPUT); | 540 | HDA_CODEC_VOLUME_IDX(tmp, index, 0, 0, HDA_OUTPUT); |
539 | knew.private_value = pval; | 541 | knew.private_value = pval; |