aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2008-10-25 01:05:04 -0400
committerTakashi Iwai <tiwai@suse.de>2008-10-27 03:15:14 -0400
commita53ccab3ccac9e8676a683df9822a2daec83ef54 (patch)
tree5e98c0731ae1b14a45447c41cf47bf67d3aed82c /sound
parentebaa0470586eec83627fa03dcd0a1107f54258f8 (diff)
ALSA: jack: lineout support to jack abstraction layer
This patch introduces support for reporting SW_LINEOUT_INSERT detection events via the jack abstraction layer. Also adds a SND_JACK_LINEOUT define to the input system header. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Cc: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/jack.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c
index 8133a2b173a5..c4bb9bad3133 100644
--- a/sound/core/jack.c
+++ b/sound/core/jack.c
@@ -102,6 +102,9 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
102 if (type & SND_JACK_HEADPHONE) 102 if (type & SND_JACK_HEADPHONE)
103 input_set_capability(jack->input_dev, EV_SW, 103 input_set_capability(jack->input_dev, EV_SW,
104 SW_HEADPHONE_INSERT); 104 SW_HEADPHONE_INSERT);
105 if (type & SND_JACK_LINEOUT)
106 input_set_capability(jack->input_dev, EV_SW,
107 SW_LINEOUT_INSERT);
105 if (type & SND_JACK_MICROPHONE) 108 if (type & SND_JACK_MICROPHONE)
106 input_set_capability(jack->input_dev, EV_SW, 109 input_set_capability(jack->input_dev, EV_SW,
107 SW_MICROPHONE_INSERT); 110 SW_MICROPHONE_INSERT);
@@ -150,6 +153,9 @@ void snd_jack_report(struct snd_jack *jack, int status)
150 if (jack->type & SND_JACK_HEADPHONE) 153 if (jack->type & SND_JACK_HEADPHONE)
151 input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT, 154 input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT,
152 status & SND_JACK_HEADPHONE); 155 status & SND_JACK_HEADPHONE);
156 if (jack->type & SND_JACK_LINEOUT)
157 input_report_switch(jack->input_dev, SW_LINEOUT_INSERT,
158 status & SND_JACK_LINEOUT);
153 if (jack->type & SND_JACK_MICROPHONE) 159 if (jack->type & SND_JACK_MICROPHONE)
154 input_report_switch(jack->input_dev, SW_MICROPHONE_INSERT, 160 input_report_switch(jack->input_dev, SW_MICROPHONE_INSERT,
155 status & SND_JACK_MICROPHONE); 161 status & SND_JACK_MICROPHONE);