aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 04cb1251e3e7..1885e7649101 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1552,15 +1552,20 @@ int snd_hda_add_vmaster(struct hda_codec *codec, char *name,
1552 1552
1553 for (s = slaves; *s; s++) { 1553 for (s = slaves; *s; s++) {
1554 struct snd_kcontrol *sctl; 1554 struct snd_kcontrol *sctl;
1555 1555 int i = 0;
1556 sctl = snd_hda_find_mixer_ctl(codec, *s); 1556 for (;;) {
1557 if (!sctl) { 1557 sctl = _snd_hda_find_mixer_ctl(codec, *s, i);
1558 snd_printdd("Cannot find slave %s, skipped\n", *s); 1558 if (!sctl) {
1559 continue; 1559 if (!i)
1560 snd_printdd("Cannot find slave %s, "
1561 "skipped\n", *s);
1562 break;
1563 }
1564 err = snd_ctl_add_slave(kctl, sctl);
1565 if (err < 0)
1566 return err;
1567 i++;
1560 } 1568 }
1561 err = snd_ctl_add_slave(kctl, sctl);
1562 if (err < 0)
1563 return err;
1564 } 1569 }
1565 return 0; 1570 return 0;
1566} 1571}