[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240803032717.175-1-shenghao-ding@ti.com>
Date: Sat, 3 Aug 2024 11:27:14 +0800
From: Shenghao Ding <shenghao-ding@...com>
To: <broonie@...nel.org>
CC: <andriy.shevchenko@...ux.intel.com>, <lgirdwood@...il.com>,
<perex@...ex.cz>, <pierre-louis.bossart@...ux.intel.com>,
<13916275206@....com>, <zhourui@...qin.com>,
<alsa-devel@...a-project.org>, <i-salazar@...com>,
<linux-kernel@...r.kernel.org>, <j-chadha@...com>,
<liam.r.girdwood@...el.com>, <jaden-yue@...com>,
<yung-chuan.liao@...ux.intel.com>, <dipa@...com>, <yuhsuan@...gle.com>,
<henry.lo@...com>, <tiwai@...e.de>, <baojun.xu@...com>, <soyer@....hu>,
<Baojun.Xu@....com>, <judyhsiao@...gle.com>, <navada@...com>,
<cujomalainey@...gle.com>, <aanya@...com>, <nayeem.mahmud@...com>,
<savyasanchi.shukla@...radyne.com>, <flaviopr@...rosoft.com>,
<jesse-ji@...com>, <darren.ye@...iatek.com>, <antheas.dk@...il.com>,
<Jerry2.Huang@...uturecenter.com>,
Shenghao Ding <shenghao-ding@...com>
Subject: [PATCH v1] ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781
Rename dai_driver name to unify the name between TAS2563 and
TAS2781, remove unnecessary line feed, strscpy replace scnprintf.
Signed-off-by: Shenghao Ding <shenghao-ding@...com>
---
v1:
- Use strscpy to replace scnprintf.
- rename dai_driver name from "tas2781_codec" to "tasdev_codec",
in case of misunderstanding whether tas2781 or tas2563.
- Remove unnecessary line feed for tasdevice_dsp_create_ctrls
---
sound/soc/codecs/tas2781-i2c.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index 8a57c045afdd..6631254d4985 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -353,7 +353,7 @@ static int tasdevice_create_control(struct tasdevice_priv *tas_priv)
ret = -ENOMEM;
goto out;
}
- scnprintf(name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN, "Speaker Profile Id");
+ strscpy(name, "Speaker Profile Id", SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
prof_ctrls[mix_index].name = name;
prof_ctrls[mix_index].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
prof_ctrls[mix_index].info = tasdevice_info_profile;
@@ -424,8 +424,7 @@ static int tasdevice_configuration_put(
return ret;
}
-static int tasdevice_dsp_create_ctrls(
- struct tasdevice_priv *tas_priv)
+static int tasdevice_dsp_create_ctrls(struct tasdevice_priv *tas_priv)
{
struct snd_kcontrol_new *dsp_ctrls;
char *prog_name, *conf_name;
@@ -453,8 +452,8 @@ static int tasdevice_dsp_create_ctrls(
goto out;
}
- scnprintf(prog_name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
- "Speaker Program Id");
+ strscpy(prog_name, "Speaker Program Id",
+ SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
dsp_ctrls[mix_index].name = prog_name;
dsp_ctrls[mix_index].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
dsp_ctrls[mix_index].info = tasdevice_info_programs;
@@ -462,8 +461,7 @@ static int tasdevice_dsp_create_ctrls(
dsp_ctrls[mix_index].put = tasdevice_program_put;
mix_index++;
- scnprintf(conf_name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN,
- "Speaker Config Id");
+ strscpy(conf_name, "Speaker Config Id", SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
dsp_ctrls[mix_index].name = conf_name;
dsp_ctrls[mix_index].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
dsp_ctrls[mix_index].info = tasdevice_info_configurations;
@@ -673,7 +671,7 @@ static const struct snd_soc_dai_ops tasdevice_dai_ops = {
static struct snd_soc_dai_driver tasdevice_dai_driver[] = {
{
- .name = "tas2781_codec",
+ .name = "tasdev_codec",
.id = 0,
.playback = {
.stream_name = "Playback",
--
2.34.1
Powered by blists - more mailing lists