From nobody Tue Dec 16 17:02:41 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D459CDB47E for ; Fri, 20 Oct 2023 08:35:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376504AbjJTIfY (ORCPT ); Fri, 20 Oct 2023 04:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235672AbjJTIfU (ORCPT ); Fri, 20 Oct 2023 04:35:20 -0400 Received: from out28-171.mail.aliyun.com (out28-171.mail.aliyun.com [115.124.28.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8761ED60; Fri, 20 Oct 2023 01:35:17 -0700 (PDT) X-Alimail-AntiSpam: AC=CONTINUE;BC=0.08115333|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_system_inform|0.00825157-0.000204018-0.991544;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047194;MF=wangweidong.a@awinic.com;NM=1;PH=DS;RN=27;RT=27;SR=0;TI=SMTPD_---.V3YjltG_1697790906; Received: from ubuntu-VirtualBox..(mailfrom:wangweidong.a@awinic.com fp:SMTPD_---.V3YjltG_1697790906) by smtp.aliyun-inc.com; Fri, 20 Oct 2023 16:35:13 +0800 From: wangweidong.a@awinic.com To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, perex@perex.cz, tiwai@suse.com, wangweidong.a@awinic.com, shumingf@realtek.com, rf@opensource.cirrus.com, herve.codina@bootlin.com, ckeepax@opensource.cirrus.com, 13916275206@139.com, ryans.lee@analog.com, linus.walleij@linaro.org, sebastian.reichel@collabora.com, ajye_huang@compal.corp-partner.google.com, harshit.m.mogalapalli@oracle.com, arnd@arndb.de, colin.i.king@gmail.com, dan.carpenter@linaro.org, trix@redhat.com, liweilei@awinic.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: yijiangtao@awinic.com Subject: [PATCH V2 3/4] ASoC: codecs: Add code for bin parsing compatible with aw88399 Date: Fri, 20 Oct 2023 16:34:25 +0800 Message-ID: <20231020083426.302925-4-wangweidong.a@awinic.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020083426.302925-1-wangweidong.a@awinic.com> References: <20231020083426.302925-1-wangweidong.a@awinic.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Weidong Wang Add aw88399 compatible code to the aw88395_lib.c file so that it can parse aw88399's bin file. Signed-off-by: Weidong Wang Reviewed-by: Herve Codina --- sound/soc/codecs/aw88395/aw88395_lib.c | 3 +++ sound/soc/codecs/aw88395/aw88395_reg.h | 1 + 2 files changed, 4 insertions(+) diff --git a/sound/soc/codecs/aw88395/aw88395_lib.c b/sound/soc/codecs/aw88= 395/aw88395_lib.c index 87dd0ccade4c..bc72a7487048 100644 --- a/sound/soc/codecs/aw88395/aw88395_lib.c +++ b/sound/soc/codecs/aw88395/aw88395_lib.c @@ -703,6 +703,7 @@ static int aw_dev_load_cfg_by_hdr(struct aw_device *aw_= dev, =20 switch (aw_dev->chip_id) { case AW88395_CHIP_ID: + case AW88399_CHIP_ID: ret =3D aw88395_dev_cfg_get_valid_prof(aw_dev, *all_prof_info); if (ret < 0) goto exit; @@ -791,6 +792,7 @@ static int aw_get_dev_scene_count_v1(struct aw_device *= aw_dev, struct aw_contain =20 switch (aw_dev->chip_id) { case AW88395_CHIP_ID: + case AW88399_CHIP_ID: for (i =3D 0; i < cfg_hdr->ddt_num; ++i) { if ((cfg_dde[i].data_type =3D=3D ACF_SEC_TYPE_MULTIPLE_BIN) && (aw_dev->chip_id =3D=3D cfg_dde[i].chip_id) && @@ -832,6 +834,7 @@ static int aw_get_default_scene_count_v1(struct aw_devi= ce *aw_dev, =20 switch (aw_dev->chip_id) { case AW88395_CHIP_ID: + case AW88399_CHIP_ID: for (i =3D 0; i < cfg_hdr->ddt_num; ++i) { if ((cfg_dde[i].data_type =3D=3D ACF_SEC_TYPE_MULTIPLE_BIN) && (aw_dev->chip_id =3D=3D cfg_dde[i].chip_id) && diff --git a/sound/soc/codecs/aw88395/aw88395_reg.h b/sound/soc/codecs/aw88= 395/aw88395_reg.h index e7a7c02efaf3..63d2bac85715 100644 --- a/sound/soc/codecs/aw88395/aw88395_reg.h +++ b/sound/soc/codecs/aw88395/aw88395_reg.h @@ -95,6 +95,7 @@ #define AW88395_TM_REG (0x7C) =20 enum aw88395_id { + AW88399_CHIP_ID =3D 0x2183, AW88395_CHIP_ID =3D 0x2049, AW88261_CHIP_ID =3D 0x2113, }; --=20 2.41.0