]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ALSA: hda/tas2781: Add name prefix tas2781 for tas2781's dvc_tlv and amp_vol_tlv
authorShenghao Ding <shenghao-ding@ti.com>
Sat, 16 Aug 2025 04:27:41 +0000 (12:27 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 18 Aug 2025 09:10:57 +0000 (11:10 +0200)
With some new devices adding into the driver, dvc_tlv and amp_vol_tlv will
cause confusion for customers on which devices they support.

Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250816042741.1659-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/tas2781-tlv.h
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
sound/hda/codecs/side-codecs/tas2781_hda_spi.c
sound/soc/codecs/tas2781-i2c.c

index ef9b9f19d212058bdab0010c9f5bec36f1c59f04..273224df9282da457ea26dbb101c8963b86aa478 100644 (file)
@@ -2,7 +2,7 @@
 //
 // ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier
 //
-// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
+// Copyright (C) 2022 - 2025 Texas Instruments Incorporated
 // https://www.ti.com
 //
 // The TAS2781 driver implements a flexible and configurable
@@ -15,7 +15,7 @@
 #ifndef __TAS2781_TLV_H__
 #define __TAS2781_TLV_H__
 
-static const __maybe_unused DECLARE_TLV_DB_SCALE(dvc_tlv, -10000, 50, 0);
-static const __maybe_unused DECLARE_TLV_DB_SCALE(amp_vol_tlv, 1100, 50, 0);
+static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2781_dvc_tlv, -10000, 50, 0);
+static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2781_amp_tlv, 1100, 50, 0);
 
 #endif
index 06c7bc2b9e9d5933f2b7ce0c9158b47bcd017136..b91fff3fde97fbbe804d5015707f0454bef3e9e7 100644 (file)
@@ -267,7 +267,7 @@ static const struct snd_kcontrol_new tas2770_snd_controls[] = {
 static const struct snd_kcontrol_new tas2781_snd_controls[] = {
        ACARD_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL,
                1, 0, 20, 0, tas2781_amp_getvol,
-               tas2781_amp_putvol, amp_vol_tlv),
+               tas2781_amp_putvol, tas2781_amp_tlv),
        ACARD_SINGLE_BOOL_EXT("Speaker Force Firmware Load", 0,
                tas2781_force_fwload_get, tas2781_force_fwload_put),
 };
index 09a5d0f131b2fd402d2a5749956fe144c793201a..b9a55672bf15d53d144b476f3755919592761312 100644 (file)
@@ -494,9 +494,11 @@ static int tas2781_force_fwload_put(struct snd_kcontrol *kcontrol,
 
 static struct snd_kcontrol_new tas2781_snd_ctls[] = {
        ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_AMP_LEVEL, 1, 0, 20, 0,
-               tas2781_amp_getvol, tas2781_amp_putvol, amp_vol_tlv),
+               tas2781_amp_getvol, tas2781_amp_putvol,
+               tas2781_amp_tlv),
        ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_DVC_LVL, 0, 0, 200, 1,
-               tas2781_digital_getvol, tas2781_digital_putvol, dvc_tlv),
+               tas2781_digital_getvol, tas2781_digital_putvol,
+               tas2781_dvc_tlv),
        ACARD_SINGLE_BOOL_EXT(NULL, 0, tas2781_force_fwload_get,
                tas2781_force_fwload_put),
 };
index 676130f4cf3ecf5972870b6fb0cfe6920e588c30..0e09d794516fc70b2a34a8ecce7f859f1b30bd33 100644 (file)
@@ -910,10 +910,10 @@ static const struct snd_kcontrol_new tasdevice_cali_controls[] = {
 static const struct snd_kcontrol_new tas2781_snd_controls[] = {
        SOC_SINGLE_RANGE_EXT_TLV("Speaker Analog Volume", TAS2781_AMP_LEVEL,
                1, 0, 20, 0, tas2781_amp_getvol,
-               tas2781_amp_putvol, amp_vol_tlv),
+               tas2781_amp_putvol, tas2781_amp_tlv),
        SOC_SINGLE_RANGE_EXT_TLV("Speaker Digital Volume", TAS2781_DVC_LVL,
                0, 0, 200, 1, tas2781_digital_getvol,
-               tas2781_digital_putvol, dvc_tlv),
+               tas2781_digital_putvol, tas2781_dvc_tlv),
 };
 
 static const struct snd_kcontrol_new tas2781_cali_controls[] = {