diff options
-rw-r--r-- | sound/soc/soc-pcm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 141a302e4e77..e7f16b54a97d 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -158,7 +158,10 @@ static void soc_pcm_init_runtime_hw(struct snd_pcm_hardware *hw, | |||
158 | cpu_stream->channels_min); | 158 | cpu_stream->channels_min); |
159 | hw->channels_max = min(codec_stream->channels_max, | 159 | hw->channels_max = min(codec_stream->channels_max, |
160 | cpu_stream->channels_max); | 160 | cpu_stream->channels_max); |
161 | hw->formats = codec_stream->formats & cpu_stream->formats; | 161 | if (hw->formats) |
162 | hw->formats &= codec_stream->formats & cpu_stream->formats; | ||
163 | else | ||
164 | hw->formats = codec_stream->formats & cpu_stream->formats; | ||
162 | hw->rates = codec_stream->rates & cpu_stream->rates; | 165 | hw->rates = codec_stream->rates & cpu_stream->rates; |
163 | if (codec_stream->rates | 166 | if (codec_stream->rates |
164 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) | 167 | & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS)) |