aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/cmi8330.c
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2008-07-31 15:10:47 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-06 09:40:02 -0400
commit760fc6b838d8c783c363e8bdb3714bd92a8945c4 (patch)
treebe50fd4d3e3c3d561d62a369066f9ea62d348fbc /sound/isa/cmi8330.c
parentead893c0deeec165524cc8a06e7e739d7d84b4c4 (diff)
ALSA: wss_lib: use wss detection code instead of ad1848 one
Use the wss detection code and kill the ad1848 library. The library is fully assimilated into the new wss library. This required reworking of the AD1848 family code so the code is changed to correctly detect chips from the AD1848 and CS4231 families. I have tested it on following cards: Gallant SC-6600 (codec: AD1848, driver: snd-sc6600) SoundScape VIVO/90 (codec: AD1845, driver: snd-sscape) SG Waverider (codec: CS4231A, driver: Rene Herman's snd-galaxy) Opti930 (codec: built-in - CS4231 compatible, driver: snd-opti93x) Opti931 (codec: built-in - CS4231 compatible, driver: snd-opti93x) Gallant SC-70P (chip/codec: CS4237B, driver: snd-cs4236) Audio Plus 3D (chip/codec: CMI8330A, driver: snd-cmi8330) Dell Latitude CP (chip/codec: cs4236, driver snd-cs4232) Sound playback and recording works on all these cards. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Reviewed-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/isa/cmi8330.c')
-rw-r--r--sound/isa/cmi8330.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index 6f7e8bb6ae60..e49aec700a55 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -50,7 +50,7 @@
50#include <linux/pnp.h> 50#include <linux/pnp.h>
51#include <linux/moduleparam.h> 51#include <linux/moduleparam.h>
52#include <sound/core.h> 52#include <sound/core.h>
53#include <sound/ad1848.h> 53#include <sound/wss.h>
54#include <sound/sb.h> 54#include <sound/sb.h>
55#include <sound/initval.h> 55#include <sound/initval.h>
56 56
@@ -180,9 +180,9 @@ WSS_DOUBLE("Master Playback Volume", 0,
180WSS_SINGLE("Loud Playback Switch", 0, 180WSS_SINGLE("Loud Playback Switch", 0,
181 CMI8330_MUTEMUX, 6, 1, 1), 181 CMI8330_MUTEMUX, 6, 1, 1),
182WSS_DOUBLE("PCM Playback Switch", 0, 182WSS_DOUBLE("PCM Playback Switch", 0,
183 AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 7, 7, 1, 1), 183 CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1),
184WSS_DOUBLE("PCM Playback Volume", 0, 184WSS_DOUBLE("PCM Playback Volume", 0,
185 AD1848_LEFT_OUTPUT, AD1848_RIGHT_OUTPUT, 0, 0, 63, 1), 185 CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 63, 1),
186WSS_DOUBLE("Line Playback Switch", 0, 186WSS_DOUBLE("Line Playback Switch", 0,
187 CMI8330_MUTEMUX, CMI8330_MUTEMUX, 4, 3, 1, 0), 187 CMI8330_MUTEMUX, CMI8330_MUTEMUX, 4, 3, 1, 0),
188WSS_DOUBLE("Line Playback Volume", 0, 188WSS_DOUBLE("Line Playback Volume", 0,
@@ -489,12 +489,11 @@ static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev)
489 int i, err; 489 int i, err;
490 490
491 acard = card->private_data; 491 acard = card->private_data;
492 if ((err = snd_ad1848_create(card, 492 err = snd_wss_create(card, wssport[dev] + 4, -1,
493 wssport[dev] + 4, 493 wssirq[dev],
494 wssirq[dev], 494 wssdma[dev], -1,
495 wssdma[dev], 495 WSS_HW_DETECT, 0, &acard->wss);
496 WSS_HW_DETECT, 496 if (err < 0) {
497 &acard->wss)) < 0) {
498 snd_printk(KERN_ERR PFX "(AD1848) device busy??\n"); 497 snd_printk(KERN_ERR PFX "(AD1848) device busy??\n");
499 return err; 498 return err;
500 } 499 }
@@ -517,9 +516,10 @@ static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev)
517 return err; 516 return err;
518 } 517 }
519 518
520 snd_ad1848_out(acard->wss, AD1848_MISC_INFO, 0x40); /* switch on MODE2 */ 519 snd_wss_out(acard->wss, CS4231_MISC_INFO, 0x40); /* switch on MODE2 */
521 for (i = CMI8330_RMUX3D; i <= CMI8330_CDINGAIN; i++) 520 for (i = CMI8330_RMUX3D; i <= CMI8330_CDINGAIN; i++)
522 snd_ad1848_out(acard->wss, i, snd_cmi8330_image[i - CMI8330_RMUX3D]); 521 snd_wss_out(acard->wss, i,
522 snd_cmi8330_image[i - CMI8330_RMUX3D]);
523 523
524 if ((err = snd_cmi8330_mixer(card, acard)) < 0) { 524 if ((err = snd_cmi8330_mixer(card, acard)) < 0) {
525 snd_printk(KERN_ERR PFX "failed to create mixers\n"); 525 snd_printk(KERN_ERR PFX "failed to create mixers\n");