]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Use a common helper for PCM state check and hwsync
authorTakashi Iwai <tiwai@suse.de>
Fri, 19 May 2017 18:04:23 +0000 (20:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 21 May 2017 06:57:31 +0000 (08:57 +0200)
commitd7b23a60a5b556811dace82a0cacd396afb43956
tree70c472a4897b282059a54f3efe4f0940cedb62e0
parentd2dc3059eb169ae413ca15d3c7469fdcc8015d6c
ALSA: pcm: Use a common helper for PCM state check and hwsync

The mostly same codes for checking the current PCM state and calling
hwsync are found in a few places.  This patch simplifies them by
creating a common helper function.

It also fixes a couple of cases where we missed the proper state check
(e.g. PAUSED state wasn't handled in rewind and snd_pcm_hwsync()),
too.

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