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/wtm.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/wtm.c')
-rw-r--r-- | sound/pci/ice1712/wtm.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/sound/pci/ice1712/wtm.c b/sound/pci/ice1712/wtm.c index 04e535c8542b..7fcce0a506d6 100644 --- a/sound/pci/ice1712/wtm.c +++ b/sound/pci/ice1712/wtm.c | |||
@@ -71,14 +71,7 @@ static inline unsigned char stac9460_2_get(struct snd_ice1712 *ice, int reg) | |||
71 | /* | 71 | /* |
72 | * DAC mute control | 72 | * DAC mute control |
73 | */ | 73 | */ |
74 | static int stac9460_dac_mute_info(struct snd_kcontrol *kcontrol, | 74 | #define stac9460_dac_mute_info snd_ctl_boolean_mono_info |
75 | struct snd_ctl_elem_info *uinfo) | ||
76 | { | ||
77 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
78 | uinfo->count = 1; | ||
79 | uinfo->value.integer.min = 0; | ||
80 | return 0; | ||
81 | } | ||
82 | 75 | ||
83 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, | 76 | static int stac9460_dac_mute_get(struct snd_kcontrol *kcontrol, |
84 | struct snd_ctl_elem_value *ucontrol) | 77 | struct snd_ctl_elem_value *ucontrol) |
@@ -218,15 +211,7 @@ static int stac9460_dac_vol_put(struct snd_kcontrol *kcontrol, | |||
218 | /* | 211 | /* |
219 | * ADC mute control | 212 | * ADC mute control |
220 | */ | 213 | */ |
221 | static int stac9460_adc_mute_info(struct snd_kcontrol *kcontrol, | 214 | #define stac9460_adc_mute_info snd_ctl_boolean_stereo_info |
222 | struct snd_ctl_elem_info *uinfo) | ||
223 | { | ||
224 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
225 | uinfo->count = 2; | ||
226 | uinfo->value.integer.min = 0; | ||
227 | uinfo->value.integer.max = 1; | ||
228 | return 0; | ||
229 | } | ||
230 | 215 | ||
231 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, | 216 | static int stac9460_adc_mute_get(struct snd_kcontrol *kcontrol, |
232 | struct snd_ctl_elem_value *ucontrol) | 217 | struct snd_ctl_elem_value *ucontrol) |
@@ -357,15 +342,7 @@ static int stac9460_adc_vol_put(struct snd_kcontrol *kcontrol, | |||
357 | * MIC / LINE switch fonction | 342 | * MIC / LINE switch fonction |
358 | */ | 343 | */ |
359 | 344 | ||
360 | static int stac9460_mic_sw_info(struct snd_kcontrol *kcontrol, | 345 | #define stac9460_mic_sw_info snd_ctl_boolean_mono_info |
361 | struct snd_ctl_elem_info *uinfo) | ||
362 | { | ||
363 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
364 | uinfo->count = 1; | ||
365 | uinfo->value.integer.min = 0; | ||
366 | uinfo->value.integer.max = 1; | ||
367 | return 0; | ||
368 | } | ||
369 | 346 | ||
370 | static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, | 347 | static int stac9460_mic_sw_get(struct snd_kcontrol *kcontrol, |
371 | struct snd_ctl_elem_value *ucontrol) | 348 | struct snd_ctl_elem_value *ucontrol) |