mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
SoC: soc-pcm: call pcm_new when creating new pcm
Call pcm_new when creating a new PCM to settup coherent dma mask. Change-Id: Ic3e906df4b9acbe0497241352e710442086b27d9 Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
567264c6cb
commit
1a80306d3d
1 changed files with 19 additions and 0 deletions
|
|
@ -2823,6 +2823,9 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
|
|||
{
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
||||
#ifdef CONFIG_AUDIO_QGKI
|
||||
struct snd_soc_component *component;
|
||||
#endif
|
||||
struct snd_soc_rtdcom_list *rtdcom;
|
||||
struct snd_pcm *pcm;
|
||||
char new_name[64];
|
||||
|
|
@ -2911,6 +2914,22 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
|
|||
pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd;
|
||||
if (capture)
|
||||
pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd;
|
||||
#ifdef CONFIG_AUDIO_QGKI
|
||||
for_each_rtdcom(rtd, rtdcom) {
|
||||
component = rtdcom->component;
|
||||
|
||||
if (!component->driver->pcm_new)
|
||||
continue;
|
||||
|
||||
ret = component->driver->pcm_new(rtd);
|
||||
if (ret < 0) {
|
||||
dev_err(component->dev,
|
||||
"ASoC: pcm constructor failed: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue