Home
last modified time | relevance | path

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

12

/linux-6.1.9/sound/core/
Dmemalloc.c28 static const struct snd_malloc_ops *snd_dma_get_ops(struct snd_dma_buffer *dmab);
31 static void *snd_dma_sg_fallback_alloc(struct snd_dma_buffer *dmab, size_t size);
34 static void *__snd_dma_alloc_pages(struct snd_dma_buffer *dmab, size_t size) in __snd_dma_alloc_pages() argument
36 const struct snd_malloc_ops *ops = snd_dma_get_ops(dmab); in __snd_dma_alloc_pages()
40 return ops->alloc(dmab, size); in __snd_dma_alloc_pages()
60 struct snd_dma_buffer *dmab) in snd_dma_alloc_dir_pages() argument
64 if (WARN_ON(!dmab)) in snd_dma_alloc_dir_pages()
68 dmab->dev.type = type; in snd_dma_alloc_dir_pages()
69 dmab->dev.dev = device; in snd_dma_alloc_dir_pages()
70 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.c35 int str, size_t size, struct snd_dma_buffer *dmab) in do_alloc_pages() argument
48 err = snd_dma_alloc_dir_pages(type, dev, dir, size, dmab); in do_alloc_pages()
51 card->total_pcm_alloc_bytes += dmab->bytes; in do_alloc_pages()
57 static void do_free_pages(struct snd_card *card, struct snd_dma_buffer *dmab) in do_free_pages() argument
59 if (!dmab->area) in do_free_pages()
62 WARN_ON(card->total_pcm_alloc_bytes < dmab->bytes); in do_free_pages()
63 card->total_pcm_alloc_bytes -= dmab->bytes; in do_free_pages()
65 snd_dma_free_pages(dmab); in do_free_pages()
66 dmab->area = NULL; in do_free_pages()
78 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.1.9/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.1.9/sound/soc/sof/intel/
Dhda-loader-skl.c269 struct snd_dma_buffer *dmab, in cl_stream_prepare_skl() argument
278 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, sdev->dev, bufsize, dmab); in cl_stream_prepare_skl()
287 snd_dma_free_pages(dmab); in cl_stream_prepare_skl()
292 frags = cl_skl_cldma_setup_bdle(sdev, dmab, &bdl, bufsize, 1); in cl_stream_prepare_skl()
299 struct snd_dma_buffer *dmab, in cl_cleanup_skl() argument
304 snd_dma_free_pages(dmab); in cl_cleanup_skl()
309 struct snd_dma_buffer *dmab, in cl_dsp_init_skl() argument
349 ret = cl_stream_prepare_skl(sdev, dmab, dmab_bdl); in cl_dsp_init_skl()
386 cl_cleanup_skl(sdev, dmab, dmab_bdl); in cl_dsp_init_skl()
392 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.c45 unsigned int size, struct snd_dma_buffer *dmab, in hda_cl_stream_prepare() argument
63 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, &pci->dev, size, dmab); in hda_cl_stream_prepare()
74 ret = hda_dsp_iccmax_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_stream_prepare()
80 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_stream_prepare()
91 snd_dma_free_pages(dmab); in hda_cl_stream_prepare()
247 int hda_cl_cleanup(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab, in hda_cl_cleanup() argument
271 snd_dma_free_pages(dmab); in hda_cl_cleanup()
272 dmab->area = NULL; in hda_cl_cleanup()
393 struct snd_dma_buffer dmab; in hda_dsp_cl_boot_firmware() local
422 &dmab, SNDRV_PCM_STREAM_PLAYBACK); in hda_dsp_cl_boot_firmware()
[all …]
Dhda-stream.c60 struct snd_dma_buffer *dmab, in hda_setup_bdle() argument
77 addr = snd_sgbuf_get_addr(dmab, offset); in hda_setup_bdle()
82 chunk = snd_sgbuf_get_chunk_size(dmab, offset, size); in hda_setup_bdle()
108 struct snd_dma_buffer *dmab, in hda_dsp_stream_setup_bdl() argument
144 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl()
148 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl()
398 struct snd_dma_buffer *dmab, in hda_dsp_iccmax_stream_hw_params() argument
412 if (!dmab) { in hda_dsp_iccmax_stream_hw_params()
430 ret = hda_dsp_stream_setup_bdl(sdev, dmab, hstream); in hda_dsp_iccmax_stream_hw_params()
474 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.h622 struct snd_dma_buffer *dmab,
626 struct snd_dma_buffer *dmab,
632 struct snd_dma_buffer *dmab,
673 unsigned int size, struct snd_dma_buffer *dmab,
675 int hda_cl_cleanup(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
735 int hda_dsp_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
Dhda-pcm.c102 struct snd_dma_buffer *dmab; in hda_dsp_pcm_hw_params() local
112 dmab = substream->runtime->dma_buffer_p; in hda_dsp_pcm_hw_params()
121 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, params); in hda_dsp_pcm_hw_params()
/linux-6.1.9/sound/pci/emu10k1/
Dmemory.c380 struct snd_dma_buffer *dmab) in snd_emu10k1_alloc_pages_maybe_wider() argument
395 &emu->pci->dev, size, dmab); in snd_emu10k1_alloc_pages_maybe_wider()
483 struct snd_dma_buffer dmab; in __synth_free_pages() local
486 dmab.dev.type = SNDRV_DMA_TYPE_DEV; in __synth_free_pages()
487 dmab.dev.dev = &emu->pci->dev; in __synth_free_pages()
492 dmab.area = emu->page_ptr_table[page]; in __synth_free_pages()
493 dmab.addr = emu->page_addr_table[page]; in __synth_free_pages()
499 dmab.bytes = PAGE_SIZE; in __synth_free_pages()
501 dmab.bytes *= 2; in __synth_free_pages()
503 snd_dma_free_pages(&dmab); in __synth_free_pages()
[all …]
/linux-6.1.9/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.1.9/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.1.9/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()
Dacp.h136 struct snd_dma_buffer *dmab; member
237 int acp_sof_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
/linux-6.1.9/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.1.9/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()
/linux-6.1.9/sound/soc/intel/avs/
Dloader.c349 struct snd_dma_buffer dmab; in avs_hda_load_basefw() local
367 ret = snd_hdac_dsp_prepare(hstream, sdfmt, fw->size, &dmab); in avs_hda_load_basefw()
377 memcpy(dmab.area, fw->data, fw->size); in avs_hda_load_basefw()
406 snd_hdac_dsp_cleanup(hstream, &dmab); in avs_hda_load_basefw()
416 struct snd_dma_buffer dmab; in avs_hda_load_library() local
434 ret = snd_hdac_dsp_prepare(stream, sdfmt, lib->size, &dmab); in avs_hda_load_library()
442 memcpy(dmab.area, lib->data, lib->size); in avs_hda_load_library()
457 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()
/linux-6.1.9/sound/hda/
Dhdac_stream.c425 struct snd_dma_buffer *dmab, in setup_bdle() argument
438 addr = snd_sgbuf_get_addr(dmab, ofs); in setup_bdle()
443 chunk = snd_sgbuf_get_chunk_size(dmab, ofs, size); in setup_bdle()
807 struct snd_dma_buffer *dmab) in snd_hdac_dsp_cleanup() argument
811 if (!dmab->area || !azx_dev->locked) in snd_hdac_dsp_cleanup()
823 snd_dma_free_pages(dmab); in snd_hdac_dsp_cleanup()
824 dmab->area = NULL; in snd_hdac_dsp_cleanup()

12