dect
/
linux-2.6
Archived
13
0
Fork 0

ASoC: Add jack_status_check callback function for GPIO jacks

The jack_status_check callback function is the interface to check the
status of the jack. Some target provides the method to distinguish what
is the jack inserted - headphone jack, microphone jack, tvout jack, etc,
so we can implement it using the jack_status_check function.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Joonyoung Shim 2009-11-12 17:14:04 +09:00 committed by Mark Brown
parent f773205300
commit c871a05315
2 changed files with 5 additions and 0 deletions

View File

@ -332,6 +332,8 @@ struct snd_soc_jack_gpio {
int debounce_time;
struct snd_soc_jack *jack;
struct work_struct work;
int (*jack_status_check)(void);
};
#endif

View File

@ -163,6 +163,9 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
else
report = 0;
if (gpio->jack_status_check)
report = gpio->jack_status_check();
snd_soc_jack_report(jack, report, gpio->report);
}