aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-17 11:36:38 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-17 14:10:44 -0400
commit1c6e555c3a66af29a51690748ca54314e62c16d5 (patch)
treed07668266bb04630c9ba9f2d86c5bc89c6ccf5d4 /sound
parent57d54889cd00db2752994b389ba714138652e60c (diff)
ALSA: Rename jack switch table in preparation for button support
Avoids confusion when we have button support. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/jack.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/core/jack.c b/sound/core/jack.c
index f705eec7372a..f6f091f2b382 100644
--- a/sound/core/jack.c
+++ b/sound/core/jack.c
@@ -23,7 +23,7 @@
23#include <sound/jack.h> 23#include <sound/jack.h>
24#include <sound/core.h> 24#include <sound/core.h>
25 25
26static int jack_types[] = { 26static int jack_switch_types[] = {
27 SW_HEADPHONE_INSERT, 27 SW_HEADPHONE_INSERT,
28 SW_MICROPHONE_INSERT, 28 SW_MICROPHONE_INSERT,
29 SW_LINEOUT_INSERT, 29 SW_LINEOUT_INSERT,
@@ -112,10 +112,10 @@ int snd_jack_new(struct snd_card *card, const char *id, int type,
112 112
113 jack->type = type; 113 jack->type = type;
114 114
115 for (i = 0; i < ARRAY_SIZE(jack_types); i++) 115 for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++)
116 if (type & (1 << i)) 116 if (type & (1 << i))
117 input_set_capability(jack->input_dev, EV_SW, 117 input_set_capability(jack->input_dev, EV_SW,
118 jack_types[i]); 118 jack_switch_types[i]);
119 119
120 err = snd_device_new(card, SNDRV_DEV_JACK, jack, &ops); 120 err = snd_device_new(card, SNDRV_DEV_JACK, jack, &ops);
121 if (err < 0) 121 if (err < 0)
@@ -163,10 +163,11 @@ void snd_jack_report(struct snd_jack *jack, int status)
163 if (!jack) 163 if (!jack)
164 return; 164 return;
165 165
166 for (i = 0; i < ARRAY_SIZE(jack_types); i++) { 166 for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) {
167 int testbit = 1 << i; 167 int testbit = 1 << i;
168 if (jack->type & testbit) 168 if (jack->type & testbit)
169 input_report_switch(jack->input_dev, jack_types[i], 169 input_report_switch(jack->input_dev,
170 jack_switch_types[i],
170 status & testbit); 171 status & testbit);
171 } 172 }
172 173