forked from Minki/linux
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>
This commit is contained in:
parent
dd164fbfdc
commit
0db78532ff
@ -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
|
||||
==============
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user