diff options
author | David Henningsson <david.henningsson@canonical.com> | 2011-10-05 09:53:25 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-10-05 11:22:04 -0400 |
commit | 7c2f8e4009d4b66c8458e3a5c20510b4262853bb (patch) | |
tree | 5958ddebda59e7822890f66275787d134fa1543b | |
parent | 48718eab5a719cb537466124d9585b3066e27fae (diff) |
ALSA: jack - Add "Line In" input jack constants
Similar to Line Out, these constants form the base for future
patches enabling input jack reporting for Line in jacks.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/linux/input.h | 1 | ||||
-rw-r--r-- | include/sound/jack.h | 1 | ||||
-rw-r--r-- | sound/core/jack.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 2 |
4 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index a637e7814334..a514fb8faea3 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -814,6 +814,7 @@ struct input_keymap_entry { | |||
814 | #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ | 814 | #define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */ |
815 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ | 815 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ |
816 | #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ | 816 | #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ |
817 | #define SW_LINEIN_INSERT 0x0d /* set = inserted */ | ||
817 | #define SW_MAX 0x0f | 818 | #define SW_MAX 0x0f |
818 | #define SW_CNT (SW_MAX+1) | 819 | #define SW_CNT (SW_MAX+1) |
819 | 820 | ||
diff --git a/include/sound/jack.h b/include/sound/jack.h index c140fc7cbd3f..63c790742db4 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h | |||
@@ -42,6 +42,7 @@ enum snd_jack_types { | |||
42 | SND_JACK_MECHANICAL = 0x0008, /* If detected separately */ | 42 | SND_JACK_MECHANICAL = 0x0008, /* If detected separately */ |
43 | SND_JACK_VIDEOOUT = 0x0010, | 43 | SND_JACK_VIDEOOUT = 0x0010, |
44 | SND_JACK_AVOUT = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT, | 44 | SND_JACK_AVOUT = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT, |
45 | SND_JACK_LINEIN = 0x0020, | ||
45 | 46 | ||
46 | /* Kept separate from switches to facilitate implementation */ | 47 | /* Kept separate from switches to facilitate implementation */ |
47 | SND_JACK_BTN_0 = 0x4000, | 48 | SND_JACK_BTN_0 = 0x4000, |
diff --git a/sound/core/jack.c b/sound/core/jack.c index 53b53e97c896..240a3e13470d 100644 --- a/sound/core/jack.c +++ b/sound/core/jack.c | |||
@@ -30,6 +30,7 @@ static int jack_switch_types[] = { | |||
30 | SW_LINEOUT_INSERT, | 30 | SW_LINEOUT_INSERT, |
31 | SW_JACK_PHYSICAL_INSERT, | 31 | SW_JACK_PHYSICAL_INSERT, |
32 | SW_VIDEOOUT_INSERT, | 32 | SW_VIDEOOUT_INSERT, |
33 | SW_LINEIN_INSERT, | ||
33 | }; | 34 | }; |
34 | 35 | ||
35 | static int snd_jack_dev_free(struct snd_device *device) | 36 | static int snd_jack_dev_free(struct snd_device *device) |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e3db19610411..8b046a10b42b 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -5264,6 +5264,8 @@ static const char *get_jack_default_name(struct hda_codec *codec, hda_nid_t nid, | |||
5264 | return "Mic"; | 5264 | return "Mic"; |
5265 | case SND_JACK_LINEOUT: | 5265 | case SND_JACK_LINEOUT: |
5266 | return "Line-out"; | 5266 | return "Line-out"; |
5267 | case SND_JACK_LINEIN: | ||
5268 | return "Line-in"; | ||
5267 | case SND_JACK_HEADSET: | 5269 | case SND_JACK_HEADSET: |
5268 | return "Headset"; | 5270 | return "Headset"; |
5269 | case SND_JACK_VIDEOOUT: | 5271 | case SND_JACK_VIDEOOUT: |