Home
last modified time | relevance | path

Searched refs:dmab (Results 1 – 25 of 39) sorted by relevance

12

/linux-6.6.21/sound/core/
Dmemalloc.c27 static const struct snd_malloc_ops *snd_dma_get_ops(struct snd_dma_buffer *dmab);
30 static void *snd_dma_sg_fallback_alloc(struct snd_dma_buffer *dmab, size_t size);
33 static void *__snd_dma_alloc_pages(struct snd_dma_buffer *dmab, size_t size) in __snd_dma_alloc_pages() argument
35 const struct snd_malloc_ops *ops = snd_dma_get_ops(dmab); in __snd_dma_alloc_pages()
39 return ops->alloc(dmab, size); in __snd_dma_alloc_pages()
59 struct snd_dma_buffer *dmab) in snd_dma_alloc_dir_pages() argument
63 if (WARN_ON(!dmab)) in snd_dma_alloc_dir_pages()
67 dmab->dev.type = type; in snd_dma_alloc_dir_pages()
68 dmab->dev.dev = device; in snd_dma_alloc_dir_pages()
69 dmab->dev.dir = dir; in snd_dma_alloc_dir_pages()
[all …]
Dmemalloc_local.h6 void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
7 void (*free)(struct snd_dma_buffer *dmab);
8 dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset);
9 struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
10 unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
12 int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
13 void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode);
Dpcm_memory.c55 int str, size_t size, struct snd_dma_buffer *dmab) in do_alloc_pages() argument
74 err = snd_dma_alloc_dir_pages(type, dev, dir, size, dmab); in do_alloc_pages()
79 if (dmab->bytes != size) in do_alloc_pages()
80 update_allocated_size(card, dmab->bytes - size); in do_alloc_pages()
88 static void do_free_pages(struct snd_card *card, struct snd_dma_buffer *dmab) in do_free_pages() argument
90 if (!dmab->area) in do_free_pages()
92 decrease_allocated_size(card, dmab->bytes); in do_free_pages()
93 snd_dma_free_pages(dmab); in do_free_pages()
94 dmab->area = NULL; in do_free_pages()
106 struct snd_dma_buffer *dmab = &substream->dma_buffer; in preallocate_pcm_pages() local
[all …]
Dcompress_offload.c491 struct snd_dma_buffer *dmab; in snd_compr_malloc_pages() local
496 dmab = kzalloc(sizeof(*dmab), GFP_KERNEL); in snd_compr_malloc_pages()
497 if (!dmab) in snd_compr_malloc_pages()
499 dmab->dev = stream->dma_buffer.dev; in snd_compr_malloc_pages()
500 ret = snd_dma_alloc_pages(dmab->dev.type, dmab->dev.dev, size, dmab); in snd_compr_malloc_pages()
502 kfree(dmab); in snd_compr_malloc_pages()
506 snd_compr_set_runtime_buffer(stream, dmab); in snd_compr_malloc_pages()
/linux-6.6.21/include/sound/
Dmemalloc.h79 struct snd_dma_buffer *dmab);
82 size_t size, struct snd_dma_buffer *dmab) in snd_dma_alloc_pages() argument
84 return snd_dma_alloc_dir_pages(type, dev, DMA_BIDIRECTIONAL, size, dmab); in snd_dma_alloc_pages()
88 struct snd_dma_buffer *dmab);
89 void snd_dma_free_pages(struct snd_dma_buffer *dmab);
90 int snd_dma_buffer_mmap(struct snd_dma_buffer *dmab,
95 void snd_dma_buffer_sync(struct snd_dma_buffer *dmab,
98 static inline void snd_dma_buffer_sync(struct snd_dma_buffer *dmab, in snd_dma_buffer_sync() argument
102 dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, size_t offset);
103 struct page *snd_sgbuf_get_page(struct snd_dma_buffer *dmab, size_t offset);
[all …]
/linux-6.6.21/sound/soc/sof/intel/
Dhda-loader-skl.c268 struct snd_dma_buffer *dmab, in cl_stream_prepare_skl() argument
277 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, sdev->dev, bufsize, dmab); in cl_stream_prepare_skl()
286 snd_dma_free_pages(dmab); in cl_stream_prepare_skl()
291 frags = cl_skl_cldma_setup_bdle(sdev, dmab, &bdl, bufsize, 1); in cl_stream_prepare_skl()
298 struct snd_dma_buffer *dmab, in cl_cleanup_skl() argument
303 snd_dma_free_pages(dmab); in cl_cleanup_skl()
308 struct snd_dma_buffer *dmab, in cl_dsp_init_skl() argument
348 ret = cl_stream_prepare_skl(sdev, dmab, dmab_bdl); in cl_dsp_init_skl()
385 cl_cleanup_skl(sdev, dmab, dmab_bdl); in cl_dsp_init_skl()
391 struct snd_dma_buffer *dmab, in cl_skl_cldma_fill_buffer() argument
[all …]
Dhda-trace.c22 static int hda_dsp_trace_prepare(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab) in hda_dsp_trace_prepare() argument
30 hstream->bufsize = dmab->bytes; in hda_dsp_trace_prepare()
32 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_dsp_trace_prepare()
39 int hda_dsp_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab, in hda_dsp_trace_init() argument
60 ret = hda_dsp_trace_prepare(sdev, dmab); in hda_dsp_trace_init()
Dhda-loader.c47 unsigned int size, struct snd_dma_buffer *dmab, in hda_cl_stream_prepare() argument
65 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, &pci->dev, size, dmab); in hda_cl_stream_prepare()
76 ret = hda_dsp_iccmax_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_stream_prepare()
82 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_stream_prepare()
93 snd_dma_free_pages(dmab); in hda_cl_stream_prepare()
249 int hda_cl_cleanup(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab, in hda_cl_cleanup() argument
273 snd_dma_free_pages(dmab); in hda_cl_cleanup()
274 dmab->area = NULL; in hda_cl_cleanup()
390 struct snd_dma_buffer dmab; in hda_dsp_cl_boot_firmware() local
423 &dmab, SNDRV_PCM_STREAM_PLAYBACK); in hda_dsp_cl_boot_firmware()
[all …]
Dhda-stream.c59 struct snd_dma_buffer *dmab, in hda_setup_bdle() argument
76 addr = snd_sgbuf_get_addr(dmab, offset); in hda_setup_bdle()
81 chunk = snd_sgbuf_get_chunk_size(dmab, offset, size); in hda_setup_bdle()
107 struct snd_dma_buffer *dmab, in hda_dsp_stream_setup_bdl() argument
143 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl()
147 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl()
415 struct snd_dma_buffer *dmab, in hda_dsp_iccmax_stream_hw_params() argument
428 if (!dmab) { in hda_dsp_iccmax_stream_hw_params()
446 ret = hda_dsp_stream_setup_bdl(sdev, dmab, hstream); in hda_dsp_iccmax_stream_hw_params()
491 struct snd_dma_buffer *dmab, in hda_dsp_stream_hw_params() argument
[all …]
Dhda-probes.c77 struct snd_dma_buffer *dmab; in hda_probes_compr_set_params() local
81 dmab = cstream->runtime->dma_buffer_p; in hda_probes_compr_set_params()
94 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_probes_compr_set_params()
Dhda-pcm.c102 struct snd_dma_buffer *dmab; in hda_dsp_pcm_hw_params() local
107 dmab = substream->runtime->dma_buffer_p; in hda_dsp_pcm_hw_params()
126 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, params); in hda_dsp_pcm_hw_params()
Dhda.h637 struct snd_dma_buffer *dmab,
641 struct snd_dma_buffer *dmab,
647 struct snd_dma_buffer *dmab,
688 unsigned int size, struct snd_dma_buffer *dmab,
690 int hda_cl_cleanup(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
773 int hda_dsp_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
/linux-6.6.21/sound/pci/emu10k1/
Dmemory.c378 struct snd_dma_buffer *dmab) in snd_emu10k1_alloc_pages_maybe_wider() argument
393 &emu->pci->dev, size, dmab); in snd_emu10k1_alloc_pages_maybe_wider()
481 struct snd_dma_buffer dmab; in __synth_free_pages() local
484 dmab.dev.type = SNDRV_DMA_TYPE_DEV; in __synth_free_pages()
485 dmab.dev.dev = &emu->pci->dev; in __synth_free_pages()
490 dmab.area = emu->page_ptr_table[page]; in __synth_free_pages()
491 dmab.addr = emu->page_addr_table[page]; in __synth_free_pages()
497 dmab.bytes = PAGE_SIZE; in __synth_free_pages()
499 dmab.bytes *= 2; in __synth_free_pages()
501 snd_dma_free_pages(&dmab); in __synth_free_pages()
[all …]
/linux-6.6.21/sound/soc/sof/
Dsof-utils.c26 struct snd_dma_buffer *dmab, in snd_sof_create_page_table() argument
34 dmab->area, size, pages); in snd_sof_create_page_table()
45 u32 pfn = snd_sgbuf_get_addr(dmab, i * PAGE_SIZE) >> PAGE_SHIFT; in snd_sof_create_page_table()
Dsof-utils.h16 struct snd_dma_buffer *dmab,
/linux-6.6.21/drivers/scsi/lpfc/
Dlpfc_mem.c594 lpfc_sli4_rb_free(struct lpfc_hba *phba, struct hbq_dmabuf *dmab) in lpfc_sli4_rb_free() argument
596 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_rb_free()
597 dma_pool_free(phba->lpfc_drb_pool, dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_rb_free()
598 kfree(dmab); in lpfc_sli4_rb_free()
652 lpfc_sli4_nvmet_free(struct lpfc_hba *phba, struct rqb_dmabuf *dmab) in lpfc_sli4_nvmet_free() argument
654 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_nvmet_free()
656 dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_nvmet_free()
657 kfree(dmab); in lpfc_sli4_nvmet_free()
/linux-6.6.21/sound/soc/sof/amd/
Dacp-trace.c37 int acp_sof_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab, in acp_sof_trace_init() argument
49 stream->dmab = dmab; in acp_sof_trace_init()
/linux-6.6.21/sound/hda/
Dhdac_stream.c443 struct snd_dma_buffer *dmab, in setup_bdle() argument
456 addr = snd_sgbuf_get_addr(dmab, ofs); in setup_bdle()
461 chunk = snd_sgbuf_get_chunk_size(dmab, ofs, size); in setup_bdle()
496 struct snd_dma_buffer *dmab; in snd_hdac_stream_setup_periods() local
503 dmab = snd_pcm_get_dma_buf(substream); in snd_hdac_stream_setup_periods()
505 dmab = snd_pcm_get_dma_buf(cstream); in snd_hdac_stream_setup_periods()
537 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_periods()
547 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_periods()
550 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_periods()
981 struct snd_dma_buffer *dmab) in snd_hdac_dsp_cleanup() argument
[all …]
/linux-6.6.21/sound/soc/stm/
Dstm32_spdifrx.c238 struct snd_dma_buffer *dmab; member
255 u32 *p_start = (u32 *)spdifrx->dmab->area; in stm32_spdifrx_dma_complete()
265 if (!spdifrx->dmab->area) in stm32_spdifrx_dma_complete()
298 spdifrx->dmab->addr, in stm32_spdifrx_dma_ctrl_start()
413 spdifrx->dmab = devm_kzalloc(dev, sizeof(struct snd_dma_buffer), in stm32_spdifrx_dma_ctrl_register()
415 if (!spdifrx->dmab) in stm32_spdifrx_dma_ctrl_register()
418 spdifrx->dmab->dev.type = SNDRV_DMA_TYPE_DEV_IRAM; in stm32_spdifrx_dma_ctrl_register()
419 spdifrx->dmab->dev.dev = dev; in stm32_spdifrx_dma_ctrl_register()
420 ret = snd_dma_alloc_pages(spdifrx->dmab->dev.type, dev, in stm32_spdifrx_dma_ctrl_register()
421 SPDIFRX_CSR_BUF_LENGTH, spdifrx->dmab); in stm32_spdifrx_dma_ctrl_register()
[all …]
/linux-6.6.21/sound/soc/intel/skylake/
Dbxt-sst.c48 struct snd_dma_buffer dmab; in bxt_load_library() local
61 stripped_fw.size, &dmab); in bxt_load_library()
70 memcpy(dmab.area, stripped_fw.data, stripped_fw.size); in bxt_load_library()
79 ctx->dsp_ops.cleanup(ctx->dev, &dmab, stream_tag); in bxt_load_library()
99 stream_tag = ctx->dsp_ops.prepare(ctx->dev, 0x40, fwsize, &ctx->dmab); in sst_bxt_prepare_fw()
107 memcpy(ctx->dmab.area, fwdata, fwsize); in sst_bxt_prepare_fw()
161 ctx->dsp_ops.cleanup(ctx->dev, &ctx->dmab, stream_tag); in sst_bxt_prepare_fw()
176 ctx->dsp_ops.cleanup(ctx->dev, &ctx->dmab, ctx->dsp_ops.stream_tag); in sst_transfer_fw_host_dma()
Dskl-sst-dsp.h159 struct snd_dma_buffer *dmab, size_t size);
161 struct snd_dma_buffer *dmab);
167 int (*cleanup)(struct device *dev, struct snd_dma_buffer *dmab,
Dcnl-sst.c51 stream_tag = ctx->dsp_ops.prepare(ctx->dev, 0x40, fwsize, &ctx->dmab); in cnl_prepare_fw()
58 memcpy(ctx->dmab.area, fwdata, fwsize); in cnl_prepare_fw()
103 ctx->dsp_ops.cleanup(ctx->dev, &ctx->dmab, stream_tag); in cnl_prepare_fw()
119 ctx->dsp_ops.cleanup(ctx->dev, &ctx->dmab, ctx->dsp_ops.stream_tag); in sst_transfer_fw_host_dma()
Dskl-messages.c26 struct snd_dma_buffer *dmab, size_t size) in skl_alloc_dma_buf() argument
28 return snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, dev, size, dmab); in skl_alloc_dma_buf()
31 static int skl_free_dma_buf(struct device *dev, struct snd_dma_buffer *dmab) in skl_free_dma_buf() argument
33 snd_dma_free_pages(dmab); in skl_free_dma_buf()
70 unsigned int size, struct snd_dma_buffer *dmab) in skl_dsp_prepare() argument
92 ret = snd_hdac_dsp_prepare(stream, format, size, dmab); in skl_dsp_prepare()
120 struct snd_dma_buffer *dmab, int stream_tag) in skl_dsp_cleanup() argument
138 snd_hdac_dsp_cleanup(stream, dmab); in skl_dsp_cleanup()
/linux-6.6.21/sound/soc/intel/avs/
Dloader.c357 struct snd_dma_buffer dmab; in avs_hda_load_basefw() local
375 ret = snd_hdac_dsp_prepare(hstream, sdfmt, fw->size, &dmab); in avs_hda_load_basefw()
385 memcpy(dmab.area, fw->data, fw->size); in avs_hda_load_basefw()
414 snd_hdac_dsp_cleanup(hstream, &dmab); in avs_hda_load_basefw()
424 struct snd_dma_buffer dmab; in avs_hda_load_library() local
442 ret = snd_hdac_dsp_prepare(stream, sdfmt, lib->size, &dmab); in avs_hda_load_library()
450 memcpy(dmab.area, lib->data, lib->size); in avs_hda_load_library()
465 snd_hdac_dsp_cleanup(stream, &dmab); in avs_hda_load_library()
Dcldma.c207 struct snd_dma_buffer *dmab = &cl->dmab_data; in cldma_setup_bdle() local
218 addr = snd_sgbuf_get_addr(dmab, offset); in cldma_setup_bdle()
221 chunk = snd_sgbuf_get_chunk_size(dmab, offset, bdle_size); in cldma_setup_bdle()

12