mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Most codes in tas2781_spi_fwlib.c are same as tas2781-fmwlib.c, mainly for firmware parsing, only differece is the register reading, bit update and book switching in i2c and spi. The main purpose of this patch is for code cleaup and arrange the shared part for i2c and spi. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250429111055.567-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
37 lines
1.5 KiB
C
37 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
//
|
|
// ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier
|
|
//
|
|
// Copyright (C) 2025 Texas Instruments Incorporated
|
|
// https://www.ti.com
|
|
//
|
|
// The TAS2563/TAS2781 driver implements a flexible and configurable
|
|
// algo coefficient setting for one, two, or even multiple
|
|
// TAS2563/TAS2781 chips.
|
|
//
|
|
// Author: Shenghao Ding <shenghao-ding@ti.com>
|
|
//
|
|
|
|
#ifndef __TAS2781_COMLIB_I2C_H__
|
|
#define __TAS2781_COMLIB_I2C_H__
|
|
|
|
void tasdevice_reset(struct tasdevice_priv *tas_dev);
|
|
int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
|
|
struct module *module,
|
|
void (*cont)(const struct firmware *fw, void *context));
|
|
struct tasdevice_priv *tasdevice_kzalloc(struct i2c_client *i2c);
|
|
int tasdevice_init(struct tasdevice_priv *tas_priv);
|
|
int tasdev_chn_switch(struct tasdevice_priv *tas_priv,
|
|
unsigned short chn);
|
|
int tasdevice_dev_update_bits(
|
|
struct tasdevice_priv *tasdevice, unsigned short chn,
|
|
unsigned int reg, unsigned int mask, unsigned int value);
|
|
int tasdevice_amp_putvol(struct tasdevice_priv *tas_priv,
|
|
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
|
|
int tasdevice_amp_getvol(struct tasdevice_priv *tas_priv,
|
|
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
|
|
int tasdevice_digital_getvol(struct tasdevice_priv *tas_priv,
|
|
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
|
|
int tasdevice_digital_putvol(struct tasdevice_priv *tas_priv,
|
|
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
|
|
#endif /* __TAS2781_COMLIB_I2C_H__ */
|