diff options
-rw-r--r-- | sound/usb/mixer_quirks.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index f119a41ed9a9..3980bf554c83 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
@@ -437,19 +437,9 @@ static void snd_audigy2nx_proc_read(struct snd_info_entry *entry, | |||
437 | static int snd_emu0204_ch_switch_info(struct snd_kcontrol *kcontrol, | 437 | static int snd_emu0204_ch_switch_info(struct snd_kcontrol *kcontrol, |
438 | struct snd_ctl_elem_info *uinfo) | 438 | struct snd_ctl_elem_info *uinfo) |
439 | { | 439 | { |
440 | static const char *texts[2] = {"1/2", | 440 | static const char * const texts[2] = {"1/2", "3/4"}; |
441 | "3/4" | ||
442 | }; | ||
443 | |||
444 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | ||
445 | uinfo->count = 1; | ||
446 | uinfo->value.enumerated.items = 2; | ||
447 | if (uinfo->value.enumerated.item > 1) | ||
448 | uinfo->value.enumerated.item = 1; | ||
449 | strcpy(uinfo->value.enumerated.name, | ||
450 | texts[uinfo->value.enumerated.item]); | ||
451 | 441 | ||
452 | return 0; | 442 | return snd_ctl_enum_info(uinfo, 1, ARRAY_SIZE(texts), texts); |
453 | } | 443 | } |
454 | 444 | ||
455 | static int snd_emu0204_ch_switch_get(struct snd_kcontrol *kcontrol, | 445 | static int snd_emu0204_ch_switch_get(struct snd_kcontrol *kcontrol, |
@@ -735,25 +725,12 @@ struct snd_ftu_eff_switch_priv_val { | |||
735 | static int snd_ftu_eff_switch_info(struct snd_kcontrol *kcontrol, | 725 | static int snd_ftu_eff_switch_info(struct snd_kcontrol *kcontrol, |
736 | struct snd_ctl_elem_info *uinfo) | 726 | struct snd_ctl_elem_info *uinfo) |
737 | { | 727 | { |
738 | static const char *texts[8] = {"Room 1", | 728 | static const char *const texts[8] = { |
739 | "Room 2", | 729 | "Room 1", "Room 2", "Room 3", "Hall 1", |
740 | "Room 3", | 730 | "Hall 2", "Plate", "Delay", "Echo" |
741 | "Hall 1", | ||
742 | "Hall 2", | ||
743 | "Plate", | ||
744 | "Delay", | ||
745 | "Echo" | ||
746 | }; | 731 | }; |
747 | 732 | ||
748 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 733 | return snd_ctl_enum_info(uinfo, 1, ARRAY_SIZE(texts), texts); |
749 | uinfo->count = 1; | ||
750 | uinfo->value.enumerated.items = 8; | ||
751 | if (uinfo->value.enumerated.item > 7) | ||
752 | uinfo->value.enumerated.item = 7; | ||
753 | strcpy(uinfo->value.enumerated.name, | ||
754 | texts[uinfo->value.enumerated.item]); | ||
755 | |||
756 | return 0; | ||
757 | } | 734 | } |
758 | 735 | ||
759 | static int snd_ftu_eff_switch_get(struct snd_kcontrol *kctl, | 736 | static int snd_ftu_eff_switch_get(struct snd_kcontrol *kctl, |