Skip to content

Commit

Permalink
ASoC: max98363: limit the number of channel to 1
Browse files Browse the repository at this point in the history
MAX98363 is a mono amplifier. The number of channel needs to be always 1.

Signed-off-by: Ryan Lee <ryans.lee@analog.com>
Link: https://lore.kernel.org/r/20230601130600.25344-2-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Ryan Lee authored and Mark Brown committed Jun 1, 2023
1 parent 0e2ee34 commit 3a67ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/max98363.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static int max98363_sdw_dai_hw_params(struct snd_pcm_substream *substream,
stream_config.frame_rate = params_rate(params);
stream_config.bps = snd_pcm_format_width(params_format(params));
stream_config.direction = direction;
stream_config.ch_count = params_channels(params);
stream_config.ch_count = 1;

if (stream_config.ch_count > runtime->hw.channels_max) {
stream_config.ch_count = runtime->hw.channels_max;
Expand Down

0 comments on commit 3a67ad1

Please sign in to comment.