--- au_audio.c.old Thu Jan 31 00:20:16 2002 +++ au_audio.c Tue Mar 5 04:34:04 2002 @@ -361,14 +361,13 @@ if(!wdev->play_stream.wave) return -EINVAL; PSHOW("au_audio_ioctl() : DSP_POST\n"); - drain_playback(dev, wdev, (file->f_flags & O_NONBLOCK)); - stop_wave(dev, &(wdev->play_stream)); + drain_playback(dev, wdev, 1); return SUCCESS; case SNDCTL_DSP_SYNC: if (wdev->play_stream.wave) { PSHOW("au_audio_ioctl() : DSP_SYNC\n"); - drain_playback(dev, wdev, (file->f_flags & O_NONBLOCK)); + drain_playback(dev, wdev, 0); stop_wave(dev, &(wdev->play_stream)); } if (wdev->record_stream.wave) @@ -709,6 +708,9 @@ spin_lock_irqsave(&dev->irq_lock,flags); AddWaveBuffer(wdev->play_stream.wave, mb->page, mb->count); spin_unlock_irqrestore(&dev->irq_lock,flags); + wdev->play_stream.fill_index++; + if(wdev->play_stream.fill_index >= wdev->play_stream.num_frags) + wdev->play_stream.fill_index = 0; } while (wdev->play_stream.total_played < wdev->play_stream.total_sent) {