Skip to content

Commit

Permalink
ASoC: Don't tell applications about msbits unless we're ignoring input
Browse files Browse the repository at this point in the history
On the off chance that an application both pays attention and gets
confused.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 21, 2012
1 parent 09452f2 commit 278047f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream,
return;

for (i = 0; i < ARRAY_SIZE(sample_sizes); i++) {
ret = snd_pcm_hw_constraint_msbits(substream->runtime,
0, sample_sizes[i],
bits);
if (bits >= sample_sizes[i])
continue;

ret = snd_pcm_hw_constraint_msbits(substream->runtime, 0,
sample_sizes[i], bits);
if (ret != 0)
dev_warn(dai->dev,
"Failed to set MSB %d/%d: %d\n",
Expand Down

0 comments on commit 278047f

Please sign in to comment.