[alsa-devel] [PATCH v2 1/2] ALSA: jack: create jack kcontrols for every jack input device
Raymond Yau
superquad.vortex2 at gmail.com
Fri Mar 20 11:30:29 CET 2015
>
> Currently the ALSA jack core registers only input devices for each jack
> registered. These jack input devices are not readable by userspace devices
> that run as non root.
>
> This patch adds support for additionally registering jack kcontrol devices
> for every input jack registered. This allows non root userspace to read
> jack status.
>
> Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
> Modified-by: Jie Yang <yang.jie at intel.com>
> Signed-off-by: Jie Yang <yang.jie at intel.com>
> Reveiwed-by: Mark Brown <broonie at kernel.org>
> ---
> include/sound/jack.h | 8 +++++
> sound/core/jack.c | 99
++++++++++++++++++++++++++++++++++++++++++++++++++--
> 2 files changed, 105 insertions(+), 2 deletions(-)
>
> diff --git a/include/sound/jack.h b/include/sound/jack.h
> index 2182350..ef0f0ed 100644
> --- a/include/sound/jack.h
> +++ b/include/sound/jack.h
> @@ -73,6 +73,8 @@ enum snd_jack_types {
>
> struct snd_jack {
> struct input_dev *input_dev;
> + struct list_head kctl_list;
> + struct snd_card *card;
> int registered;
> int type;
> const char *id;
> @@ -82,6 +84,12 @@ struct snd_jack {
> void (*private_free)(struct snd_jack *);
> };
>
> +struct snd_jack_kctl {
> + struct snd_kcontrol *kctl;
> + struct list_head jack_list; /* list of controls
belong to the same jack*/
Does it mean that those multi io jacks (line in and mic jacks of desktop)
and those headphone/mic combo jack of netbook have all the input and output
kctls in this list ?
More information about the Alsa-devel
mailing list