Fix CPU hog with combination of rate plugin

Fix CPU hog with some apps (e.g. artsd) when rate plugin is used
together with dmix (or possible hw).
This commit is contained in:
Takashi Iwai 2005-04-22 16:36:13 +00:00
parent 56b3974439
commit 467d69c5bc
3 changed files with 55 additions and 69 deletions

View file

@ -627,6 +627,9 @@ static snd_pcm_sframes_t snd_pcm_dmix_mmap_commit(snd_pcm_t *pcm,
/* ok, we commit the changes after the validation of area */
/* it's intended, although the result might be crappy */
snd_pcm_dmix_sync_area(pcm, size);
/* clear timer queue to avoid a bogus return from poll */
if (snd_pcm_mmap_playback_avail(pcm) < pcm->avail_min)
snd_pcm_direct_clear_timer_queue(dmix);
}
return size;
}