Update of /cvsroot/alsa/alsa-kernel/isa/cs423x
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22069

Modified Files:
        cs4231_lib.c 
Log Message:
checks the PCM substream pointers to fix oops/panic in the interrupt
handler.




Index: cs4231_lib.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/isa/cs423x/cs4231_lib.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- cs4231_lib.c        8 Apr 2004 17:10:08 -0000       1.39
+++ cs4231_lib.c        1 May 2004 09:01:11 -0000       1.40
@@ -979,19 +979,26 @@
        }               
        if (chip->single_dma && chip->hardware != CS4231_HW_INTERWAVE) {
                if (status & CS4231_PLAYBACK_IRQ) {
-                       if (chip->mode & CS4231_MODE_PLAY)
-                               snd_pcm_period_elapsed(chip->playback_substream);
+                       if (chip->mode & CS4231_MODE_PLAY) {
+                               if (chip->playback_substream)
+                                       
snd_pcm_period_elapsed(chip->playback_substream);
+                       }
                        if (chip->mode & CS4231_MODE_RECORD) {
-                               snd_cs4231_overrange(chip);
-                               snd_pcm_period_elapsed(chip->capture_substream);
+                               if (chip->capture_substream) {
+                                       snd_cs4231_overrange(chip);
+                                       
snd_pcm_period_elapsed(chip->capture_substream);
+                               }
                        }
                }
        } else {
-               if (status & CS4231_PLAYBACK_IRQ)
-                       snd_pcm_period_elapsed(chip->playback_substream);
+               if (status & CS4231_PLAYBACK_IRQ) {
+                       if (chip->playback_substream)
+                               snd_pcm_period_elapsed(chip->playback_substream);
                if (status & CS4231_RECORD_IRQ) {
-                       snd_cs4231_overrange(chip);
-                       snd_pcm_period_elapsed(chip->capture_substream);
+                       if (chip->capture_substream) {
+                               snd_cs4231_overrange(chip);
+                               snd_pcm_period_elapsed(chip->capture_substream);
+                       }
                }
        }
 



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to