asoc: kona: call wsa set channel map for wsa883x
Update speaker amp call for wsa883x.
Change-Id: I3ab9be48e169f15ef6fdda7ee61f34b35d333e05
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
diff --git a/asoc/kona.c b/asoc/kona.c
index a97590f..82814ce 100644
--- a/asoc/kona.c
+++ b/asoc/kona.c
@@ -31,6 +31,7 @@
#include "asoc/wcd-mbhc-v2.h"
#include "codecs/wcd938x/wcd938x-mbhc.h"
#include "codecs/wsa881x.h"
+#include "codecs/wsa883x/wsa883x.h"
#include "codecs/wcd938x/wcd938x.h"
#include "codecs/bolero/bolero-cdc.h"
#include <dt-bindings/sound/audio-codec-port-types.h>
@@ -7503,9 +7504,14 @@
if (!strcmp(component->name_prefix, "SpkrLeft")) {
dev_dbg(component->dev, "%s: setting left ch map to codec %s\n",
__func__, component->name);
- wsa881x_set_channel_map(component, &spkleft_ports[0],
- WSA881X_MAX_SWR_PORTS, &ch_mask[0],
- &ch_rate[0], &spkleft_port_types[0]);
+ if (strnstr(component->name, "wsa883x", sizeof(component->name)))
+ wsa883x_set_channel_map(component, &spkleft_ports[0],
+ WSA881X_MAX_SWR_PORTS, &ch_mask[0],
+ &ch_rate[0], &spkleft_port_types[0]);
+ else
+ wsa881x_set_channel_map(component, &spkleft_ports[0],
+ WSA881X_MAX_SWR_PORTS, &ch_mask[0],
+ &ch_rate[0], &spkleft_port_types[0]);
if (dapm->component) {
snd_soc_dapm_ignore_suspend(dapm, "SpkrLeft IN");
snd_soc_dapm_ignore_suspend(dapm, "SpkrLeft SPKR");
@@ -7513,9 +7519,14 @@
} else if (!strcmp(component->name_prefix, "SpkrRight")) {
dev_dbg(component->dev, "%s: setting right ch map to codec %s\n",
__func__, component->name);
- wsa881x_set_channel_map(component, &spkright_ports[0],
- WSA881X_MAX_SWR_PORTS, &ch_mask[0],
- &ch_rate[0], &spkright_port_types[0]);
+ if (strnstr(component->name, "wsa883x", sizeof(component->name)))
+ wsa883x_set_channel_map(component, &spkright_ports[0],
+ WSA881X_MAX_SWR_PORTS, &ch_mask[0],
+ &ch_rate[0], &spkright_port_types[0]);
+ else
+ wsa881x_set_channel_map(component, &spkright_ports[0],
+ WSA881X_MAX_SWR_PORTS, &ch_mask[0],
+ &ch_rate[0], &spkright_port_types[0]);
if (dapm->component) {
snd_soc_dapm_ignore_suspend(dapm, "SpkrRight IN");
snd_soc_dapm_ignore_suspend(dapm, "SpkrRight SPKR");
@@ -7538,8 +7549,12 @@
}
pdata->codec_root = entry;
}
- wsa881x_codec_info_create_codec_entry(pdata->codec_root,
- component);
+ if (strnstr(component->name, "wsa883x", sizeof(component->name)))
+ wsa883x_codec_info_create_codec_entry(pdata->codec_root,
+ component);
+ else
+ wsa881x_codec_info_create_codec_entry(pdata->codec_root,
+ component);
err:
return ret;
}