diff options
author | Astrid Rost <astrid.rost@axis.com> | 2023-01-23 16:59:12 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-01-27 15:20:55 +0300 |
commit | 9b271207ac83db362fac757d367923bde57dce86 (patch) | |
tree | a1a8ad0f43926ee3d415b6c4a911d383fbfa5518 /sound/soc/generic/simple-card.c | |
parent | df55122ba0955951a85ef3ffb19f0dcb0ad3ffbb (diff) | |
download | linux-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 'sound/soc/generic/simple-card.c')
-rw-r--r-- | sound/soc/generic/simple-card.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index feb55b66239b..e98932c16754 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -623,6 +623,10 @@ static int simple_soc_probe(struct snd_soc_card *card) if (ret < 0) return ret; + ret = asoc_simple_init_aux_jacks(priv, PREFIX); + if (ret < 0) + return ret; + return 0; } |