ALSA: pcm: Unify read/write loop
authorTakashi Iwai <tiwai@suse.de>
Wed, 24 May 2017 20:36:23 +0000 (22:36 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 2 Jun 2017 17:38:22 +0000 (19:38 +0200)
commit5c7264cfbb209efea04bbbd69b8b4f5f2fc5f86d
tree851ec067b37a9fd5bfdae9e8211f3cabf25a53d2
parent9f60063094ba72e2767be18289baf5151f1f1c2f
ALSA: pcm: Unify read/write loop

Both __snd_pcm_lib_read() and __snd_pcm_write() functions have almost
the same code to loop over samples.  For simplification, this patch
unifies both as the single helper, __snd_pcm_lib_xfer().

Other than that, there should be no functional change by this patch.

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