]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: Add jack reporting API
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 28 Jul 2008 18:05:35 +0000 (19:05 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 29 Jul 2008 19:32:03 +0000 (21:32 +0200)
commitb1f16ce8642dd421f33c5d39174ee680fe395488
tree4041759593dbc10c35c96976e60ee759de3f9dbe
parent88d319f953c21cff0dc86277d2f8a66e59170e23
ALSA: Add jack reporting API

Currently very few systems provide information about jack status to user
space, even though many have hardware facilities to do detection. Those
systems that do use an input device with the existing SW_HEADPHONE_INSERT
switch type to do so, often independently of ALSA.

This patch introduces a standard method for representing jacks to user
space into ALSA. It allows drivers to register jacks for a sound card with
the input subsystem, binding the input device to the card to help user
space associate the input devices with their sound cards. The created
input devices are named in the form "card longname jack" where jack is
provided by the driver when allocating a jack. By default the parent for
the input device is the sound card but this can be overridden by the
card driver.

The existing user space API with SW_HEADPHONE_INSERT is preserved.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
include/sound/core.h
include/sound/jack.h [new file with mode: 0644]
sound/core/jack.c [new file with mode: 0644]