ASoc: tas2781: Add name_prefix as the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s
Subsystems (3)
Shenghao Ding
maintainerPATCH 1/1 ASoc: tas2781: Add name_prefix as the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s
Add name_prefix as the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s. name_prefix is not mandatory.
---
v1:
- Changed the copyright year to 2024 in tas2781-comlib.c.
- Correct the filename in the header comments of tas2781-comlib.c, remove the wrong file name.
- Add name_prefix as name of firmwares and kcontrol.
--- include/sound/tas2781.h | 1 + sound/soc/codecs/tas2781-comlib.c | 13 +++++++++---- sound/soc/codecs/tas2781-i2c.c | 1 + 3 files changed, 11 insertions(+), 4 deletions(-)
include/sound/tas2781.h +1 -0
@@ -108,6 +108,7 @@ struct tasdevice_priv {unsigned char coef_binaryname[64 ];unsigned char rca_binaryname[64 ];unsigned char dev_name[32 ]; +const char *name_prefix;unsigned char ndev;unsigned int magic_num;unsigned int chip_id;
sound/soc/codecs/tas2781-comlib.c +9 -4
@@ -1,8 +1,8 @@// SPDX-License-Identifier: GPL-2.0 // -// tas2781-lib.c -- TAS2781 Common functions for HDA and ASoC Audio drivers +// TAS2781 Common functions for HDA and ASoC Audio drivers // -// Copyright 2023 Texas Instruments, Inc. +// Copyright 2023 - 2024 Texas Instruments, Inc. // // Author: Shenghao Ding <[email protected]>
@@ -277,8 +277,13 @@ int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,*/ mutex_lock (&tas_priv->codec_lock); -scnprintf (tas_priv->rca_binaryname,64 ,"%sRCA%d.bin" , - tas_priv->dev_name, tas_priv->ndev); +if (tas_priv->name_prefix) +scnprintf (tas_priv->rca_binaryname,64 ,"%s-%sRCA%d.bin" , + tas_priv->name_prefix, tas_priv->dev_name, + tas_priv->ndev); +else +scnprintf (tas_priv->rca_binaryname,64 ,"%sRCA%d.bin" , + tas_priv->dev_name, tas_priv->ndev);crc8_populate_msb (tas_priv->crc8_lkp_tbl,TASDEVICE_CRC8_POLYNOMIAL ); tas_priv->codec = codec; ret = request_firmware_nowait(module, FW_ACTION_UEVENT,
sound/soc/codecs/tas2781-i2c.c +1 -0
@@ -579,6 +579,7 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec) {struct tasdevice_priv *tas_priv =snd_soc_component_get_drvdata (codec); + tas_priv->name_prefix = codec->name_prefix;return tascodec_init (tas_priv, codec,THIS_MODULE , tasdevice_fw_ready); }
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 5 lines · Shenghao Ding
Add
name_prefixas the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s.name_prefixis not mandatory.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoc: tas2781: Add name_prefix as the prefix name of firmwares and kcontrol to support corresponding TAS2563/TAS2781s
commit: 00dd4d86ed908e70d912a96ad91d1248ff055b62
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark