ALSA: pcm: Clean up with snd_pcm_avail() and snd_pcm_hw_avail() helpers
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Apr 2018 15:56:52 +0000 (17:56 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 17 Apr 2018 05:37:13 +0000 (07:37 +0200)
commit763e5067aac91ce569a8b1212e6c31968bc7d325
tree0cad6a8be1127348f7a5fecf2bbe16b6ee38aa58
parent057666b69b1d51feb389a17ec73722b001aaf3d0
ALSA: pcm: Clean up with snd_pcm_avail() and snd_pcm_hw_avail() helpers

Introduce two new direction-neutral helpers to calculate the avail and
hw_avail values, and clean up the code with them.

The two separated forward and rewind functions are gathered to the
unified functions.

No functional change but only code reductions.

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