]> Zhao Yanbai Git Server - minix.git/commitdiff
libaudiodriver: handle interrupt only once 54/754/2
authorArne Welzel <arne.welzel@gmail.com>
Thu, 15 Nov 2012 11:05:51 +0000 (12:05 +0100)
committerGerrit Code Review <gerrit@gerrit>
Tue, 20 Aug 2013 17:42:37 +0000 (19:42 +0200)
Apparently, qemu's sb16 doesn't reset the interrupt register
of the mixer and the driver ends up in an endless loop when
playing a "multi-fragment" sample.

Change-Id: I47633b99a0d79ba201aec785da69fb3950e026bf

lib/libaudiodriver/audio_fw.c

index 58ce03a4f4aedf35936f0d765ea99385d6b7b9b5..34ae2f5e8f62d1b2c6a90caf88f58381331dd6b8 100644 (file)
@@ -607,16 +607,13 @@ static void msg_hardware(void) {
 
        u32_t     i;
 
-       /* while we have an interrupt  */
-       while ( drv_int_sum()) {
-               /* loop over all sub devices */
-               for ( i = 0; i < drv.NrOfSubDevices; i++) {
-                       /* if interrupt from sub device and Dma transfer 
-                          was actually busy, take care of business */
-                       if( drv_int(i) && sub_dev[i].DmaBusy ) {
-                               if (sub_dev[i].DmaMode == DEV_WRITE_S) handle_int_write(i);
-                               if (sub_dev[i].DmaMode == DEV_READ_S) handle_int_read(i);  
-                       }
+       /* loop over all sub devices */
+       for ( i = 0; i < drv.NrOfSubDevices; i++) {
+               /* if interrupt from sub device and Dma transfer 
+                  was actually busy, take care of business */
+               if( drv_int(i) && sub_dev[i].DmaBusy ) {
+                       if (sub_dev[i].DmaMode == DEV_WRITE_S) handle_int_write(i);
+                       if (sub_dev[i].DmaMode == DEV_READ_S) handle_int_read(i);  
                }
        }