summaryrefslogtreecommitdiff
path: root/include/sound/simple_card_utils.h
diff options
context:
space:
mode:
authorAstrid Rost <astrid.rost@axis.com>2023-01-23 16:59:12 +0300
committerMark Brown <broonie@kernel.org>2023-01-27 15:20:55 +0300
commit9b271207ac83db362fac757d367923bde57dce86 (patch)
treea1a8ad0f43926ee3d415b6c4a911d383fbfa5518 /include/sound/simple_card_utils.h
parentdf55122ba0955951a85ef3ffb19f0dcb0ad3ffbb (diff)
downloadlinux-9b271207ac83db362fac757d367923bde57dce86.tar.xz
ASoC: simple-card-utils: create jack inputs for aux_devs
Add a generic way to create jack inputs for auxiliary jack detection drivers (e.g. via i2c, spi), which are not part of any real codec. The simple-card can be used as combining card driver to add the jacks, no new one is required. Create a jack (for input-events) for jack devices in the auxiliary device list (aux_devs). A device which returns a valid value on get_jack_type counts as jack device; set_jack is required to add the jack to the device. Signed-off-by: Astrid Rost <astrid.rost@axis.com> Link: https://lore.kernel.org/r/20230123135913.2720991-3-astrid.rost@axis.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/simple_card_utils.h')
-rw-r--r--include/sound/simple_card_utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index 38590f1ae9ee..a3f3f3aa9e6e 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -69,6 +69,7 @@ struct asoc_simple_priv {
} *dai_props;
struct asoc_simple_jack hp_jack;
struct asoc_simple_jack mic_jack;
+ struct snd_soc_jack *aux_jacks;
struct snd_soc_dai_link *dai_link;
struct asoc_simple_dai *dais;
struct snd_soc_dai_link_component *dlcs;
@@ -187,6 +188,8 @@ int asoc_simple_parse_pin_switches(struct snd_soc_card *card,
int asoc_simple_init_jack(struct snd_soc_card *card,
struct asoc_simple_jack *sjack,
int is_hp, char *prefix, char *pin);
+int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv,
+ char *prefix);
int asoc_simple_init_priv(struct asoc_simple_priv *priv,
struct link_info *li);
int asoc_simple_remove(struct platform_device *pdev);