Skip to content

Commit d506fc3

Browse files
Jani Nikulabroonie
authored andcommitted
ALSA: Add support for video out to the jack reporting API
Add support for reporting new jack types SND_JACK_VIDEOOUT and SND_JACK_AVOUT (a combination of LINEOUT and VIDEOOUT) to the jack reporting API. Also add the corresponding SW_VIDEOOUT_INSERT switch to the input system header. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent bd8a71a commit d506fc3

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎include/linux/input.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ struct input_absinfo {
661661
#define SW_DOCK 0x05 /* set = plugged into dock */
662662
#define SW_LINEOUT_INSERT 0x06 /* set = inserted */
663663
#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */
664+
#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */
664665
#define SW_MAX 0x0f
665666
#define SW_CNT (SW_MAX+1)
666667

‎include/sound/jack.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ enum snd_jack_types {
4040
SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE,
4141
SND_JACK_LINEOUT = 0x0004,
4242
SND_JACK_MECHANICAL = 0x0008, /* If detected separately */
43+
SND_JACK_VIDEOOUT = 0x0010,
44+
SND_JACK_AVOUT = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT,
4345
};
4446

4547
struct snd_jack {

‎sound/core/jack.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ static int jack_types[] = {
2828
SW_MICROPHONE_INSERT,
2929
SW_LINEOUT_INSERT,
3030
SW_JACK_PHYSICAL_INSERT,
31+
SW_VIDEOOUT_INSERT,
3132
};
3233

3334
static int snd_jack_dev_free(struct snd_device *device)

0 commit comments

Comments
 (0)