aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/cmi8330.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/cmi8330.c')
-rw-r--r--sound/isa/cmi8330.c82
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
177static struct ad1848_mix_elem snd_cmi8330_controls[] __devinitdata = { 177static struct snd_kcontrol_new snd_cmi8330_controls[] __devinitdata = {
178AD1848_DOUBLE("Master Playback Volume", 0, CMI8330_MASTVOL, CMI8330_MASTVOL, 4, 0, 15, 0), 178WSS_DOUBLE("Master Playback Volume", 0,
179AD1848_SINGLE("Loud Playback Switch", 0, CMI8330_MUTEMUX, 6, 1, 1), 179 CMI8330_MASTVOL, CMI8330_MASTVOL, 4, 0, 15, 0),
180AD1848_DOUBLE("PCM Playback Switch", 0, AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1), 180WSS_SINGLE("Loud Playback Switch", 0,
181AD1848_DOUBLE("PCM Playback Volume", 0, AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 0, 0, 63, 1), 181 CMI8330_MUTEMUX, 6, 1, 1),
182AD1848_DOUBLE("Line Playback Switch", 0, CMI8330_MUTEMUX, CMI8330_MUTEMUX, 4, 3, 1, 0), 182WSS_DOUBLE("PCM Playback Switch", 0,
183AD1848_DOUBLE("Line Playback Volume", 0, CMI8330_LINVOL, CMI8330_LINVOL, 4, 0, 15, 0), 183 AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1),
184AD1848_DOUBLE("Line Capture Switch", 0, CMI8330_RMUX3D, CMI8330_RMUX3D, 2, 1, 1, 0), 184WSS_DOUBLE("PCM Playback Volume", 0,
185AD1848_DOUBLE("Line Capture Volume", 0, CMI8330_LINGAIN, CMI8330_LINGAIN, 4, 0, 15, 0), 185 AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 0, 0, 63, 1),
186AD1848_DOUBLE("CD Playback Switch", 0, CMI8330_MUTEMUX, CMI8330_MUTEMUX, 2, 1, 1, 0), 186WSS_DOUBLE("Line Playback Switch", 0,
187AD1848_DOUBLE("CD Capture Switch", 0, CMI8330_RMUX3D, CMI8330_RMUX3D, 4, 3, 1, 0), 187 CMI8330_MUTEMUX, CMI8330_MUTEMUX, 4, 3, 1, 0),
188AD1848_DOUBLE("CD Playback Volume", 0, CMI8330_CDINVOL, CMI8330_CDINVOL, 4, 0, 15, 0), 188WSS_DOUBLE("Line Playback Volume", 0,
189AD1848_DOUBLE("CD Capture Volume", 0, CMI8330_CDINGAIN, CMI8330_CDINGAIN, 4, 0, 15, 0), 189 CMI8330_LINVOL, CMI8330_LINVOL, 4, 0, 15, 0),
190AD1848_SINGLE("Mic Playback Switch", 0, CMI8330_MUTEMUX, 0, 1, 0), 190WSS_DOUBLE("Line Capture Switch", 0,
191AD1848_SINGLE("Mic Playback Volume", 0, CMI8330_OUTPUTVOL, 0, 7, 0), 191 CMI8330_RMUX3D, CMI8330_RMUX3D, 2, 1, 1, 0),
192AD1848_SINGLE("Mic Capture Switch", 0, CMI8330_RMUX3D, 0, 1, 0), 192WSS_DOUBLE("Line Capture Volume", 0,
193AD1848_SINGLE("Mic Capture Volume", 0, CMI8330_OUTPUTVOL, 5, 7, 0), 193 CMI8330_LINGAIN, CMI8330_LINGAIN, 4, 0, 15, 0),
194AD1848_DOUBLE("Wavetable Playback Switch", 0, CMI8330_RECMUX, CMI8330_RECMUX, 1, 0, 1, 0), 194WSS_DOUBLE("CD Playback Switch", 0,
195AD1848_DOUBLE("Wavetable Playback Volume", 0, CMI8330_WAVVOL, CMI8330_WAVVOL, 4, 0, 15, 0), 195 CMI8330_MUTEMUX, CMI8330_MUTEMUX, 2, 1, 1, 0),
196AD1848_DOUBLE("Wavetable Capture Switch", 0, CMI8330_RECMUX, CMI8330_RECMUX, 5, 4, 1, 0), 196WSS_DOUBLE("CD Capture Switch", 0,
197AD1848_DOUBLE("Wavetable Capture Volume", 0, CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4, 0, 15, 0), 197 CMI8330_RMUX3D, CMI8330_RMUX3D, 4, 3, 1, 0),
198AD1848_SINGLE("3D Control - Switch", 0, CMI8330_RMUX3D, 5, 1, 1), 198WSS_DOUBLE("CD Playback Volume", 0,
199AD1848_SINGLE("PC Speaker Playback Volume", 0, CMI8330_OUTPUTVOL, 3, 3, 0), 199 CMI8330_CDINVOL, CMI8330_CDINVOL, 4, 0, 15, 0),
200AD1848_SINGLE("FM Playback Switch", 0, CMI8330_RECMUX, 3, 1, 1), 200WSS_DOUBLE("CD Capture Volume", 0,
201AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",CAPTURE,SWITCH), 0, CMI8330_RMUX3D, 7, 1, 1), 201 CMI8330_CDINGAIN, CMI8330_CDINGAIN, 4, 0, 15, 0),
202AD1848_SINGLE(SNDRV_CTL_NAME_IEC958("Input ",PLAYBACK,SWITCH), 0, CMI8330_MUTEMUX, 7, 1, 1), 202WSS_SINGLE("Mic Playback Switch", 0,
203 CMI8330_MUTEMUX, 0, 1, 0),
204WSS_SINGLE("Mic Playback Volume", 0,
205 CMI8330_OUTPUTVOL, 0, 7, 0),
206WSS_SINGLE("Mic Capture Switch", 0,
207 CMI8330_RMUX3D, 0, 1, 0),
208WSS_SINGLE("Mic Capture Volume", 0,
209 CMI8330_OUTPUTVOL, 5, 7, 0),
210WSS_DOUBLE("Wavetable Playback Switch", 0,
211 CMI8330_RECMUX, CMI8330_RECMUX, 1, 0, 1, 0),
212WSS_DOUBLE("Wavetable Playback Volume", 0,
213 CMI8330_WAVVOL, CMI8330_WAVVOL, 4, 0, 15, 0),
214WSS_DOUBLE("Wavetable Capture Switch", 0,
215 CMI8330_RECMUX, CMI8330_RECMUX, 5, 4, 1, 0),
216WSS_DOUBLE("Wavetable Capture Volume", 0,
217 CMI8330_WAVGAIN, CMI8330_WAVGAIN, 4, 0, 15, 0),
218WSS_SINGLE("3D Control - Switch", 0,
219 CMI8330_RMUX3D, 5, 1, 1),
220WSS_SINGLE("PC Speaker Playback Volume", 0,
221 CMI8330_OUTPUTVOL, 3, 3, 0),
222WSS_SINGLE("FM Playback Switch", 0,
223 CMI8330_RECMUX, 3, 1, 1),
224WSS_SINGLE(SNDRV_CTL_NAME_IEC958("Input ", CAPTURE, SWITCH), 0,
225 CMI8330_RMUX3D, 7, 1, 1),
226WSS_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