mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-01 01:40:07 -05:00
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:
parent
56b3974439
commit
467d69c5bc
3 changed files with 55 additions and 69 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue