diff options
-rw-r--r-- | sound/soc/soc-core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 06c38d1502b7..eb73aab78b94 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -404,6 +404,12 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) | |||
404 | codec_dai->playback.formats & cpu_dai->playback.formats; | 404 | codec_dai->playback.formats & cpu_dai->playback.formats; |
405 | runtime->hw.rates = | 405 | runtime->hw.rates = |
406 | codec_dai->playback.rates & cpu_dai->playback.rates; | 406 | codec_dai->playback.rates & cpu_dai->playback.rates; |
407 | if (codec_dai->playback.rates | ||
408 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) | ||
409 | runtime->hw.rates |= cpu_dai->playback.rates; | ||
410 | if (cpu_dai->playback.rates | ||
411 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) | ||
412 | runtime->hw.rates |= codec_dai->playback.rates; | ||
407 | } else { | 413 | } else { |
408 | runtime->hw.rate_min = | 414 | runtime->hw.rate_min = |
409 | max(codec_dai->capture.rate_min, | 415 | max(codec_dai->capture.rate_min, |
@@ -421,6 +427,12 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) | |||
421 | codec_dai->capture.formats & cpu_dai->capture.formats; | 427 | codec_dai->capture.formats & cpu_dai->capture.formats; |
422 | runtime->hw.rates = | 428 | runtime->hw.rates = |
423 | codec_dai->capture.rates & cpu_dai->capture.rates; | 429 | codec_dai->capture.rates & cpu_dai->capture.rates; |
430 | if (codec_dai->capture.rates | ||
431 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) | ||
432 | runtime->hw.rates |= cpu_dai->capture.rates; | ||
433 | if (cpu_dai->capture.rates | ||
434 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) | ||
435 | runtime->hw.rates |= codec_dai->capture.rates; | ||
424 | } | 436 | } |
425 | 437 | ||
426 | snd_pcm_limit_hw_rates(runtime); | 438 | snd_pcm_limit_hw_rates(runtime); |