ASoC: Don't tell applications about msbits unless we're ignoring input
PATCH 1/1 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 <[email protected]>
--- sound/soc/soc-pcm.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
sound/soc/soc-pcm.c +5 -3
@@ -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) +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",
Signature · 1 line
1.7.7.3