diff options
Diffstat (limited to 'sound/isa/cmi8330.c')
-rw-r--r-- | sound/isa/cmi8330.c | 82 |
1 files changed, 55 insertions, 27 deletions
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index af6ba129910e..ca6f602f15c2 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -174,32 +174,57 @@ MODULE_DEVICE_TABLE(pnp_card, snd_cmi8330_pnpids); | |||
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | 176 | ||
177 | static struct ad1848_mix_elem snd_cmi8330_controls[] __devinitdata = { | 177 | static struct snd_kcontrol_new snd_cmi8330_controls[] __devinitdata = { |
178 | AD1848_DOUBLE("Master Playback Volume", 0, CMI8330_MASTVOL, CMI8330_MASTVOL, 4, 0, 15, 0), | 178 | WSS_DOUBLE("Master Playback Volume", 0, |
179 | AD1848_SINGLE("Loud Playback Switch", 0, CMI8330_MUTEMUX, 6, 1, 1), | 179 | CMI8330_MASTVOL, CMI8330_MASTVOL, 4, 0, 15, 0), |
180 | AD1848_DOUBLE("PCM Playback Switch", 0, AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1), | 180 | WSS_SINGLE("Loud Playback Switch", 0, |
181 | AD1848_DOUBLE("PCM Playback Volume", 0, AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 0, 0, 63, 1), | 181 | CMI8330_MUTEMUX, 6, 1, 1), |
182 | AD1848_DOUBLE("Line Playback Switch", 0, CMI8330_MUTEMUX, CMI8330_MUTEMUX, 4, 3, 1, 0), | 182 | WSS_DOUBLE("PCM Playback Switch", 0, |
183 | AD1848_DOUBLE("Line Playback Volume", 0, CMI8330_LINVOL, CMI8330_LINVOL, 4, 0, 15, 0), | 183 | AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1), |
184 | AD1848_DOUBLE("Line Capture Switch", 0, CMI8330_RMUX3D, CMI8330_RMUX3D, 2, 1, 1, 0), | 184 | WSS_DOUBLE("PCM Playback Volume", 0, |
185 | AD1848_DOUBLE("Line Capture Volume", 0, CMI8330_LINGAIN, CMI8330_LINGAIN, 4, 0, 15, 0), | 185 | AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 0, 0, 63, 1), |
186 | AD1848_DOUBLE("CD Playback Switch", 0, CMI8330_MUTEMUX, CMI8330_MUTEMUX, 2, 1, 1, 0), | 186 | WSS_DOUBLE("Line Playback Switch", 0, |
187 | AD1848_DOUBLE("CD Capture Switch", 0, CMI8330_RMUX3D, CMI8330_RMUX3D, 4, 3, 1, 0), | 187 | CMI8330_MUTEMUX, CMI8330_MUTEMUX, 4, 3, 1, 0), |
188 | AD1848_DOUBLE("CD Playback Volume", 0, CMI8330_CDINVOL, CMI8330_CDINVOL, 4, 0, 15, 0), | 188 | WSS_DOUBLE("Line Playback Volume", 0, |
189 | AD1848_DOUBLE("CD Capture Volume", 0, CMI8330_CDINGAIN, CMI8330_CDINGAIN, 4, 0, 15, 0), | 189 | CMI8330_LINVOL, CMI8330_LINVOL, 4, 0, 15, 0), |
190 | AD1848_SINGLE("Mic Playback Switch", 0, CMI8330_MUTEMUX, 0, 1, 0), | 190 | WSS_DOUBLE("Line Capture Switch", 0, |
191 | AD1848_SINGLE("Mic Playback Volume", 0, CMI8330_OUTPUTVOL, 0, 7, 0), | 191 | CMI8330_RMUX3D, CMI8330_RMUX3D, 2, 1, 1, 0), |
192 | AD1848_SINGLE("Mic Capture Switch", 0, CMI8330_RMUX3D, 0, 1, 0), | 192 | WSS_DOUBLE("Line Capture Volume", 0, |
193 | AD1848_SINGLE("Mic Capture Volume", 0, CMI8330_OUTPUTVOL, 5, 7, 0), | 193 | CMI8330_LINGAIN, CMI8330_LINGAIN, 4, 0, 15, 0), |
194 | AD1848_DOUBLE("Wavetable Playback Switch", 0, CMI8330_RECMUX, CMI8330_RECMUX, 1, 0, 1, 0), | 194 | WSS_DOUBLE("CD Playback Switch", 0, |
195 | AD1848_DOUBLE("Wavetable Playback Volume", 0, CMI8330_WAVVOL, CMI8330_WAVVOL, 4, 0, 15, 0), | 195 | CMI8330_MUTEMUX, CMI8330_MUTEMUX, 2, 1, 1, 0), |
196 | AD1848_DOUBLE("Wavetable Capture Switch", 0, CMI8330_RECMUX, CMI8330_RECMUX, 5, 4, 1, 0), | 196 | WSS_DOUBLE("CD Capture Switch", 0, |
197 | AD1848_DOUBLE("Wavetable Capture Volume", 0, CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4, 0, 15, 0), | 197 | CMI8330_RMUX3D, CMI8330_RMUX3D, 4, 3, 1, 0), |
198 | AD1848_SINGLE("3D Control - Switch", 0, CMI8330_RMUX3D, 5, 1, 1), | 198 | WSS_DOUBLE("CD Playback Volume", 0, |
199 | AD1848_SINGLE("PC Speaker Playback Volume", 0, CMI8330_OUTPUTVOL, 3, 3, 0), | 199 | CMI8330_CDINVOL, CMI8330_CDINVOL, 4, 0, 15, 0), |
200 | AD1848_SINGLE("FM Playback Switch", 0, CMI8330_RECMUX, 3, 1, 1), | 200 | WSS_DOUBLE("CD Capture Volume", 0, |
201 | AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",CAPTURE,SWITCH), 0, CMI8330_RMUX3D, 7, 1, 1), | 201 | CMI8330_CDINGAIN, CMI8330_CDINGAIN, 4, 0, 15, 0), |
202 | AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",PLAYBACK,SWITCH), 0, CMI8330_MUTEMUX, 7, 1, 1), | 202 | WSS_SINGLE("Mic Playback Switch", 0, |
203 | CMI8330_MUTEMUX, 0, 1, 0), | ||
204 | WSS_SINGLE("Mic Playback Volume", 0, | ||
205 | CMI8330_OUTPUTVOL, 0, 7, 0), | ||
206 | WSS_SINGLE("Mic Capture Switch", 0, | ||
207 | CMI8330_RMUX3D, 0, 1, 0), | ||
208 | WSS_SINGLE("Mic Capture Volume", 0, | ||
209 | CMI8330_OUTPUTVOL, 5, 7, 0), | ||
210 | WSS_DOUBLE("Wavetable Playback Switch", 0, | ||
211 | CMI8330_RECMUX, CMI8330_RECMUX, 1, 0, 1, 0), | ||
212 | WSS_DOUBLE("Wavetable Playback Volume", 0, | ||
213 | CMI8330_WAVVOL, CMI8330_WAVVOL, 4, 0, 15, 0), | ||
214 | WSS_DOUBLE("Wavetable Capture Switch", 0, | ||
215 | CMI8330_RECMUX, CMI8330_RECMUX, 5, 4, 1, 0), | ||
216 | WSS_DOUBLE("Wavetable Capture Volume", 0, | ||
217 | CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4, 0, 15, 0), | ||
218 | WSS_SINGLE("3D Control - Switch", 0, | ||
219 | CMI8330_RMUX3D, 5, 1, 1), | ||
220 | WSS_SINGLE("PC Speaker Playback Volume", 0, | ||
221 | CMI8330_OUTPUTVOL, 3, 3, 0), | ||
222 | WSS_SINGLE("FM Playback Switch", 0, | ||
223 | CMI8330_RECMUX, 3, 1, 1), | ||
224 | WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", CAPTURE, SWITCH), 0, | ||
225 | CMI8330_RMUX3D, 7, 1, 1), | ||
226 | WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", PLAYBACK, SWITCH), 0, | ||
227 | CMI8330_MUTEMUX, 7, 1, 1), | ||
203 | }; | 228 | }; |
204 | 229 | ||
205 | #ifdef ENABLE_SB_MIXER | 230 | #ifdef ENABLE_SB_MIXER |
@@ -268,7 +293,10 @@ static int __devinit snd_cmi8330_mixer(struct snd_card *card, struct snd_cmi8330 | |||
268 | strcpy(card->mixername, "CMI8330/C3D"); | 293 | strcpy(card->mixername, "CMI8330/C3D"); |
269 | 294 | ||
270 | for (idx = 0; idx < ARRAY_SIZE(snd_cmi8330_controls); idx++) { | 295 | for (idx = 0; idx < ARRAY_SIZE(snd_cmi8330_controls); idx++) { |
271 | if ((err = snd_ad1848_add_ctl_elem(acard->wss, &snd_cmi8330_controls[idx])) < 0) | 296 | err = snd_ctl_add(card, |
297 | snd_ctl_new1(&snd_cmi8330_controls[idx], | ||
298 | acard->wss)); | ||
299 | if (err < 0) | ||
272 | return err; | 300 | return err; |
273 | } | 301 | } |
274 | 302 | ||