diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 0b3e0d7d29e3bd..f47741b37efe3b 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -614,11 +614,16 @@ static int max98373_sdw_dai_hw_params(struct snd_pcm_substream *substream, stream_config.bps = snd_pcm_format_width(params_format(params)); stream_config.direction = direction; - if (max98373->slot) { + if (max98373->slot && direction == SDW_DATA_DIR_RX) { stream_config.ch_count = max98373->slot; port_config.ch_mask = max98373->rx_mask; } else { - stream_config.ch_count = params_channels(params); + /* only IV are supported by capture */ + if (direction == SDW_DATA_DIR_TX) + stream_config.ch_count = 2; + else + stream_config.ch_count = params_channels(params); + port_config.ch_mask = GENMASK(stream_config.ch_count - 1, 0); } @@ -774,7 +779,8 @@ static int max98373_sdw_set_tdm_slot(struct snd_soc_dai *dai, struct max98373_priv *max98373 = snd_soc_component_get_drvdata(component); - if (!tx_mask && !rx_mask && !slots && !slot_width) + /* tx_mask is ignored since it's irrelevant for I/V feedback */ + if (!rx_mask && !slots && !slot_width) max98373->tdm_mode = false; else max98373->tdm_mode = true;