Skip to content

Commit 9565c9d

Browse files
laklimovbroonie
authored andcommitted
ASoC: qcom: sc8280xp: explicitly set S16LE format in sc8280xp_be_hw_params_fixup()
Setting format to s16le is required for compressed playback on compatible soundcards. Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org> Link: https://patch.msgid.link/20250911154340.2798304-1-alexey.klimov@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent ce2335c commit 9565c9d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sound/soc/qcom/sc8280xp.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>
@@ -82,8 +83,10 @@ static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
8283
SNDRV_PCM_HW_PARAM_RATE);
8384
struct snd_interval *channels = hw_param_interval(params,
8485
SNDRV_PCM_HW_PARAM_CHANNELS);
86+
struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
8587

8688
rate->min = rate->max = 48000;
89+
snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
8790
channels->min = 2;
8891
channels->max = 2;
8992
switch (cpu_dai->id) {

0 commit comments

Comments
 (0)