ALSA: jack - Add "Line In" input jack constants
authorDavid Henningsson <david.henningsson@canonical.com>
Wed, 5 Oct 2011 13:53:25 +0000 (15:53 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 5 Oct 2011 15:22:04 +0000 (17:22 +0200)
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>
include/linux/input.h
include/sound/jack.h
sound/core/jack.c
sound/pci/hda/hda_codec.c

index a637e781433499c8283f2991989ff35a35b7e66c..a514fb8faea3f1c61c34b7867396390f2615b813 100644 (file)
@@ -814,6 +814,7 @@ struct input_keymap_entry {
 #define SW_KEYPAD_SLIDE                0x0a  /* set = keypad slide out */
 #define SW_FRONT_PROXIMITY     0x0b  /* set = front proximity sensor active */
 #define SW_ROTATE_LOCK         0x0c  /* set = rotate locked/disabled */
+#define SW_LINEIN_INSERT       0x0d  /* set = inserted */
 #define SW_MAX                 0x0f
 #define SW_CNT                 (SW_MAX+1)
 
index c140fc7cbd3f276470a949c2701c9989e4f9a2f8..63c790742db47be586cd995cda581bfae9c33b80 100644 (file)
@@ -42,6 +42,7 @@ enum snd_jack_types {
        SND_JACK_MECHANICAL     = 0x0008, /* If detected separately */
        SND_JACK_VIDEOOUT       = 0x0010,
        SND_JACK_AVOUT          = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT,
+       SND_JACK_LINEIN         = 0x0020,
 
        /* Kept separate from switches to facilitate implementation */
        SND_JACK_BTN_0          = 0x4000,
index 53b53e97c8960e4415b7c45801d5368cb611690c..240a3e13470dfe3e718dd9fdc22fdadf8900b763 100644 (file)
@@ -30,6 +30,7 @@ static int jack_switch_types[] = {
        SW_LINEOUT_INSERT,
        SW_JACK_PHYSICAL_INSERT,
        SW_VIDEOOUT_INSERT,
+       SW_LINEIN_INSERT,
 };
 
 static int snd_jack_dev_free(struct snd_device *device)
index e3db1961041140bc25e2bb316935e1384d63f476..8b046a10b42b860ba54d2ef8bdcff41de4fcf951 100644 (file)
@@ -5264,6 +5264,8 @@ static const char *get_jack_default_name(struct hda_codec *codec, hda_nid_t nid,
                return "Mic";
        case SND_JACK_LINEOUT:
                return "Line-out";
+       case SND_JACK_LINEIN:
+               return "Line-in";
        case SND_JACK_HEADSET:
                return "Headset";
        case SND_JACK_VIDEOOUT: