Skip to content

Commit e29de7a

Browse files
krzkbroonie
authored andcommitted
ASoC: qcom: q6apm-lpass-dais: pass max number of channels to Audioreach
Using the params_channels() helper when setting hw_params, results in passing to Audioreach minimum number of channels valid for given hardware. This is not valid for any hardware which sets minimum channels to two and maximum to something bigger, like four channels. Instead pass the maximum number of supported channels to allow playback of multi-channel formats. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 109cb21 commit e29de7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/qcom/qdsp6/q6apm-lpass-dais.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int q6hdmi_hw_params(struct snd_pcm_substream *substream,
9898
{
9999
struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
100100
struct audioreach_module_config *cfg = &dai_data->module_config[dai->id];
101-
int channels = params_channels(params);
101+
int channels = hw_param_interval_c(params, SNDRV_PCM_HW_PARAM_CHANNELS)->max;
102102
int ret;
103103

104104
cfg->bit_width = params_width(params);
@@ -131,7 +131,7 @@ static int q6dma_hw_params(struct snd_pcm_substream *substream,
131131

132132
cfg->bit_width = params_width(params);
133133
cfg->sample_rate = params_rate(params);
134-
cfg->num_channels = params_channels(params);
134+
cfg->num_channels = hw_param_interval_c(params, SNDRV_PCM_HW_PARAM_CHANNELS)->max;
135135

136136
return 0;
137137
}

0 commit comments

Comments
 (0)