[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231024071419.85647-4-wangweidong.a@awinic.com>
Date: Tue, 24 Oct 2023 15:14:18 +0800
From: wangweidong.a@...nic.com
To: broonie@...nel.org
Cc: 13916275206@....com, ajye_huang@...pal.corp-partner.google.com,
alsa-devel@...a-project.org, arnd@...db.de,
ckeepax@...nsource.cirrus.com, colin.i.king@...il.com,
conor+dt@...nel.org, dan.carpenter@...aro.org,
devicetree@...r.kernel.org, harshit.m.mogalapalli@...cle.com,
herve.codina@...tlin.com, krzysztof.kozlowski+dt@...aro.org,
lgirdwood@...il.com, linus.walleij@...aro.org,
linux-kernel@...r.kernel.org, liweilei@...nic.com, perex@...ex.cz,
rf@...nsource.cirrus.com, robh+dt@...nel.org, ryans.lee@...log.com,
sebastian.reichel@...labora.com, shumingf@...ltek.com,
tiwai@...e.com, trix@...hat.com, wangweidong.a@...nic.com,
yijiangtao@...nic.com
Subject: [PATCH V2 3/4] ASoC: codecs: Add code for bin parsing compatible with aw88399
From: Weidong Wang <wangweidong.a@...nic.com>
Add aw88399 compatible code to the aw88395_lib.c file
so that it can parse aw88399's bin file.
Signed-off-by: Weidong Wang <wangweidong.a@...nic.com>
Reviewed-by: Herve Codina <herve.codina@...tlin.com>
---
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/aw88395/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,
switch (aw_dev->chip_id) {
case AW88395_CHIP_ID:
+ case AW88399_CHIP_ID:
ret = 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
switch (aw_dev->chip_id) {
case AW88395_CHIP_ID:
+ case AW88399_CHIP_ID:
for (i = 0; i < cfg_hdr->ddt_num; ++i) {
if ((cfg_dde[i].data_type == ACF_SEC_TYPE_MULTIPLE_BIN) &&
(aw_dev->chip_id == cfg_dde[i].chip_id) &&
@@ -832,6 +834,7 @@ static int aw_get_default_scene_count_v1(struct aw_device *aw_dev,
switch (aw_dev->chip_id) {
case AW88395_CHIP_ID:
+ case AW88399_CHIP_ID:
for (i = 0; i < cfg_hdr->ddt_num; ++i) {
if ((cfg_dde[i].data_type == ACF_SEC_TYPE_MULTIPLE_BIN) &&
(aw_dev->chip_id == cfg_dde[i].chip_id) &&
diff --git a/sound/soc/codecs/aw88395/aw88395_reg.h b/sound/soc/codecs/aw88395/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)
enum aw88395_id {
+ AW88399_CHIP_ID = 0x2183,
AW88395_CHIP_ID = 0x2049,
AW88261_CHIP_ID = 0x2113,
};
--
2.41.0
Powered by blists - more mailing lists