diff options
author | Mark Brown <broonie@linaro.org> | 2014-01-16 07:42:57 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-01-16 07:42:57 -0500 |
commit | 2f43a23ab9ea1865a663e100b0af20198decb4f1 (patch) | |
tree | 7501fb678115cbbdb544c43dc7b59f95408f1f52 /sound/soc/soc-pcm.c | |
parent | 7cfa7b547337faf5890c8c5f091e081fb79caf73 (diff) | |
parent | 55dcdb5051930dee75e9e2c0da90bc82ee3dcd77 (diff) |
Merge remote-tracking branch 'asoc/topic/pcm' into for-tiwai
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index e95ef9586723..5932971cf54d 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -240,14 +240,15 @@ static void soc_pcm_init_runtime_hw(struct snd_pcm_runtime *runtime, | |||
240 | cpu_stream->channels_min); | 240 | cpu_stream->channels_min); |
241 | hw->channels_max = min(codec_stream->channels_max, | 241 | hw->channels_max = min(codec_stream->channels_max, |
242 | cpu_stream->channels_max); | 242 | cpu_stream->channels_max); |
243 | hw->formats = codec_stream->formats & cpu_stream->formats; | 243 | if (hw->formats) |
244 | hw->rates = codec_stream->rates & cpu_stream->rates; | 244 | hw->formats &= codec_stream->formats & cpu_stream->formats; |
245 | if (codec_stream->rates | 245 | else |
246 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) | 246 | hw->formats = codec_stream->formats & cpu_stream->formats; |
247 | hw->rates |= cpu_stream->rates; | 247 | hw->rates = snd_pcm_rate_mask_intersect(codec_stream->rates, |
248 | if (cpu_stream->rates | 248 | cpu_stream->rates); |
249 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) | 249 | |
250 | hw->rates |= codec_stream->rates; | 250 | hw->rate_min = 0; |
251 | hw->rate_max = UINT_MAX; | ||
251 | 252 | ||
252 | snd_pcm_limit_hw_rates(runtime); | 253 | snd_pcm_limit_hw_rates(runtime); |
253 | 254 | ||
@@ -2140,10 +2141,8 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) | |||
2140 | int ret = 0, playback = 0, capture = 0; | 2141 | int ret = 0, playback = 0, capture = 0; |
2141 | 2142 | ||
2142 | if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { | 2143 | if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { |
2143 | if (cpu_dai->driver->playback.channels_min) | 2144 | playback = rtd->dai_link->dpcm_playback; |
2144 | playback = 1; | 2145 | capture = rtd->dai_link->dpcm_capture; |
2145 | if (cpu_dai->driver->capture.channels_min) | ||
2146 | capture = 1; | ||
2147 | } else { | 2146 | } else { |
2148 | if (codec_dai->driver->playback.channels_min && | 2147 | if (codec_dai->driver->playback.channels_min && |
2149 | cpu_dai->driver->playback.channels_min) | 2148 | cpu_dai->driver->playback.channels_min) |