summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-01-06 14:19:07 +0100
committerMark Brown <broonie@linaro.org>2014-01-06 17:42:42 +0000
commit002220a90db8ab9a6313887934dec25b54404cbd (patch)
tree0c6a5cccccac168355a3e28f0543db032ce9d5a0 /sound/soc/soc-pcm.c
parent08ae9b456d393dfd1bbe7619b994189be6a26449 (diff)
downloadblackbird-obmc-linux-002220a90db8ab9a6313887934dec25b54404cbd.tar.gz
blackbird-obmc-linux-002220a90db8ab9a6313887934dec25b54404cbd.zip
ASoC: dpcm: Allow PCMs to omit the set of supported formats
Allow PCMs that do not impose any restrictions on the supported formats to set the formats field to 0, Instead of assuming that this means that the PCM does not support any formats (which doesn't make much sense), assume that it supports all formats. This brings the behavior of DPCM closer to that of non-DPCM. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index b649e32791df..feb0f2843026 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1235,7 +1235,10 @@ static void dpcm_init_runtime_hw(struct snd_pcm_runtime *runtime,
runtime->hw.rate_max = stream->rate_max;
runtime->hw.channels_min = stream->channels_min;
runtime->hw.channels_max = stream->channels_max;
- runtime->hw.formats &= stream->formats;
+ if (runtime->hw.formats)
+ runtime->hw.formats &= stream->formats;
+ else
+ runtime->hw.formats = stream->formats;
runtime->hw.rates = stream->rates;
}
OpenPOWER on IntegriCloud