UPSTREAM: ASoC: dmaengine_pcm: add peripheral configuration
The commite7bbb7acab("dmaengine: add peripheral configuration") adds peripheral configuration for dma_slave_config. This configuration is useful for some audio peripherals, for example, the peripheral supports multi fifos, we can let the DMA know which fifos are selected. So also add this configuration for snd_dmaengine_dai_dma_data. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1612509985-11063-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Bug: 159736148 (cherry picked from commit500c9f8c58) Change-Id: Ib8fd722b382e8d605db9edee65ab16df014d63db Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
This commit is contained in:
parent
1dbf9d8dbc
commit
ce1a244af8
2 changed files with 7 additions and 0 deletions
|
|
@ -66,6 +66,9 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream)
|
|||
* @chan_name: Custom channel name to use when requesting DMA channel.
|
||||
* @fifo_size: FIFO size of the DAI controller in bytes
|
||||
* @flags: PCM_DAI flags, only SND_DMAENGINE_PCM_DAI_FLAG_PACK for now
|
||||
* @peripheral_config: peripheral configuration for programming peripheral
|
||||
* for dmaengine transfer
|
||||
* @peripheral_size: peripheral configuration buffer size
|
||||
*/
|
||||
struct snd_dmaengine_dai_dma_data {
|
||||
dma_addr_t addr;
|
||||
|
|
@ -76,6 +79,8 @@ struct snd_dmaengine_dai_dma_data {
|
|||
const char *chan_name;
|
||||
unsigned int fifo_size;
|
||||
unsigned int flags;
|
||||
void *peripheral_config;
|
||||
size_t peripheral_size;
|
||||
};
|
||||
|
||||
void snd_dmaengine_pcm_set_config_from_dai_data(
|
||||
|
|
|
|||
|
|
@ -125,6 +125,8 @@ void snd_dmaengine_pcm_set_config_from_dai_data(
|
|||
}
|
||||
|
||||
slave_config->slave_id = dma_data->slave_id;
|
||||
slave_config->peripheral_config = dma_data->peripheral_config;
|
||||
slave_config->peripheral_size = dma_data->peripheral_size;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_set_config_from_dai_data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue