summaryrefslogtreecommitdiff
path: root/sound/core/pcm_local.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-06-09 19:25:49 +0300
committerTakashi Iwai <tiwai@suse.de>2021-06-10 11:15:21 +0300
commit37af81c5998f4b0f23fb452cffa4b8a1c00ce95b (patch)
tree1def6906c07dfff4d6ddde09cbaaaa3000af693d /sound/core/pcm_local.h
parent84a0374051c1582ed9ace6cd63cdbfb15ed4b797 (diff)
downloadlinux-37af81c5998f4b0f23fb452cffa4b8a1c00ce95b.tar.xz
ALSA: core: Abstract memory alloc helpers
This patch introduces the ops table to each memory allocation type (SNDRV_DMA_TYPE_XXX) and abstract the handling for the better code management. Then we get separate the page allocation, release and other tasks for each type, especially for the SG buffer. Each buffer type has now callbacks in the struct snd_malloc_ops, and the common helper functions call those ops accordingly. The former inline code that is specific to SG-buffer is moved into the local sgbuf.c, and we can simplify the PCM code without details of memory handling. Link: https://lore.kernel.org/r/20210609162551.7842-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_local.h')
-rw-r--r--sound/core/pcm_local.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/sound/core/pcm_local.h b/sound/core/pcm_local.h
index e3b3558aeab6..fe9689b8a6a6 100644
--- a/sound/core/pcm_local.h
+++ b/sound/core/pcm_local.h
@@ -65,11 +65,6 @@ void __snd_pcm_xrun(struct snd_pcm_substream *substream);
void snd_pcm_group_init(struct snd_pcm_group *group);
void snd_pcm_sync_stop(struct snd_pcm_substream *substream, bool sync_irq);
-#ifdef CONFIG_SND_DMA_SGBUF
-struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream,
- unsigned long offset);
-#endif
-
#define PCM_RUNTIME_CHECK(sub) snd_BUG_ON(!(sub) || !(sub)->runtime)
/* loop over all PCM substreams */