diff options
Diffstat (limited to 'sound/isa/wss/wss_lib.c')
-rw-r--r-- | sound/isa/wss/wss_lib.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 360b08b03e1d..347bb1bda110 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c | |||
@@ -1993,25 +1993,20 @@ EXPORT_SYMBOL(snd_wss_timer); | |||
1993 | static int snd_wss_info_mux(struct snd_kcontrol *kcontrol, | 1993 | static int snd_wss_info_mux(struct snd_kcontrol *kcontrol, |
1994 | struct snd_ctl_elem_info *uinfo) | 1994 | struct snd_ctl_elem_info *uinfo) |
1995 | { | 1995 | { |
1996 | static char *texts[4] = { | 1996 | static const char * const texts[4] = { |
1997 | "Line", "Aux", "Mic", "Mix" | 1997 | "Line", "Aux", "Mic", "Mix" |
1998 | }; | 1998 | }; |
1999 | static char *opl3sa_texts[4] = { | 1999 | static const char * const opl3sa_texts[4] = { |
2000 | "Line", "CD", "Mic", "Mix" | 2000 | "Line", "CD", "Mic", "Mix" |
2001 | }; | 2001 | }; |
2002 | static char *gusmax_texts[4] = { | 2002 | static const char * const gusmax_texts[4] = { |
2003 | "Line", "Synth", "Mic", "Mix" | 2003 | "Line", "Synth", "Mic", "Mix" |
2004 | }; | 2004 | }; |
2005 | char **ptexts = texts; | 2005 | const char * const *ptexts = texts; |
2006 | struct snd_wss *chip = snd_kcontrol_chip(kcontrol); | 2006 | struct snd_wss *chip = snd_kcontrol_chip(kcontrol); |
2007 | 2007 | ||
2008 | if (snd_BUG_ON(!chip->card)) | 2008 | if (snd_BUG_ON(!chip->card)) |
2009 | return -EINVAL; | 2009 | return -EINVAL; |
2010 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | ||
2011 | uinfo->count = 2; | ||
2012 | uinfo->value.enumerated.items = 4; | ||
2013 | if (uinfo->value.enumerated.item > 3) | ||
2014 | uinfo->value.enumerated.item = 3; | ||
2015 | if (!strcmp(chip->card->driver, "GUS MAX")) | 2010 | if (!strcmp(chip->card->driver, "GUS MAX")) |
2016 | ptexts = gusmax_texts; | 2011 | ptexts = gusmax_texts; |
2017 | switch (chip->hardware) { | 2012 | switch (chip->hardware) { |
@@ -2023,8 +2018,7 @@ static int snd_wss_info_mux(struct snd_kcontrol *kcontrol, | |||
2023 | ptexts = opl3sa_texts; | 2018 | ptexts = opl3sa_texts; |
2024 | break; | 2019 | break; |
2025 | } | 2020 | } |
2026 | strcpy(uinfo->value.enumerated.name, ptexts[uinfo->value.enumerated.item]); | 2021 | return snd_ctl_enum_info(uinfo, 2, 4, ptexts); |
2027 | return 0; | ||
2028 | } | 2022 | } |
2029 | 2023 | ||
2030 | static int snd_wss_get_mux(struct snd_kcontrol *kcontrol, | 2024 | static int snd_wss_get_mux(struct snd_kcontrol *kcontrol, |