mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header
@ 2024-07-13  1:51 Shenghao Ding
  2024-07-13  1:51 ` [PATCH v1 2/2] ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781 Shenghao Ding
  2024-07-15 18:12 ` [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Shenghao Ding @ 2024-07-13  1:51 UTC (permalink / raw)
  To: broonie
  Cc: andriy.shevchenko, lgirdwood, perex, pierre-louis.bossart,
	13916275206, zhourui, alsa-devel, i-salazar, linux-kernel,
	j-chadha, liam.r.girdwood, jaden-yue, yung-chuan.liao, dipa,
	yuhsuan, henry.lo, tiwai, baojun.xu, soyer, Baojun.Xu, judyhsiao,
	navada, cujomalainey, aanya, nayeem.mahmud, savyasanchi.shukla,
	flaviopr, jesse-ji, darren.ye, Shenghao Ding

Add TAS2563 into the Header in case of misunderstanding.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>

---
v1:
 - Add TAS2563 into the Header
 - Add channel no into the log for error debug
---
 sound/soc/codecs/tas2781-comlib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c
index 1fbf4560f5cc..58abbc098a91 100644
--- a/sound/soc/codecs/tas2781-comlib.c
+++ b/sound/soc/codecs/tas2781-comlib.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 //
-// TAS2781 Common functions for HDA and ASoC Audio drivers
+// TAS2563/TAS2781 Common functions for HDA and ASoC Audio drivers
 //
 // Copyright 2023 - 2024 Texas Instruments, Inc.
 //
@@ -64,8 +64,8 @@ static int tasdevice_change_chn_book(struct tasdevice_priv *tas_priv,
 			 */
 			ret = regmap_write(map, TASDEVICE_PAGE_SELECT, 0);
 			if (ret < 0) {
-				dev_err(tas_priv->dev, "%s, E=%d\n",
-					__func__, ret);
+				dev_err(tas_priv->dev, "%s, E=%d channel:%d\n",
+					__func__, ret, chn);
 				goto out;
 			}
 		}
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781
  2024-07-13  1:51 [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header Shenghao Ding
@ 2024-07-13  1:51 ` Shenghao Ding
  2024-07-15 18:17   ` Mark Brown
  2024-07-15 18:12 ` [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Shenghao Ding @ 2024-07-13  1:51 UTC (permalink / raw)
  To: broonie
  Cc: andriy.shevchenko, lgirdwood, perex, pierre-louis.bossart,
	13916275206, zhourui, alsa-devel, i-salazar, linux-kernel,
	j-chadha, liam.r.girdwood, jaden-yue, yung-chuan.liao, dipa,
	yuhsuan, henry.lo, tiwai, baojun.xu, soyer, Baojun.Xu, judyhsiao,
	navada, cujomalainey, aanya, nayeem.mahmud, savyasanchi.shukla,
	flaviopr, jesse-ji, darren.ye, Shenghao Ding

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@ti.com>

v1:
 - Use strscpy to replace scnprintf.
 - rename dai_driver name from "tas2781_codec" to "tasdev_codec"
 - 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 e79d613745b4..6482ec44f7a8 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -352,7 +352,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;
@@ -423,8 +423,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;
@@ -452,8 +451,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;
@@ -461,8 +460,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;
@@ -672,7 +670,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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header
  2024-07-13  1:51 [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header Shenghao Ding
  2024-07-13  1:51 ` [PATCH v1 2/2] ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781 Shenghao Ding
@ 2024-07-15 18:12 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-07-15 18:12 UTC (permalink / raw)
  To: Shenghao Ding
  Cc: andriy.shevchenko, lgirdwood, perex, pierre-louis.bossart,
	13916275206, zhourui, alsa-devel, i-salazar, linux-kernel,
	j-chadha, liam.r.girdwood, jaden-yue, yung-chuan.liao, dipa,
	yuhsuan, henry.lo, tiwai, baojun.xu, soyer, Baojun.Xu, judyhsiao,
	navada, cujomalainey, aanya, nayeem.mahmud, savyasanchi.shukla,
	flaviopr, jesse-ji, darren.ye

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

On Sat, Jul 13, 2024 at 09:51:41AM +0800, Shenghao Ding wrote:
> Add TAS2563 into the Header in case of misunderstanding.

> @@ -64,8 +64,8 @@ static int tasdevice_change_chn_book(struct tasdevice_priv *tas_priv,
>  			 */
>  			ret = regmap_write(map, TASDEVICE_PAGE_SELECT, 0);
>  			if (ret < 0) {
> -				dev_err(tas_priv->dev, "%s, E=%d\n",
> -					__func__, ret);
> +				dev_err(tas_priv->dev, "%s, E=%d channel:%d\n",
> +					__func__, ret, chn);
>  				goto out;
>  			}

This is reasonable enough but doesn't match the changelog.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 2/2] ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781
  2024-07-13  1:51 ` [PATCH v1 2/2] ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781 Shenghao Ding
@ 2024-07-15 18:17   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-07-15 18:17 UTC (permalink / raw)
  To: Shenghao Ding
  Cc: andriy.shevchenko, lgirdwood, perex, pierre-louis.bossart,
	13916275206, zhourui, alsa-devel, i-salazar, linux-kernel,
	j-chadha, liam.r.girdwood, jaden-yue, yung-chuan.liao, dipa,
	yuhsuan, henry.lo, tiwai, baojun.xu, soyer, Baojun.Xu, judyhsiao,
	navada, cujomalainey, aanya, nayeem.mahmud, savyasanchi.shukla,
	flaviopr, jesse-ji, darren.ye

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

On Sat, Jul 13, 2024 at 09:51:42AM +0800, Shenghao Ding wrote:
> Rename dai_driver name to unify the name between TAS2563 and
> TAS2781, remove unnecessary line feed, strscpy replace scnprintf.

This should be split into several changes, the name unification, the
linefeed cleanup and the scnprintf() replacement don't seem to overlap
at all.

> Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
> 
> v1:
>  - Use strscpy to replace scnprintf.
>  - rename dai_driver name from "tas2781_codec" to "tasdev_codec"
>  - Remove unnecessary line feed for tasdevice_dsp_create_ctrls
> ---

These changelogs should come after the --- so that tools can cut them
out when applying.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-15 18:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-13  1:51 [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header Shenghao Ding
2024-07-13  1:51 ` [PATCH v1 2/2] ASoc: tas2781: Rename dai_driver name to unify the name between TAS2563 and TAS2781 Shenghao Ding
2024-07-15 18:17   ` Mark Brown
2024-07-15 18:12 ` [PATCH v1 1/2] ASoc: tas2781: Add TAS2563 into the Header Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®