Skip to contentSkip to conversation

ALSA: Add more jack button slots

PATCH In review Mark Brown 2 participants 2 messages Sep 6, 2010 – Sep 7, 2010 Sound

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ALSA: Add more jack button slots

Some devices have more flexible microphone detection and can detect a wider range of buttons.

---
 include/sound/jack.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
include/sound/jack.h +4 -1
index d90b9fa..c140fc7 100644
@@ -47,6 +47,9 @@ enum snd_jack_types {
 	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 {
@@ -55,7 +58,7 @@ struct snd_jack {
 	int type;
 	const char *id;
 	char name[100];
-	unsigned int key[3];   /* Keep in sync with definitions above */
+	unsigned int key[6];   /* Keep in sync with definitions above */
 	void *private_data;
 	void (*private_free)(struct snd_jack *);
 };
Signature · 1 line
1.7.1
#1 lore raw

At Mon, 6 Sep 2010 16:08:56 +0100,

Quoted 5 lines · Mark Brown

Some devices have more flexible microphone detection and can detect a wider range of buttons.

Applied now to topic/misc branch.
Thanks.

Takashi

Quoted 30 lines
---
 include/sound/jack.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
include/sound/jack.h +4 -1
index d90b9fa..c140fc7 100644
@@ -47,6 +47,9 @@ enum snd_jack_types {
 	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 {
@@ -55,7 +58,7 @@ struct snd_jack {
 	int type;
 	const char *id;
 	char name[100];
-	unsigned int key[3];   /* Keep in sync with definitions above */
+	unsigned int key[6];   /* Keep in sync with definitions above */
 	void *private_data;
 	void (*private_free)(struct snd_jack *);
 };
Signature · 1 line
1.7.1