summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/lpass-va-macro.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-09-06 08:24:56 +0200
committerTakashi Iwai <tiwai@suse.de>2024-09-06 08:24:56 +0200
commitc491b044cf5f8236742887ba59b30032036e4ac8 (patch)
treed89c4626355f95e30f568f2cd7afec6952324c92 /sound/soc/codecs/lpass-va-macro.c
parenta83e4c97ddd7473406ec5e1df8d5e7b24bd7e892 (diff)
parent77212f300bfd6fb3edaabd1daf863cabb521854a (diff)
Merge tag 'asoc-fix-v6.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.11 A larger set of fixes than I'd like at this point, but mainly due to people working on fixing module autoloading by adding missing exports of ID tables rather than anything particularly concerning. There are some other runtime fixes and quirks, and a tweak to the ABI definition for SOF which ensures that a struct layout doesn't vary depending on the architecture of the host.
Diffstat (limited to 'sound/soc/codecs/lpass-va-macro.c')
-rw-r--r--sound/soc/codecs/lpass-va-macro.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index 8454193ed22a..e95d1f29ef18 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -228,11 +228,13 @@ struct va_macro {
struct va_macro_data {
bool has_swr_master;
bool has_npl_clk;
+ int version;
};
static const struct va_macro_data sm8250_va_data = {
.has_swr_master = false,
.has_npl_clk = false,
+ .version = LPASS_CODEC_VERSION_1_0,
};
static const struct va_macro_data sm8450_va_data = {
@@ -1587,7 +1589,14 @@ static int va_macro_probe(struct platform_device *pdev)
goto err_npl;
}
- va_macro_set_lpass_codec_version(va);
+ /**
+ * old version of codecs do not have a reliable way to determine the
+ * version from registers, get them from soc specific data
+ */
+ if (data->version)
+ lpass_macro_set_codec_version(data->version);
+ else /* read version from register */
+ va_macro_set_lpass_codec_version(va);
if (va->has_swr_master) {
/* Set default CLK div to 1 */