/linux-6.12.1/sound/core/ |
D | memalloc.c | 22 void *(*alloc)(struct snd_dma_buffer *dmab, size_t size); 23 void (*free)(struct snd_dma_buffer *dmab); 24 dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset); 25 struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset); 26 unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab, 28 int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area); 29 void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode); 37 static const struct snd_malloc_ops *snd_dma_get_ops(struct snd_dma_buffer *dmab); 39 static void *__snd_dma_alloc_pages(struct snd_dma_buffer *dmab, size_t size) in __snd_dma_alloc_pages() argument 41 const struct snd_malloc_ops *ops = snd_dma_get_ops(dmab); in __snd_dma_alloc_pages() [all …]
|
D | pcm_memory.c | 52 int str, size_t size, struct snd_dma_buffer *dmab) in do_alloc_pages() argument 69 err = snd_dma_alloc_dir_pages(type, dev, dir, size, dmab); in do_alloc_pages() 74 if (dmab->bytes != size) in do_alloc_pages() 75 update_allocated_size(card, dmab->bytes - size); in do_alloc_pages() 83 static void do_free_pages(struct snd_card *card, struct snd_dma_buffer *dmab) in do_free_pages() argument 85 if (!dmab->area) in do_free_pages() 87 decrease_allocated_size(card, dmab->bytes); in do_free_pages() 88 snd_dma_free_pages(dmab); in do_free_pages() 89 dmab->area = NULL; in do_free_pages() 101 struct snd_dma_buffer *dmab = &substream->dma_buffer; in preallocate_pcm_pages() local [all …]
|
D | compress_offload.c | 476 struct snd_dma_buffer *dmab; in snd_compr_malloc_pages() local 481 dmab = kzalloc(sizeof(*dmab), GFP_KERNEL); in snd_compr_malloc_pages() 482 if (!dmab) in snd_compr_malloc_pages() 484 dmab->dev = stream->dma_buffer.dev; in snd_compr_malloc_pages() 485 ret = snd_dma_alloc_pages(dmab->dev.type, dmab->dev.dev, size, dmab); in snd_compr_malloc_pages() 487 kfree(dmab); in snd_compr_malloc_pages() 491 snd_compr_set_runtime_buffer(stream, dmab); in snd_compr_malloc_pages()
|
/linux-6.12.1/include/sound/ |
D | memalloc.h | 74 struct snd_dma_buffer *dmab); 77 size_t size, struct snd_dma_buffer *dmab) in snd_dma_alloc_pages() argument 79 return snd_dma_alloc_dir_pages(type, dev, DMA_BIDIRECTIONAL, size, dmab); in snd_dma_alloc_pages() 83 struct snd_dma_buffer *dmab); 84 void snd_dma_free_pages(struct snd_dma_buffer *dmab); 85 int snd_dma_buffer_mmap(struct snd_dma_buffer *dmab, 90 void snd_dma_buffer_sync(struct snd_dma_buffer *dmab, 93 static inline void snd_dma_buffer_sync(struct snd_dma_buffer *dmab, in snd_dma_buffer_sync() argument 97 dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, size_t offset); 98 struct page *snd_sgbuf_get_page(struct snd_dma_buffer *dmab, size_t offset); [all …]
|
/linux-6.12.1/sound/soc/sof/intel/ |
D | hda-loader-skl.c | 268 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 …]
|
D | hda-trace.c | 22 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()
|
D | hda-loader.c | 47 unsigned int size, struct snd_dma_buffer *dmab, in hda_cl_prepare() argument 65 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, dev, size, dmab); in hda_cl_prepare() 76 ret = hda_dsp_iccmax_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_prepare() 82 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_prepare() 93 snd_dma_free_pages(dmab); in hda_cl_prepare() 257 int hda_cl_cleanup(struct device *dev, struct snd_dma_buffer *dmab, in hda_cl_cleanup() argument 282 snd_dma_free_pages(dmab); in hda_cl_cleanup() 283 dmab->area = NULL; in hda_cl_cleanup() 411 struct snd_dma_buffer dmab; in hda_dsp_cl_boot_firmware() local 444 &dmab, SNDRV_PCM_STREAM_PLAYBACK, false); in hda_dsp_cl_boot_firmware() [all …]
|
D | hda-stream.c | 65 struct snd_dma_buffer *dmab, in hda_setup_bdle() argument 82 addr = snd_sgbuf_get_addr(dmab, offset); in hda_setup_bdle() 87 chunk = snd_sgbuf_get_chunk_size(dmab, offset, size); in hda_setup_bdle() 113 struct snd_dma_buffer *dmab, in hda_dsp_stream_setup_bdl() argument 149 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl() 153 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl() 419 struct snd_dma_buffer *dmab, in hda_dsp_iccmax_stream_hw_params() argument 432 if (!dmab) { in hda_dsp_iccmax_stream_hw_params() 450 ret = hda_dsp_stream_setup_bdl(sdev, dmab, hstream); in hda_dsp_iccmax_stream_hw_params() 495 struct snd_dma_buffer *dmab, in hda_dsp_stream_hw_params() argument [all …]
|
D | hda-probes.c | 77 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()
|
D | hda-pcm.c | 102 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()
|
D | hda.h | 654 struct snd_dma_buffer *dmab, 658 struct snd_dma_buffer *dmab, 664 struct snd_dma_buffer *dmab, 716 unsigned int size, struct snd_dma_buffer *dmab, 720 int hda_cl_cleanup(struct device *dev, struct snd_dma_buffer *dmab, 803 int hda_dsp_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
|
/linux-6.12.1/sound/pci/emu10k1/ |
D | memory.c | 378 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.12.1/sound/soc/sof/ |
D | sof-utils.c | 26 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()
|
D | sof-utils.h | 16 struct snd_dma_buffer *dmab,
|
/linux-6.12.1/drivers/scsi/lpfc/ |
D | lpfc_mem.c | 601 lpfc_sli4_rb_free(struct lpfc_hba *phba, struct hbq_dmabuf *dmab) in lpfc_sli4_rb_free() argument 603 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_rb_free() 604 dma_pool_free(phba->lpfc_drb_pool, dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_rb_free() 605 kfree(dmab); in lpfc_sli4_rb_free() 659 lpfc_sli4_nvmet_free(struct lpfc_hba *phba, struct rqb_dmabuf *dmab) in lpfc_sli4_nvmet_free() argument 661 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_nvmet_free() 663 dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_nvmet_free() 664 kfree(dmab); in lpfc_sli4_nvmet_free()
|
/linux-6.12.1/sound/soc/sof/amd/ |
D | acp-trace.c | 37 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()
|
D | acp.h | 188 struct snd_dma_buffer *dmab; member 343 int acp_sof_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
|
D | acp-pcm.c | 31 stream->dmab = substream->runtime->dma_buffer_p; in acp_pcm_hw_params()
|
D | acp-probes.c | 79 stream->dmab = cstream->runtime->dma_buffer_p; in acp_probes_compr_set_params()
|
/linux-6.12.1/sound/hda/ |
D | hdac_stream.c | 454 struct snd_dma_buffer *dmab, in setup_bdle() argument 467 addr = snd_sgbuf_get_addr(dmab, ofs); in setup_bdle() 472 chunk = snd_sgbuf_get_chunk_size(dmab, ofs, size); in setup_bdle() 507 struct snd_dma_buffer *dmab; in snd_hdac_stream_setup_periods() local 514 dmab = snd_pcm_get_dma_buf(substream); in snd_hdac_stream_setup_periods() 516 dmab = snd_pcm_get_dma_buf(cstream); in snd_hdac_stream_setup_periods() 548 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_periods() 558 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_periods() 561 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_periods() 997 struct snd_dma_buffer *dmab) in snd_hdac_dsp_cleanup() argument [all …]
|
/linux-6.12.1/sound/soc/stm/ |
D | stm32_spdifrx.c | 238 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.12.1/sound/soc/intel/avs/ |
D | loader.c | 359 struct snd_dma_buffer dmab; in avs_hda_load_basefw() local 377 ret = snd_hdac_dsp_prepare(hstream, sdfmt, fw->size, &dmab); in avs_hda_load_basefw() 387 memcpy(dmab.area, fw->data, fw->size); in avs_hda_load_basefw() 416 snd_hdac_dsp_cleanup(hstream, &dmab); in avs_hda_load_basefw() 426 struct snd_dma_buffer dmab; in avs_hda_load_library() local 444 ret = snd_hdac_dsp_prepare(stream, sdfmt, lib->size, &dmab); in avs_hda_load_library() 452 memcpy(dmab.area, lib->data, lib->size); in avs_hda_load_library() 467 snd_hdac_dsp_cleanup(stream, &dmab); in avs_hda_load_library()
|
D | icl.c | 136 struct snd_dma_buffer dmab; in avs_icl_load_basefw() local 162 ret = snd_hdac_dsp_prepare(hdac_stream(host_stream), sd_fmt, fw->size, &dmab); in avs_icl_load_basefw() 178 snd_hdac_dsp_cleanup(hdac_stream(host_stream), &dmab); in avs_icl_load_basefw()
|
D | cldma.c | 207 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.12.1/sound/soc/intel/common/ |
D | sst-dsp-priv.h | 98 struct snd_dma_buffer dmab; member
|