]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: Preserve period_event in snd_pcm_hw_sw_params() call
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Jan 2019 11:02:56 +0000 (12:02 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 9 Jan 2019 11:02:56 +0000 (12:02 +0100)
commit9c1439a76cea33d2cec65a42d499230d2f9a5205
tree7b8b9d358e3295bea8886638225ed34cb8824c78
parentef7b098deb2652cea2659936c96cfe3229c0a782
pcm: Preserve period_event in snd_pcm_hw_sw_params() call

snd_pcm_hw_sw_params() in pcm_hw.c tries to abuse the reserved bits
for passing period_Event flag.  In this hackish way, we clear the
reserved bits at beginning, and restore before returning.  However,
the code paths that return earlier don't restore the value, hence when
user calls this function twice, it may pass an unexpected value.

This patch fixes the failure, restoring the value always before
returning from the function.

Reported-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_hw.c