Skip to content

Commit 7bd6061

Browse files
laklimovgregkh
authored andcommitted
ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
[ Upstream commit 89be3c1 ] Setting format to s16le is required for compressed playback on compatible soundcards. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://patch.msgid.link/20250228161430.373961-1-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 84c069d commit 7bd6061

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/qcom/sm8250.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <sound/soc.h>
88
#include <sound/soc-dapm.h>
99
#include <sound/pcm.h>
10+
#include <sound/pcm_params.h>
1011
#include <linux/soundwire/sdw.h>
1112
#include <sound/jack.h>
1213
#include <linux/input-event-codes.h>
@@ -39,9 +40,11 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
3940
SNDRV_PCM_HW_PARAM_RATE);
4041
struct snd_interval *channels = hw_param_interval(params,
4142
SNDRV_PCM_HW_PARAM_CHANNELS);
43+
struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
4244

4345
rate->min = rate->max = 48000;
4446
channels->min = channels->max = 2;
47+
snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
4548

4649
return 0;
4750
}

0 commit comments

Comments
 (0)