libaudiodriver: handle interrupt only once

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
This commit is contained in:
Arne Welzel 2012-11-15 12:05:51 +01:00 committed by Gerrit Code Review
parent b026d9f946
commit 842c4eda7f

View 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);
}
}