[PATCH 2/2] ASoC: Intel: avs: Fix type warning in avs_probe_compr_set_params()

Cezary Rojewski
2026-04-07T08:53:15Z

Expected argument type is snd_pcm_format_t.
Found out by sparse.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---

This is a continuation of topic "ASoC: Intel: avs: Set of streaming
fixes" from last year [1]. The warning keeps popping out in the scans,
time to get rid of it.

[1]: https://lore.kernel.org/linux-sound/dd089b21-571c-41e2-bcea-d666ee7af882@intel.com/

sound/soc/intel/avs/probes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/avs/probes.c b/sound/soc/intel/avs/probes.c
index 74096236984a..099119ad28b3 100644
--- a/sound/soc/intel/avs/probes.c
+++ b/sound/soc/intel/avs/probes.c
@@ -144,7 +144,7 @@ static int avs_probe_compr_set_params(struct snd_compr_stream *cstream,
ret = snd_compr_malloc_pages(cstream, rtd->buffer_size);
if (ret < 0)
return ret;
- bps = snd_pcm_format_physical_width(params->codec.format);
+ bps = snd_pcm_format_physical_width((__force snd_pcm_format_t)params->codec.format);
if (bps < 0)
return bps;
format_val = snd_hdac_stream_format(params->codec.ch_out, bps, params->codec.sample_rate);
--
2.34.1