aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/pci/ice1712/quartet.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ice1712/quartet.c')
-rw-r--r--sound/pci/ice1712/quartet.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c
index 0e3e04aa9faf..f61ee9f5c754 100644
--- a/sound/pci/ice1712/quartet.c
+++ b/sound/pci/ice1712/quartet.c
@@ -566,7 +566,7 @@ static int qtet_ain12_sw_put(struct snd_kcontrol *kcontrol,
{
struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
unsigned int old, new, tmp, masked_old;
- old = new = get_scr(ice);
+ old = get_scr(ice);
masked_old = old & (SCR_AIN12_SEL1 | SCR_AIN12_SEL0);
tmp = ucontrol->value.integer.value[0];
if (tmp == 2)
@@ -766,26 +766,6 @@ static const char * const follower_vols[] = {
static
DECLARE_TLV_DB_SCALE(qtet_master_db_scale, -6350, 50, 1);
-static struct snd_kcontrol *ctl_find(struct snd_card *card,
- const char *name)
-{
- struct snd_ctl_elem_id sid = {0};
-
- strlcpy(sid.name, name, sizeof(sid.name));
- sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
- return snd_ctl_find_id(card, &sid);
-}
-
-static void add_followers(struct snd_card *card,
- struct snd_kcontrol *master, const char * const *list)
-{
- for (; *list; list++) {
- struct snd_kcontrol *follower = ctl_find(card, *list);
- if (follower)
- snd_ctl_add_follower(master, follower);
- }
-}
-
static int qtet_add_controls(struct snd_ice1712 *ice)
{
struct qtet_spec *spec = ice->spec;
@@ -806,10 +786,12 @@ static int qtet_add_controls(struct snd_ice1712 *ice)
qtet_master_db_scale);
if (!vmaster)
return -ENOMEM;
- add_followers(ice->card, vmaster, follower_vols);
err = snd_ctl_add(ice->card, vmaster);
if (err < 0)
return err;
+ err = snd_ctl_add_followers(ice->card, vmaster, follower_vols);
+ if (err < 0)
+ return err;
/* only capture SPDIF over AK4113 */
return snd_ak4113_build(spec->ak4113,
ice->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);