diff options
author | Jaroslav Kysela <perex@perex.cz> | 2009-11-11 07:43:01 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-16 05:35:14 -0500 |
commit | 3911a4c19e927738766003839aa447becbdbaa27 (patch) | |
tree | 7a9dc03cfc6776a57a6e459cd4efe5d8e16797cd /sound/pci/hda/patch_cirrus.c | |
parent | 2dca0bba70ce3c233be152e384580c134935332d (diff) |
ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment
This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 8ba306856d38..9ac09e4568b3 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c | |||
@@ -500,7 +500,7 @@ static int add_mute(struct hda_codec *codec, const char *name, int index, | |||
500 | knew.private_value = pval; | 500 | knew.private_value = pval; |
501 | snprintf(tmp, sizeof(tmp), "%s %s Switch", name, dir_sfx[dir]); | 501 | snprintf(tmp, sizeof(tmp), "%s %s Switch", name, dir_sfx[dir]); |
502 | *kctlp = snd_ctl_new1(&knew, codec); | 502 | *kctlp = snd_ctl_new1(&knew, codec); |
503 | return snd_hda_ctl_add(codec, *kctlp); | 503 | return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); |
504 | } | 504 | } |
505 | 505 | ||
506 | static int add_volume(struct hda_codec *codec, const char *name, | 506 | static int add_volume(struct hda_codec *codec, const char *name, |
@@ -513,7 +513,7 @@ static int add_volume(struct hda_codec *codec, const char *name, | |||
513 | knew.private_value = pval; | 513 | knew.private_value = pval; |
514 | snprintf(tmp, sizeof(tmp), "%s %s Volume", name, dir_sfx[dir]); | 514 | snprintf(tmp, sizeof(tmp), "%s %s Volume", name, dir_sfx[dir]); |
515 | *kctlp = snd_ctl_new1(&knew, codec); | 515 | *kctlp = snd_ctl_new1(&knew, codec); |
516 | return snd_hda_ctl_add(codec, *kctlp); | 516 | return snd_hda_ctl_add(codec, get_amp_nid_(pval), *kctlp); |
517 | } | 517 | } |
518 | 518 | ||
519 | static void fix_volume_caps(struct hda_codec *codec, hda_nid_t dac) | 519 | static void fix_volume_caps(struct hda_codec *codec, hda_nid_t dac) |
@@ -536,14 +536,14 @@ static int add_vmaster(struct hda_codec *codec, hda_nid_t dac) | |||
536 | 536 | ||
537 | spec->vmaster_sw = | 537 | spec->vmaster_sw = |
538 | snd_ctl_make_virtual_master("Master Playback Switch", NULL); | 538 | snd_ctl_make_virtual_master("Master Playback Switch", NULL); |
539 | err = snd_hda_ctl_add(codec, spec->vmaster_sw); | 539 | err = snd_hda_ctl_add(codec, dac, spec->vmaster_sw); |
540 | if (err < 0) | 540 | if (err < 0) |
541 | return err; | 541 | return err; |
542 | 542 | ||
543 | snd_hda_set_vmaster_tlv(codec, dac, HDA_OUTPUT, tlv); | 543 | snd_hda_set_vmaster_tlv(codec, dac, HDA_OUTPUT, tlv); |
544 | spec->vmaster_vol = | 544 | spec->vmaster_vol = |
545 | snd_ctl_make_virtual_master("Master Playback Volume", tlv); | 545 | snd_ctl_make_virtual_master("Master Playback Volume", tlv); |
546 | err = snd_hda_ctl_add(codec, spec->vmaster_vol); | 546 | err = snd_hda_ctl_add(codec, dac, spec->vmaster_vol); |
547 | if (err < 0) | 547 | if (err < 0) |
548 | return err; | 548 | return err; |
549 | return 0; | 549 | return 0; |
@@ -756,13 +756,13 @@ static int build_input(struct hda_codec *codec) | |||
756 | if (!kctl) | 756 | if (!kctl) |
757 | return -ENOMEM; | 757 | return -ENOMEM; |
758 | kctl->private_value = (long)spec->capture_bind[i]; | 758 | kctl->private_value = (long)spec->capture_bind[i]; |
759 | err = snd_hda_ctl_add(codec, kctl); | 759 | err = snd_hda_ctl_add(codec, 0, kctl); |
760 | if (err < 0) | 760 | if (err < 0) |
761 | return err; | 761 | return err; |
762 | } | 762 | } |
763 | 763 | ||
764 | if (spec->num_inputs > 1 && !spec->mic_detect) { | 764 | if (spec->num_inputs > 1 && !spec->mic_detect) { |
765 | err = snd_hda_ctl_add(codec, | 765 | err = snd_hda_ctl_add(codec, 0, |
766 | snd_ctl_new1(&cs_capture_source, codec)); | 766 | snd_ctl_new1(&cs_capture_source, codec)); |
767 | if (err < 0) | 767 | if (err < 0) |
768 | return err; | 768 | return err; |