]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: memalloc: Make SG-buffer helper usable for continuous buffer, too
authorTakashi Iwai <tiwai@suse.de>
Mon, 15 Jun 2020 16:00:44 +0000 (18:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 15 Jun 2020 16:01:52 +0000 (18:01 +0200)
commit97c69c1c200ce32a4dea5753e692834702c6ee5d
tree91b48322462746d447147f7448a886e22fbbf768
parent8d32ab2fe4ae3f987bcbef42100480679edca2f2
ALSA: memalloc: Make SG-buffer helper usable for continuous buffer, too

We have a few helper functions for making the access to the buffer
address easier on SG-buffer.  Those are specific to the buffer that is
allocated with SG-buffer type, and it makes hard to use both SG and
non-SG buffers in the same code.

This patch adds a few simple checks and lets the helpers to deal with
both SG- and continuous buffers gracefully.  It's a preliminary step
for the upcoming patch that mimics the buffer type on the fly.

Link: https://lore.kernel.org/r/20200615160045.2703-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/memalloc.h
sound/core/sgbuf.c