ASoC: jack: add snd_soc_codec_set_jack
authorBard Liao <bardliao@realtek.com>
Fri, 7 Apr 2017 03:26:41 +0000 (11:26 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 10 Apr 2017 18:46:09 +0000 (19:46 +0100)
commitd7344010d183ad62d1ababca3beb9553cf5e1546
treeec8bb158f07de78d0a469040d149837de3982480
parent73548dd316adec41172c31d63a0c35a97bf9577f
ASoC: jack: add snd_soc_codec_set_jack

There are many codecs with the capability of jack detection. Usually,
we create a jack on machine driver but there is no common function for
machine driver to deliver the jack pointer to codec driver.
snd_soc_codec_set_jack can be used for delivering the jack pointer to
codec driver and enable the jack detection function. To make it work,
codec driver need to define a callback function to receive the jack
pointer and do all necessary procedure for enabling jack detection.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-jack.c