Home
last modified time | relevance | path

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

12

/linux/sound/core/
H A Dmemalloc.c22 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 …]
H A Dpcm_memory.c52 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 …]
H A Dcompress_offload.c513 struct snd_dma_buffer *dmab; in snd_compr_malloc_pages() local
518 dmab = kzalloc(sizeof(*dmab), GFP_KERNEL); in snd_compr_malloc_pages()
519 if (!dmab) in snd_compr_malloc_pages()
521 dmab->dev = stream->dma_buffer.dev; in snd_compr_malloc_pages()
522 ret = snd_dma_alloc_pages(dmab->dev.type, dmab->dev.dev, size, dmab); in snd_compr_malloc_pages()
524 kfree(dmab); in snd_compr_malloc_pages()
528 snd_compr_set_runtime_buffer(stream, dmab); in snd_compr_malloc_pages()
/linux/include/sound/
H A Dmemalloc.h74 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 …]
H A Dhda_codec.h514 struct snd_dma_buffer *dmab);
527 struct snd_dma_buffer *dmab) {} in snd_hda_codec_load_dsp_cleanup() argument
/linux/sound/soc/sof/intel/
H A 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 …]
H A 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()
H A Dhda-loader.c53 struct snd_dma_buffer *dmab, bool persistent_buffer, int direction, in hda_cl_prepare() argument
76 if (!persistent_buffer || !dmab->area) { in hda_cl_prepare()
77 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, dev, size, dmab); in hda_cl_prepare()
90 ret = hda_dsp_iccmax_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_prepare()
96 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, NULL); in hda_cl_prepare()
107 snd_dma_free_pages(dmab); in hda_cl_prepare()
108 dmab->area = NULL; in hda_cl_prepare()
109 dmab->bytes = 0; in hda_cl_prepare()
275 int hda_cl_cleanup(struct device *dev, struct snd_dma_buffer *dmab, in hda_cl_cleanup() argument
302 snd_dma_free_pages(dmab); in hda_cl_cleanup()
[all …]
H A Dhda-stream.c65 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
128 chunk_size = snd_sgbuf_get_chunk_size(dmab, 0, hstream->bufsize); in hda_dsp_stream_setup_bdl()
175 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl()
179 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl()
445 struct snd_dma_buffer *dmab, in hda_dsp_iccmax_stream_hw_params() argument
458 if (!dmab) { in hda_dsp_iccmax_stream_hw_params()
476 ret = hda_dsp_stream_setup_bdl(sdev, dmab, hstream); in hda_dsp_iccmax_stream_hw_params()
[all …]
H A 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()
H A Dhda-pcm.c107 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()
131 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, params); in hda_dsp_pcm_hw_params()
H A Dhda.h663 struct snd_dma_buffer *dmab,
667 struct snd_dma_buffer *dmab,
673 struct snd_dma_buffer *dmab,
725 unsigned int size, struct snd_dma_buffer *dmab,
730 int hda_cl_cleanup(struct device *dev, struct snd_dma_buffer *dmab,
813 int hda_dsp_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
/linux/sound/pci/emu10k1/
H A 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/drivers/scsi/lpfc/
H A Dlpfc_mem.c601 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/sound/soc/sof/
H A 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()
H A Dsof-utils.h16 struct snd_dma_buffer *dmab,
H A Dcompress.c82 struct snd_dma_buffer *dmab = cstream->runtime->dma_buffer_p; in create_page_table() local
91 return snd_sof_create_page_table(component->dev, dmab, in create_page_table()
/linux/sound/soc/sof/amd/
H A 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()
H A Dacp.h188 struct snd_dma_buffer *dmab; member
344 int acp_sof_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
H A Dacp-pcm.c31 stream->dmab = substream->runtime->dma_buffer_p; in acp_pcm_hw_params()
H A Dacp-probes.c79 stream->dmab = cstream->runtime->dma_buffer_p; in acp_probes_compr_set_params()
/linux/sound/soc/stm/
H A 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/sound/soc/intel/avs/
H A Dloader.c362 struct snd_dma_buffer dmab; in avs_hda_load_basefw()
380 ret = snd_hdac_dsp_prepare(hstream, sdfmt, fw->size, &dmab); in avs_hda_load_basefw()
390 memcpy(dmab.area, fw->data, fw->size); in avs_hda_load_basefw()
420 snd_hdac_dsp_cleanup(hstream, &dmab); in avs_hda_load_basefw()
430 struct snd_dma_buffer dmab; in avs_hda_load_library()
448 ret = snd_hdac_dsp_prepare(stream, sdfmt, lib->size, &dmab); in avs_hda_load_library()
456 memcpy(dmab.area, lib->data, lib->size); in avs_hda_load_library()
471 snd_hdac_dsp_cleanup(stream, &dmab); in avs_hda_load_library()
359 struct snd_dma_buffer dmab; avs_hda_load_basefw() local
426 struct snd_dma_buffer dmab; avs_hda_load_library() local
H A Dicl.c136 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()
H A 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