All of lore.kernel.org
 help / color / mirror / Atom feed
From: wangweidong.a@awinic.com
To: broonie@kernel.org
Cc: 13916275206@139.com, ajye_huang@compal.corp-partner.google.com,
	alsa-devel@alsa-project.org, arnd@arndb.de,
	ckeepax@opensource.cirrus.com, colin.i.king@gmail.com,
	conor+dt@kernel.org, dan.carpenter@linaro.org,
	devicetree@vger.kernel.org, harshit.m.mogalapalli@oracle.com,
	herve.codina@bootlin.com, krzysztof.kozlowski+dt@linaro.org,
	lgirdwood@gmail.com, linus.walleij@linaro.org,
	linux-kernel@vger.kernel.org, liweilei@awinic.com,
	perex@perex.cz, rf@opensource.cirrus.com, robh+dt@kernel.org,
	ryans.lee@analog.com, sebastian.reichel@collabora.com,
	shumingf@realtek.com, tiwai@suse.com, trix@redhat.com,
	wangweidong.a@awinic.com, yijiangtao@awinic.com
Subject: [PATCH V2 3/4] ASoC: codecs: Add code for bin parsing compatible with aw88399
Date: Tue, 24 Oct 2023 15:14:18 +0800	[thread overview]
Message-ID: <20231024071419.85647-4-wangweidong.a@awinic.com> (raw)
In-Reply-To: <20231024071419.85647-1-wangweidong.a@awinic.com>

From: Weidong Wang <wangweidong.a@awinic.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@awinic.com>
Reviewed-by: Herve Codina <herve.codina@bootlin.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


  parent reply	other threads:[~2023-10-24  7:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20  8:34 [PATCH V2 0/4] ASoC: codecs: Add aw88399 amplifier driver wangweidong.a
2023-10-20  8:34 ` [PATCH V2 1/4] ASoC: dt-bindings: Add schema for "awinic,aw88399" wangweidong.a
2023-10-20  8:34 ` [PATCH V2 2/4] ASoC: codecs: Modify max_register usage error wangweidong.a
2023-10-20  8:34 ` [PATCH V2 3/4] ASoC: codecs: Add code for bin parsing compatible with aw88399 wangweidong.a
2023-10-23 12:29   ` Mark Brown
2023-10-24  7:14     ` [PATCH V2 0/4] ASoC: codecs: Add aw88399 amplifier driver wangweidong.a
2023-10-24  7:14       ` [PATCH V2 1/4] ASoC: dt-bindings: Add schema for "awinic,aw88399" wangweidong.a
2023-10-24  7:14       ` [PATCH V2 2/4] ASoC: codecs: Modify max_register usage error wangweidong.a
2023-10-24  7:14       ` wangweidong.a [this message]
2023-10-24  7:14       ` [PATCH V2 4/4] ASoC: codecs: Add aw88399 amplifier driver wangweidong.a
2023-10-24 12:28       ` [PATCH V2 0/4] " Mark Brown
2023-10-24  7:19     ` [PATCH V2 3/4] ASoC: codecs: Add code for bin parsing compatible with aw88399 wangweidong.a
2023-10-24 12:42       ` Mark Brown
2023-10-24 13:57         ` Mark Brown
2023-10-25  8:58           ` wangweidong.a
2023-10-20  8:34 ` [PATCH V2 4/4] ASoC: codecs: Add aw88399 amplifier driver wangweidong.a
2023-10-24 13:55 ` [PATCH V2 0/4] " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231024071419.85647-4-wangweidong.a@awinic.com \
    --to=wangweidong.a@awinic.com \
    --cc=13916275206@139.com \
    --cc=ajye_huang@compal.corp-partner.google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=colin.i.king@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=harshit.m.mogalapalli@oracle.com \
    --cc=herve.codina@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liweilei@awinic.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=robh+dt@kernel.org \
    --cc=ryans.lee@analog.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=shumingf@realtek.com \
    --cc=tiwai@suse.com \
    --cc=trix@redhat.com \
    --cc=yijiangtao@awinic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.