diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2019-06-20 12:20:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-29 12:24:26 +0300 |
commit | 61d7f6a11793f9901d881316df87d01d79acea42 (patch) | |
tree | aad87eefb14ebc387680f9e8c5db8481ef6d070f /sound/soc | |
parent | d7ae1636c8cd17b0e7a9c242f4d5ec9ba53b1aed (diff) | |
download | linux-61d7f6a11793f9901d881316df87d01d79acea42.tar.xz |
ASoC: ti: davinci-mcasp: Fix slot mask settings when using multiple AXRs
[ Upstream commit fd14f4436fd47d5418023c90e933e66d3645552e ]
If multiple serializers are connected in the system and the number of
channels will need to use more than one serializer the mask to enable the
serializers were left to 0 if tdm_mask is provided
Fixes: dd55ff8346a97 ("ASoC: davinci-mcasp: Add set_tdm_slots() support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 624c209c9498..d1935c5c3602 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -882,14 +882,13 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream, active_slots = hweight32(mcasp->tdm_mask[stream]); active_serializers = (channels + active_slots - 1) / active_slots; - if (active_serializers == 1) { + if (active_serializers == 1) active_slots = channels; - for (i = 0; i < total_slots; i++) { - if ((1 << i) & mcasp->tdm_mask[stream]) { - mask |= (1 << i); - if (--active_slots <= 0) - break; - } + for (i = 0; i < total_slots; i++) { + if ((1 << i) & mcasp->tdm_mask[stream]) { + mask |= (1 << i); + if (--active_slots <= 0) + break; } } } else { |