aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/sb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/sb')
-rw-r--r--sound/isa/sb/emu8000.c24
-rw-r--r--sound/isa/sb/emu8000_patch.c3
-rw-r--r--sound/isa/sb/emu8000_pcm.c3
-rw-r--r--sound/isa/sb/emu8000_synth.c2
-rw-r--r--sound/isa/sb/sb16.c5
-rw-r--r--sound/isa/sb/sb16_main.c8
-rw-r--r--sound/isa/sb/sb8.c5
-rw-r--r--sound/isa/sb/sb8_main.c3
-rw-r--r--sound/isa/sb/sb_common.c12
-rw-r--r--sound/isa/sb/sb_mixer.c4
10 files changed, 22 insertions, 47 deletions
diff --git a/sound/isa/sb/emu8000.c b/sound/isa/sb/emu8000.c
index 5375705c054b..b09c6575e01a 100644
--- a/sound/isa/sb/emu8000.c
+++ b/sound/isa/sb/emu8000.c
@@ -135,8 +135,7 @@ static void __init
135snd_emu8000_read_wait(emu8000_t *emu) 135snd_emu8000_read_wait(emu8000_t *emu)
136{ 136{
137 while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) { 137 while ((EMU8000_SMALR_READ(emu) & 0x80000000) != 0) {
138 set_current_state(TASK_INTERRUPTIBLE); 138 schedule_timeout_interruptible(1);
139 schedule_timeout(1);
140 if (signal_pending(current)) 139 if (signal_pending(current))
141 break; 140 break;
142 } 141 }
@@ -148,8 +147,7 @@ static void __init
148snd_emu8000_write_wait(emu8000_t *emu) 147snd_emu8000_write_wait(emu8000_t *emu)
149{ 148{
150 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 149 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
151 set_current_state(TASK_INTERRUPTIBLE); 150 schedule_timeout_interruptible(1);
152 schedule_timeout(1);
153 if (signal_pending(current)) 151 if (signal_pending(current))
154 break; 152 break;
155 } 153 }
@@ -437,8 +435,7 @@ size_dram(emu8000_t *emu)
437 for (i = 0; i < 10000; i++) { 435 for (i = 0; i < 10000; i++) {
438 if ((EMU8000_SMALW_READ(emu) & 0x80000000) == 0) 436 if ((EMU8000_SMALW_READ(emu) & 0x80000000) == 0)
439 break; 437 break;
440 set_current_state(TASK_INTERRUPTIBLE); 438 schedule_timeout_interruptible(1);
441 schedule_timeout(1);
442 if (signal_pending(current)) 439 if (signal_pending(current))
443 break; 440 break;
444 } 441 }
@@ -1054,18 +1051,9 @@ __error:
1054 */ 1051 */
1055static int snd_emu8000_free(emu8000_t *hw) 1052static int snd_emu8000_free(emu8000_t *hw)
1056{ 1053{
1057 if (hw->res_port1) { 1054 release_and_free_resource(hw->res_port1);
1058 release_resource(hw->res_port1); 1055 release_and_free_resource(hw->res_port2);
1059 kfree_nocheck(hw->res_port1); 1056 release_and_free_resource(hw->res_port3);
1060 }
1061 if (hw->res_port2) {
1062 release_resource(hw->res_port2);
1063 kfree_nocheck(hw->res_port2);
1064 }
1065 if (hw->res_port3) {
1066 release_resource(hw->res_port3);
1067 kfree_nocheck(hw->res_port3);
1068 }
1069 kfree(hw); 1057 kfree(hw);
1070 return 0; 1058 return 0;
1071} 1059}
diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c
index 26e693078cb3..2fea67e71c78 100644
--- a/sound/isa/sb/emu8000_patch.c
+++ b/sound/isa/sb/emu8000_patch.c
@@ -109,8 +109,7 @@ static void
109snd_emu8000_write_wait(emu8000_t *emu) 109snd_emu8000_write_wait(emu8000_t *emu)
110{ 110{
111 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 111 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
112 set_current_state(TASK_INTERRUPTIBLE); 112 schedule_timeout_interruptible(1);
113 schedule_timeout(1);
114 if (signal_pending(current)) 113 if (signal_pending(current))
115 break; 114 break;
116 } 115 }
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c
index 0209790dc4b5..b323beeeda15 100644
--- a/sound/isa/sb/emu8000_pcm.c
+++ b/sound/isa/sb/emu8000_pcm.c
@@ -117,8 +117,7 @@ snd_emu8000_write_wait(emu8000_t *emu, int can_schedule)
117{ 117{
118 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) { 118 while ((EMU8000_SMALW_READ(emu) & 0x80000000) != 0) {
119 if (can_schedule) { 119 if (can_schedule) {
120 set_current_state(TASK_INTERRUPTIBLE); 120 schedule_timeout_interruptible(1);
121 schedule_timeout(1);
122 if (signal_pending(current)) 121 if (signal_pending(current))
123 break; 122 break;
124 } 123 }
diff --git a/sound/isa/sb/emu8000_synth.c b/sound/isa/sb/emu8000_synth.c
index 1f63aa52d596..f68e217416a6 100644
--- a/sound/isa/sb/emu8000_synth.c
+++ b/sound/isa/sb/emu8000_synth.c
@@ -56,7 +56,7 @@ static int snd_emu8000_new_device(snd_seq_device_t *dev)
56 emu->num_ports = hw->seq_ports; 56 emu->num_ports = hw->seq_ports;
57 57
58 if (hw->memhdr) { 58 if (hw->memhdr) {
59 snd_printk("memhdr is already initialized!?\n"); 59 snd_printk(KERN_ERR "memhdr is already initialized!?\n");
60 snd_util_memhdr_free(hw->memhdr); 60 snd_util_memhdr_free(hw->memhdr);
61 } 61 }
62 hw->memhdr = snd_util_memhdr_new(hw->mem_size); 62 hw->memhdr = snd_util_memhdr_new(hw->mem_size);
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 7888783d68f5..c2fa451bc8f0 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -345,10 +345,7 @@ static void snd_sb16_free(snd_card_t *card)
345 345
346 if (acard == NULL) 346 if (acard == NULL)
347 return; 347 return;
348 if (acard->fm_res) { 348 release_and_free_resource(acard->fm_res);
349 release_resource(acard->fm_res);
350 kfree_nocheck(acard->fm_res);
351 }
352} 349}
353 350
354#ifdef CONFIG_PNP 351#ifdef CONFIG_PNP
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
index a99e642a68b5..556b95e3e22f 100644
--- a/sound/isa/sb/sb16_main.c
+++ b/sound/isa/sb/sb16_main.c
@@ -747,7 +747,7 @@ int snd_sb16dsp_configure(sb_t * chip)
747 unsigned char realirq, realdma, realmpureg; 747 unsigned char realirq, realdma, realmpureg;
748 /* note: mpu register should be present only on SB16 Vibra soundcards */ 748 /* note: mpu register should be present only on SB16 Vibra soundcards */
749 749
750 // printk("codec->irq=%i, codec->dma8=%i, codec->dma16=%i\n", chip->irq, chip->dma8, chip->dma16); 750 // printk(KERN_DEBUG "codec->irq=%i, codec->dma8=%i, codec->dma16=%i\n", chip->irq, chip->dma8, chip->dma16);
751 spin_lock_irqsave(&chip->mixer_lock, flags); 751 spin_lock_irqsave(&chip->mixer_lock, flags);
752 mpureg = snd_sbmixer_read(chip, SB_DSP4_MPUSETUP) & ~0x06; 752 mpureg = snd_sbmixer_read(chip, SB_DSP4_MPUSETUP) & ~0x06;
753 spin_unlock_irqrestore(&chip->mixer_lock, flags); 753 spin_unlock_irqrestore(&chip->mixer_lock, flags);
@@ -821,9 +821,9 @@ int snd_sb16dsp_configure(sb_t * chip)
821 821
822 spin_unlock_irqrestore(&chip->mixer_lock, flags); 822 spin_unlock_irqrestore(&chip->mixer_lock, flags);
823 if ((~realirq) & irqreg || (~realdma) & dmareg) { 823 if ((~realirq) & irqreg || (~realdma) & dmareg) {
824 snd_printk("SB16 [0x%lx]: unable to set DMA & IRQ (PnP device?)\n", chip->port); 824 snd_printk(KERN_ERR "SB16 [0x%lx]: unable to set DMA & IRQ (PnP device?)\n", chip->port);
825 snd_printk("SB16 [0x%lx]: wanted: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, realirq, realdma, realmpureg); 825 snd_printk(KERN_ERR "SB16 [0x%lx]: wanted: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, realirq, realdma, realmpureg);
826 snd_printk("SB16 [0x%lx]: got: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, irqreg, dmareg, mpureg); 826 snd_printk(KERN_ERR "SB16 [0x%lx]: got: irqreg=0x%x, dmareg=0x%x, mpureg = 0x%x\n", chip->port, irqreg, dmareg, mpureg);
827 return -ENODEV; 827 return -ENODEV;
828 } 828 }
829 return 0; 829 return 0;
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index c41ac25e85ca..0bc0a3afdabc 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -78,10 +78,7 @@ static void snd_sb8_free(snd_card_t *card)
78 78
79 if (acard == NULL) 79 if (acard == NULL)
80 return; 80 return;
81 if (acard->fm_res) { 81 release_and_free_resource(acard->fm_res);
82 release_resource(acard->fm_res);
83 kfree_nocheck(acard->fm_res);
84 }
85} 82}
86 83
87static int __init snd_sb8_probe(int dev) 84static int __init snd_sb8_probe(int dev)
diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
index 87c9b1ba06cf..5ddc6e41d909 100644
--- a/sound/isa/sb/sb8_main.c
+++ b/sound/isa/sb/sb8_main.c
@@ -334,9 +334,6 @@ irqreturn_t snd_sb8dsp_interrupt(sb_t *chip)
334 snd_pcm_substream_t *substream; 334 snd_pcm_substream_t *substream;
335 snd_pcm_runtime_t *runtime; 335 snd_pcm_runtime_t *runtime;
336 336
337#if 0
338 snd_printk("sb8: interrupt\n");
339#endif
340 snd_sb_ack_8bit(chip); 337 snd_sb_ack_8bit(chip);
341 switch (chip->mode) { 338 switch (chip->mode) {
342 case SB_MODE_PLAYBACK_8: /* ok.. playback is active */ 339 case SB_MODE_PLAYBACK_8: /* ok.. playback is active */
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index f0f205ae425f..603e923b5d2f 100644
--- a/sound/isa/sb/sb_common.c
+++ b/sound/isa/sb/sb_common.c
@@ -45,7 +45,7 @@ int snd_sbdsp_command(sb_t *chip, unsigned char val)
45{ 45{
46 int i; 46 int i;
47#ifdef IO_DEBUG 47#ifdef IO_DEBUG
48 snd_printk("command 0x%x\n", val); 48 snd_printk(KERN_DEBUG "command 0x%x\n", val);
49#endif 49#endif
50 for (i = BUSY_LOOPS; i; i--) 50 for (i = BUSY_LOOPS; i; i--)
51 if ((inb(SBP(chip, STATUS)) & 0x80) == 0) { 51 if ((inb(SBP(chip, STATUS)) & 0x80) == 0) {
@@ -64,7 +64,7 @@ int snd_sbdsp_get_byte(sb_t *chip)
64 if (inb(SBP(chip, DATA_AVAIL)) & 0x80) { 64 if (inb(SBP(chip, DATA_AVAIL)) & 0x80) {
65 val = inb(SBP(chip, READ)); 65 val = inb(SBP(chip, READ));
66#ifdef IO_DEBUG 66#ifdef IO_DEBUG
67 snd_printk("get_byte 0x%x\n", val); 67 snd_printk(KERN_DEBUG "get_byte 0x%x\n", val);
68#endif 68#endif
69 return val; 69 return val;
70 } 70 }
@@ -154,7 +154,7 @@ static int snd_sbdsp_probe(sb_t * chip)
154 str = "16"; 154 str = "16";
155 break; 155 break;
156 default: 156 default:
157 snd_printk("SB [0x%lx]: unknown DSP chip version %i.%i\n", 157 snd_printk(KERN_INFO "SB [0x%lx]: unknown DSP chip version %i.%i\n",
158 chip->port, major, minor); 158 chip->port, major, minor);
159 return -ENODEV; 159 return -ENODEV;
160 } 160 }
@@ -178,10 +178,8 @@ static int snd_sbdsp_probe(sb_t * chip)
178 178
179static int snd_sbdsp_free(sb_t *chip) 179static int snd_sbdsp_free(sb_t *chip)
180{ 180{
181 if (chip->res_port) { 181 if (chip->res_port)
182 release_resource(chip->res_port); 182 release_and_free_resource(chip->res_port);
183 kfree_nocheck(chip->res_port);
184 }
185 if (chip->irq >= 0) 183 if (chip->irq >= 0)
186 free_irq(chip->irq, (void *) chip); 184 free_irq(chip->irq, (void *) chip);
187#ifdef CONFIG_ISA 185#ifdef CONFIG_ISA
diff --git a/sound/isa/sb/sb_mixer.c b/sound/isa/sb/sb_mixer.c
index ff4b59968027..5a926a452d38 100644
--- a/sound/isa/sb/sb_mixer.c
+++ b/sound/isa/sb/sb_mixer.c
@@ -36,7 +36,7 @@ void snd_sbmixer_write(sb_t *chip, unsigned char reg, unsigned char data)
36 outb(data, SBP(chip, MIXER_DATA)); 36 outb(data, SBP(chip, MIXER_DATA));
37 udelay(10); 37 udelay(10);
38#ifdef IO_DEBUG 38#ifdef IO_DEBUG
39 snd_printk("mixer_write 0x%x 0x%x\n", reg, data); 39 snd_printk(KERN_DEBUG "mixer_write 0x%x 0x%x\n", reg, data);
40#endif 40#endif
41} 41}
42 42
@@ -49,7 +49,7 @@ unsigned char snd_sbmixer_read(sb_t *chip, unsigned char reg)
49 result = inb(SBP(chip, MIXER_DATA)); 49 result = inb(SBP(chip, MIXER_DATA));
50 udelay(10); 50 udelay(10);
51#ifdef IO_DEBUG 51#ifdef IO_DEBUG
52 snd_printk("mixer_read 0x%x 0x%x\n", reg, result); 52 snd_printk(KERN_DEBUG "mixer_read 0x%x 0x%x\n", reg, result);
53#endif 53#endif
54 return result; 54 return result;
55} 55}