aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss')
-rw-r--r--sound/oss/ad1848.c4
-rw-r--r--sound/oss/au1550_ac97.c2
-rw-r--r--sound/oss/audio.c2
-rw-r--r--sound/oss/dmabuf.c2
-rw-r--r--sound/oss/pas2_card.c4
-rw-r--r--sound/oss/pss.c12
-rw-r--r--sound/oss/sequencer.c3
-rw-r--r--sound/oss/sh_dac_audio.c2
-rw-r--r--sound/oss/swarm_cs4297a.c2
-rw-r--r--sound/oss/vwsnd.c2
10 files changed, 21 insertions, 14 deletions
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index 7cf9913a47b2..d12bd98a37ba 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -280,7 +280,7 @@ static void wait_for_calibration(ad1848_info * devc)
280 while (timeout > 0 && (ad_read(devc, 11) & 0x20)) 280 while (timeout > 0 && (ad_read(devc, 11) & 0x20))
281 timeout--; 281 timeout--;
282 if (ad_read(devc, 11) & 0x20) 282 if (ad_read(devc, 11) & 0x20)
283 if ( (devc->model != MD_1845) || (devc->model != MD_1845_SSCAPE)) 283 if ((devc->model != MD_1845) && (devc->model != MD_1845_SSCAPE))
284 printk(KERN_WARNING "ad1848: Auto calibration timed out(3).\n"); 284 printk(KERN_WARNING "ad1848: Auto calibration timed out(3).\n");
285} 285}
286 286
@@ -2107,7 +2107,7 @@ int ad1848_control(int cmd, int arg)
2107 switch (cmd) 2107 switch (cmd)
2108 { 2108 {
2109 case AD1848_SET_XTAL: /* Change clock frequency of AD1845 (only ) */ 2109 case AD1848_SET_XTAL: /* Change clock frequency of AD1845 (only ) */
2110 if (devc->model != MD_1845 || devc->model != MD_1845_SSCAPE) 2110 if (devc->model != MD_1845 && devc->model != MD_1845_SSCAPE)
2111 return -EINVAL; 2111 return -EINVAL;
2112 spin_lock_irqsave(&devc->lock,flags); 2112 spin_lock_irqsave(&devc->lock,flags);
2113 ad_enter_MCE(devc); 2113 ad_enter_MCE(devc);
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c
index 81e1f443d094..4191acccbcdb 100644
--- a/sound/oss/au1550_ac97.c
+++ b/sound/oss/au1550_ac97.c
@@ -1627,7 +1627,9 @@ au1550_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
1627 sizeof(abinfo)) ? -EFAULT : 0; 1627 sizeof(abinfo)) ? -EFAULT : 0;
1628 1628
1629 case SNDCTL_DSP_NONBLOCK: 1629 case SNDCTL_DSP_NONBLOCK:
1630 spin_lock(&file->f_lock);
1630 file->f_flags |= O_NONBLOCK; 1631 file->f_flags |= O_NONBLOCK;
1632 spin_unlock(&file->f_lock);
1631 return 0; 1633 return 0;
1632 1634
1633 case SNDCTL_DSP_GETODELAY: 1635 case SNDCTL_DSP_GETODELAY:
diff --git a/sound/oss/audio.c b/sound/oss/audio.c
index 89bd27a5e865..b69c05b7ea7b 100644
--- a/sound/oss/audio.c
+++ b/sound/oss/audio.c
@@ -433,7 +433,9 @@ int audio_ioctl(int dev, struct file *file, unsigned int cmd, void __user *arg)
433 return dma_ioctl(dev, cmd, arg); 433 return dma_ioctl(dev, cmd, arg);
434 434
435 case SNDCTL_DSP_NONBLOCK: 435 case SNDCTL_DSP_NONBLOCK:
436 spin_lock(&file->f_lock);
436 file->f_flags |= O_NONBLOCK; 437 file->f_flags |= O_NONBLOCK;
438 spin_unlock(&file->f_lock);
437 return 0; 439 return 0;
438 440
439 case SNDCTL_DSP_GETCAPS: 441 case SNDCTL_DSP_GETCAPS:
diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c
index 1e90d769b62e..1bfcf7e88546 100644
--- a/sound/oss/dmabuf.c
+++ b/sound/oss/dmabuf.c
@@ -439,7 +439,7 @@ int DMAbuf_sync(int dev)
439 DMAbuf_launch_output(dev, dmap); 439 DMAbuf_launch_output(dev, dmap);
440 adev->dmap_out->flags |= DMA_SYNCING; 440 adev->dmap_out->flags |= DMA_SYNCING;
441 adev->dmap_out->underrun_count = 0; 441 adev->dmap_out->underrun_count = 0;
442 while (!signal_pending(current) && n++ <= adev->dmap_out->nbufs && 442 while (!signal_pending(current) && n++ < adev->dmap_out->nbufs &&
443 adev->dmap_out->qlen && adev->dmap_out->underrun_count == 0) { 443 adev->dmap_out->qlen && adev->dmap_out->underrun_count == 0) {
444 long t = dmabuf_timeout(dmap); 444 long t = dmabuf_timeout(dmap);
445 spin_unlock_irqrestore(&dmap->lock,flags); 445 spin_unlock_irqrestore(&dmap->lock,flags);
diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c
index 25f3a22c52ee..7f377ec3486d 100644
--- a/sound/oss/pas2_card.c
+++ b/sound/oss/pas2_card.c
@@ -156,9 +156,7 @@ static int __init config_pas_hw(struct address_info *hw_config)
156 * 0x80 156 * 0x80
157 */ , 0xB88); 157 */ , 0xB88);
158 158
159 pas_write(0x80 159 pas_write(0x80 | (joystick ? 0x40 : 0), 0xF388);
160 | joystick?0x40:0
161 ,0xF388);
162 160
163 if (pas_irq < 0 || pas_irq > 15) 161 if (pas_irq < 0 || pas_irq > 15)
164 { 162 {
diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index 16ed06950dc1..16517a5a1301 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -457,10 +457,9 @@ static void pss_mixer_reset(pss_confdata *devc)
457 } 457 }
458} 458}
459 459
460static int set_volume_mono(unsigned __user *p, int *aleft) 460static int set_volume_mono(unsigned __user *p, unsigned int *aleft)
461{ 461{
462 int left; 462 unsigned int left, volume;
463 unsigned volume;
464 if (get_user(volume, p)) 463 if (get_user(volume, p))
465 return -EFAULT; 464 return -EFAULT;
466 465
@@ -471,10 +470,11 @@ static int set_volume_mono(unsigned __user *p, int *aleft)
471 return 0; 470 return 0;
472} 471}
473 472
474static int set_volume_stereo(unsigned __user *p, int *aleft, int *aright) 473static int set_volume_stereo(unsigned __user *p,
474 unsigned int *aleft,
475 unsigned int *aright)
475{ 476{
476 int left, right; 477 unsigned int left, right, volume;
477 unsigned volume;
478 if (get_user(volume, p)) 478 if (get_user(volume, p))
479 return -EFAULT; 479 return -EFAULT;
480 480
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
index 5c215f787ca9..c79874696bec 100644
--- a/sound/oss/sequencer.c
+++ b/sound/oss/sequencer.c
@@ -212,7 +212,6 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun
212{ 212{
213 unsigned char event_rec[EV_SZ], ev_code; 213 unsigned char event_rec[EV_SZ], ev_code;
214 int p = 0, c, ev_size; 214 int p = 0, c, ev_size;
215 int err;
216 int mode = translate_mode(file); 215 int mode = translate_mode(file);
217 216
218 dev = dev >> 4; 217 dev = dev >> 4;
@@ -285,7 +284,7 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun
285 { 284 {
286 if (!midi_opened[event_rec[2]]) 285 if (!midi_opened[event_rec[2]])
287 { 286 {
288 int mode; 287 int err, mode;
289 int dev = event_rec[2]; 288 int dev = event_rec[2];
290 289
291 if (dev >= max_mididev || midi_devs[dev]==NULL) 290 if (dev >= max_mididev || midi_devs[dev]==NULL)
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index e5d423994918..78cfb66e4c59 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -135,7 +135,9 @@ static int dac_audio_ioctl(struct inode *inode, struct file *file,
135 return put_user(AFMT_U8, (int *)arg); 135 return put_user(AFMT_U8, (int *)arg);
136 136
137 case SNDCTL_DSP_NONBLOCK: 137 case SNDCTL_DSP_NONBLOCK:
138 spin_lock(&file->f_lock);
138 file->f_flags |= O_NONBLOCK; 139 file->f_flags |= O_NONBLOCK;
140 spin_unlock(&file->f_lock);
139 return 0; 141 return 0;
140 142
141 case SNDCTL_DSP_GETCAPS: 143 case SNDCTL_DSP_GETCAPS:
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c
index 41562ecde5bb..1edab7b4ea83 100644
--- a/sound/oss/swarm_cs4297a.c
+++ b/sound/oss/swarm_cs4297a.c
@@ -2200,7 +2200,9 @@ static int cs4297a_ioctl(struct inode *inode, struct file *file,
2200 sizeof(abinfo)) ? -EFAULT : 0; 2200 sizeof(abinfo)) ? -EFAULT : 0;
2201 2201
2202 case SNDCTL_DSP_NONBLOCK: 2202 case SNDCTL_DSP_NONBLOCK:
2203 spin_lock(&file->f_lock);
2203 file->f_flags |= O_NONBLOCK; 2204 file->f_flags |= O_NONBLOCK;
2205 spin_unlock(&file->f_lock);
2204 return 0; 2206 return 0;
2205 2207
2206 case SNDCTL_DSP_GETODELAY: 2208 case SNDCTL_DSP_GETODELAY:
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c
index 78b8acc7c3b9..187f72750e8f 100644
--- a/sound/oss/vwsnd.c
+++ b/sound/oss/vwsnd.c
@@ -2673,7 +2673,9 @@ static int vwsnd_audio_do_ioctl(struct inode *inode,
2673 2673
2674 case SNDCTL_DSP_NONBLOCK: /* _SIO ('P',14) */ 2674 case SNDCTL_DSP_NONBLOCK: /* _SIO ('P',14) */
2675 DBGX("SNDCTL_DSP_NONBLOCK\n"); 2675 DBGX("SNDCTL_DSP_NONBLOCK\n");
2676 spin_lock(&file->f_lock);
2676 file->f_flags |= O_NONBLOCK; 2677 file->f_flags |= O_NONBLOCK;
2678 spin_unlock(&file->f_lock);
2677 return 0; 2679 return 0;
2678 2680
2679 case SNDCTL_DSP_RESET: /* _SIO ('P', 0) */ 2681 case SNDCTL_DSP_RESET: /* _SIO ('P', 0) */