[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230919105724.105624-6-wangweidong.a@awinic.com>
Date: Tue, 19 Sep 2023 18:57:22 +0800
From: wangweidong.a@...nic.com
To: lgirdwood@...il.com, broonie@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
perex@...ex.cz, tiwai@...e.com, wangweidong.a@...nic.com,
rf@...nsource.cirrus.com, herve.codina@...tlin.com,
shumingf@...ltek.com, ryans.lee@...log.com, 13916275206@....com,
linus.walleij@...aro.org, ckeepax@...nsource.cirrus.com,
povik+lin@...ebit.org, harshit.m.mogalapalli@...cle.com,
arnd@...db.de, yijiangtao@...nic.com, yang.lee@...ux.alibaba.com,
liweilei@...nic.com, u.kleine-koenig@...gutronix.de,
colin.i.king@...il.com, trix@...hat.com,
alsa-devel@...a-project.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH V4 5/7] ASoC: codecs: Modify i2c name and parameter transmission methodls
From: Weidong Wang <wangweidong.a@...nic.com>
Modify aw888395_smartpa to aw88395 in order to
align with the awinic,aw88395.yaml file
Modify the transmission method of parameters.
Signed-off-by: Weidong Wang <wangweidong.a@...nic.com>
---
sound/soc/codecs/aw88395/aw88395.c | 9 ++++-----
sound/soc/codecs/aw88395/aw88395.h | 2 +-
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/aw88395/aw88395.c b/sound/soc/codecs/aw88395/aw88395.c
index 9dcd75dd799a..77227c8f01f6 100644
--- a/sound/soc/codecs/aw88395/aw88395.c
+++ b/sound/soc/codecs/aw88395/aw88395.c
@@ -175,9 +175,8 @@ static int aw88395_profile_info(struct snd_kcontrol *kcontrol,
{
struct snd_soc_component *codec = snd_soc_kcontrol_component(kcontrol);
struct aw88395 *aw88395 = snd_soc_component_get_drvdata(codec);
- const char *prof_name;
- char *name;
- int count;
+ char *prof_name, *name;
+ int count, ret;
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
@@ -196,8 +195,8 @@ static int aw88395_profile_info(struct snd_kcontrol *kcontrol,
name = uinfo->value.enumerated.name;
count = uinfo->value.enumerated.item;
- prof_name = aw88395_dev_get_prof_name(aw88395->aw_pa, count);
- if (!prof_name) {
+ ret = aw88395_dev_get_prof_name(aw88395->aw_pa, count, &prof_name);
+ if (ret) {
strscpy(uinfo->value.enumerated.name, "null",
strlen("null") + 1);
return 0;
diff --git a/sound/soc/codecs/aw88395/aw88395.h b/sound/soc/codecs/aw88395/aw88395.h
index 8036ba27f68d..c2a4f0cb8cd5 100644
--- a/sound/soc/codecs/aw88395/aw88395.h
+++ b/sound/soc/codecs/aw88395/aw88395.h
@@ -16,7 +16,7 @@
#define AW88395_DSP_16_DATA_MASK (0x0000ffff)
-#define AW88395_I2C_NAME "aw88395_smartpa"
+#define AW88395_I2C_NAME "aw88395"
#define AW88395_RATES (SNDRV_PCM_RATE_8000_48000 | \
SNDRV_PCM_RATE_96000)
--
2.41.0
Powered by blists - more mailing lists