| /linux/sound/core/ |
| H A 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 …]
|
| H A 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 …]
|
| H A D | compress_offload.c | 537 struct snd_dma_buffer *dmab; in snd_compr_malloc_pages() local 542 dmab = kzalloc_obj(*dmab); in snd_compr_malloc_pages() 543 if (!dmab) in snd_compr_malloc_pages() 545 dmab->dev = stream->dma_buffer.dev; in snd_compr_malloc_pages() 546 ret = snd_dma_alloc_pages(dmab->dev.type, dmab->dev.dev, size, dmab); in snd_compr_malloc_pages() 548 kfree(dmab); in snd_compr_malloc_pages() 552 snd_compr_set_runtime_buffer(stream, dmab); in snd_compr_malloc_pages()
|
| /linux/include/sound/ |
| H A 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 …]
|
| H A D | hdaudio.h | 663 struct snd_dma_buffer *dmab); 682 struct snd_dma_buffer *dmab) in snd_hdac_dsp_cleanup() argument
|
| /linux/sound/soc/sof/intel/ |
| H A 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 …]
|
| H A 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()
|
| H A D | hda-loader.c | 53 struct snd_dma_buffer *dmab, bool persistent_buffer, int direction, in hda_cl_prepare() argument 56 return hda_data_stream_prepare(dev, format, size, dmab, persistent_buffer, in hda_cl_prepare() 218 int hda_cl_cleanup(struct device *dev, struct snd_dma_buffer *dmab, in cl_dsp_init() 221 return hda_data_stream_cleanup(dev, dmab, persistent_buffer, hext_stream, false); in cl_dsp_init() 275 hda_cl_cleanup(struct device * dev,struct snd_dma_buffer * dmab,bool persistent_buffer,struct hdac_ext_stream * hext_stream) hda_cl_cleanup() argument
|
| H A 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 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() 480 struct snd_dma_buffer *dmab, in hda_dsp_iccmax_stream_hw_params() 493 if (!dmab) { in hda_dsp_iccmax_stream_hw_params() 511 ret = hda_dsp_stream_setup_bdl(sdev, dmab, hstrea in hda_dsp_iccmax_stream_hw_params() 445 hda_dsp_iccmax_stream_hw_params(struct snd_sof_dev * sdev,struct hdac_ext_stream * hext_stream,struct snd_dma_buffer * dmab,struct snd_pcm_hw_params * params) hda_dsp_iccmax_stream_hw_params() argument 521 hda_dsp_stream_hw_params(struct snd_sof_dev * sdev,struct hdac_ext_stream * hext_stream,struct snd_dma_buffer * dmab,struct snd_pcm_hw_params * params) hda_dsp_stream_hw_params() argument [all...] |
| H A D | hda-pcm.c | 109 struct snd_dma_buffer *dmab; in hda_dsp_pcm_hw_params() local 114 dmab = substream->runtime->dma_buffer_p; in hda_dsp_pcm_hw_params() 133 ret = hda_dsp_stream_hw_params(sdev, hext_stream, dmab, params); in hda_dsp_pcm_hw_params()
|
| /linux/sound/hda/core/ |
| H A D | stream.c | 452 struct snd_dma_buffer *dmab, in setup_bdle() argument 465 addr = snd_sgbuf_get_addr(dmab, ofs); in setup_bdle() 470 chunk = snd_sgbuf_get_chunk_size(dmab, ofs, size); in setup_bdle() 501 static int snd_hdac_stream_setup_bdle(struct hdac_stream *azx_dev, struct snd_dma_buffer *dmab, in snd_hdac_stream_setup_bdle() argument 535 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_bdle() 545 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_bdle() 548 ofs = setup_bdle(bus, dmab, azx_dev, in snd_hdac_stream_setup_bdle() 574 struct snd_dma_buffer *dmab; in snd_hdac_stream_setup_periods() local 578 dmab = snd_pcm_get_dma_buf(substream); in snd_hdac_stream_setup_periods() 580 dmab = snd_pcm_get_dma_buf(cstream); in snd_hdac_stream_setup_periods() [all …]
|
| /linux/drivers/scsi/lpfc/ |
| H A D | lpfc_mem.c | 599 lpfc_sli4_rb_free(struct lpfc_hba *phba, struct hbq_dmabuf *dmab) in lpfc_sli4_rb_free() argument 601 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_rb_free() 602 dma_pool_free(phba->lpfc_drb_pool, dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_rb_free() 603 kfree(dmab); in lpfc_sli4_rb_free() 657 lpfc_sli4_nvmet_free(struct lpfc_hba *phba, struct rqb_dmabuf *dmab) in lpfc_sli4_nvmet_free() argument 659 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_nvmet_free() 661 dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_nvmet_free() 662 kfree(dmab); in lpfc_sli4_nvmet_free()
|
| /linux/sound/soc/sof/ |
| H A 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()
|
| H A D | sof-utils.h | 16 struct snd_dma_buffer *dmab,
|
| H A D | compress.c | 82 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()
|
| H A D | pcm.c | 194 struct snd_dma_buffer *dmab = snd_pcm_get_dma_buf(substream); in sof_pcm_stream_free() 196 ret = snd_sof_create_page_table(component->dev, dmab, in sof_pcm_stream_free() 153 struct snd_dma_buffer *dmab = snd_pcm_get_dma_buf(substream); sof_pcm_hw_params() local
|
| /linux/sound/soc/sof/amd/ |
| H A 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()
|
| H A D | acp.h | 192 struct snd_dma_buffer *dmab; member 350 int acp_sof_trace_init(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,
|
| H A D | acp-pcm.c | 31 stream->dmab = substream->runtime->dma_buffer_p; in acp_pcm_hw_params()
|
| H A D | acp-stream.c | 107 addr = snd_sgbuf_get_addr(stream->dmab, page_idx * PAGE_SIZE); in acp_dsp_stream_config()
|
| /linux/sound/soc/intel/avs/ |
| H A D | loader.c | 363 struct snd_dma_buffer dmab; in avs_hda_load_basefw() local 381 ret = snd_hdac_dsp_prepare(hstream, sdfmt, fw->size, &dmab); in avs_hda_load_basefw() 391 memcpy(dmab.area, fw->data, fw->size); in avs_hda_load_basefw() 421 snd_hdac_dsp_cleanup(hstream, &dmab); in avs_hda_load_basefw() 431 struct snd_dma_buffer dmab; in avs_hda_load_library() local 449 ret = snd_hdac_dsp_prepare(stream, sdfmt, lib->size, &dmab); in avs_hda_load_library() 457 memcpy(dmab.area, lib->data, lib->size); in avs_hda_load_library() 472 snd_hdac_dsp_cleanup(stream, &dmab); in avs_hda_load_library()
|
| H A 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/sound/soc/fsl/ |
| H A D | fsl_asrc_m2m.c | 412 struct snd_dma_buffer *dmab = dmabuf->priv; in fsl_asrc_m2m_mmap() local 414 return snd_dma_buffer_mmap(dmab, vma); in fsl_asrc_m2m_mmap() 420 struct snd_dma_buffer *dmab = attachment->dmabuf->priv; in fsl_asrc_m2m_map_dma_buf() local 427 if (dma_get_sgtable(attachment->dev, sgt, dmab->area, dmab->addr, dmab->bytes) < 0) in fsl_asrc_m2m_map_dma_buf()
|
| /linux/sound/soc/intel/catpt/ |
| H A D | pcm.c | 372 struct snd_dma_buffer *dmab; in catpt_dai_hw_params() local 392 dmab = snd_pcm_get_dma_buf(substream); in catpt_dai_hw_params() 400 rinfo.ring_first_page_pfn = PFN_DOWN(snd_sgbuf_get_addr(dmab, 0)); in catpt_dai_hw_params()
|
| /linux/sound/hda/common/ |
| H A D | controller.c | 996 struct snd_dma_buffer *dmab) in snd_hda_codec_load_dsp_cleanup() argument 1003 if (!dmab->area || !hstr->locked) in snd_hda_codec_load_dsp_cleanup() 1006 snd_hdac_dsp_cleanup(hstr, dmab); in snd_hda_codec_load_dsp_cleanup()
|