From 1afa6e2e1d26d0b9d96785ee1823bf11c4c5f202 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Wed, 11 Feb 2009 13:53:26 +0100 Subject: sound: OSS: dmabuf: too many loops loop adev->dmap_out->nbufs times Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai --- sound/oss/dmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c index 1e90d769b62..1bfcf7e8854 100644 --- a/sound/oss/dmabuf.c +++ b/sound/oss/dmabuf.c @@ -439,7 +439,7 @@ int DMAbuf_sync(int dev) DMAbuf_launch_output(dev, dmap); adev->dmap_out->flags |= DMA_SYNCING; adev->dmap_out->underrun_count = 0; - while (!signal_pending(current) && n++ <= adev->dmap_out->nbufs && + while (!signal_pending(current) && n++ < adev->dmap_out->nbufs && adev->dmap_out->qlen && adev->dmap_out->underrun_count == 0) { long t = dmabuf_timeout(dmap); spin_unlock_irqrestore(&dmap->lock,flags); -- cgit v1.2.3 From a259cb8eb784352ee9ce46a4fc6cd94fc2fbc68d Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sun, 15 Feb 2009 20:51:19 +0100 Subject: sound: OSS: &&/|| typo in ad1848.c &&/|| typo Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai --- sound/oss/ad1848.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index 7cf9913a47b..a5b83568bdc 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c @@ -2107,7 +2107,7 @@ int ad1848_control(int cmd, int arg) switch (cmd) { case AD1848_SET_XTAL: /* Change clock frequency of AD1845 (only ) */ - if (devc->model != MD_1845 || devc->model != MD_1845_SSCAPE) + if (devc->model != MD_1845 && devc->model != MD_1845_SSCAPE) return -EINVAL; spin_lock_irqsave(&devc->lock,flags); ad_enter_MCE(devc); -- cgit v1.2.3 From b22f5d94c432e97df8d85151fcf3da16cee75f04 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 17 Feb 2009 08:02:16 +0100 Subject: sound: OSS: ad1848 - Fix another typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix another typo of || and &&. Reported-by: Jörg-Volker Peetz Signed-off-by: Takashi Iwai --- sound/oss/ad1848.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index a5b83568bdc..d12bd98a37b 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c @@ -280,7 +280,7 @@ static void wait_for_calibration(ad1848_info * devc) while (timeout > 0 && (ad_read(devc, 11) & 0x20)) timeout--; if (ad_read(devc, 11) & 0x20) - if ( (devc->model != MD_1845) || (devc->model != MD_1845_SSCAPE)) + if ((devc->model != MD_1845) && (devc->model != MD_1845_SSCAPE)) printk(KERN_WARNING "ad1848: Auto calibration timed out(3).\n"); } -- cgit v1.2.3 From c16159123d5b3245e2b30023a207606c74032f9c Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Wed, 18 Feb 2009 10:15:00 +0100 Subject: sound: OSS: missing parentheses in pas2_card.c Add missing parentheses in pas2_card.c. Signed-off-by: Roel Kluin Signed-off-by: Takashi Iwai --- sound/oss/pas2_card.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c index 25f3a22c52e..7f377ec3486 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) * 0x80 */ , 0xB88); - pas_write(0x80 - | joystick?0x40:0 - ,0xF388); + pas_write(0x80 | (joystick ? 0x40 : 0), 0xF388); if (pas_irq < 0 || pas_irq > 15) { -- cgit v1.2.3 From 4dd3a29f295799295eac819bbf540690fbe30c16 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Wed, 18 Feb 2009 19:09:23 +0900 Subject: sound: fix opensound URL in oss Introduction Signed-off-by: Yoichi Yuasa Signed-off-by: Takashi Iwai --- Documentation/sound/oss/Introduction | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/sound/oss/Introduction b/Documentation/sound/oss/Introduction index f04ba6bb739..75d967ff926 100644 --- a/Documentation/sound/oss/Introduction +++ b/Documentation/sound/oss/Introduction @@ -80,7 +80,7 @@ Notes: additional features. 2. The commercial OSS driver may be obtained from the site: - http://www/opensound.com. This may be used for cards that + http://www.opensound.com. This may be used for cards that are unsupported by the kernel driver, or may be used by other operating systems. -- cgit v1.2.3 From eca985d28e1a8092ba2686ec5485fd688df5cfb3 Mon Sep 17 00:00:00 2001 From: Krzysztof Helt Date: Wed, 18 Feb 2009 19:07:18 +0100 Subject: sound: Remove documentation for OSS CS4232 driver There is no OSS cs4232 driver in the kernel any more and this documentation does not contain any info useful for ALSA driver. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai --- Documentation/sound/oss/CS4232 | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 Documentation/sound/oss/CS4232 diff --git a/Documentation/sound/oss/CS4232 b/Documentation/sound/oss/CS4232 deleted file mode 100644 index 7d6af7a5c1c..00000000000 --- a/Documentation/sound/oss/CS4232 +++ /dev/null @@ -1,23 +0,0 @@ -To configure the Crystal CS423x sound chip and activate its DSP functions, -modules may be loaded in this order: - - modprobe sound - insmod ad1848 - insmod uart401 - insmod cs4232 io=* irq=* dma=* dma2=* - -This is the meaning of the parameters: - - io--I/O address of the Windows Sound System (normally 0x534) - irq--IRQ of this device - dma and dma2--DMA channels (DMA2 may be 0) - -On some cards, the board attempts to do non-PnP setup, and fails. If you -have problems, use Linux' PnP facilities. - -To get MIDI facilities add - - insmod opl3 io=* - -where "io" is the I/O address of the OPL3 synthesizer. This will be shown -in /proc/sys/pnp and is normally 0x388. -- cgit v1.2.3 From 5d44aa4c7322e0cda6d71cc3f0dffaceea0daae5 Mon Sep 17 00:00:00 2001 From: Hannes Eder Date: Wed, 25 Feb 2009 22:29:29 +0100 Subject: sound/oss: fix sparse warnings: different signedness Impact: Change signature of 'set_volume_stereo' and 'set_volume_mono'. Fix this sparse warnings: sound/oss/pss.c:545:42: warning: incorrect type in argument 2 (different signedness) sound/oss/pss.c:546:42: warning: incorrect type in argument 3 (different signedness) sound/oss/pss.c:554:59: warning: incorrect type in argument 2 (different signedness) sound/oss/pss.c:560:59: warning: incorrect type in argument 2 (different signedness) sound/oss/pss.c:566:59: warning: incorrect type in argument 2 (different signedness) Signed-off-by: Hannes Eder Signed-off-by: Takashi Iwai --- sound/oss/pss.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/oss/pss.c b/sound/oss/pss.c index 16ed06950dc..16517a5a130 100644 --- a/sound/oss/pss.c +++ b/sound/oss/pss.c @@ -457,10 +457,9 @@ static void pss_mixer_reset(pss_confdata *devc) } } -static int set_volume_mono(unsigned __user *p, int *aleft) +static int set_volume_mono(unsigned __user *p, unsigned int *aleft) { - int left; - unsigned volume; + unsigned int left, volume; if (get_user(volume, p)) return -EFAULT; @@ -471,10 +470,11 @@ static int set_volume_mono(unsigned __user *p, int *aleft) return 0; } -static int set_volume_stereo(unsigned __user *p, int *aleft, int *aright) +static int set_volume_stereo(unsigned __user *p, + unsigned int *aleft, + unsigned int *aright) { - int left, right; - unsigned volume; + unsigned int left, right, volume; if (get_user(volume, p)) return -EFAULT; -- cgit v1.2.3 From e5bf48437370f3fc603e2dce12e8d3fb1a6a2457 Mon Sep 17 00:00:00 2001 From: Hannes Eder Date: Wed, 25 Feb 2009 22:29:47 +0100 Subject: sound/oss: fix sparse warning: symbol shadows an earlier one Impact: Move variable to a more inner scope. Fix this sparse warning: sound/oss/sequencer.c:235:29: warning: symbol 'err' shadows an earlier one sound/oss/sequencer.c:215:13: originally declared here Signed-off-by: Hannes Eder Signed-off-by: Takashi Iwai --- sound/oss/sequencer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c index 5c215f787ca..c79874696be 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 { unsigned char event_rec[EV_SZ], ev_code; int p = 0, c, ev_size; - int err; int mode = translate_mode(file); dev = dev >> 4; @@ -285,7 +284,7 @@ int sequencer_write(int dev, struct file *file, const char __user *buf, int coun { if (!midi_opened[event_rec[2]]) { - int mode; + int err, mode; int dev = event_rec[2]; if (dev >= max_mididev || midi_devs[dev]==NULL) -- cgit v1.2.3