ASoC: simple-card-utils: create jack inputs for aux_devs
authorAstrid Rost <astrid.rost@axis.com>
Mon, 23 Jan 2023 13:59:12 +0000 (14:59 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 27 Jan 2023 12:20:55 +0000 (12:20 +0000)
commit9b271207ac83db362fac757d367923bde57dce86
treea1a8ad0f43926ee3d415b6c4a911d383fbfa5518
parentdf55122ba0955951a85ef3ffb19f0dcb0ad3ffbb
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>
include/sound/simple_card_utils.h
sound/soc/generic/simple-card-utils.c
sound/soc/generic/simple-card.c