|
@@ -263,7 +263,6 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd)
|
|
struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform);
|
|
struct dmaengine_pcm *pcm = soc_platform_to_pcm(rtd->platform);
|
|
const struct snd_dmaengine_pcm_config *config = pcm->config;
|
|
const struct snd_dmaengine_pcm_config *config = pcm->config;
|
|
struct device *dev = rtd->platform->dev;
|
|
struct device *dev = rtd->platform->dev;
|
|
- struct snd_dmaengine_dai_dma_data *dma_data;
|
|
|
|
struct snd_pcm_substream *substream;
|
|
struct snd_pcm_substream *substream;
|
|
size_t prealloc_buffer_size;
|
|
size_t prealloc_buffer_size;
|
|
size_t max_buffer_size;
|
|
size_t max_buffer_size;
|
|
@@ -278,19 +277,11 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd)
|
|
max_buffer_size = SIZE_MAX;
|
|
max_buffer_size = SIZE_MAX;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
|
|
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
|
|
substream = rtd->pcm->streams[i].substream;
|
|
substream = rtd->pcm->streams[i].substream;
|
|
if (!substream)
|
|
if (!substream)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
|
|
|
|
-
|
|
|
|
- if (!pcm->chan[i] &&
|
|
|
|
- (pcm->flags & SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME))
|
|
|
|
- pcm->chan[i] = dma_request_slave_channel(dev,
|
|
|
|
- dma_data->chan_name);
|
|
|
|
-
|
|
|
|
if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) {
|
|
if (!pcm->chan[i] && (pcm->flags & SND_DMAENGINE_PCM_FLAG_COMPAT)) {
|
|
pcm->chan[i] = dmaengine_pcm_compat_request_channel(rtd,
|
|
pcm->chan[i] = dmaengine_pcm_compat_request_channel(rtd,
|
|
substream);
|
|
substream);
|
|
@@ -359,9 +350,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
|
|
const char *name;
|
|
const char *name;
|
|
struct dma_chan *chan;
|
|
struct dma_chan *chan;
|
|
|
|
|
|
- if ((pcm->flags & (SND_DMAENGINE_PCM_FLAG_NO_DT |
|
|
|
|
- SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME)) ||
|
|
|
|
- !dev->of_node)
|
|
|
|
|
|
+ if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_DT) || !dev->of_node)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
if (config && config->dma_dev) {
|
|
if (config && config->dma_dev) {
|