summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/compress_driver.h2
-rw-r--r--include/sound/cs-amp-lib.h1
-rw-r--r--include/sound/cs35l56.h5
-rw-r--r--include/sound/dmaengine_pcm.h5
-rw-r--r--include/sound/emu10k1.h3
-rw-r--r--include/sound/gus.h1
-rw-r--r--include/sound/hda_codec.h34
-rw-r--r--include/sound/hdaudio.h1
-rw-r--r--include/sound/soc-component.h83
-rw-r--r--include/sound/soc-dai.h7
-rw-r--r--include/sound/soc-dapm.h61
-rw-r--r--include/sound/soc.h5
-rw-r--r--include/sound/soc_sdw_utils.h8
-rw-r--r--include/sound/sof/ipc4/header.h4
-rw-r--r--include/sound/soundfont.h18
-rw-r--r--include/sound/tas2781-dsp.h11
-rw-r--r--include/sound/tas2781.h14
-rw-r--r--include/sound/tas2x20-tlv.h259
-rw-r--r--include/sound/tas5825-tlv.h24
-rw-r--r--include/sound/tlv320dac33-plat.h21
20 files changed, 418 insertions, 149 deletions
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
index b55c9eeb2b54..9e3d801e45ec 100644
--- a/include/sound/compress_driver.h
+++ b/include/sound/compress_driver.h
@@ -161,7 +161,7 @@ struct snd_compr_ops {
struct snd_compr_metadata *metadata);
int (*trigger)(struct snd_compr_stream *stream, int cmd);
int (*pointer)(struct snd_compr_stream *stream,
- struct snd_compr_tstamp *tstamp);
+ struct snd_compr_tstamp64 *tstamp);
int (*copy)(struct snd_compr_stream *stream, char __user *buf,
size_t count);
int (*mmap)(struct snd_compr_stream *stream,
diff --git a/include/sound/cs-amp-lib.h b/include/sound/cs-amp-lib.h
index 5459c221badf..43a87a39110c 100644
--- a/include/sound/cs-amp-lib.h
+++ b/include/sound/cs-amp-lib.h
@@ -49,6 +49,7 @@ int cs_amp_write_cal_coeffs(struct cs_dsp *dsp,
const struct cirrus_amp_cal_data *data);
int cs_amp_get_efi_calibration_data(struct device *dev, u64 target_uid, int amp_index,
struct cirrus_amp_cal_data *out_data);
+int cs_amp_get_vendor_spkid(struct device *dev);
struct cs_amp_test_hooks {
efi_status_t (*get_efi_variable)(efi_char16_t *name,
diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index 7c8bbe8ad1e2..ab044ce2aa8b 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -85,7 +85,9 @@
#define CS35L56_DSP1_XMEM_UNPACKED24_0 0x2800000
#define CS35L56_DSP1_FW_VER 0x2800010
#define CS35L56_DSP1_HALO_STATE 0x28021E0
+#define CS35L56_B2_DSP1_HALO_STATE 0x2803D20
#define CS35L56_DSP1_PM_CUR_STATE 0x2804308
+#define CS35L56_B2_DSP1_PM_CUR_STATE 0x2804678
#define CS35L56_DSP1_XMEM_UNPACKED24_8191 0x2807FFC
#define CS35L56_DSP1_CORE_BASE 0x2B80000
#define CS35L56_DSP1_SCRATCH1 0x2B805C0
@@ -337,9 +339,6 @@ extern const struct regmap_config cs35l56_regmap_sdw;
extern const struct regmap_config cs35l63_regmap_i2c;
extern const struct regmap_config cs35l63_regmap_sdw;
-extern const struct cs35l56_fw_reg cs35l56_fw_reg;
-extern const struct cs35l56_fw_reg cs35l63_fw_reg;
-
extern const struct cirrus_amp_cal_controls cs35l56_calibration_controls;
extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC];
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h
index 1ef13bcdc43f..9472f0a966a2 100644
--- a/include/sound/dmaengine_pcm.h
+++ b/include/sound/dmaengine_pcm.h
@@ -69,6 +69,10 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream)
* @peripheral_config: peripheral configuration for programming peripheral
* for dmaengine transfer
* @peripheral_size: peripheral configuration buffer size
+ * @port_window_size: The length of the register area in words the data need
+ * to be accessed on the device side. It is only used for devices which is using
+ * an area instead of a single register to send/receive the data. Typically the
+ * DMA loops in this area in order to transfer the data.
*/
struct snd_dmaengine_dai_dma_data {
dma_addr_t addr;
@@ -80,6 +84,7 @@ struct snd_dmaengine_dai_dma_data {
unsigned int flags;
void *peripheral_config;
size_t peripheral_size;
+ u32 port_window_size;
};
void snd_dmaengine_pcm_set_config_from_dai_data(
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 38db50b280eb..4f94565c9d15 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1842,8 +1842,7 @@ unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg,
void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
-static inline void snd_emu1010_fpga_lock(struct snd_emu10k1 *emu) { mutex_lock(&emu->emu1010.lock); };
-static inline void snd_emu1010_fpga_unlock(struct snd_emu10k1 *emu) { mutex_unlock(&emu->emu1010.lock); };
+DEFINE_GUARD(snd_emu1010_fpga_lock, struct snd_emu10k1 *, mutex_lock(&(_T)->emu1010.lock), mutex_unlock(&(_T)->emu1010.lock))
void snd_emu1010_fpga_write_lock(struct snd_emu10k1 *emu, u32 reg, u32 value);
void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
void snd_emu1010_fpga_read(struct snd_emu10k1 *emu, u32 reg, u32 *value);
diff --git a/include/sound/gus.h b/include/sound/gus.h
index 1c8fb6c93e50..321ae93625eb 100644
--- a/include/sound/gus.h
+++ b/include/sound/gus.h
@@ -515,7 +515,6 @@ struct _SND_IW_LFO_PROGRAM {
/* gus_mem.c */
-void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup);
int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * block);
struct snd_gf1_mem_block *snd_gf1_mem_alloc(struct snd_gf1_mem * alloc, int owner,
char *name, int size, int w_16,
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
index ddc9c392f93f..5d9f0ef228af 100644
--- a/include/sound/hda_codec.h
+++ b/include/sound/hda_codec.h
@@ -360,8 +360,8 @@ int snd_hda_override_conn_list(struct hda_codec *codec, hda_nid_t nid, int nums,
int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux,
hda_nid_t nid, int recursive);
unsigned int snd_hda_get_num_devices(struct hda_codec *codec, hda_nid_t nid);
-int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid,
- u8 *dev_list, int max_devices);
+unsigned int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid,
+ u8 *dev_list, unsigned int max_devices);
int snd_hda_get_dev_select(struct hda_codec *codec, hda_nid_t nid);
int snd_hda_set_dev_select(struct hda_codec *codec, hda_nid_t nid, int dev_id);
@@ -503,6 +503,36 @@ static inline bool hda_codec_need_resume(struct hda_codec *codec)
return !codec->relaxed_resume && codec->jacktbl.used;
}
+/*
+ * PM with auto-cleanup: call like CLASS(snd_hda_power, pm)(codec)
+ * If the error handling is needed, refer pm.err.
+ */
+struct __hda_power_obj {
+ struct hda_codec *codec;
+ int err;
+};
+
+static inline struct __hda_power_obj __snd_hda_power_up(struct hda_codec *codec)
+{
+ struct __hda_power_obj T = { .codec = codec };
+ T.err = snd_hda_power_up(codec);
+ return T;
+}
+
+static inline struct __hda_power_obj __snd_hda_power_up_pm(struct hda_codec *codec)
+{
+ struct __hda_power_obj T = { .codec = codec };
+ T.err = snd_hda_power_up_pm(codec);
+ return T;
+}
+
+DEFINE_CLASS(snd_hda_power, struct __hda_power_obj,
+ snd_hda_power_down((_T).codec), __snd_hda_power_up(codec),
+ struct hda_codec *codec)
+DEFINE_CLASS(snd_hda_power_pm, struct __hda_power_obj,
+ snd_hda_power_down_pm((_T).codec), __snd_hda_power_up_pm(codec),
+ struct hda_codec *codec)
+
#ifdef CONFIG_SND_HDA_PATCH_LOADER
/*
* patch firmware
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index d38234f8fe44..4e0c1d8af09f 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -651,6 +651,7 @@ int snd_hdac_stream_set_lpib(struct hdac_stream *azx_dev, u32 value);
#define snd_hdac_dsp_lock(dev) mutex_lock(&(dev)->dsp_mutex)
#define snd_hdac_dsp_unlock(dev) mutex_unlock(&(dev)->dsp_mutex)
#define snd_hdac_stream_is_locked(dev) ((dev)->locked)
+DEFINE_GUARD(snd_hdac_dsp_lock, struct hdac_stream *, snd_hdac_dsp_lock(_T), snd_hdac_dsp_unlock(_T))
/* DSP loader helpers */
int snd_hdac_dsp_prepare(struct hdac_stream *azx_dev, unsigned int format,
unsigned int byte_size, struct snd_dma_buffer *bufp);
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index 2caa807c6249..d78cda866888 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -47,7 +47,7 @@ struct snd_compress_ops {
struct snd_compr_stream *stream, int cmd);
int (*pointer)(struct snd_soc_component *component,
struct snd_compr_stream *stream,
- struct snd_compr_tstamp *tstamp);
+ struct snd_compr_tstamp64 *tstamp);
int (*copy)(struct snd_soc_component *component,
struct snd_compr_stream *stream, char __user *buf,
size_t count);
@@ -261,89 +261,18 @@ struct snd_soc_component {
list_for_each_entry_safe(dai, _dai, &(component)->dai_list, list)
/**
- * snd_soc_dapm_to_component() - Casts a DAPM context to the component it is
- * embedded in
- * @dapm: The DAPM context to cast to the component
- *
- * This function must only be used on DAPM contexts that are known to be part of
- * a component (e.g. in a component driver). Otherwise the behavior is
- * undefined.
- */
-static inline struct snd_soc_component *snd_soc_dapm_to_component(
- struct snd_soc_dapm_context *dapm)
-{
- return container_of(dapm, struct snd_soc_component, dapm);
-}
-
-/**
- * snd_soc_component_get_dapm() - Returns the DAPM context associated with a
+ * snd_soc_component_to_dapm() - Returns the DAPM context associated with a
* component
* @component: The component for which to get the DAPM context
*/
-static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
+static inline struct snd_soc_dapm_context *snd_soc_component_to_dapm(
struct snd_soc_component *component)
{
return &component->dapm;
}
-/**
- * snd_soc_component_init_bias_level() - Initialize COMPONENT DAPM bias level
- * @component: The COMPONENT for which to initialize the DAPM bias level
- * @level: The DAPM level to initialize to
- *
- * Initializes the COMPONENT DAPM bias level. See snd_soc_dapm_init_bias_level()
- */
-static inline void
-snd_soc_component_init_bias_level(struct snd_soc_component *component,
- enum snd_soc_bias_level level)
-{
- snd_soc_dapm_init_bias_level(
- snd_soc_component_get_dapm(component), level);
-}
-
-/**
- * snd_soc_component_get_bias_level() - Get current COMPONENT DAPM bias level
- * @component: The COMPONENT for which to get the DAPM bias level
- *
- * Returns: The current DAPM bias level of the COMPONENT.
- */
-static inline enum snd_soc_bias_level
-snd_soc_component_get_bias_level(struct snd_soc_component *component)
-{
- return snd_soc_dapm_get_bias_level(
- snd_soc_component_get_dapm(component));
-}
-
-/**
- * snd_soc_component_force_bias_level() - Set the COMPONENT DAPM bias level
- * @component: The COMPONENT for which to set the level
- * @level: The level to set to
- *
- * Forces the COMPONENT bias level to a specific state. See
- * snd_soc_dapm_force_bias_level().
- */
-static inline int
-snd_soc_component_force_bias_level(struct snd_soc_component *component,
- enum snd_soc_bias_level level)
-{
- return snd_soc_dapm_force_bias_level(
- snd_soc_component_get_dapm(component),
- level);
-}
-
-/**
- * snd_soc_dapm_kcontrol_component() - Returns the component associated to a
- * kcontrol
- * @kcontrol: The kcontrol
- *
- * This function must only be used on DAPM contexts that are known to be part of
- * a COMPONENT (e.g. in a COMPONENT driver). Otherwise the behavior is undefined
- */
-static inline struct snd_soc_component *snd_soc_dapm_kcontrol_component(
- struct snd_kcontrol *kcontrol)
-{
- return snd_soc_dapm_to_component(snd_soc_dapm_kcontrol_dapm(kcontrol));
-}
+// FIXME
+#define snd_soc_component_get_dapm snd_soc_component_to_dapm
/**
* snd_soc_component_cache_sync() - Sync the register cache with the hardware
@@ -498,7 +427,7 @@ int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream,
struct snd_compr_codec_caps *codec);
int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes);
int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream,
- struct snd_compr_tstamp *tstamp);
+ struct snd_compr_tstamp64 *tstamp);
int snd_soc_component_compr_copy(struct snd_compr_stream *cstream,
char __user *buf, size_t count);
int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream,
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 166c29557e9d..224396927aef 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -256,7 +256,7 @@ int snd_soc_dai_compr_ack(struct snd_soc_dai *dai,
size_t bytes);
int snd_soc_dai_compr_pointer(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
- struct snd_compr_tstamp *tstamp);
+ struct snd_compr_tstamp64 *tstamp);
int snd_soc_dai_compr_set_metadata(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);
@@ -383,8 +383,9 @@ struct snd_soc_cdai_ops {
struct snd_compr_metadata *, struct snd_soc_dai *);
int (*trigger)(struct snd_compr_stream *, int,
struct snd_soc_dai *);
- int (*pointer)(struct snd_compr_stream *,
- struct snd_compr_tstamp *, struct snd_soc_dai *);
+ int (*pointer)(struct snd_compr_stream *stream,
+ struct snd_compr_tstamp64 *tstamp,
+ struct snd_soc_dai *dai);
int (*ack)(struct snd_compr_stream *, size_t,
struct snd_soc_dai *);
};
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 0b5c7e6a90c8..75941324886b 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -583,11 +583,9 @@ struct snd_soc_dapm_update {
struct snd_soc_dapm_context {
enum snd_soc_bias_level bias_level;
- /* bit field */
- unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
- unsigned int suspend_bias_off:1; /* Use BIAS_OFF in suspend if the DAPM is idle */
+ bool idle_bias; /* Use BIAS_OFF instead of STANDBY when false */
- struct device *dev; /* from parent - for debug */
+ struct device *dev; /* from parent - for debug */ /* REMOVE ME */
struct snd_soc_component *component; /* parent component */
struct snd_soc_card *card; /* parent card */
@@ -660,6 +658,12 @@ void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card);
int snd_soc_dapm_update_dai(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai);
int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s);
+struct device *snd_soc_dapm_to_dev(struct snd_soc_dapm_context *dapm);
+struct snd_soc_card *snd_soc_dapm_to_card(struct snd_soc_dapm_context *dapm);
+struct snd_soc_component *snd_soc_dapm_to_component(struct snd_soc_dapm_context *dapm);
+
+bool snd_soc_dapm_get_idle_bias(struct snd_soc_dapm_context *dapm);
+void snd_soc_dapm_set_idle_bias(struct snd_soc_dapm_context *dapm, bool on);
/* dapm path setup */
int snd_soc_dapm_new_widgets(struct snd_soc_card *card);
@@ -699,7 +703,6 @@ int snd_soc_dapm_sync_unlocked(struct snd_soc_dapm_context *dapm);
int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin);
int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm, const char *pin);
int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, const char *pin);
-unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol);
void snd_soc_dapm_mark_endpoints_dirty(struct snd_soc_card *card);
/*
@@ -718,10 +721,23 @@ int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,
bool (*custom_stop_condition)(struct snd_soc_dapm_widget *, enum snd_soc_dapm_direction));
void snd_soc_dapm_dai_free_widgets(struct snd_soc_dapm_widget_list **list);
-struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm(struct snd_kcontrol *kcontrol);
-struct snd_soc_dapm_widget *snd_soc_dapm_kcontrol_widget(struct snd_kcontrol *kcontrol);
+struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_to_dapm(struct snd_kcontrol *kcontrol);
+struct snd_soc_dapm_widget *snd_soc_dapm_kcontrol_to_widget(struct snd_kcontrol *kcontrol);
+struct snd_soc_component *snd_soc_dapm_kcontrol_to_component(struct snd_kcontrol *kcontrol);
+unsigned int snd_soc_dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol);
int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level);
+enum snd_soc_bias_level snd_soc_dapm_get_bias_level(struct snd_soc_dapm_context *dapm);
+void snd_soc_dapm_init_bias_level(struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level);
+
+// REMOVE ME !!
+#define snd_soc_component_force_bias_level(c, l) snd_soc_dapm_force_bias_level(&(c)->dapm, l)
+#define snd_soc_component_get_bias_level(c) snd_soc_dapm_get_bias_level(&(c)->dapm)
+#define snd_soc_component_init_bias_level(c, l) snd_soc_dapm_init_bias_level(&(c)->dapm, l)
+#define snd_soc_dapm_kcontrol_widget snd_soc_dapm_kcontrol_to_widget
+#define snd_soc_dapm_kcontrol_dapm snd_soc_dapm_kcontrol_to_dapm
+#define dapm_kcontrol_get_value snd_soc_dapm_kcontrol_get_value
+#define snd_soc_dapm_kcontrol_component snd_soc_dapm_kcontrol_to_component
#define for_each_dapm_widgets(list, i, widget) \
for ((i) = 0; \
@@ -729,37 +745,6 @@ int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm, enum snd_so
(i)++)
/**
- * snd_soc_dapm_init_bias_level() - Initialize DAPM bias level
- * @dapm: The DAPM context to initialize
- * @level: The DAPM level to initialize to
- *
- * This function only sets the driver internal state of the DAPM level and will
- * not modify the state of the device. Hence it should not be used during normal
- * operation, but only to synchronize the internal state to the device state.
- * E.g. during driver probe to set the DAPM level to the one corresponding with
- * the power-on reset state of the device.
- *
- * To change the DAPM state of the device use snd_soc_dapm_set_bias_level().
- */
-static inline void snd_soc_dapm_init_bias_level(
- struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level)
-{
- dapm->bias_level = level;
-}
-
-/**
- * snd_soc_dapm_get_bias_level() - Get current DAPM bias level
- * @dapm: The context for which to get the bias level
- *
- * Returns: The current bias level of the passed DAPM context.
- */
-static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level(
- struct snd_soc_dapm_context *dapm)
-{
- return dapm->bias_level;
-}
-
-/**
* snd_soc_dapm_widget_for_each_path - Iterates over all paths in the
* specified direction of a widget
* @w: The widget
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 1fffef311c41..ddc508ff7b9b 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1120,6 +1120,11 @@ static inline int snd_soc_card_is_instantiated(struct snd_soc_card *card)
return card && card->instantiated;
}
+static inline struct snd_soc_dapm_context *snd_soc_card_to_dapm(struct snd_soc_card *card)
+{
+ return &card->dapm;
+}
+
/* SoC machine DAI configuration, glues a codec and cpu DAI together */
struct snd_soc_pcm_runtime {
struct device *dev;
diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h
index 6049a5d0cfcd..3c5e9b2af7f1 100644
--- a/include/sound/soc_sdw_utils.h
+++ b/include/sound/soc_sdw_utils.h
@@ -248,5 +248,13 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so
int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+/* TI */
+int asoc_sdw_ti_amp_init(struct snd_soc_card *card,
+ struct snd_soc_dai_link *dai_links,
+ struct asoc_sdw_codec_info *info,
+ bool playback);
+int asoc_sdw_ti_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+int asoc_sdw_ti_amp_initial_settings(struct snd_soc_card *card,
+ const char *name_prefix);
#endif
diff --git a/include/sound/sof/ipc4/header.h b/include/sound/sof/ipc4/header.h
index e85c7afd85a4..15fac532688e 100644
--- a/include/sound/sof/ipc4/header.h
+++ b/include/sound/sof/ipc4/header.h
@@ -326,10 +326,14 @@ struct sof_ipc4_base_module_cfg {
#define SOF_IPC4_MOD_INSTANCE_SHIFT 16
#define SOF_IPC4_MOD_INSTANCE_MASK GENMASK(23, 16)
#define SOF_IPC4_MOD_INSTANCE(x) ((x) << SOF_IPC4_MOD_INSTANCE_SHIFT)
+#define SOF_IPC4_MOD_INSTANCE_GET(x) (((x) & SOF_IPC4_MOD_INSTANCE_MASK) \
+ >> SOF_IPC4_MOD_INSTANCE_SHIFT)
#define SOF_IPC4_MOD_ID_SHIFT 0
#define SOF_IPC4_MOD_ID_MASK GENMASK(15, 0)
#define SOF_IPC4_MOD_ID(x) ((x) << SOF_IPC4_MOD_ID_SHIFT)
+#define SOF_IPC4_MOD_ID_GET(x) (((x) & SOF_IPC4_MOD_ID_MASK) \
+ >> SOF_IPC4_MOD_ID_SHIFT)
/* init module ipc msg */
#define SOF_IPC4_MOD_EXT_PARAM_SIZE_SHIFT 0
diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h
index 8a40cc15f66d..48f8cf6de3ac 100644
--- a/include/sound/soundfont.h
+++ b/include/sound/soundfont.h
@@ -114,5 +114,23 @@ int snd_sf_calc_parm_decay(int msec);
extern int snd_sf_vol_table[128];
int snd_sf_linear_to_log(unsigned int amount, int offset, int ratio);
+/* lock access to sflist */
+static inline void snd_soundfont_lock_preset(struct snd_sf_list *sflist)
+{
+ mutex_lock(&sflist->presets_mutex);
+ guard(spinlock_irqsave)(&sflist->lock);
+ sflist->presets_locked = 1;
+}
+
+/* remove lock */
+static inline void snd_soundfont_unlock_preset(struct snd_sf_list *sflist)
+{
+ guard(spinlock_irqsave)(&sflist->lock);
+ sflist->presets_locked = 0;
+ mutex_unlock(&sflist->presets_mutex);
+}
+
+DEFINE_GUARD(snd_soundfont_lock_preset, struct snd_sf_list *,
+ snd_soundfont_lock_preset(_T), snd_soundfont_unlock_preset(_T))
#endif /* __SOUND_SOUNDFONT_H */
diff --git a/include/sound/tas2781-dsp.h b/include/sound/tas2781-dsp.h
index c3a9efa73d5d..dd6ee45ad096 100644
--- a/include/sound/tas2781-dsp.h
+++ b/include/sound/tas2781-dsp.h
@@ -34,6 +34,7 @@
#define PPC3_VERSION_TAS2781_BASIC_MIN 0x14600
#define PPC3_VERSION_TAS2781_ALPHA_MIN 0x4a00
#define PPC3_VERSION_TAS2781_BETA_MIN 0x19400
+#define PPC3_VERSION_TAS5825_BASE 0x114200
#define TASDEVICE_DEVICE_SUM 8
#define TASDEVICE_CONFIG_SUM 64
@@ -53,6 +54,8 @@ enum tasdevice_dsp_dev_idx {
TASDEVICE_DSP_TAS_2781_DUAL_MONO,
TASDEVICE_DSP_TAS_2781_21,
TASDEVICE_DSP_TAS_2781_QUAD,
+ TASDEVICE_DSP_TAS_5825_MONO,
+ TASDEVICE_DSP_TAS_5825_DUAL,
TASDEVICE_DSP_TAS_MAX_DEVICE
};
@@ -198,6 +201,14 @@ struct tasdevice_rca {
int ncfgs;
struct tasdevice_config_info **cfg_info;
int profile_cfg_id;
+ /*
+ * Since version 0x105, the keyword 'init' was introduced into the
+ * profile, which is used for chip initialization, particularly to
+ * store common settings for other non-initialization profiles.
+ * if (init_profile_id < 0)
+ * No init profile inside the RCA firmware.
+ */
+ int init_profile_id;
};
void tasdevice_select_cfg_blk(void *context, int conf_no,
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 3875e92f1ec5..ddd997ac3216 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -49,10 +49,12 @@
#define TASDEVICE_REG(book, page, reg) (((book * 256 * 128) + \
(page * 128)) + reg)
-/* Software Reset */
+/* Software Reset, compatble with new device (TAS5825). */
#define TASDEVICE_REG_SWRESET TASDEVICE_REG(0x0, 0x0, 0x01)
#define TASDEVICE_REG_SWRESET_RESET BIT(0)
+#define TAS5825_REG_SWRESET_RESET (BIT(0) | BIT(4))
+
/* Checksum */
#define TASDEVICE_CHECKSUM_REG TASDEVICE_REG(0x0, 0x0, 0x7e)
@@ -110,8 +112,17 @@
#define TAS2781_RUNTIME_RE_REG TASDEVICE_REG(0x64, 0x63, 0x44)
enum audio_device {
+ TAS2020,
+ TAS2118,
+ TAS2120,
+ TAS2320,
TAS2563,
+ TAS2570,
+ TAS2572,
TAS2781,
+ TAS5825,
+ TAS5827,
+ TAS_OTHERS,
};
enum dspbin_type {
@@ -194,6 +205,7 @@ struct tasdevice_priv {
unsigned char coef_binaryname[64];
unsigned char rca_binaryname[64];
unsigned char dev_name[32];
+ const unsigned char (*dvc_tlv_table)[4];
const char *name_prefix;
unsigned char ndev;
unsigned int dspbin_typ;
diff --git a/include/sound/tas2x20-tlv.h b/include/sound/tas2x20-tlv.h
new file mode 100644
index 000000000000..6e6bcec4a0a1
--- /dev/null
+++ b/include/sound/tas2x20-tlv.h
@@ -0,0 +1,259 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+//
+// ALSA SoC Texas Instruments TAS2x20/TAS2118 Audio Smart Amplifier
+//
+// Copyright (C) 2025 Texas Instruments Incorporated
+// https://www.ti.com
+//
+// The TAS2x20/TAS2118 hda driver implements for one, two, or even multiple
+// TAS2x20/TAS2118 chips.
+//
+// Author: Baojun Xu <baojun.xu@ti.com>
+//
+
+#ifndef __TAS2X20_TLV_H__
+#define __TAS2X20_TLV_H__
+
+#define TAS2X20_DVC_LEVEL TASDEVICE_REG(0x0, 0x2, 0x0c)
+#define TAS2X20_AMP_LEVEL TASDEVICE_REG(0x0, 0x0, 0x07)
+
+static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2x20_dvc_tlv, 1650, 50, 0);
+static const __maybe_unused DECLARE_TLV_DB_SCALE(tas2x20_amp_tlv, 2100, 50, 0);
+
+/* pow(10, db/20) * pow(2,22) */
+static const __maybe_unused unsigned char tas2x20_dvc_table[][4] = {
+ { 0X00, 0X00, 0X0D, 0X00 }, /* -110.0db */
+ { 0X00, 0X00, 0X0E, 0X00 }, /* -109.5db */
+ { 0X00, 0X00, 0X0E, 0X00 }, /* -109.0db */
+ { 0X00, 0X00, 0X0F, 0X00 }, /* -108.5db */
+ { 0X00, 0X00, 0X10, 0X00 }, /* -108.0db */
+ { 0X00, 0X00, 0X11, 0X00 }, /* -107.5db */
+ { 0X00, 0X00, 0X12, 0X00 }, /* -107.0db */
+ { 0X00, 0X00, 0X13, 0X00 }, /* -106.5db */
+ { 0X00, 0X00, 0X15, 0X00 }, /* -106.0db */
+ { 0X00, 0X00, 0X16, 0X00 }, /* -105.5db */
+ { 0X00, 0X00, 0X17, 0X00 }, /* -105.0db */
+ { 0X00, 0X00, 0X18, 0X00 }, /* -104.5db */
+ { 0X00, 0X00, 0X1A, 0X00 }, /* -104.0db */
+ { 0X00, 0X00, 0X1C, 0X00 }, /* -103.5db */
+ { 0X00, 0X00, 0X1D, 0X00 }, /* -103.0db */
+ { 0X00, 0X00, 0X1F, 0X00 }, /* -102.5db */
+ { 0X00, 0X00, 0X21, 0X00 }, /* -102.0db */
+ { 0X00, 0X00, 0X23, 0X00 }, /* -101.5db */
+ { 0X00, 0X00, 0X25, 0X00 }, /* -101.0db */
+ { 0X00, 0X00, 0X27, 0X00 }, /* -100.5db */
+ { 0X00, 0X00, 0X29, 0X00 }, /* -100.0db */
+ { 0X00, 0X00, 0X2C, 0X00 }, /* -99.5db */
+ { 0X00, 0X00, 0X2F, 0X00 }, /* -99.0db */
+ { 0X00, 0X00, 0X31, 0X00 }, /* -98.5db */
+ { 0X00, 0X00, 0X34, 0X00 }, /* -98.0db */
+ { 0X00, 0X00, 0X37, 0X00 }, /* -97.5db */
+ { 0X00, 0X00, 0X3B, 0X00 }, /* -97.0db */
+ { 0X00, 0X00, 0X3E, 0X00 }, /* -96.5db */
+ { 0X00, 0X00, 0X42, 0X00 }, /* -96.0db */
+ { 0X00, 0X00, 0X46, 0X00 }, /* -95.5db */
+ { 0X00, 0X00, 0X4A, 0X00 }, /* -95.0db */
+ { 0X00, 0X00, 0X4F, 0X00 }, /* -94.5db */
+ { 0X00, 0X00, 0X53, 0X00 }, /* -94.0db */
+ { 0X00, 0X00, 0X58, 0X00 }, /* -93.5db */
+ { 0X00, 0X00, 0X5D, 0X00 }, /* -93.0db */
+ { 0X00, 0X00, 0X63, 0X00 }, /* -92.5db */
+ { 0X00, 0X00, 0X69, 0X00 }, /* -92.0db */
+ { 0X00, 0X00, 0X6F, 0X00 }, /* -91.5db */
+ { 0X00, 0X00, 0X76, 0X00 }, /* -91.0db */
+ { 0X00, 0X00, 0X7D, 0X00 }, /* -90.5db */
+ { 0X00, 0X00, 0X84, 0X00 }, /* -90.0db */
+ { 0X00, 0X00, 0X8C, 0X00 }, /* -89.5db */
+ { 0X00, 0X00, 0X94, 0X00 }, /* -89.0db */
+ { 0X00, 0X00, 0X9D, 0X00 }, /* -88.5db */
+ { 0X00, 0X00, 0XA6, 0X00 }, /* -88.0db */
+ { 0X00, 0X00, 0XB0, 0X00 }, /* -87.5db */
+ { 0X00, 0X00, 0XBB, 0X00 }, /* -87.0db */
+ { 0X00, 0X00, 0XC6, 0X00 }, /* -86.5db */
+ { 0X00, 0X00, 0XD2, 0X00 }, /* -86.0db */
+ { 0X00, 0X00, 0XDE, 0X00 }, /* -85.5db */
+ { 0X00, 0X00, 0XEB, 0X00 }, /* -85.0db */
+ { 0X00, 0X00, 0XF9, 0X00 }, /* -84.5db */
+ { 0X00, 0X01, 0X08, 0X00 }, /* -84.0db */
+ { 0X00, 0X01, 0X18, 0X00 }, /* -83.5db */
+ { 0X00, 0X01, 0X28, 0X00 }, /* -83.0db */
+ { 0X00, 0X01, 0X3A, 0X00 }, /* -82.5db */
+ { 0X00, 0X01, 0X4D, 0X00 }, /* -82.0db */
+ { 0X00, 0X01, 0X60, 0X00 }, /* -81.5db */
+ { 0X00, 0X01, 0X75, 0X00 }, /* -81.0db */
+ { 0X00, 0X01, 0X8B, 0X00 }, /* -80.5db */
+ { 0X00, 0X01, 0XA3, 0X00 }, /* -80.0db */
+ { 0X00, 0X01, 0XBC, 0X00 }, /* -79.5db */
+ { 0X00, 0X01, 0XD6, 0X00 }, /* -79.0db */
+ { 0X00, 0X01, 0XF2, 0X00 }, /* -78.5db */
+ { 0X00, 0X02, 0X10, 0X00 }, /* -78.0db */
+ { 0X00, 0X02, 0X2F, 0X00 }, /* -77.5db */
+ { 0X00, 0X02, 0X50, 0X00 }, /* -77.0db */
+ { 0X00, 0X02, 0X73, 0X00 }, /* -76.5db */
+ { 0X00, 0X02, 0X98, 0X00 }, /* -76.0db */
+ { 0X00, 0X02, 0XC0, 0X00 }, /* -75.5db */
+ { 0X00, 0X02, 0XE9, 0X00 }, /* -75.0db */
+ { 0X00, 0X03, 0X16, 0X00 }, /* -74.5db */
+ { 0X00, 0X03, 0X44, 0X00 }, /* -74.0db */
+ { 0X00, 0X03, 0X76, 0X00 }, /* -73.5db */
+ { 0X00, 0X03, 0XAA, 0X00 }, /* -73.0db */
+ { 0X00, 0X03, 0XE2, 0X00 }, /* -72.5db */
+ { 0X00, 0X04, 0X1D, 0X00 }, /* -72.0db */
+ { 0X00, 0X04, 0X5B, 0X00 }, /* -71.5db */
+ { 0X00, 0X04, 0X9E, 0X00 }, /* -71.0db */
+ { 0X00, 0X04, 0XE4, 0X00 }, /* -70.5db */
+ { 0X00, 0X05, 0X2E, 0X00 }, /* -70.0db */
+ { 0X00, 0X05, 0X7C, 0X00 }, /* -69.5db */
+ { 0X00, 0X05, 0XD0, 0X00 }, /* -69.0db */
+ { 0X00, 0X06, 0X28, 0X00 }, /* -68.5db */
+ { 0X00, 0X06, 0X85, 0X00 }, /* -68.0db */
+ { 0X00, 0X06, 0XE8, 0X00 }, /* -67.5db */
+ { 0X00, 0X07, 0X51, 0X00 }, /* -67.0db */
+ { 0X00, 0X07, 0XC0, 0X00 }, /* -66.5db */
+ { 0X00, 0X08, 0X36, 0X00 }, /* -66.0db */
+ { 0X00, 0X08, 0XB2, 0X00 }, /* -65.5db */
+ { 0X00, 0X09, 0X36, 0X00 }, /* -65.0db */
+ { 0X00, 0X09, 0XC2, 0X00 }, /* -64.5db */
+ { 0X00, 0X0A, 0X56, 0X00 }, /* -64.0db */
+ { 0X00, 0X0A, 0XF3, 0X00 }, /* -63.5db */
+ { 0X00, 0X0B, 0X99, 0X00 }, /* -63.0db */
+ { 0X00, 0X0C, 0X49, 0X00 }, /* -62.5db */
+ { 0X00, 0X0D, 0X03, 0X00 }, /* -62.0db */
+ { 0X00, 0X0D, 0XC9, 0X00 }, /* -61.5db */
+ { 0X00, 0X0E, 0X9A, 0X00 }, /* -61.0db */
+ { 0X00, 0X0F, 0X77, 0X00 }, /* -60.5db */
+ { 0X00, 0X10, 0X62, 0X00 }, /* -60.0db */
+ { 0X00, 0X11, 0X5A, 0X00 }, /* -59.5db */
+ { 0X00, 0X12, 0X62, 0X00 }, /* -59.0db */
+ { 0X00, 0X13, 0X78, 0X00 }, /* -58.5db */
+ { 0X00, 0X14, 0XA0, 0X00 }, /* -58.0db */
+ { 0X00, 0X15, 0XD9, 0X00 }, /* -57.5db */
+ { 0X00, 0X17, 0X24, 0X00 }, /* -57.0db */
+ { 0X00, 0X18, 0X83, 0X00 }, /* -56.5db */
+ { 0X00, 0X19, 0XF7, 0X00 }, /* -56.0db */
+ { 0X00, 0X1B, 0X81, 0X00 }, /* -55.5db */
+ { 0X00, 0X1D, 0X22, 0X00 }, /* -55.0db */
+ { 0X00, 0X1E, 0XDC, 0X00 }, /* -54.5db */
+ { 0X00, 0X20, 0XB0, 0X00 }, /* -54.0db */
+ { 0X00, 0X22, 0XA0, 0X00 }, /* -53.5db */
+ { 0X00, 0X24, 0XAD, 0X00 }, /* -53.0db */
+ { 0X00, 0X26, 0XDA, 0X00 }, /* -52.5db */
+ { 0X00, 0X29, 0X27, 0X00 }, /* -52.0db */
+ { 0X00, 0X2B, 0X97, 0X00 }, /* -51.5db */
+ { 0X00, 0X2E, 0X2D, 0X00 }, /* -51.0db */
+ { 0X00, 0X30, 0XE9, 0X00 }, /* -50.5db */
+ { 0X00, 0X33, 0XCF, 0X00 }, /* -50.0db */
+ { 0X00, 0X36, 0XE1, 0X00 }, /* -49.5db */
+ { 0X00, 0X3A, 0X21, 0X00 }, /* -49.0db */
+ { 0X00, 0X3D, 0X93, 0X00 }, /* -48.5db */
+ { 0X00, 0X41, 0X39, 0X00 }, /* -48.0db */
+ { 0X00, 0X45, 0X17, 0X00 }, /* -47.5db */
+ { 0X00, 0X49, 0X2F, 0X00 }, /* -47.0db */
+ { 0X00, 0X4D, 0X85, 0X00 }, /* -46.5db */
+ { 0X00, 0X52, 0X1D, 0X00 }, /* -46.0db */
+ { 0X00, 0X56, 0XFA, 0X00 }, /* -45.5db */
+ { 0X00, 0X5C, 0X22, 0X00 }, /* -45.0db */
+ { 0X00, 0X61, 0X97, 0X00 }, /* -44.5db */
+ { 0X00, 0X67, 0X60, 0X00 }, /* -44.0db */
+ { 0X00, 0X6D, 0X80, 0X00 }, /* -43.5db */
+ { 0X00, 0X73, 0XFD, 0X00 }, /* -43.0db */
+ { 0X00, 0X7A, 0XDC, 0X00 }, /* -42.5db */
+ { 0X00, 0X82, 0X24, 0X00 }, /* -42.0db */
+ { 0X00, 0X89, 0XDA, 0X00 }, /* -41.5db */
+ { 0X00, 0X92, 0X05, 0X00 }, /* -41.0db */
+ { 0X00, 0X9A, 0XAC, 0X00 }, /* -40.5db */
+ { 0X00, 0XA3, 0XD7, 0X00 }, /* -40.0db */
+ { 0X00, 0XAD, 0X8C, 0X00 }, /* -39.5db */
+ { 0X00, 0XB7, 0XD4, 0X00 }, /* -39.0db */
+ { 0X00, 0XC2, 0XB9, 0X00 }, /* -38.5db */
+ { 0X00, 0XCE, 0X43, 0X00 }, /* -38.0db */
+ { 0X00, 0XDA, 0X7B, 0X00 }, /* -37.5db */
+ { 0X00, 0XE7, 0X6E, 0X00 }, /* -37.0db */
+ { 0X00, 0XF5, 0X24, 0X00 }, /* -36.5db */
+ { 0X01, 0X03, 0XAB, 0X00 }, /* -36.0db */
+ { 0X01, 0X13, 0X0E, 0X00 }, /* -35.5db */
+ { 0X01, 0X23, 0X5A, 0X00 }, /* -35.0db */
+ { 0X01, 0X34, 0X9D, 0X00 }, /* -34.5db */
+ { 0X01, 0X46, 0XE7, 0X00 }, /* -34.0db */
+ { 0X01, 0X5A, 0X46, 0X00 }, /* -33.5db */
+ { 0X01, 0X6E, 0XCA, 0X00 }, /* -33.0db */
+ { 0X01, 0X84, 0X86, 0X00 }, /* -32.5db */
+ { 0X01, 0X9B, 0X8C, 0X00 }, /* -32.0db */
+ { 0X01, 0XB3, 0XEE, 0X00 }, /* -31.5db */
+ { 0X01, 0XCD, 0XC3, 0X00 }, /* -31.0db */
+ { 0X01, 0XE9, 0X20, 0X00 }, /* -30.5db */
+ { 0X02, 0X06, 0X1B, 0X00 }, /* -30.0db */
+ { 0X02, 0X24, 0XCE, 0X00 }, /* -29.5db */
+ { 0X02, 0X45, 0X53, 0X00 }, /* -29.0db */
+ { 0X02, 0X67, 0XC5, 0X00 }, /* -28.5db */
+ { 0X02, 0X8C, 0X42, 0X00 }, /* -28.0db */
+ { 0X02, 0XB2, 0XE8, 0X00 }, /* -27.5db */
+ { 0X02, 0XDB, 0XD8, 0X00 }, /* -27.0db */
+ { 0X03, 0X07, 0X36, 0X00 }, /* -26.5db */
+ { 0X03, 0X35, 0X25, 0X00 }, /* -26.0db */
+ { 0X03, 0X65, 0XCD, 0X00 }, /* -25.5db */
+ { 0X03, 0X99, 0X57, 0X00 }, /* -25.0db */
+ { 0X03, 0XCF, 0XEE, 0X00 }, /* -24.5db */
+ { 0X04, 0X09, 0XC2, 0X00 }, /* -24.0db */
+ { 0X04, 0X47, 0X03, 0X00 }, /* -23.5db */
+ { 0X04, 0X87, 0XE5, 0X00 }, /* -23.0db */
+ { 0X04, 0XCC, 0XA0, 0X00 }, /* -22.5db */
+ { 0X05, 0X15, 0X6D, 0X00 }, /* -22.0db */
+ { 0X05, 0X62, 0X8A, 0X00 }, /* -21.5db */
+ { 0X05, 0XB4, 0X39, 0X00 }, /* -21.0db */
+ { 0X06, 0X0A, 0XBF, 0X00 }, /* -20.5db */
+ { 0X06, 0X66, 0X66, 0X00 }, /* -20.0db */
+ { 0X06, 0XC7, 0X7B, 0X00 }, /* -19.5db */
+ { 0X07, 0X2E, 0X50, 0X00 }, /* -19.0db */
+ { 0X07, 0X9B, 0X3D, 0X00 }, /* -18.5db */
+ { 0X08, 0X0E, 0X9F, 0X00 }, /* -18.0db */
+ { 0X08, 0X88, 0XD7, 0X00 }, /* -17.5db */
+ { 0X09, 0X0A, 0X4D, 0X00 }, /* -17.0db */
+ { 0X09, 0X93, 0X6E, 0X00 }, /* -16.5db */
+ { 0X0A, 0X24, 0XB0, 0X00 }, /* -16.0db */
+ { 0X0A, 0XBE, 0X8D, 0X00 }, /* -15.5db */
+ { 0X0B, 0X61, 0X88, 0X00 }, /* -15.0db */
+ { 0X0C, 0X0E, 0X2B, 0X00 }, /* -14.5db */
+ { 0X0C, 0XC5, 0X09, 0X00 }, /* -14.0db */
+ { 0X0D, 0X86, 0XBD, 0X00 }, /* -13.5db */
+ { 0X0E, 0X53, 0XEB, 0X00 }, /* -13.0db */
+ { 0X0F, 0X2D, 0X42, 0X00 }, /* -12.5db */
+ { 0X10, 0X13, 0X79, 0X00 }, /* -12.0db */
+ { 0X11, 0X07, 0X54, 0X00 }, /* -11.5db */
+ { 0X12, 0X09, 0XA3, 0X00 }, /* -11.0db */
+ { 0X13, 0X1B, 0X40, 0X00 }, /* -10.5db */
+ { 0X14, 0X3D, 0X13, 0X00 }, /* -10.0db */
+ { 0X15, 0X70, 0X12, 0X00 }, /* -9.5db */
+ { 0X16, 0XB5, 0X43, 0X00 }, /* -9.0db */
+ { 0X18, 0X0D, 0XB8, 0X00 }, /* -8.5db */
+ { 0X19, 0X7A, 0X96, 0X00 }, /* -8.0db */
+ { 0X1A, 0XFD, 0X13, 0X00 }, /* -7.5db */
+ { 0X1C, 0X96, 0X76, 0X00 }, /* -7.0db */
+ { 0X1E, 0X48, 0X1C, 0X00 }, /* -6.5db */
+ { 0X20, 0X13, 0X73, 0X00 }, /* -6.0db */
+ { 0X21, 0XFA, 0X02, 0X00 }, /* -5.5db */
+ { 0X23, 0XFD, 0X66, 0X00 }, /* -5.0db */
+ { 0X26, 0X1F, 0X54, 0X00 }, /* -4.5db */
+ { 0X28, 0X61, 0X9A, 0X00 }, /* -4.0db */
+ { 0X2A, 0XC6, 0X25, 0X00 }, /* -3.5db */
+ { 0X2D, 0X4E, 0XFB, 0X00 }, /* -3.0db */
+ { 0X2F, 0XFE, 0X44, 0X00 }, /* -2.5db */
+ { 0X32, 0XD6, 0X46, 0X00 }, /* -2.0db */
+ { 0X35, 0XD9, 0X6B, 0X00 }, /* -1.5db */
+ { 0X39, 0X0A, 0X41, 0X00 }, /* -1.0db */
+ { 0X3C, 0X6B, 0X7E, 0X00 }, /* -0.5db */
+ { 0X40, 0X00, 0X00, 0X00 }, /* 0.0db */
+ { 0X43, 0XCA, 0XD0, 0X00 }, /* 0.5db */
+ { 0X47, 0XCF, 0X26, 0X00 }, /* 1.0db */
+ { 0X4C, 0X10, 0X6B, 0X00 }, /* 1.5db */
+ { 0X50, 0X92, 0X3B, 0X00 }, /* 2.0db */
+ { 0X55, 0X58, 0X6A, 0X00 }, /* 2.5db */
+ { 0X5A, 0X67, 0X03, 0X00 }, /* 3.0db */
+ { 0X5F, 0XC2, 0X53, 0X00 }, /* 3.5db */
+ { 0X65, 0X6E, 0XE3, 0X00 }, /* 4.0db */
+ { 0X6B, 0X71, 0X86, 0X00 }, /* 4.5db */
+ { 0X71, 0XCF, 0X54, 0X00 }, /* 5.0db */
+ { 0X78, 0X8D, 0XB4, 0X00 }, /* 5.5db */
+ { 0X7F, 0XB2, 0X61, 0X00 }, /* 6.0db */
+};
+#endif
diff --git a/include/sound/tas5825-tlv.h b/include/sound/tas5825-tlv.h
new file mode 100644
index 000000000000..95f2d3fad120
--- /dev/null
+++ b/include/sound/tas5825-tlv.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+//
+// ALSA SoC Texas Instruments TAS5825 Audio Smart Amplifier
+//
+// Copyright (C) 2025 Texas Instruments Incorporated
+// https://www.ti.com
+//
+// The TAS5825 hda driver implements for one or two TAS5825 chips.
+//
+// Author: Baojun Xu <baojun.xu@ti.com>
+//
+
+#ifndef __TAS5825_TLV_H__
+#define __TAS5825_TLV_H__
+
+#define TAS5825_DVC_LEVEL TASDEVICE_REG(0x0, 0x0, 0x4c)
+#define TAS5825_AMP_LEVEL TASDEVICE_REG(0x0, 0x0, 0x54)
+
+static const __maybe_unused DECLARE_TLV_DB_SCALE(
+ tas5825_dvc_tlv, -10300, 50, 0);
+static const __maybe_unused DECLARE_TLV_DB_SCALE(
+ tas5825_amp_tlv, -1550, 50, 0);
+
+#endif
diff --git a/include/sound/tlv320dac33-plat.h b/include/sound/tlv320dac33-plat.h
deleted file mode 100644
index 7a7249a896e3..000000000000
--- a/include/sound/tlv320dac33-plat.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Platform header for Texas Instruments TLV320DAC33 codec driver
- *
- * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
- *
- * Copyright: (C) 2009 Nokia Corporation
- */
-
-#ifndef __TLV320DAC33_PLAT_H
-#define __TLV320DAC33_PLAT_H
-
-struct tlv320dac33_platform_data {
- int power_gpio;
- int mode1_latency; /* latency caused by the i2c writes in us */
- int auto_fifo_config; /* FIFO config based on the period size */
- int keep_bclk; /* Keep the BCLK running in FIFO modes */
- u8 burst_bclkdiv;
-};
-
-#endif /* __TLV320DAC33_PLAT_H */