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/ice1712/prodigy192.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/ice1712/prodigy192.c')
-rw-r--r-- | sound/pci/ice1712/prodigy192.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c index 4bae7305a79b..4180f9739ecb 100644 --- a/sound/pci/ice1712/prodigy192.c +++ b/sound/pci/ice1712/prodigy192.c | |||
@@ -81,14 +81,7 @@ static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) | |||
81 | /* | 81 | /* |
82 | * DAC mute control | 82 | * DAC mute control |
83 | */ | 83 | */ |
84 | static int stac9460_dac_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 84 | #define stac9460_dac_mute_info snd_ctl_boolean_mono_info |
85 | { | ||
86 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
87 | uinfo->count = 1; | ||
88 | uinfo->value.integer.min = 0; | ||
89 | uinfo->value.integer.max = 1; | ||
90 | return 0; | ||
91 | } | ||
92 | 85 | ||
93 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 86 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
94 | { | 87 | { |
@@ -177,14 +170,7 @@ static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el | |||
177 | /* | 170 | /* |
178 | * ADC mute control | 171 | * ADC mute control |
179 | */ | 172 | */ |
180 | static int stac9460_adc_mute_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 173 | #define stac9460_adc_mute_info snd_ctl_boolean_stereo_info |
181 | { | ||
182 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
183 | uinfo->count = 2; | ||
184 | uinfo->value.integer.min = 0; | ||
185 | uinfo->value.integer.max = 1; | ||
186 | return 0; | ||
187 | } | ||
188 | 174 | ||
189 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 175 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
190 | { | 176 | { |
@@ -292,14 +278,7 @@ static int aureon_get_headphone_amp(struct snd_ice1712 *ice) | |||
292 | return ( tmp & AUREON_HP_SEL )!= 0; | 278 | return ( tmp & AUREON_HP_SEL )!= 0; |
293 | } | 279 | } |
294 | 280 | ||
295 | static int aureon_bool_info(struct snd_kcontrol *k, struct snd_ctl_elem_info *uinfo) | 281 | #define aureon_bool_info snd_ctl_boolean_mono_info |
296 | { | ||
297 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
298 | uinfo->count = 1; | ||
299 | uinfo->value.integer.min = 0; | ||
300 | uinfo->value.integer.max = 1; | ||
301 | return 0; | ||
302 | } | ||
303 | 282 | ||
304 | static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) | 283 | static int aureon_hpamp_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
305 | { | 284 | { |