summaryrefslogtreecommitdiff
path: root/sound/core/ctljack.c
AgeCommit message (Collapse)Author
2015-06-26ALSA: jack: Fix endless loop at unique index detectionTakashi Iwai
While the commit [d0a601c278de: ALSA: jack: Fix the id uniqueness check] fixes the wrong string check, it leads to a worse result -- the loop in get_available_index() goes into an endless loop. The cause is that snd_ctl_find_id() returns the object assigned to the numid if it's set. Thus it points to the previous entry again. This patch clears the numid field for the next call properly. Reported-and-tested-by: Tomáš Pružina <pruzinat@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-05-29ALSA: jack: Fix the id uniqueness checkTakashi Iwai
snd_kctl_jack_new() tries to assign a unique index number when a name string that has been already registered is passed. However, it checks with the base string without "Jack" suffix, so it never hits. Fix the call with the properly processed name string instead. Fixes: b8dd086674cf 'ALSA: Jack: handle jack embedded kcontrol creating within ctljack') Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: jack: remove exporting ctljack functionsJie Yang
snd_kctl_jack_new() and snd_kctl_jack_report() are internal only now so make them static. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: hda - Update to use the new jack kctls methodJie Yang
Jack snd_kcontrols can now be created during snd_jack_new() or by later calling snd_jack_add_new_kctls(). This patch creates the jacks during the initialisation stage for both phantom and non phantom jacks. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27ALSA: Jack: handle jack embedded kcontrol creating within ctljackJie Yang
This patch adds a static method get_available_index() to allocate the index of new jack kcontrols and also adds jack_kctl_name_gen() which is used to ensure compatibility with jack naming by removing " Jack" from some incorrectly passed names. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: hda - Add missing inclusion of linux/export.hTakashi Iwai
This is needed newly since 3.2... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16ALSA: Introduce common helper functions for jack-detection controlTakashi Iwai
Now move the helper function for creating and reporting the jack-detection to the common place. The driver that needs this functionality should select CONFIG_SND_KCTL_JACK kconfig. Signed-off-by: Takashi Iwai <tiwai@suse.de>