Loading include/sound/jack.h +3 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ enum snd_jack_types { SND_JACK_BTN_5 = 0x0200, }; /* Keep in sync with definitions above */ #define SND_JACK_SWITCH_TYPES 6 struct snd_jack { struct input_dev *input_dev; int registered; Loading sound/core/jack.c +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ #include <sound/jack.h> #include <sound/core.h> static int jack_switch_types[] = { static int jack_switch_types[SND_JACK_SWITCH_TYPES] = { SW_HEADPHONE_INSERT, SW_MICROPHONE_INSERT, SW_LINEOUT_INSERT, Loading Loading @@ -128,7 +128,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type, jack->type = type; for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) for (i = 0; i < SND_JACK_SWITCH_TYPES; i++) if (type & (1 << i)) input_set_capability(jack->input_dev, EV_SW, jack_switch_types[i]); Loading Loading
include/sound/jack.h +3 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ enum snd_jack_types { SND_JACK_BTN_5 = 0x0200, }; /* Keep in sync with definitions above */ #define SND_JACK_SWITCH_TYPES 6 struct snd_jack { struct input_dev *input_dev; int registered; Loading
sound/core/jack.c +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ #include <sound/jack.h> #include <sound/core.h> static int jack_switch_types[] = { static int jack_switch_types[SND_JACK_SWITCH_TYPES] = { SW_HEADPHONE_INSERT, SW_MICROPHONE_INSERT, SW_LINEOUT_INSERT, Loading Loading @@ -128,7 +128,7 @@ int snd_jack_new(struct snd_card *card, const char *id, int type, jack->type = type; for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) for (i = 0; i < SND_JACK_SWITCH_TYPES; i++) if (type & (1 << i)) input_set_capability(jack->input_dev, EV_SW, jack_switch_types[i]); Loading