Currently only hda will create kctls for hda jacks, for asoc, people may need create jack kctls in specific driver.
Here we are introducing kctls for each jack, by creating kctls and add them to jack controls list (considering exist of combo jack). At the same time, we will report events for each control in the list.
With this implement, we are no longer need hda jack specific kctls, so here also remove jack kctls for hda.
Changes in v3: 1. replace bit index with bit mask in jack_kctl; 2. add exception for SND_JACK_HEADSET and SND_JACK_AVOUT, only create one jack kctl for these two combo jacks, respectively. 3. add NULL check, mem kfree, and fix some potential risk.
Change in v2: 1. define jack_kctl struct, and put jack kctl related stuff there; 2. add a patch to remove the existing controls for HDA jack.
Jie Yang (2): ALSA: jack: create jack kcontrols for every jack input device ALSA: hda - Remove jack kctls
include/sound/jack.h | 8 ++++ sound/core/Kconfig | 3 -- sound/core/Makefile | 3 +- sound/core/jack.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++- sound/pci/hda/Kconfig | 10 +--- sound/pci/hda/hda_jack.c | 45 ++---------------- sound/pci/hda/hda_jack.h | 3 -- 7 files changed, 129 insertions(+), 61 deletions(-)