• Jie Yang's avatar
    ALSA: jack: implement kctl creating for jack devices · 9058cbe1
    Jie Yang authored
    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 series will implement kctls inside the
    core jack part, including kctls creating, status changing report, for both
    HD-Audio and ASoC jack. This allows non root userspace to read jack status
    and act on it.
    
    This patch adds a new API called snd_jack_add_new_kctl(), which will create
    a kcontrol, add it to the card, and also attach it to the jack kctl list.
    
    This patch also initialises the jack kctl list after jack is newed, and
    reports kctl status when jack insertion/removal events occur.
    
    snd_jack_new() is updated in the following patches to also support creating
    phantom jacks and jack kcontrols. We then remove these duplicated features
    from HDA jack and have jack kctls handled by core throughout HDA and ASoC.
    Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
    Modified-by: default avatarJie Yang <yang.jie@intel.com>
    Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
    Reveiwed-by: default avatarMark Brown <broonie@kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    9058cbe1
jack.h 3.42 KB