summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tas2781-comlib.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-07-15 16:31:00 +0200
committerTakashi Iwai <tiwai@suse.de>2024-07-15 16:31:00 +0200
commit97b10a77b150df664bb521ae217dd6bceb40d5d3 (patch)
tree9f14e5d6e0a9e048cfef95f41678569dd994aba6 /sound/soc/codecs/tas2781-comlib.c
parente54dc34318f62bdeea7edefed386d47fae155618 (diff)
parentc51cba4755609ad97ba97713210c16f043c73224 (diff)
Merge tag 'asoc-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for for v6.11 There are a lot of changes in here, though the big bulk of things is cleanups and simplifications of various kinds which are internally rather than externally visible. A good chunk of those are DT schema conversions, but there's also a lot of changes in the code. Highlights: - Syncing of features between simple-audio-card and the two audio-graph cards so there is no reason to stick with an older driver. - Support for specifying the order of operations for components within cards to allow quirking for unusual systems. - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS v2.5 and WCD937x, Realtek RT1318 and RT1320 and Texas Instruments PCM5242.
Diffstat (limited to 'sound/soc/codecs/tas2781-comlib.c')
-rw-r--r--sound/soc/codecs/tas2781-comlib.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c
index 3aa81514dad7..1fbf4560f5cc 100644
--- a/sound/soc/codecs/tas2781-comlib.c
+++ b/sound/soc/codecs/tas2781-comlib.c
@@ -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 <shenghao-ding@ti.com>
@@ -243,7 +243,7 @@ struct tasdevice_priv *tasdevice_kzalloc(struct i2c_client *i2c)
}
EXPORT_SYMBOL_GPL(tasdevice_kzalloc);
-void tas2781_reset(struct tasdevice_priv *tas_dev)
+void tasdevice_reset(struct tasdevice_priv *tas_dev)
{
int ret, i;
@@ -254,8 +254,8 @@ void tas2781_reset(struct tasdevice_priv *tas_dev)
} else {
for (i = 0; i < tas_dev->ndev; i++) {
ret = tasdevice_dev_write(tas_dev, i,
- TAS2781_REG_SWRESET,
- TAS2781_REG_SWRESET_RESET);
+ TASDEVICE_REG_SWRESET,
+ TASDEVICE_REG_SWRESET_RESET);
if (ret < 0)
dev_err(tas_dev->dev,
"dev %d swreset fail, %d\n",
@@ -264,7 +264,7 @@ void tas2781_reset(struct tasdevice_priv *tas_dev)
}
usleep_range(1000, 1050);
}
-EXPORT_SYMBOL_GPL(tas2781_reset);
+EXPORT_SYMBOL_GPL(tasdevice_reset);
int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
struct module *module,
@@ -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,