From c747081be49abafcb6d6276feec1a4d3e4d051d1 Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Mon, 26 Apr 2021 21:16:00 +0530 Subject: [PATCH] asoc: wsa883x: Update wsa8832 variant Add support for WSA8832 variant. Change-Id: I2fdbe7bf00eb3d10087520749d65b902802619bd Signed-off-by: Laxminath Kasam --- asoc/codecs/wsa883x/wsa883x.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/asoc/codecs/wsa883x/wsa883x.c b/asoc/codecs/wsa883x/wsa883x.c index 2fc764af5d8d..13874ca50421 100644 --- a/asoc/codecs/wsa883x/wsa883x.c +++ b/asoc/codecs/wsa883x/wsa883x.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved. */ #include @@ -132,6 +132,8 @@ static int wsa883x_get_temperature(struct snd_soc_component *component, enum { WSA8830 = 0, WSA8835, + WSA8832, + WSA8835_V2 = 5, }; enum { @@ -721,7 +723,11 @@ static ssize_t wsa883x_variant_read(struct snd_info_entry *entry, case WSA8830: len = snprintf(buffer, sizeof(buffer), "WSA8830\n"); break; + case WSA8832: + len = snprintf(buffer, sizeof(buffer), "WSA8832\n"); + break; case WSA8835: + case WSA8835_V2: len = snprintf(buffer, sizeof(buffer), "WSA8835\n"); break; default: @@ -1098,7 +1104,8 @@ static int wsa883x_spkr_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, WSA883X_DRE_CTL_0, 0xF0, 0x90); - if (wsa883x->variant == WSA8830) + if (wsa883x->variant == WSA8830 || + wsa883x->variant == WSA8832) snd_soc_component_update_bits(component, WSA883X_DRE_CTL_0, 0x07, 0x03); @@ -1218,7 +1225,7 @@ static void wsa883x_codec_init(struct snd_soc_component *component) snd_soc_component_update_bits(component, reg_init[i].reg, reg_init[i].mask, reg_init[i].val); - if (wsa883x->variant == WSA8830) + if (wsa883x->variant == WSA8830 || wsa883x->variant == WSA8832) snd_soc_component_update_bits(component, WSA883X_DRE_CTL_0, 0x07, 0x03); }