summaryrefslogtreecommitdiff
path: root/Documentation/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-08-23 13:57:40 +0200
committerTakashi Iwai <tiwai@suse.de>2022-08-24 08:00:26 +0200
commit0db78532ff144a52757d636a26803099d78f431e (patch)
tree46e7270a6cfc0896573da5616da606f2180901fe /Documentation/sound
parentdd164fbfdc20ccf17be9186b1a5a4b2bc11b6a97 (diff)
ALSA: doc: Drop snd_dma_continuous_data() usages
Update the documentation to follow the recent change of the memory allocation helpers. The macro snd_dma_continuous_data() is gone, and the driver needs to set up the coherent dma mask for allocating in the lower memory addresses, instead. Link: https://lore.kernel.org/r/20220823115740.14123-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound')
-rw-r--r--Documentation/sound/kernel-api/writing-an-alsa-driver.rst21
1 files changed, 8 insertions, 13 deletions
diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
index 176b73583b7a..07a620c5ca74 100644
--- a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
+++ b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst
@@ -3565,13 +3565,17 @@ given size.
The second argument (type) and the third argument (device pointer) are
dependent on the bus. For normal devices, pass the device pointer
(typically identical as ``card->dev``) to the third argument with
-``SNDRV_DMA_TYPE_DEV`` type. For the continuous buffer unrelated to the
+``SNDRV_DMA_TYPE_DEV`` type.
+
+For the continuous buffer unrelated to the
bus can be pre-allocated with ``SNDRV_DMA_TYPE_CONTINUOUS`` type.
You can pass NULL to the device pointer in that case, which is the
default mode implying to allocate with ``GFP_KERNEL`` flag.
-If you need a different GFP flag, you can pass it by encoding the flag
-into the device pointer via a special macro
-:c:func:`snd_dma_continuous_data()`.
+If you need a restricted (lower) address, set up the coherent DMA mask
+bits for the device, and pass the device pointer, like the normal
+device memory allocations. For this type, it's still allowed to pass
+NULL to the device pointer, too, if no address restriction is needed.
+
For the scatter-gather buffers, use ``SNDRV_DMA_TYPE_DEV_SG`` with the
device pointer (see the `Non-Contiguous Buffers`_ section).
@@ -3811,15 +3815,6 @@ arguments here. Since each vmalloc call should succeed at any time,
we don't need to pre-allocate the buffers like other continuous
pages.
-If you need the 32bit DMA allocation, pass the device pointer encoded
-by :c:func:`snd_dma_continuous_data()` with ``GFP_KERNEL|__GFP_DMA32``
-argument.
-
-::
-
- snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_VMALLOC,
- snd_dma_continuous_data(GFP_KERNEL | __GFP_DMA32), 0, 0);
-
Proc Interface
==============