tas2781-comlib-i2c.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. //
  3. // ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier
  4. //
  5. // Copyright (C) 2025 Texas Instruments Incorporated
  6. // https://www.ti.com
  7. //
  8. // The TAS2563/TAS2781 driver implements a flexible and configurable
  9. // algo coefficient setting for one, two, or even multiple
  10. // TAS2563/TAS2781 chips.
  11. //
  12. // Author: Shenghao Ding <shenghao-ding@ti.com>
  13. //
  14. #ifndef __TAS2781_COMLIB_I2C_H__
  15. #define __TAS2781_COMLIB_I2C_H__
  16. void tasdevice_reset(struct tasdevice_priv *tas_dev);
  17. int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
  18. struct module *module,
  19. void (*cont)(const struct firmware *fw, void *context));
  20. struct tasdevice_priv *tasdevice_kzalloc(struct i2c_client *i2c);
  21. int tasdevice_init(struct tasdevice_priv *tas_priv);
  22. int tasdev_chn_switch(struct tasdevice_priv *tas_priv,
  23. unsigned short chn);
  24. int tasdevice_dev_update_bits(
  25. struct tasdevice_priv *tasdevice, unsigned short chn,
  26. unsigned int reg, unsigned int mask, unsigned int value);
  27. int tasdevice_amp_putvol(struct tasdevice_priv *tas_priv,
  28. struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
  29. int tasdevice_amp_getvol(struct tasdevice_priv *tas_priv,
  30. struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
  31. int tasdevice_digital_getvol(struct tasdevice_priv *tas_priv,
  32. struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
  33. int tasdevice_digital_putvol(struct tasdevice_priv *tas_priv,
  34. struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
  35. #endif /* __TAS2781_COMLIB_I2C_H__ */