diff options
Diffstat (limited to 'sound/usb/mixer_quirks.c')
-rw-r--r-- | sound/usb/mixer_quirks.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index 8b55c0667f60..88a408cdddbd 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
@@ -69,7 +69,6 @@ static int snd_create_std_mono_ctl_offset(struct usb_mixer_interface *mixer, | |||
69 | const char *name, | 69 | const char *name, |
70 | snd_kcontrol_tlv_rw_t *tlv_callback) | 70 | snd_kcontrol_tlv_rw_t *tlv_callback) |
71 | { | 71 | { |
72 | int err; | ||
73 | struct usb_mixer_elem_info *cval; | 72 | struct usb_mixer_elem_info *cval; |
74 | struct snd_kcontrol *kctl; | 73 | struct snd_kcontrol *kctl; |
75 | 74 | ||
@@ -77,8 +76,7 @@ static int snd_create_std_mono_ctl_offset(struct usb_mixer_interface *mixer, | |||
77 | if (!cval) | 76 | if (!cval) |
78 | return -ENOMEM; | 77 | return -ENOMEM; |
79 | 78 | ||
80 | cval->id = unitid; | 79 | snd_usb_mixer_elem_init_std(&cval->head, mixer, unitid); |
81 | cval->mixer = mixer; | ||
82 | cval->val_type = val_type; | 80 | cval->val_type = val_type; |
83 | cval->channels = 1; | 81 | cval->channels = 1; |
84 | cval->control = control; | 82 | cval->control = control; |
@@ -112,11 +110,7 @@ static int snd_create_std_mono_ctl_offset(struct usb_mixer_interface *mixer, | |||
112 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; | 110 | SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK; |
113 | } | 111 | } |
114 | /* Add control to mixer */ | 112 | /* Add control to mixer */ |
115 | err = snd_usb_mixer_add_control(mixer, kctl); | 113 | return snd_usb_mixer_add_control(&cval->head, kctl); |
116 | if (err < 0) | ||
117 | return err; | ||
118 | |||
119 | return 0; | ||
120 | } | 114 | } |
121 | 115 | ||
122 | static int snd_create_std_mono_ctl(struct usb_mixer_interface *mixer, | 116 | static int snd_create_std_mono_ctl(struct usb_mixer_interface *mixer, |
@@ -1206,7 +1200,7 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip, | |||
1206 | int unitid = 12; /* SamleRate ExtensionUnit ID */ | 1200 | int unitid = 12; /* SamleRate ExtensionUnit ID */ |
1207 | 1201 | ||
1208 | list_for_each_entry(mixer, &chip->mixer_list, list) { | 1202 | list_for_each_entry(mixer, &chip->mixer_list, list) { |
1209 | cval = mixer->id_elems[unitid]; | 1203 | cval = (struct usb_mixer_elem_info *)mixer->id_elems[unitid]; |
1210 | if (cval) { | 1204 | if (cval) { |
1211 | snd_usb_mixer_set_ctl_value(cval, UAC_SET_CUR, | 1205 | snd_usb_mixer_set_ctl_value(cval, UAC_SET_CUR, |
1212 | cval->control << 8, | 1206 | cval->control << 8, |