diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-07-23 09:42:26 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:57:45 -0400 |
commit | a5ce88909d3007caa7b65996a8f6784350beb2a6 (patch) | |
tree | e9882165ba7f7fe88dd8de817028edefadb0d496 /sound/pci/es1938.c | |
parent | b9ed4f2b68dc47b0c35c1a3ae8ae97c2517d5177 (diff) |
[ALSA] Clean up with common snd_ctl_boolean_*_info callbacks
Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/es1938.c')
-rw-r--r-- | sound/pci/es1938.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index fec29a108945..fc686db59ce8 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -1066,15 +1066,7 @@ static int snd_es1938_put_mux(struct snd_kcontrol *kcontrol, | |||
1066 | return snd_es1938_mixer_bits(chip, 0x1c, 0x07, val) != val; | 1066 | return snd_es1938_mixer_bits(chip, 0x1c, 0x07, val) != val; |
1067 | } | 1067 | } |
1068 | 1068 | ||
1069 | static int snd_es1938_info_spatializer_enable(struct snd_kcontrol *kcontrol, | 1069 | #define snd_es1938_info_spatializer_enable snd_ctl_boolean_mono_info |
1070 | struct snd_ctl_elem_info *uinfo) | ||
1071 | { | ||
1072 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1073 | uinfo->count = 1; | ||
1074 | uinfo->value.integer.min = 0; | ||
1075 | uinfo->value.integer.max = 1; | ||
1076 | return 0; | ||
1077 | } | ||
1078 | 1070 | ||
1079 | static int snd_es1938_get_spatializer_enable(struct snd_kcontrol *kcontrol, | 1071 | static int snd_es1938_get_spatializer_enable(struct snd_kcontrol *kcontrol, |
1080 | struct snd_ctl_elem_value *ucontrol) | 1072 | struct snd_ctl_elem_value *ucontrol) |
@@ -1120,15 +1112,7 @@ static int snd_es1938_get_hw_volume(struct snd_kcontrol *kcontrol, | |||
1120 | return 0; | 1112 | return 0; |
1121 | } | 1113 | } |
1122 | 1114 | ||
1123 | static int snd_es1938_info_hw_switch(struct snd_kcontrol *kcontrol, | 1115 | #define snd_es1938_info_hw_switch snd_ctl_boolean_stereo_info |
1124 | struct snd_ctl_elem_info *uinfo) | ||
1125 | { | ||
1126 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1127 | uinfo->count = 2; | ||
1128 | uinfo->value.integer.min = 0; | ||
1129 | uinfo->value.integer.max = 1; | ||
1130 | return 0; | ||
1131 | } | ||
1132 | 1116 | ||
1133 | static int snd_es1938_get_hw_switch(struct snd_kcontrol *kcontrol, | 1117 | static int snd_es1938_get_hw_switch(struct snd_kcontrol *kcontrol, |
1134 | struct snd_ctl_elem_value *ucontrol) | 1118 | struct snd_ctl_elem_value *ucontrol) |