]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Preprocess PAUSED or SUSPENDED stream before PREPARE
authorTakashi Iwai <tiwai@suse.de>
Tue, 24 May 2016 13:40:03 +0000 (15:40 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 14 Jun 2017 05:44:00 +0000 (07:44 +0200)
commitd55db8ab3246e3b6f7f599dc088a52bd4c7b4160
tree98c15796187add768fa5c9d2f30c1b4cb41f41fd
parentafa7ee515f1922ff58bc0dc86253bbec3bbb7f83
ALSA: pcm: Preprocess PAUSED or SUSPENDED stream before PREPARE

Calling PREPARE ioctl to the stream in either PAUSED or SUSPENDED
state may confuse some drivers that don't handle the state properly.
Instead of fixing each driver, PCM core should take care of the proper
state change before actually trying to (re-)prepare the stream.
Namely, when the stream is in PAUSED state, it triggers PAUSE_RELEASE,
and when in SUSPENDED state, it triggers STOP, before calling prepare
callbacks.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c