diff options
author | Gergo Koteles <soyer@irl.hu> | 2023-12-30 01:09:42 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-01-02 16:14:01 +0100 |
commit | 76f5f55c45b906710c9565a7e68c8d782c46b394 (patch) | |
tree | 498805590a561229ff4ff4f77fd7d70a56254608 /sound/soc | |
parent | bd968aef071ab177a47034c2e45048a3c192f0b8 (diff) |
ALSA: hda/tas2781: add ptrs to calibration functions
Make calibration functions configurable to support different calibration
data storage modes.
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/5859c77ffef752b8a9784713b412d815d7e2688c.1703891777.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/tas2781-comlib.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c index 00e35169ae49..b7e56ceb1acf 100644 --- a/sound/soc/codecs/tas2781-comlib.c +++ b/sound/soc/codecs/tas2781-comlib.c @@ -412,6 +412,21 @@ void tasdevice_remove(struct tasdevice_priv *tas_priv) } EXPORT_SYMBOL_GPL(tasdevice_remove); +int tasdevice_save_calibration(struct tasdevice_priv *tas_priv) +{ + if (tas_priv->save_calibration) + return tas_priv->save_calibration(tas_priv); + return -EINVAL; +} +EXPORT_SYMBOL_GPL(tasdevice_save_calibration); + +void tasdevice_apply_calibration(struct tasdevice_priv *tas_priv) +{ + if (tas_priv->apply_calibration && tas_priv->cali_data.total_sz) + tas_priv->apply_calibration(tas_priv); +} +EXPORT_SYMBOL_GPL(tasdevice_apply_calibration); + static int tasdevice_clamp(int val, int max, unsigned int invert) { if (val > max) |