net: Kill ratelimit.h dependency in linux/net.h
[linux-2.6.git] / include / sound / jack.h
index b1b2b8b..c140fc7 100644 (file)
@@ -30,11 +30,26 @@ struct input_dev;
 /**
  * Jack types which can be reported.  These values are used as a
  * bitmask.
+ *
+ * Note that this must be kept in sync with the lookup table in
+ * sound/core/jack.c.
  */
 enum snd_jack_types {
        SND_JACK_HEADPHONE      = 0x0001,
        SND_JACK_MICROPHONE     = 0x0002,
        SND_JACK_HEADSET        = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE,
+       SND_JACK_LINEOUT        = 0x0004,
+       SND_JACK_MECHANICAL     = 0x0008, /* If detected separately */
+       SND_JACK_VIDEOOUT       = 0x0010,
+       SND_JACK_AVOUT          = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT,
+
+       /* Kept separate from switches to facilitate implementation */
+       SND_JACK_BTN_0          = 0x4000,
+       SND_JACK_BTN_1          = 0x2000,
+       SND_JACK_BTN_2          = 0x1000,
+       SND_JACK_BTN_3          = 0x0800,
+       SND_JACK_BTN_4          = 0x0400,
+       SND_JACK_BTN_5          = 0x0200,
 };
 
 struct snd_jack {
@@ -43,6 +58,9 @@ struct snd_jack {
        int type;
        const char *id;
        char name[100];
+       unsigned int key[6];   /* Keep in sync with definitions above */
+       void *private_data;
+       void (*private_free)(struct snd_jack *);
 };
 
 #ifdef CONFIG_SND_JACK
@@ -50,6 +68,8 @@ struct snd_jack {
 int snd_jack_new(struct snd_card *card, const char *id, int type,
                 struct snd_jack **jack);
 void snd_jack_set_parent(struct snd_jack *jack, struct device *parent);
+int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type,
+                    int keytype);
 
 void snd_jack_report(struct snd_jack *jack, int status);