提交 767eea1f 编写于 作者: P Peter Ujfalusi 提交者: Yang Yingliang

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: dd55ff83 ("ASoC: davinci-mcasp: Add set_tdm_slots() support")
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 837ba2a4
...@@ -874,7 +874,7 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream, ...@@ -874,7 +874,7 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream,
active_slots = hweight32(mcasp->tdm_mask[stream]); active_slots = hweight32(mcasp->tdm_mask[stream]);
active_serializers = (channels + active_slots - 1) / active_serializers = (channels + active_slots - 1) /
active_slots; active_slots;
if (active_serializers == 1) { if (active_serializers == 1)
active_slots = channels; active_slots = channels;
for (i = 0; i < total_slots; i++) { for (i = 0; i < total_slots; i++) {
if ((1 << i) & mcasp->tdm_mask[stream]) { if ((1 << i) & mcasp->tdm_mask[stream]) {
...@@ -883,7 +883,6 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream, ...@@ -883,7 +883,6 @@ static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream,
break; break;
} }
} }
}
} else { } else {
active_serializers = (channels + total_slots - 1) / total_slots; active_serializers = (channels + total_slots - 1) / total_slots;
if (active_serializers == 1) if (active_serializers == 1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册