/* * prepare DMA for pcm */ int i2s_dma_prepare(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct sep0611_runtime_data *prtd = runtime->private_data; struct dma_info *p_dma_info; unsigned long i2s_fifo_width = 1; /* 16 bits in default */ int ret; /* we need call the i2s_dma_prepare after set hw_params, such as in pcm_prepare */ if(runtime->format == 0){ printk("ERR:please ensure the hw_params has been set correctly\n"); return -EINVAL; } p_dma_info = kmalloc(sizeof(struct dma_info), GFP_KERNEL); if(!p_dma_info){ return -ENOMEM; } if(substream->stream == SNDRV_PCM_STREAM_PLAYBACK){ p_dma_info->trans_type = MEM_TO_DEV; p_dma_info->src_addr = prtd->dma_buffer; p_dma_info->dst_addr = I2S_BASE + I2
ALSA 驱动中dma的配置
最新推荐文章于 2024-11-25 22:53:22 发布