Merge tag 'v3.13-rc3' into asoc-pcm
authorMark Brown <broonie@linaro.org>
Tue, 14 Jan 2014 20:41:53 +0000 (20:41 +0000)
committerMark Brown <broonie@linaro.org>
Tue, 14 Jan 2014 20:41:53 +0000 (20:41 +0000)
Linux 3.13-rc3

include/sound/soc.h
sound/soc/soc-pcm.c

index 1f741cb24f337c3e4662c2ff2cd45f78985c54c1..a5ef14f06124684bd52f611d52e1667e800a9e10 100644 (file)
@@ -886,6 +886,10 @@ struct snd_soc_dai_link {
        /* This DAI link can route to other DAI links at runtime (Frontend)*/
        unsigned int dynamic:1;
 
+       /* DPCM capture and Playback support */
+       unsigned int dpcm_capture:1;
+       unsigned int dpcm_playback:1;
+
        /* pmdown_time is ignored at stop */
        unsigned int ignore_pmdown_time:1;
 
index 11a90cd027faca2956172f3dfa92f6d2ee46a8fe..1a617fde46e66062880ba4ec943c2dc1a2870a3e 100644 (file)
@@ -158,7 +158,10 @@ static void soc_pcm_init_runtime_hw(struct snd_pcm_runtime *runtime,
                cpu_stream->channels_min);
        hw->channels_max = min(codec_stream->channels_max,
                cpu_stream->channels_max);
-       hw->formats = codec_stream->formats & cpu_stream->formats;
+       if (hw->formats)
+               hw->formats &= codec_stream->formats & cpu_stream->formats;
+       else
+               hw->formats = codec_stream->formats & cpu_stream->formats;
        hw->rates = codec_stream->rates & cpu_stream->rates;
        if (codec_stream->rates
                & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS))
@@ -2032,10 +2035,8 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
        int ret = 0, playback = 0, capture = 0;
 
        if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) {
-               if (cpu_dai->driver->playback.channels_min)
-                       playback = 1;
-               if (cpu_dai->driver->capture.channels_min)
-                       capture = 1;
+               playback = rtd->dai_link->dpcm_playback;
+               capture = rtd->dai_link->dpcm_capture;
        } else {
                if (codec_dai->driver->playback.channels_min &&
                    cpu_dai->driver->playback.channels_min)