/kernel/linux/linux-5.10/sound/core/ |
D | memalloc.c | 27 static void snd_malloc_dev_pages(struct snd_dma_buffer *dmab, size_t size) in snd_malloc_dev_pages() argument 35 dmab->area = dma_alloc_coherent(dmab->dev.dev, size, &dmab->addr, in snd_malloc_dev_pages() 38 if (dmab->area && dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC) in snd_malloc_dev_pages() 39 set_memory_wc((unsigned long)dmab->area, in snd_malloc_dev_pages() 45 static void snd_free_dev_pages(struct snd_dma_buffer *dmab) in snd_free_dev_pages() argument 48 if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC) in snd_free_dev_pages() 49 set_memory_wb((unsigned long)dmab->area, in snd_free_dev_pages() 50 PAGE_ALIGN(dmab->bytes) >> PAGE_SHIFT); in snd_free_dev_pages() 52 dma_free_coherent(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); in snd_free_dev_pages() 63 static void snd_malloc_dev_iram(struct snd_dma_buffer *dmab, size_t size) in snd_malloc_dev_iram() argument [all …]
|
D | sgbuf.c | 19 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) in snd_free_sgbuf_pages() argument 21 struct snd_sg_buf *sgbuf = dmab->private_data; in snd_free_sgbuf_pages() 28 vunmap(dmab->area); in snd_free_sgbuf_pages() 29 dmab->area = NULL; in snd_free_sgbuf_pages() 32 if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC_SG) in snd_free_sgbuf_pages() 47 dmab->private_data = NULL; in snd_free_sgbuf_pages() 55 size_t size, struct snd_dma_buffer *dmab, in snd_malloc_sgbuf_pages() argument 66 dmab->area = NULL; in snd_malloc_sgbuf_pages() 67 dmab->addr = 0; in snd_malloc_sgbuf_pages() 68 dmab->private_data = sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL); in snd_malloc_sgbuf_pages() [all …]
|
D | pcm_memory.c | 35 size_t size, struct snd_dma_buffer *dmab) in do_alloc_pages() argument 43 err = snd_dma_alloc_pages(type, dev, size, dmab); in do_alloc_pages() 46 card->total_pcm_alloc_bytes += dmab->bytes; in do_alloc_pages() 52 static void do_free_pages(struct snd_card *card, struct snd_dma_buffer *dmab) in do_free_pages() argument 54 if (!dmab->area) in do_free_pages() 57 WARN_ON(card->total_pcm_alloc_bytes < dmab->bytes); in do_free_pages() 58 card->total_pcm_alloc_bytes -= dmab->bytes; in do_free_pages() 60 snd_dma_free_pages(dmab); in do_free_pages() 61 dmab->area = NULL; in do_free_pages() 72 struct snd_dma_buffer *dmab = &substream->dma_buffer; in preallocate_pcm_pages() local [all …]
|
D | compress_offload.c | 493 struct snd_dma_buffer *dmab; in snd_compr_malloc_pages() local 498 dmab = kzalloc(sizeof(*dmab), GFP_KERNEL); in snd_compr_malloc_pages() 499 if (!dmab) in snd_compr_malloc_pages() 501 dmab->dev = stream->dma_buffer.dev; in snd_compr_malloc_pages() 502 ret = snd_dma_alloc_pages(dmab->dev.type, dmab->dev.dev, size, dmab); in snd_compr_malloc_pages() 504 kfree(dmab); in snd_compr_malloc_pages() 508 snd_compr_set_runtime_buffer(stream, dmab); in snd_compr_malloc_pages()
|
/kernel/linux/linux-5.10/include/sound/ |
D | memalloc.h | 72 size_t size, struct snd_dma_buffer *dmab, 74 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab); 93 static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, in snd_sgbuf_get_addr() argument 96 struct snd_sg_buf *sgbuf = dmab->private_data; in snd_sgbuf_get_addr() 100 return dmab->addr + offset; in snd_sgbuf_get_addr() 109 static inline void *snd_sgbuf_get_ptr(struct snd_dma_buffer *dmab, in snd_sgbuf_get_ptr() argument 112 struct snd_sg_buf *sgbuf = dmab->private_data; in snd_sgbuf_get_ptr() 115 return dmab->area + offset; in snd_sgbuf_get_ptr() 119 unsigned int snd_sgbuf_get_chunk_size(struct snd_dma_buffer *dmab, 123 static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, in snd_sgbuf_get_addr() argument [all …]
|
D | hda_codec.h | 516 struct snd_dma_buffer *dmab); 529 struct snd_dma_buffer *dmab) {} in snd_hda_codec_load_dsp_cleanup() argument
|
D | hdaudio.h | 617 struct snd_dma_buffer *dmab); 636 struct snd_dma_buffer *dmab) in snd_hdac_dsp_cleanup() argument
|
/kernel/linux/linux-5.10/sound/soc/sof/intel/ |
D | hda-loader.c | 29 unsigned int size, struct snd_dma_buffer *dmab, in cl_stream_prepare() argument 47 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, &pci->dev, size, dmab); in cl_stream_prepare() 58 ret = hda_dsp_iccmax_stream_hw_params(sdev, dsp_stream, dmab, NULL); in cl_stream_prepare() 64 ret = hda_dsp_stream_hw_params(sdev, dsp_stream, dmab, NULL); in cl_stream_prepare() 76 snd_dma_free_pages(dmab); in cl_stream_prepare() 210 static int cl_cleanup(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab, in cl_cleanup() argument 234 snd_dma_free_pages(dmab); in cl_cleanup() 235 dmab->area = NULL; in cl_cleanup() 354 &sdev->dmab, SNDRV_PCM_STREAM_PLAYBACK); in hda_dsp_cl_boot_firmware() 360 memcpy(sdev->dmab.area, stripped_firmware.data, in hda_dsp_cl_boot_firmware() [all …]
|
D | hda-compress.c | 66 struct snd_dma_buffer *dmab; in hda_probe_compr_set_params() local 70 dmab = cstream->runtime->dma_buffer_p; in hda_probe_compr_set_params() 83 ret = hda_dsp_stream_hw_params(sdev, stream, dmab, NULL); in hda_probe_compr_set_params()
|
D | hda-stream.c | 32 struct snd_dma_buffer *dmab, in hda_setup_bdle() argument 49 addr = snd_sgbuf_get_addr(dmab, offset); in hda_setup_bdle() 54 chunk = snd_sgbuf_get_chunk_size(dmab, offset, size); in hda_setup_bdle() 83 struct snd_dma_buffer *dmab, in hda_dsp_stream_setup_bdl() argument 119 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl() 123 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl() 329 struct snd_dma_buffer *dmab, in hda_dsp_iccmax_stream_hw_params() argument 356 ret = hda_dsp_stream_setup_bdl(sdev, dmab, hstream); in hda_dsp_iccmax_stream_hw_params() 400 struct snd_dma_buffer *dmab, in hda_dsp_stream_hw_params() argument 421 if (!dmab) { in hda_dsp_stream_hw_params() [all …]
|
D | hda-trace.c | 27 struct snd_dma_buffer *dmab = &sdev->dmatb; in hda_dsp_trace_prepare() local 33 ret = hda_dsp_stream_hw_params(sdev, stream, dmab, NULL); in hda_dsp_trace_prepare()
|
D | hda-pcm.c | 92 struct snd_dma_buffer *dmab; in hda_dsp_pcm_hw_params() local 103 dmab = substream->runtime->dma_buffer_p; in hda_dsp_pcm_hw_params() 112 ret = hda_dsp_stream_hw_params(sdev, stream, dmab, params); in hda_dsp_pcm_hw_params()
|
D | hda.h | 547 struct snd_dma_buffer *dmab, 550 struct snd_dma_buffer *dmab, 556 struct snd_dma_buffer *dmab,
|
/kernel/linux/linux-5.10/sound/pci/emu10k1/ |
D | memory.c | 375 struct snd_dma_buffer *dmab) in snd_emu10k1_alloc_pages_maybe_wider() argument 390 &emu->pci->dev, size, dmab); in snd_emu10k1_alloc_pages_maybe_wider() 476 struct snd_dma_buffer dmab; in __synth_free_pages() local 479 dmab.dev.type = SNDRV_DMA_TYPE_DEV; in __synth_free_pages() 480 dmab.dev.dev = &emu->pci->dev; in __synth_free_pages() 485 dmab.area = emu->page_ptr_table[page]; in __synth_free_pages() 486 dmab.addr = emu->page_addr_table[page]; in __synth_free_pages() 492 dmab.bytes = PAGE_SIZE; in __synth_free_pages() 494 dmab.bytes *= 2; in __synth_free_pages() 496 snd_dma_free_pages(&dmab); in __synth_free_pages() [all …]
|
/kernel/linux/linux-5.10/drivers/scsi/lpfc/ |
D | lpfc_mem.c | 578 lpfc_sli4_rb_free(struct lpfc_hba *phba, struct hbq_dmabuf *dmab) in lpfc_sli4_rb_free() argument 580 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_rb_free() 581 dma_pool_free(phba->lpfc_drb_pool, dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_rb_free() 582 kfree(dmab); in lpfc_sli4_rb_free() 636 lpfc_sli4_nvmet_free(struct lpfc_hba *phba, struct rqb_dmabuf *dmab) in lpfc_sli4_nvmet_free() argument 638 dma_pool_free(phba->lpfc_hrb_pool, dmab->hbuf.virt, dmab->hbuf.phys); in lpfc_sli4_nvmet_free() 640 dmab->dbuf.virt, dmab->dbuf.phys); in lpfc_sli4_nvmet_free() 641 kfree(dmab); in lpfc_sli4_nvmet_free()
|
/kernel/linux/linux-5.10/sound/soc/stm/ |
D | stm32_spdifrx.c | 237 struct snd_dma_buffer *dmab; member 254 u32 *p_start = (u32 *)spdifrx->dmab->area; in stm32_spdifrx_dma_complete() 264 if (!spdifrx->dmab->area) in stm32_spdifrx_dma_complete() 297 spdifrx->dmab->addr, in stm32_spdifrx_dma_ctrl_start() 415 spdifrx->dmab = devm_kzalloc(dev, sizeof(struct snd_dma_buffer), in stm32_spdifrx_dma_ctrl_register() 417 if (!spdifrx->dmab) in stm32_spdifrx_dma_ctrl_register() 420 spdifrx->dmab->dev.type = SNDRV_DMA_TYPE_DEV_IRAM; in stm32_spdifrx_dma_ctrl_register() 421 spdifrx->dmab->dev.dev = dev; in stm32_spdifrx_dma_ctrl_register() 422 ret = snd_dma_alloc_pages(spdifrx->dmab->dev.type, dev, in stm32_spdifrx_dma_ctrl_register() 423 SPDIFRX_CSR_BUF_LENGTH, spdifrx->dmab); in stm32_spdifrx_dma_ctrl_register() [all …]
|
/kernel/linux/linux-5.10/sound/soc/sof/ |
D | utils.c | 123 struct snd_dma_buffer *dmab, in snd_sof_create_page_table() argument 131 dmab->area, size, pages); in snd_sof_create_page_table() 142 u32 pfn = snd_sgbuf_get_addr(dmab, i * PAGE_SIZE) >> PAGE_SHIFT; in snd_sof_create_page_table()
|
D | sof-priv.h | 405 struct snd_dma_buffer dmab; member 467 struct snd_dma_buffer *dmab,
|
/kernel/linux/linux-5.10/sound/soc/intel/skylake/ |
D | bxt-sst.c | 48 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()
|
D | skl-sst-dsp.h | 159 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,
|
D | cnl-sst.c | 51 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()
|
D | skl-messages.c | 26 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() 72 unsigned int size, struct snd_dma_buffer *dmab) in skl_dsp_prepare() argument 94 ret = snd_hdac_dsp_prepare(stream, format, size, dmab); in skl_dsp_prepare() 122 struct snd_dma_buffer *dmab, int stream_tag) in skl_dsp_cleanup() argument 140 snd_hdac_dsp_cleanup(stream, dmab); in skl_dsp_cleanup()
|
/kernel/linux/linux-5.10/sound/hda/ |
D | hdac_stream.c | 367 struct snd_dma_buffer *dmab, in setup_bdle() argument 380 addr = snd_sgbuf_get_addr(dmab, ofs); in setup_bdle() 385 chunk = snd_sgbuf_get_chunk_size(dmab, ofs, size); in setup_bdle() 756 struct snd_dma_buffer *dmab) in snd_hdac_dsp_cleanup() argument 760 if (!dmab->area || !azx_dev->locked) in snd_hdac_dsp_cleanup() 772 snd_dma_free_pages(dmab); in snd_hdac_dsp_cleanup() 773 dmab->area = NULL; in snd_hdac_dsp_cleanup()
|
/kernel/linux/linux-5.10/sound/soc/intel/common/ |
D | sst-dsp-priv.h | 98 struct snd_dma_buffer dmab; member
|
/kernel/linux/linux-5.10/sound/soc/intel/catpt/ |
D | pcm.c | 336 struct snd_dma_buffer *dmab; in catpt_dai_hw_params() local 352 dmab = snd_pcm_get_dma_buf(substream); in catpt_dai_hw_params() 360 rinfo.ring_first_page_pfn = PFN_DOWN(snd_sgbuf_get_addr(dmab, 0)); in catpt_dai_hw_params()
|