Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20240621132309.564-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Shenghao Ding and committed by
Mark Brown
00dd4d86 fe836c78

+11 -4
+1
include/sound/tas2781.h
··· 108 108 unsigned char coef_binaryname[64]; 109 109 unsigned char rca_binaryname[64]; 110 110 unsigned char dev_name[32]; 111 + const char *name_prefix; 111 112 unsigned char ndev; 112 113 unsigned int magic_num; 113 114 unsigned int chip_id;
+9 -4
sound/soc/codecs/tas2781-comlib.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 // 3 - // tas2781-lib.c -- TAS2781 Common functions for HDA and ASoC Audio drivers 3 + // TAS2781 Common functions for HDA and ASoC Audio drivers 4 4 // 5 - // Copyright 2023 Texas Instruments, Inc. 5 + // Copyright 2023 - 2024 Texas Instruments, Inc. 6 6 // 7 7 // Author: Shenghao Ding <shenghao-ding@ti.com> 8 8 ··· 277 277 */ 278 278 mutex_lock(&tas_priv->codec_lock); 279 279 280 - scnprintf(tas_priv->rca_binaryname, 64, "%sRCA%d.bin", 281 - tas_priv->dev_name, tas_priv->ndev); 280 + if (tas_priv->name_prefix) 281 + scnprintf(tas_priv->rca_binaryname, 64, "%s-%sRCA%d.bin", 282 + tas_priv->name_prefix, tas_priv->dev_name, 283 + tas_priv->ndev); 284 + else 285 + scnprintf(tas_priv->rca_binaryname, 64, "%sRCA%d.bin", 286 + tas_priv->dev_name, tas_priv->ndev); 282 287 crc8_populate_msb(tas_priv->crc8_lkp_tbl, TASDEVICE_CRC8_POLYNOMIAL); 283 288 tas_priv->codec = codec; 284 289 ret = request_firmware_nowait(module, FW_ACTION_UEVENT,
+1
sound/soc/codecs/tas2781-i2c.c
··· 579 579 { 580 580 struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec); 581 581 582 + tas_priv->name_prefix = codec->name_prefix; 582 583 return tascodec_init(tas_priv, codec, THIS_MODULE, tasdevice_fw_ready); 583 584 } 584 585