aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/sscape.c
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/sscape.c
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/sscape.c')
-rw-r--r--sound/isa/sscape.c61
1 files changed, 32 insertions, 29 deletions
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 1dc4224b3207..48a16d865834 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -147,7 +147,7 @@ struct soundscape {
147 enum card_type type; 147 enum card_type type;
148 struct resource *io_res; 148 struct resource *io_res;
149 struct resource *wss_res; 149 struct resource *wss_res;
150 struct snd_cs4231 *chip; 150 struct snd_wss *chip;
151 struct snd_mpu401 *mpu; 151 struct snd_mpu401 *mpu;
152 struct snd_hwdep *hw; 152 struct snd_hwdep *hw;
153 153
@@ -726,7 +726,7 @@ static int sscape_midi_info(struct snd_kcontrol *ctl,
726static int sscape_midi_get(struct snd_kcontrol *kctl, 726static int sscape_midi_get(struct snd_kcontrol *kctl,
727 struct snd_ctl_elem_value *uctl) 727 struct snd_ctl_elem_value *uctl)
728{ 728{
729 struct snd_cs4231 *chip = snd_kcontrol_chip(kctl); 729 struct snd_wss *chip = snd_kcontrol_chip(kctl);
730 struct snd_card *card = chip->card; 730 struct snd_card *card = chip->card;
731 register struct soundscape *s = get_card_soundscape(card); 731 register struct soundscape *s = get_card_soundscape(card);
732 unsigned long flags; 732 unsigned long flags;
@@ -746,7 +746,7 @@ static int sscape_midi_get(struct snd_kcontrol *kctl,
746static int sscape_midi_put(struct snd_kcontrol *kctl, 746static int sscape_midi_put(struct snd_kcontrol *kctl,
747 struct snd_ctl_elem_value *uctl) 747 struct snd_ctl_elem_value *uctl)
748{ 748{
749 struct snd_cs4231 *chip = snd_kcontrol_chip(kctl); 749 struct snd_wss *chip = snd_kcontrol_chip(kctl);
750 struct snd_card *card = chip->card; 750 struct snd_card *card = chip->card;
751 register struct soundscape *s = get_card_soundscape(card); 751 register struct soundscape *s = get_card_soundscape(card);
752 unsigned long flags; 752 unsigned long flags;
@@ -958,7 +958,9 @@ static int __devinit create_mpu401(struct snd_card *card, int devnum, unsigned l
958 * Override for the CS4231 playback format function. 958 * Override for the CS4231 playback format function.
959 * The AD1845 has much simpler format and rate selection. 959 * The AD1845 has much simpler format and rate selection.
960 */ 960 */
961static void ad1845_playback_format(struct snd_cs4231 * chip, struct snd_pcm_hw_params *params, unsigned char format) 961static void ad1845_playback_format(struct snd_wss *chip,
962 struct snd_pcm_hw_params *params,
963 unsigned char format)
962{ 964{
963 unsigned long flags; 965 unsigned long flags;
964 unsigned rate = params_rate(params); 966 unsigned rate = params_rate(params);
@@ -983,9 +985,9 @@ static void ad1845_playback_format(struct snd_cs4231 * chip, struct snd_pcm_hw_p
983 * NOTE: We seem to need to write to the MSB before the LSB 985 * NOTE: We seem to need to write to the MSB before the LSB
984 * to get the correct sample frequency. 986 * to get the correct sample frequency.
985 */ 987 */
986 snd_cs4231_out(chip, CS4231_PLAYBK_FORMAT, (format & 0xf0)); 988 snd_wss_out(chip, CS4231_PLAYBK_FORMAT, (format & 0xf0));
987 snd_cs4231_out(chip, AD1845_FREQ_SEL_MSB, (unsigned char) (rate >> 8)); 989 snd_wss_out(chip, AD1845_FREQ_SEL_MSB, (unsigned char) (rate >> 8));
988 snd_cs4231_out(chip, AD1845_FREQ_SEL_LSB, (unsigned char) rate); 990 snd_wss_out(chip, AD1845_FREQ_SEL_LSB, (unsigned char) rate);
989 991
990 spin_unlock_irqrestore(&chip->reg_lock, flags); 992 spin_unlock_irqrestore(&chip->reg_lock, flags);
991} 993}
@@ -994,7 +996,9 @@ static void ad1845_playback_format(struct snd_cs4231 * chip, struct snd_pcm_hw_p
994 * Override for the CS4231 capture format function. 996 * Override for the CS4231 capture format function.
995 * The AD1845 has much simpler format and rate selection. 997 * The AD1845 has much simpler format and rate selection.
996 */ 998 */
997static void ad1845_capture_format(struct snd_cs4231 * chip, struct snd_pcm_hw_params *params, unsigned char format) 999static void ad1845_capture_format(struct snd_wss *chip,
1000 struct snd_pcm_hw_params *params,
1001 unsigned char format)
998{ 1002{
999 unsigned long flags; 1003 unsigned long flags;
1000 unsigned rate = params_rate(params); 1004 unsigned rate = params_rate(params);
@@ -1019,9 +1023,9 @@ static void ad1845_capture_format(struct snd_cs4231 * chip, struct snd_pcm_hw_pa
1019 * NOTE: We seem to need to write to the MSB before the LSB 1023 * NOTE: We seem to need to write to the MSB before the LSB
1020 * to get the correct sample frequency. 1024 * to get the correct sample frequency.
1021 */ 1025 */
1022 snd_cs4231_out(chip, CS4231_REC_FORMAT, (format & 0xf0)); 1026 snd_wss_out(chip, CS4231_REC_FORMAT, (format & 0xf0));
1023 snd_cs4231_out(chip, AD1845_FREQ_SEL_MSB, (unsigned char) (rate >> 8)); 1027 snd_wss_out(chip, AD1845_FREQ_SEL_MSB, (unsigned char) (rate >> 8));
1024 snd_cs4231_out(chip, AD1845_FREQ_SEL_LSB, (unsigned char) rate); 1028 snd_wss_out(chip, AD1845_FREQ_SEL_LSB, (unsigned char) rate);
1025 1029
1026 spin_unlock_irqrestore(&chip->reg_lock, flags); 1030 spin_unlock_irqrestore(&chip->reg_lock, flags);
1027} 1031}
@@ -1036,7 +1040,7 @@ static int __devinit create_ad1845(struct snd_card *card, unsigned port,
1036 int irq, int dma1, int dma2) 1040 int irq, int dma1, int dma2)
1037{ 1041{
1038 register struct soundscape *sscape = get_card_soundscape(card); 1042 register struct soundscape *sscape = get_card_soundscape(card);
1039 struct snd_cs4231 *chip; 1043 struct snd_wss *chip;
1040 int err; 1044 int err;
1041 1045
1042 if (sscape->type == SSCAPE_VIVO) 1046 if (sscape->type == SSCAPE_VIVO)
@@ -1045,9 +1049,8 @@ static int __devinit create_ad1845(struct snd_card *card, unsigned port,
1045 if (dma1 == dma2) 1049 if (dma1 == dma2)
1046 dma2 = -1; 1050 dma2 = -1;
1047 1051
1048 err = snd_cs4231_create(card, 1052 err = snd_wss_create(card, port, -1, irq, dma1, dma2,
1049 port, -1, irq, dma1, dma2, 1053 WSS_HW_DETECT, WSS_HWSHARE_DMA1, &chip);
1050 CS4231_HW_DETECT, CS4231_HWSHARE_DMA1, &chip);
1051 if (!err) { 1054 if (!err) {
1052 unsigned long flags; 1055 unsigned long flags;
1053 struct snd_pcm *pcm; 1056 struct snd_pcm *pcm;
@@ -1063,11 +1066,11 @@ static int __devinit create_ad1845(struct snd_card *card, unsigned port,
1063 * 1066 *
1064#define AD1845_IFACE_CONFIG \ 1067#define AD1845_IFACE_CONFIG \
1065 (CS4231_AUTOCALIB | CS4231_RECORD_ENABLE | CS4231_PLAYBACK_ENABLE) 1068 (CS4231_AUTOCALIB | CS4231_RECORD_ENABLE | CS4231_PLAYBACK_ENABLE)
1066 snd_cs4231_mce_up(chip); 1069 snd_wss_mce_up(chip);
1067 spin_lock_irqsave(&chip->reg_lock, flags); 1070 spin_lock_irqsave(&chip->reg_lock, flags);
1068 snd_cs4231_out(chip, CS4231_IFACE_CTRL, AD1845_IFACE_CONFIG); 1071 snd_wss_out(chip, CS4231_IFACE_CTRL, AD1845_IFACE_CONFIG);
1069 spin_unlock_irqrestore(&chip->reg_lock, flags); 1072 spin_unlock_irqrestore(&chip->reg_lock, flags);
1070 snd_cs4231_mce_down(chip); 1073 snd_wss_mce_down(chip);
1071 */ 1074 */
1072 1075
1073 if (sscape->type != SSCAPE_VIVO) { 1076 if (sscape->type != SSCAPE_VIVO) {
@@ -1077,11 +1080,11 @@ static int __devinit create_ad1845(struct snd_card *card, unsigned port,
1077 * be 14.31818 MHz, because we must set this register 1080 * be 14.31818 MHz, because we must set this register
1078 * to get the playback to sound correct ... 1081 * to get the playback to sound correct ...
1079 */ 1082 */
1080 snd_cs4231_mce_up(chip); 1083 snd_wss_mce_up(chip);
1081 spin_lock_irqsave(&chip->reg_lock, flags); 1084 spin_lock_irqsave(&chip->reg_lock, flags);
1082 snd_cs4231_out(chip, AD1845_CRYS_CLOCK_SEL, 0x20); 1085 snd_wss_out(chip, AD1845_CRYS_CLOCK_SEL, 0x20);
1083 spin_unlock_irqrestore(&chip->reg_lock, flags); 1086 spin_unlock_irqrestore(&chip->reg_lock, flags);
1084 snd_cs4231_mce_down(chip); 1087 snd_wss_mce_down(chip);
1085 1088
1086 /* 1089 /*
1087 * More custom configuration: 1090 * More custom configuration:
@@ -1089,28 +1092,28 @@ static int __devinit create_ad1845(struct snd_card *card, unsigned port,
1089 * b) enable frequency selection (for capture/playback) 1092 * b) enable frequency selection (for capture/playback)
1090 */ 1093 */
1091 spin_lock_irqsave(&chip->reg_lock, flags); 1094 spin_lock_irqsave(&chip->reg_lock, flags);
1092 snd_cs4231_out(chip, CS4231_MISC_INFO, 1095 snd_wss_out(chip, CS4231_MISC_INFO,
1093 CS4231_MODE2 | 0x10); 1096 CS4231_MODE2 | 0x10);
1094 val = snd_cs4231_in(chip, AD1845_PWR_DOWN_CTRL); 1097 val = snd_wss_in(chip, AD1845_PWR_DOWN_CTRL);
1095 snd_cs4231_out(chip, AD1845_PWR_DOWN_CTRL, 1098 snd_wss_out(chip, AD1845_PWR_DOWN_CTRL,
1096 val | AD1845_FREQ_SEL_ENABLE); 1099 val | AD1845_FREQ_SEL_ENABLE);
1097 spin_unlock_irqrestore(&chip->reg_lock, flags); 1100 spin_unlock_irqrestore(&chip->reg_lock, flags);
1098 } 1101 }
1099 1102
1100 err = snd_cs4231_pcm(chip, 0, &pcm); 1103 err = snd_wss_pcm(chip, 0, &pcm);
1101 if (err < 0) { 1104 if (err < 0) {
1102 snd_printk(KERN_ERR "sscape: No PCM device " 1105 snd_printk(KERN_ERR "sscape: No PCM device "
1103 "for AD1845 chip\n"); 1106 "for AD1845 chip\n");
1104 goto _error; 1107 goto _error;
1105 } 1108 }
1106 1109
1107 err = snd_cs4231_mixer(chip); 1110 err = snd_wss_mixer(chip);
1108 if (err < 0) { 1111 if (err < 0) {
1109 snd_printk(KERN_ERR "sscape: No mixer device " 1112 snd_printk(KERN_ERR "sscape: No mixer device "
1110 "for AD1845 chip\n"); 1113 "for AD1845 chip\n");
1111 goto _error; 1114 goto _error;
1112 } 1115 }
1113 err = snd_cs4231_timer(chip, 0, NULL); 1116 err = snd_wss_timer(chip, 0, NULL);
1114 if (err < 0) { 1117 if (err < 0) {
1115 snd_printk(KERN_ERR "sscape: No timer device " 1118 snd_printk(KERN_ERR "sscape: No timer device "
1116 "for AD1845 chip\n"); 1119 "for AD1845 chip\n");