diff options
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/6fire/control.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/sound/usb/6fire/control.c b/sound/usb/6fire/control.c index 184e3987ac24..54656eed6e2e 100644 --- a/sound/usb/6fire/control.c +++ b/sound/usb/6fire/control.c | |||
@@ -25,8 +25,8 @@ | |||
25 | #include "comm.h" | 25 | #include "comm.h" |
26 | #include "chip.h" | 26 | #include "chip.h" |
27 | 27 | ||
28 | static char *opt_coax_texts[2] = { "Optical", "Coax" }; | 28 | static const char * const opt_coax_texts[2] = { "Optical", "Coax" }; |
29 | static char *line_phono_texts[2] = { "Line", "Phono" }; | 29 | static const char * const line_phono_texts[2] = { "Line", "Phono" }; |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * data that needs to be sent to device. sets up card internal stuff. | 32 | * data that needs to be sent to device. sets up card internal stuff. |
@@ -327,14 +327,7 @@ static int usb6fire_control_input_vol_get(struct snd_kcontrol *kcontrol, | |||
327 | static int usb6fire_control_line_phono_info(struct snd_kcontrol *kcontrol, | 327 | static int usb6fire_control_line_phono_info(struct snd_kcontrol *kcontrol, |
328 | struct snd_ctl_elem_info *uinfo) | 328 | struct snd_ctl_elem_info *uinfo) |
329 | { | 329 | { |
330 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 330 | return snd_ctl_enum_info(uinfo, 1, 2, line_phono_texts); |
331 | uinfo->count = 1; | ||
332 | uinfo->value.enumerated.items = 2; | ||
333 | if (uinfo->value.enumerated.item > 1) | ||
334 | uinfo->value.enumerated.item = 1; | ||
335 | strcpy(uinfo->value.enumerated.name, | ||
336 | line_phono_texts[uinfo->value.enumerated.item]); | ||
337 | return 0; | ||
338 | } | 331 | } |
339 | 332 | ||
340 | static int usb6fire_control_line_phono_put(struct snd_kcontrol *kcontrol, | 333 | static int usb6fire_control_line_phono_put(struct snd_kcontrol *kcontrol, |
@@ -361,14 +354,7 @@ static int usb6fire_control_line_phono_get(struct snd_kcontrol *kcontrol, | |||
361 | static int usb6fire_control_opt_coax_info(struct snd_kcontrol *kcontrol, | 354 | static int usb6fire_control_opt_coax_info(struct snd_kcontrol *kcontrol, |
362 | struct snd_ctl_elem_info *uinfo) | 355 | struct snd_ctl_elem_info *uinfo) |
363 | { | 356 | { |
364 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 357 | return snd_ctl_enum_info(uinfo, 1, 2, opt_coax_texts); |
365 | uinfo->count = 1; | ||
366 | uinfo->value.enumerated.items = 2; | ||
367 | if (uinfo->value.enumerated.item > 1) | ||
368 | uinfo->value.enumerated.item = 1; | ||
369 | strcpy(uinfo->value.enumerated.name, | ||
370 | opt_coax_texts[uinfo->value.enumerated.item]); | ||
371 | return 0; | ||
372 | } | 358 | } |
373 | 359 | ||
374 | static int usb6fire_control_opt_coax_put(struct snd_kcontrol *kcontrol, | 360 | static int usb6fire_control_opt_coax_put(struct snd_kcontrol *kcontrol, |