ASoC: dmaengine: Extend use of chan_names provided in custom DMA config 38/197838/5
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 7 Feb 2019 17:00:10 +0000 (18:00 +0100)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Mon, 4 Mar 2019 17:05:33 +0000 (18:05 +0100)
commit8088d62a54972f6d3ff891965141c64425f383ac
treeb1d56178306d611958925839f186a4134f5ef3ce
parentb45cafeedc94cac52812333c6cc72b37333d27ba
ASoC: dmaengine: Extend use of chan_names provided in custom DMA config

There are currently two ways to specify custom DMA channel names:
 - through the SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag and
   snd_dmaengine_dai_dma_data data structure,
 - through chan_names field of struct snd_dmaengine_pcm_config.

In order to replace the DAI DMA data method with the custom DMA config
one on non-DT platforms the dmaengine_pcm_new() function is extended
to also consider channel names specified in the custom DMA config.
If both config->chan_names and dma_data->chan_name are provided
the former will be used.

Change-Id: I6a325754971c7d4daf3141f3cfeede9280d9941c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-generic-dmaengine-pcm.c