summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/da7219.c
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>2022-10-31 17:02:21 +0100
committerMark Brown <broonie@kernel.org>2022-11-07 14:58:13 +0100
commit4366b7ca88f04237ae654846167db993dbe37397 (patch)
tree8fd8637b08a1689a789895ce7df655c501d9cd58 /sound/soc/codecs/da7219.c
parentASoC: amd: fix ACP version typo mistake (diff)
downloadlinux-4366b7ca88f04237ae654846167db993dbe37397.tar.xz
linux-4366b7ca88f04237ae654846167db993dbe37397.zip
ASoC: codecs: da7219: Introduce set_jack() callback
Codec driver for da7219 implements jack detect functionality, but does not integrate it with the framework. Platform component drivers are accessing the functionality through internal da7219_aad_jack_det() instead. Address this by implementing set_jack() for the codec. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221031160227.2352630-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/da7219.c')
-rw-r--r--sound/soc/codecs/da7219.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 4746c8700451..7468ee4af2ea 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -2633,11 +2633,20 @@ static int da7219_resume(struct snd_soc_component *component)
#define da7219_resume NULL
#endif
+static int da7219_set_jack(struct snd_soc_component *component, struct snd_soc_jack *jack,
+ void *data)
+{
+ da7219_aad_jack_det(component, jack);
+
+ return 0;
+}
+
static const struct snd_soc_component_driver soc_component_dev_da7219 = {
.probe = da7219_probe,
.remove = da7219_remove,
.suspend = da7219_suspend,
.resume = da7219_resume,
+ .set_jack = da7219_set_jack,
.set_bias_level = da7219_set_bias_level,
.controls = da7219_snd_controls,
.num_controls = ARRAY_SIZE(da7219_snd_controls),