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/rme9652/hdspm.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/rme9652/hdspm.c')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 70 |
1 files changed, 7 insertions, 63 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 143185e7e4dc..83ea4623e77c 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -1834,15 +1834,7 @@ static int hdspm_set_line_output(struct hdspm * hdspm, int out) | |||
1834 | return 0; | 1834 | return 0; |
1835 | } | 1835 | } |
1836 | 1836 | ||
1837 | static int snd_hdspm_info_line_out(struct snd_kcontrol *kcontrol, | 1837 | #define snd_hdspm_info_line_out snd_ctl_boolean_mono_info |
1838 | struct snd_ctl_elem_info *uinfo) | ||
1839 | { | ||
1840 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1841 | uinfo->count = 1; | ||
1842 | uinfo->value.integer.min = 0; | ||
1843 | uinfo->value.integer.max = 1; | ||
1844 | return 0; | ||
1845 | } | ||
1846 | 1838 | ||
1847 | static int snd_hdspm_get_line_out(struct snd_kcontrol *kcontrol, | 1839 | static int snd_hdspm_get_line_out(struct snd_kcontrol *kcontrol, |
1848 | struct snd_ctl_elem_value *ucontrol) | 1840 | struct snd_ctl_elem_value *ucontrol) |
@@ -1897,15 +1889,7 @@ static int hdspm_set_tx_64(struct hdspm * hdspm, int out) | |||
1897 | return 0; | 1889 | return 0; |
1898 | } | 1890 | } |
1899 | 1891 | ||
1900 | static int snd_hdspm_info_tx_64(struct snd_kcontrol *kcontrol, | 1892 | #define snd_hdspm_info_tx_64 snd_ctl_boolean_mono_info |
1901 | struct snd_ctl_elem_info *uinfo) | ||
1902 | { | ||
1903 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1904 | uinfo->count = 1; | ||
1905 | uinfo->value.integer.min = 0; | ||
1906 | uinfo->value.integer.max = 1; | ||
1907 | return 0; | ||
1908 | } | ||
1909 | 1893 | ||
1910 | static int snd_hdspm_get_tx_64(struct snd_kcontrol *kcontrol, | 1894 | static int snd_hdspm_get_tx_64(struct snd_kcontrol *kcontrol, |
1911 | struct snd_ctl_elem_value *ucontrol) | 1895 | struct snd_ctl_elem_value *ucontrol) |
@@ -1960,15 +1944,7 @@ static int hdspm_set_c_tms(struct hdspm * hdspm, int out) | |||
1960 | return 0; | 1944 | return 0; |
1961 | } | 1945 | } |
1962 | 1946 | ||
1963 | static int snd_hdspm_info_c_tms(struct snd_kcontrol *kcontrol, | 1947 | #define snd_hdspm_info_c_tms snd_ctl_boolean_mono_info |
1964 | struct snd_ctl_elem_info *uinfo) | ||
1965 | { | ||
1966 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
1967 | uinfo->count = 1; | ||
1968 | uinfo->value.integer.min = 0; | ||
1969 | uinfo->value.integer.max = 1; | ||
1970 | return 0; | ||
1971 | } | ||
1972 | 1948 | ||
1973 | static int snd_hdspm_get_c_tms(struct snd_kcontrol *kcontrol, | 1949 | static int snd_hdspm_get_c_tms(struct snd_kcontrol *kcontrol, |
1974 | struct snd_ctl_elem_value *ucontrol) | 1950 | struct snd_ctl_elem_value *ucontrol) |
@@ -2023,15 +1999,7 @@ static int hdspm_set_safe_mode(struct hdspm * hdspm, int out) | |||
2023 | return 0; | 1999 | return 0; |
2024 | } | 2000 | } |
2025 | 2001 | ||
2026 | static int snd_hdspm_info_safe_mode(struct snd_kcontrol *kcontrol, | 2002 | #define snd_hdspm_info_safe_mode snd_ctl_boolean_mono_info |
2027 | struct snd_ctl_elem_info *uinfo) | ||
2028 | { | ||
2029 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2030 | uinfo->count = 1; | ||
2031 | uinfo->value.integer.min = 0; | ||
2032 | uinfo->value.integer.max = 1; | ||
2033 | return 0; | ||
2034 | } | ||
2035 | 2003 | ||
2036 | static int snd_hdspm_get_safe_mode(struct snd_kcontrol *kcontrol, | 2004 | static int snd_hdspm_get_safe_mode(struct snd_kcontrol *kcontrol, |
2037 | struct snd_ctl_elem_value *ucontrol) | 2005 | struct snd_ctl_elem_value *ucontrol) |
@@ -2086,15 +2054,7 @@ static int hdspm_set_emphasis(struct hdspm * hdspm, int emp) | |||
2086 | return 0; | 2054 | return 0; |
2087 | } | 2055 | } |
2088 | 2056 | ||
2089 | static int snd_hdspm_info_emphasis(struct snd_kcontrol *kcontrol, | 2057 | #define snd_hdspm_info_emphasis snd_ctl_boolean_mono_info |
2090 | struct snd_ctl_elem_info *uinfo) | ||
2091 | { | ||
2092 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2093 | uinfo->count = 1; | ||
2094 | uinfo->value.integer.min = 0; | ||
2095 | uinfo->value.integer.max = 1; | ||
2096 | return 0; | ||
2097 | } | ||
2098 | 2058 | ||
2099 | static int snd_hdspm_get_emphasis(struct snd_kcontrol *kcontrol, | 2059 | static int snd_hdspm_get_emphasis(struct snd_kcontrol *kcontrol, |
2100 | struct snd_ctl_elem_value *ucontrol) | 2060 | struct snd_ctl_elem_value *ucontrol) |
@@ -2149,15 +2109,7 @@ static int hdspm_set_dolby(struct hdspm * hdspm, int dol) | |||
2149 | return 0; | 2109 | return 0; |
2150 | } | 2110 | } |
2151 | 2111 | ||
2152 | static int snd_hdspm_info_dolby(struct snd_kcontrol *kcontrol, | 2112 | #define snd_hdspm_info_dolby snd_ctl_boolean_mono_info |
2153 | struct snd_ctl_elem_info *uinfo) | ||
2154 | { | ||
2155 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2156 | uinfo->count = 1; | ||
2157 | uinfo->value.integer.min = 0; | ||
2158 | uinfo->value.integer.max = 1; | ||
2159 | return 0; | ||
2160 | } | ||
2161 | 2113 | ||
2162 | static int snd_hdspm_get_dolby(struct snd_kcontrol *kcontrol, | 2114 | static int snd_hdspm_get_dolby(struct snd_kcontrol *kcontrol, |
2163 | struct snd_ctl_elem_value *ucontrol) | 2115 | struct snd_ctl_elem_value *ucontrol) |
@@ -2212,15 +2164,7 @@ static int hdspm_set_professional(struct hdspm * hdspm, int dol) | |||
2212 | return 0; | 2164 | return 0; |
2213 | } | 2165 | } |
2214 | 2166 | ||
2215 | static int snd_hdspm_info_professional(struct snd_kcontrol *kcontrol, | 2167 | #define snd_hdspm_info_professional snd_ctl_boolean_mono_info |
2216 | struct snd_ctl_elem_info *uinfo) | ||
2217 | { | ||
2218 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | ||
2219 | uinfo->count = 1; | ||
2220 | uinfo->value.integer.min = 0; | ||
2221 | uinfo->value.integer.max = 1; | ||
2222 | return 0; | ||
2223 | } | ||
2224 | 2168 | ||
2225 | static int snd_hdspm_get_professional(struct snd_kcontrol *kcontrol, | 2169 | static int snd_hdspm_get_professional(struct snd_kcontrol *kcontrol, |
2226 | struct snd_ctl_elem_value *ucontrol) | 2170 | struct snd_ctl_elem_value *ucontrol) |