aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/opti9xx
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2008-07-31 15:03:41 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-06 09:39:49 -0400
commit7779f75f072784d3fccf721b8ec43107f93619a0 (patch)
treeada616dd3efdea7192aef3cd4ddb743f980bc39b /sound/isa/opti9xx
parent61ef19d7e771ce021edb0dff0da134b6d688d4aa (diff)
ALSA: wss_lib: rename cs4321_foo to wss_foo
Rename functions and structures from the former cs4321_lib to names more corresponding with the new name: wss_lib. 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/opti9xx')
-rw-r--r--sound/isa/opti9xx/miro.c23
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c36
2 files changed, 34 insertions, 25 deletions
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 59f7c55baf30..4641daa7844d 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1221,7 +1221,7 @@ static int __devinit snd_miro_probe(struct device *devptr, unsigned int n)
1221 1221
1222 int error; 1222 int error;
1223 struct snd_miro *miro; 1223 struct snd_miro *miro;
1224 struct snd_cs4231 *codec; 1224 struct snd_wss *codec;
1225 struct snd_timer *timer; 1225 struct snd_timer *timer;
1226 struct snd_card *card; 1226 struct snd_card *card;
1227 struct snd_pcm *pcm; 1227 struct snd_pcm *pcm;
@@ -1310,29 +1310,32 @@ static int __devinit snd_miro_probe(struct device *devptr, unsigned int n)
1310 } 1310 }
1311 } 1311 }
1312 1312
1313 if ((error = snd_miro_configure(miro))) { 1313 error = snd_miro_configure(miro);
1314 if (error) {
1314 snd_card_free(card); 1315 snd_card_free(card);
1315 return error; 1316 return error;
1316 } 1317 }
1317 1318
1318 if ((error = snd_cs4231_create(card, miro->wss_base + 4, -1, 1319 error = snd_wss_create(card, miro->wss_base + 4, -1,
1319 miro->irq, miro->dma1, miro->dma2, 1320 miro->irq, miro->dma1, miro->dma2,
1320 CS4231_HW_AD1845, 1321 WSS_HW_AD1845, 0, &codec);
1321 0, 1322 if (error < 0) {
1322 &codec)) < 0) {
1323 snd_card_free(card); 1323 snd_card_free(card);
1324 return error; 1324 return error;
1325 } 1325 }
1326 1326
1327 if ((error = snd_cs4231_pcm(codec, 0, &pcm)) < 0) { 1327 error = snd_wss_pcm(codec, 0, &pcm);
1328 if (error < 0) {
1328 snd_card_free(card); 1329 snd_card_free(card);
1329 return error; 1330 return error;
1330 } 1331 }
1331 if ((error = snd_cs4231_mixer(codec)) < 0) { 1332 error = snd_wss_mixer(codec);
1333 if (error < 0) {
1332 snd_card_free(card); 1334 snd_card_free(card);
1333 return error; 1335 return error;
1334 } 1336 }
1335 if ((error = snd_cs4231_timer(codec, 0, &timer)) < 0) { 1337 error = snd_wss_timer(codec, 0, &timer);
1338 if (error < 0) {
1336 snd_card_free(card); 1339 snd_card_free(card);
1337 return error; 1340 return error;
1338 } 1341 }
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 93a03d9c7a95..fefb8597717c 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -139,7 +139,7 @@ struct snd_opti9xx {
139 unsigned long mc_base_size; 139 unsigned long mc_base_size;
140#ifdef OPTi93X 140#ifdef OPTi93X
141 unsigned long mc_indir_index; 141 unsigned long mc_indir_index;
142 struct snd_cs4231 *codec; 142 struct snd_wss *codec;
143#endif /* OPTi93X */ 143#endif /* OPTi93X */
144 unsigned long pwd_reg; 144 unsigned long pwd_reg;
145 145
@@ -562,7 +562,7 @@ __skip_mpu:
562 562
563static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id) 563static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id)
564{ 564{
565 struct snd_cs4231 *codec = dev_id; 565 struct snd_wss *codec = dev_id;
566 struct snd_opti9xx *chip = codec->card->private_data; 566 struct snd_opti9xx *chip = codec->card->private_data;
567 unsigned char status; 567 unsigned char status;
568 568
@@ -570,7 +570,7 @@ static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id)
570 if ((status & OPTi93X_IRQ_PLAYBACK) && codec->playback_substream) 570 if ((status & OPTi93X_IRQ_PLAYBACK) && codec->playback_substream)
571 snd_pcm_period_elapsed(codec->playback_substream); 571 snd_pcm_period_elapsed(codec->playback_substream);
572 if ((status & OPTi93X_IRQ_CAPTURE) && codec->capture_substream) { 572 if ((status & OPTi93X_IRQ_CAPTURE) && codec->capture_substream) {
573 snd_cs4231_overrange(codec); 573 snd_wss_overrange(codec);
574 snd_pcm_period_elapsed(codec->capture_substream); 574 snd_pcm_period_elapsed(codec->capture_substream);
575 } 575 }
576 outb(0x00, OPTi93X_PORT(codec, STATUS)); 576 outb(0x00, OPTi93X_PORT(codec, STATUS));
@@ -691,7 +691,7 @@ static void snd_card_opti9xx_free(struct snd_card *card)
691 691
692 if (chip) { 692 if (chip) {
693#ifdef OPTi93X 693#ifdef OPTi93X
694 struct snd_cs4231 *codec = chip->codec; 694 struct snd_wss *codec = chip->codec;
695 if (codec && codec->irq > 0) { 695 if (codec && codec->irq > 0) {
696 disable_irq(codec->irq); 696 disable_irq(codec->irq);
697 free_irq(codec->irq, codec); 697 free_irq(codec->irq, codec);
@@ -707,7 +707,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
707 int error; 707 int error;
708 struct snd_opti9xx *chip = card->private_data; 708 struct snd_opti9xx *chip = card->private_data;
709#if defined(CS4231) || defined(OPTi93X) 709#if defined(CS4231) || defined(OPTi93X)
710 struct snd_cs4231 *codec; 710 struct snd_wss *codec;
711#ifdef CS4231 711#ifdef CS4231
712 struct snd_timer *timer; 712 struct snd_timer *timer;
713#endif 713#endif
@@ -734,33 +734,39 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
734#endif 734#endif
735 735
736 if (chip->wss_base == SNDRV_AUTO_PORT) { 736 if (chip->wss_base == SNDRV_AUTO_PORT) {
737 if ((chip->wss_base = snd_legacy_find_free_ioport(possible_ports, 4)) < 0) { 737 chip->wss_base = snd_legacy_find_free_ioport(possible_ports, 4);
738 if (chip->wss_base < 0) {
738 snd_printk("unable to find a free WSS port\n"); 739 snd_printk("unable to find a free WSS port\n");
739 return -EBUSY; 740 return -EBUSY;
740 } 741 }
741 } 742 }
742 if ((error = snd_opti9xx_configure(chip))) 743 error = snd_opti9xx_configure(chip);
744 if (error)
743 return error; 745 return error;
744 746
745#if defined(CS4231) || defined(OPTi93X) 747#if defined(CS4231) || defined(OPTi93X)
746 if ((error = snd_cs4231_create(card, chip->wss_base + 4, -1, 748 error = snd_wss_create(card, chip->wss_base + 4, -1,
747 chip->irq, chip->dma1, chip->dma2, 749 chip->irq, chip->dma1, chip->dma2,
748#ifdef CS4231 750#ifdef CS4231
749 CS4231_HW_DETECT, 0, 751 WSS_HW_DETECT, 0,
750#else /* OPTi93x */ 752#else /* OPTi93x */
751 CS4231_HW_OPTI93X, CS4231_HWSHARE_IRQ, 753 WSS_HW_OPTI93X, WSS_HWSHARE_IRQ,
752#endif 754#endif
753 &codec)) < 0) 755 &codec);
756 if (error < 0)
754 return error; 757 return error;
755#ifdef OPTi93X 758#ifdef OPTi93X
756 chip->codec = codec; 759 chip->codec = codec;
757#endif 760#endif
758 if ((error = snd_cs4231_pcm(codec, 0, &pcm)) < 0) 761 error = snd_wss_pcm(codec, 0, &pcm);
762 if (error < 0)
759 return error; 763 return error;
760 if ((error = snd_cs4231_mixer(codec)) < 0) 764 error = snd_wss_mixer(codec);
765 if (error < 0)
761 return error; 766 return error;
762#ifdef CS4231 767#ifdef CS4231
763 if ((error = snd_cs4231_timer(codec, 0, &timer)) < 0) 768 error = snd_wss_timer(codec, 0, &timer);
769 if (error < 0)
764 return error; 770 return error;
765#else /* OPTI93X */ 771#else /* OPTI93X */
766 error = request_irq(chip->irq, snd_opti93x_interrupt, 772 error = request_irq(chip->irq, snd_opti93x_interrupt,