/sound/core/ |
D | memalloc.c | 26 static void snd_malloc_dev_pages(struct snd_dma_buffer *dmab, size_t size) in snd_malloc_dev_pages() argument 34 dmab->area = dma_alloc_coherent(dmab->dev.dev, size, &dmab->addr, in snd_malloc_dev_pages() 37 if (dmab->area && dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC) in snd_malloc_dev_pages() 38 set_memory_wc((unsigned long)dmab->area, in snd_malloc_dev_pages() 44 static void snd_free_dev_pages(struct snd_dma_buffer *dmab) in snd_free_dev_pages() argument 47 if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC) in snd_free_dev_pages() 48 set_memory_wb((unsigned long)dmab->area, in snd_free_dev_pages() 49 PAGE_ALIGN(dmab->bytes) >> PAGE_SHIFT); in snd_free_dev_pages() 51 dma_free_coherent(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); in snd_free_dev_pages() 62 static void snd_malloc_dev_iram(struct snd_dma_buffer *dmab, size_t size) in snd_malloc_dev_iram() argument [all …]
|
D | sgbuf.c | 20 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) in snd_free_sgbuf_pages() argument 22 struct snd_sg_buf *sgbuf = dmab->private_data; in snd_free_sgbuf_pages() 29 vunmap(dmab->area); in snd_free_sgbuf_pages() 30 dmab->area = NULL; in snd_free_sgbuf_pages() 33 if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_UC_SG) in snd_free_sgbuf_pages() 48 dmab->private_data = NULL; in snd_free_sgbuf_pages() 56 size_t size, struct snd_dma_buffer *dmab, in snd_malloc_sgbuf_pages() argument 67 dmab->area = NULL; in snd_malloc_sgbuf_pages() 68 dmab->addr = 0; in snd_malloc_sgbuf_pages() 69 dmab->private_data = sgbuf = kzalloc(sizeof(*sgbuf), GFP_KERNEL); in snd_malloc_sgbuf_pages() [all …]
|
D | pcm_memory.c | 38 struct snd_dma_buffer *dmab = &substream->dma_buffer; in preallocate_pcm_pages() local 43 if ((err = snd_dma_alloc_pages(dmab->dev.type, dmab->dev.dev, in preallocate_pcm_pages() 44 size, dmab)) < 0) { in preallocate_pcm_pages() 51 dmab->bytes = 0; /* tell error */ in preallocate_pcm_pages() 293 struct snd_dma_buffer *dmab = NULL; in snd_pcm_lib_malloc_pages() local 314 dmab = &substream->dma_buffer; /* use the pre-allocated buffer */ in snd_pcm_lib_malloc_pages() 316 dmab = kzalloc(sizeof(*dmab), GFP_KERNEL); in snd_pcm_lib_malloc_pages() 317 if (! dmab) in snd_pcm_lib_malloc_pages() 319 dmab->dev = substream->dma_buffer.dev; in snd_pcm_lib_malloc_pages() 322 size, dmab) < 0) { in snd_pcm_lib_malloc_pages() [all …]
|
/sound/soc/sof/intel/ |
D | hda-loader.c | 27 unsigned int size, struct snd_dma_buffer *dmab, in cl_stream_prepare() argument 50 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG, &pci->dev, size, dmab); in cl_stream_prepare() 60 ret = hda_dsp_stream_hw_params(sdev, dsp_stream, dmab, NULL); in cl_stream_prepare() 71 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 231 snd_dma_free_pages(dmab); in cl_cleanup() 232 dmab->area = NULL; in cl_cleanup() 285 &sdev->dmab, SNDRV_PCM_STREAM_PLAYBACK); in hda_dsp_cl_boot_firmware() 303 memcpy(sdev->dmab.area, stripped_firmware.data, in hda_dsp_cl_boot_firmware() 345 ret1 = cl_cleanup(sdev, &sdev->dmab, stream); in hda_dsp_cl_boot_firmware()
|
D | hda-stream.c | 29 struct snd_dma_buffer *dmab, in hda_setup_bdle() argument 46 addr = snd_sgbuf_get_addr(dmab, offset); in hda_setup_bdle() 51 chunk = snd_sgbuf_get_chunk_size(dmab, offset, size); in hda_setup_bdle() 80 struct snd_dma_buffer *dmab, in hda_dsp_stream_setup_bdl() argument 116 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl() 120 offset = hda_setup_bdle(sdev, dmab, in hda_dsp_stream_setup_bdl() 322 struct snd_dma_buffer *dmab, in hda_dsp_stream_hw_params() argument 343 if (!dmab) { in hda_dsp_stream_hw_params() 431 ret = hda_dsp_stream_setup_bdl(sdev, dmab, hstream); in hda_dsp_stream_hw_params()
|
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 | 91 struct snd_dma_buffer *dmab; in hda_dsp_pcm_hw_params() local 101 dmab = substream->runtime->dma_buffer_p; in hda_dsp_pcm_hw_params() 110 ret = hda_dsp_stream_hw_params(sdev, stream, dmab, params); in hda_dsp_pcm_hw_params()
|
D | hda.h | 495 struct snd_dma_buffer *dmab, 502 struct snd_dma_buffer *dmab,
|
/sound/pci/emu10k1/ |
D | memory.c | 375 struct snd_dma_buffer *dmab) in snd_emu10k1_alloc_pages_maybe_wider() argument 390 snd_dma_pci_data(emu->pci), 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 = snd_dma_pci_data(emu->pci); 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 …]
|
/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() 411 spdifrx->dmab = devm_kzalloc(dev, sizeof(struct snd_dma_buffer), in stm32_spdifrx_dma_ctrl_register() 413 if (!spdifrx->dmab) in stm32_spdifrx_dma_ctrl_register() 416 spdifrx->dmab->dev.type = SNDRV_DMA_TYPE_DEV_IRAM; in stm32_spdifrx_dma_ctrl_register() 417 spdifrx->dmab->dev.dev = dev; in stm32_spdifrx_dma_ctrl_register() 418 ret = snd_dma_alloc_pages(spdifrx->dmab->dev.type, dev, in stm32_spdifrx_dma_ctrl_register() 419 SPDIFRX_CSR_BUF_LENGTH, spdifrx->dmab); in stm32_spdifrx_dma_ctrl_register() [all …]
|
/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()
|
/sound/soc/intel/haswell/ |
D | sst-haswell-pcm.c | 134 struct snd_dma_buffer dmab[HSW_PCM_COUNT][2]; member 434 struct snd_dma_buffer *dmab = snd_pcm_get_dma_buf(substream); in create_adsp_page_table() local 444 u32 pfn = snd_sgbuf_get_addr(dmab, i * PAGE_SIZE) >> PAGE_SHIFT; in create_adsp_page_table() 449 pg_table = (u32 *)(pdata->dmab[pcm][stream].area + idx); in create_adsp_page_table() 472 struct snd_dma_buffer *dmab; in hsw_pcm_hw_params() local 602 dmab = snd_pcm_get_dma_buf(substream); in hsw_pcm_hw_params() 618 pdata->dmab[rtd->cpu_dai->id][substream->stream].addr, in hsw_pcm_hw_params() 620 snd_sgbuf_get_addr(dmab, 0) >> PAGE_SHIFT); in hsw_pcm_hw_params() 1065 PAGE_SIZE, &priv_data->dmab[i][0]); in hsw_pcm_probe() 1074 PAGE_SIZE, &priv_data->dmab[i][1]); in hsw_pcm_probe() [all …]
|
/sound/hda/ |
D | hdac_stream.c | 389 struct snd_dma_buffer *dmab, in setup_bdle() argument 402 addr = snd_sgbuf_get_addr(dmab, ofs); in setup_bdle() 407 chunk = snd_sgbuf_get_chunk_size(dmab, ofs, size); in setup_bdle() 769 struct snd_dma_buffer *dmab) in snd_hdac_dsp_cleanup() argument 773 if (!dmab->area || !azx_dev->locked) in snd_hdac_dsp_cleanup() 785 snd_dma_free_pages(dmab); in snd_hdac_dsp_cleanup() 786 dmab->area = NULL; in snd_hdac_dsp_cleanup()
|
/sound/soc/sof/ |
D | core.c | 206 struct snd_dma_buffer *dmab, in snd_sof_create_page_table() argument 214 dmab->area, size, pages); in snd_sof_create_page_table() 225 u32 pfn = snd_sgbuf_get_addr(dmab, i * PAGE_SIZE) >> PAGE_SHIFT; in snd_sof_create_page_table()
|
D | sof-priv.h | 413 struct snd_dma_buffer dmab; member 471 struct snd_dma_buffer *dmab,
|
D | pcm.c | 30 struct snd_dma_buffer *dmab = snd_pcm_get_dma_buf(substream); in create_page_table() local 37 return snd_sof_create_page_table(sdev, dmab, in create_page_table()
|
/sound/pci/rme9652/ |
D | rme9652.c | 280 static int snd_hammerfall_get_buffer(struct pci_dev *pci, struct snd_dma_buffer *dmab, size_t size) in snd_hammerfall_get_buffer() argument 282 dmab->dev.type = SNDRV_DMA_TYPE_DEV; in snd_hammerfall_get_buffer() 283 dmab->dev.dev = snd_dma_pci_data(pci); in snd_hammerfall_get_buffer() 285 size, dmab) < 0) in snd_hammerfall_get_buffer() 290 static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_dev *pci) in snd_hammerfall_free_buffer() argument 292 if (dmab->area) in snd_hammerfall_free_buffer() 293 snd_dma_free_pages(dmab); in snd_hammerfall_free_buffer()
|
D | hdsp.c | 570 static int snd_hammerfall_get_buffer(struct pci_dev *pci, struct snd_dma_buffer *dmab, size_t size) in snd_hammerfall_get_buffer() argument 572 dmab->dev.type = SNDRV_DMA_TYPE_DEV; in snd_hammerfall_get_buffer() 573 dmab->dev.dev = snd_dma_pci_data(pci); in snd_hammerfall_get_buffer() 575 size, dmab) < 0) in snd_hammerfall_get_buffer() 580 static void snd_hammerfall_free_buffer(struct snd_dma_buffer *dmab, struct pci_dev *pci) in snd_hammerfall_free_buffer() argument 582 if (dmab->area) in snd_hammerfall_free_buffer() 583 snd_dma_free_pages(dmab); in snd_hammerfall_free_buffer()
|
/sound/soc/intel/common/ |
D | sst-dsp-priv.h | 315 struct snd_dma_buffer dmab; member
|
/sound/pci/hda/ |
D | hda_controller.c | 1060 struct snd_dma_buffer *dmab) in snd_hda_codec_load_dsp_cleanup() argument 1067 if (!dmab->area || !hstr->locked) in snd_hda_codec_load_dsp_cleanup() 1070 snd_hdac_dsp_cleanup(hstr, dmab); in snd_hda_codec_load_dsp_cleanup()
|
D | patch_ca0132.c | 2603 struct snd_dma_buffer *dmab; member 2638 if (dma->dmab->area) in dma_reset() 2639 snd_hda_codec_load_dsp_cleanup(codec, dma->dmab); in dma_reset() 2644 dma->dmab); in dma_reset() 2672 return dma->dmab->bytes; in dma_get_buffer_size() 2677 return dma->dmab->area; in dma_get_buffer_addr() 2684 memcpy(dma->dmab->area, data, count); in dma_xfer() 3009 dma_engine->dmab = kzalloc(sizeof(*dma_engine->dmab), GFP_KERNEL); in dspxfr_image() 3010 if (!dma_engine->dmab) { in dspxfr_image() 3034 dma_engine->dmab); in dspxfr_image() [all …]
|