i810_audio ? (possible patch)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 1 line · Alan Cox
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 renamed from i810_audio.c-2.4.17-pre1 +5 -16
@@ -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; }
Signature · 3 lines
Mario Mikočević (Mozgy) mozgy at hinet dot hr My favourite FUBAR ...