diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-19 13:04:18 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-21 16:15:37 -0500 |
commit | 278047fd654dde7ed95c8604fcefeeacc5c0bb2b (patch) | |
tree | 306d088ca76a4e64fa132702ba050ae46de36075 /sound | |
parent | 09452f23eb01241fa19c2e99585af5e340a0961b (diff) |
ASoC: Don't tell applications about msbits unless we're ignoring input
On the off chance that an application both pays attention and gets
confused.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-pcm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 8bb17937d59a..326890148a26 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -85,9 +85,11 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream, | |||
85 | return; | 85 | return; |
86 | 86 | ||
87 | for (i = 0; i < ARRAY_SIZE(sample_sizes); i++) { | 87 | for (i = 0; i < ARRAY_SIZE(sample_sizes); i++) { |
88 | ret = snd_pcm_hw_constraint_msbits(substream->runtime, | 88 | if (bits >= sample_sizes[i]) |
89 | 0, sample_sizes[i], | 89 | continue; |
90 | bits); | 90 | |
91 | ret = snd_pcm_hw_constraint_msbits(substream->runtime, 0, | ||
92 | sample_sizes[i], bits); | ||
91 | if (ret != 0) | 93 | if (ret != 0) |
92 | dev_warn(dai->dev, | 94 | dev_warn(dai->dev, |
93 | "Failed to set MSB %d/%d: %d\n", | 95 | "Failed to set MSB %d/%d: %d\n", |