*参照元 [#d472946d] #backlinks *説明 [#a3272506] -パス: [[linux-4.4.1/sound/soc/soc-generic-dmaengine-pcm.c]] -FIXME: これは何? --説明 **引数 [#d94ed0b7] -struct snd_pcm_substream *substream -- --[[linux-4.4.1/snd_pcm_substream]] -struct snd_pcm_hw_params *params -- --[[linux-4.4.1/snd_pcm_hw_params]] -struct dma_slave_config *slave_config -- --[[linux-4.4.1/dma_slave_config]] **返り値 [#j5b4d292] -int -- **参考 [#r9560b12] *実装 [#z078db63] /** * snd_dmaengine_pcm_prepare_slave_config() - Generic prepare_slave_config callback * @substream: PCM substream * @params: hw_params * @slave_config: DMA slave config to prepare * * This function can be used as a generic prepare_slave_config callback for * platforms which make use of the snd_dmaengine_dai_dma_data struct for their * DAI DMA data. Internally the function will first call * snd_hwparams_to_dma_slave_config to fill in the slave config based on the * hw_params, followed by snd_dmaengine_set_config_from_dai_data to fill in the * remaining fields based on the DAI DMA data. */ int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_dmaengine_dai_dma_data *dma_data; int ret; - --[[linux-4.4.1/snd_soc_pcm_runtime]] --[[linux-4.4.1/snd_dmaengine_dai_dma_data]] dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); - --[[linux-4.4.1/snd_soc_dai_get_dma_data()]] ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config); if (ret) return ret; - --[[linux-4.4.1/snd_hwparams_to_dma_slave_config()]] snd_dmaengine_pcm_set_config_from_dai_data(substream, dma_data, slave_config); - --[[linux-4.4.1/snd_dmaengine_pcm_set_config_from_dai_data()]] return 0; } EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_prepare_slave_config); - --[[linux-4.4.1/EXPORT_SYMBOL_GPL()]] *コメント [#t4058674]