diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-08-24 03:58:07 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-31 00:16:16 +0300 |
commit | 44c07365e9e2c87c7e04d63293618c391d1480ec (patch) | |
tree | 4c5c057c110f77517a930b33478f2d9d74eddeed /sound/soc/soc-jack.c | |
parent | ef641e5d5e6c7a07748239036b786a90ba9b9a95 (diff) | |
download | linux-44c07365e9e2c87c7e04d63293618c391d1480ec.tar.xz |
ASoC: add Component level set_jack
In current ALSA SoC, Codec only has set_jack feature.
Codec will be merged into Component in next generation ALSA SoC,
thus current Codec specific feature need to be merged into it.
This is glue patch for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r-- | sound/soc/soc-jack.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 7daf21fee355..2f9f496ab14f 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -41,6 +41,28 @@ int snd_soc_codec_set_jack(struct snd_soc_codec *codec, EXPORT_SYMBOL_GPL(snd_soc_codec_set_jack); /** + * snd_soc_component_set_jack - configure component jack. + * @component: COMPONENTs + * @jack: structure to use for the jack + * @data: can be used if codec driver need extra data for configuring jack + * + * Configures and enables jack detection function. + */ +int snd_soc_component_set_jack(struct snd_soc_component *component, + struct snd_soc_jack *jack, void *data) +{ + /* will be removed */ + if (component->set_jack) + return component->set_jack(component, jack, data); + + if (component->driver->set_jack) + return component->driver->set_jack(component, jack, data); + + return -ENOTSUPP; +} +EXPORT_SYMBOL_GPL(snd_soc_component_set_jack); + +/** * snd_soc_card_jack_new - Create a new jack * @card: ASoC card * @id: an identifying string for this jack |