From: Mario Mikocevic <mozgy@hinet.hr>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: dledford@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: i810_audio ? (possible patch)
Date: Fri, 30 Nov 2001 10:38:49 +0100 [thread overview]
Message-ID: <20011130103849.A7126@danielle.hinet.hr> (raw)
In-Reply-To: <20011128112843.A28887@danielle.hinet.hr> <E16926Y-0004Rw-00@the-village.bc.nu>
In-Reply-To: <E16926Y-0004Rw-00@the-village.bc.nu>; from alan@lxorguk.ukuu.org.uk on Wed, Nov 28, 2001 at 10:38:14AM +0000
Hi,
On Wed, Nov 28, 2001 at 10:38:14AM +0000, Alan Cox wrote:
> If I had it handy I would
Well, I checked 17pre1 and does _not_ fix my problem.
Included patch does make the difference.
No more oopses and all bitrates work in realproducer.
(it's filtered from RH's -ac kernel i810_audio.c)
(I took the liberty of upping th version to 0.04a :)
--- i810_audio.c-2.4.17-pre1 Thu Nov 29 13:53:26 2001
+++ i810_audio.c Fri Nov 30 10:30:45 2001
@@ -197,7 +197,7 @@
#define INT_MASK (INT_SEC|INT_PRI|INT_MC|INT_PO|INT_PI|INT_MO|INT_NI|INT_GPI)
-#define DRIVER_VERSION "0.04"
+#define DRIVER_VERSION "0.04a"
/* magic numbers to protect our data structures */
#define I810_CARD_MAGIC 0x5072696E /* "Prin" */
@@ -1231,7 +1231,6 @@
unsigned long flags;
unsigned int swptr;
int cnt;
- DECLARE_WAITQUEUE(waita, current);
#ifdef DEBUG2
printk("i810_audio: i810_read called, count = %d\n", count);
@@ -1257,7 +1256,6 @@
dmabuf->trigger &= ~PCM_ENABLE_OUTPUT;
ret = 0;
- add_wait_queue(&dmabuf->wait, &waita);
while (count > 0) {
spin_lock_irqsave(&card->lock, flags);
if (PM_SUSPENDED(card)) {
@@ -1322,7 +1320,7 @@
if (copy_to_user(buffer, dmabuf->rawbuf + swptr, cnt)) {
if (!ret) ret = -EFAULT;
- goto done;
+ return ret;
}
swptr = (swptr + cnt) % dmabuf->dmasize;
@@ -1344,10 +1342,6 @@
i810_update_lvi(state,1);
if(!(dmabuf->enable & ADC_RUNNING))
start_adc(state);
- done:
- set_current_state(TASK_RUNNING);
- remove_wait_queue(&dmabuf->wait, &waita);
-
return ret;
}
@@ -1362,7 +1356,6 @@
unsigned long flags;
unsigned int swptr = 0;
int cnt, x;
- DECLARE_WAITQUEUE(waita, current);
#ifdef DEBUG2
printk("i810_audio: i810_write called, count = %d\n", count);
@@ -1387,7 +1380,6 @@
dmabuf->trigger &= ~PCM_ENABLE_INPUT;
ret = 0;
- add_wait_queue(&dmabuf->wait, &waita);
while (count > 0) {
spin_lock_irqsave(&state->card->lock, flags);
if (PM_SUSPENDED(card)) {
@@ -1427,7 +1419,7 @@
}
if (file->f_flags & O_NONBLOCK) {
if (!ret) ret = -EAGAIN;
- goto ret;
+ return ret;
}
/* Not strictly correct but works */
tmo = (dmabuf->dmasize * HZ) / (dmabuf->rate * 4);
@@ -1451,13 +1443,13 @@
}
if (signal_pending(current)) {
if (!ret) ret = -ERESTARTSYS;
- goto ret;
+ return ret;
}
continue;
}
if (copy_from_user(dmabuf->rawbuf+swptr,buffer,cnt)) {
if (!ret) ret = -EFAULT;
- goto ret;
+ return ret;
}
swptr = (swptr + cnt) % dmabuf->dmasize;
@@ -1483,9 +1475,6 @@
i810_update_lvi(state,0);
if (!dmabuf->enable && dmabuf->count >= dmabuf->userfragsize)
start_dac(state);
- ret:
- set_current_state(TASK_RUNNING);
- remove_wait_queue(&dmabuf->wait, &waita);
return ret;
}
--
Mario Mikočević (Mozgy)
mozgy at hinet dot hr
My favourite FUBAR ...
parent reply other threads:[~2001-11-30 9:39 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <E16926Y-0004Rw-00@the-village.bc.nu>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011130103849.A7126@danielle.hinet.hr \
--to=mozgy@hinet.hr \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®