ASoC: added WSA2 support on targets with more than two spkrs
Add wsa2 backend dai links only in platforms which has 4 wsa speakers. add 2 to the device index parsed from hardware device id of wsa slave to match the dai names in the msm_dailink.h Change-Id: Iffe43842123526f4925f9d5bcd8dff0317bac7a7 Signed-off-by: Junkai Cai <junkai@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
3ae97cf8fa
commit
647c4b4898
@@ -1741,6 +1741,9 @@ static int wsa883x_swr_probe(struct swr_device *pdev)
|
||||
/* Get last digit from HEX format */
|
||||
dev_index = (int)((char)(pdev->addr & 0xF));
|
||||
|
||||
if (of_device_is_compatible(pdev->dev.of_node, "qcom,wsa883x_2"))
|
||||
dev_index += 2;
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "wsa-codec.%d", dev_index);
|
||||
wsa883x->driver->name = kstrndup(buffer, strlen(buffer), GFP_KERNEL);
|
||||
|
||||
|
Reference in New Issue
Block a user