ALSA: Jack: handle jack embedded kcontrol creating within ctljack
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>
Tento commit je obsažen v:
@@ -402,7 +402,7 @@ static int __snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
|
||||
return 0;
|
||||
if (jack->kctl)
|
||||
return 0; /* already created */
|
||||
kctl = snd_kctl_jack_new(name, idx, codec);
|
||||
kctl = snd_kctl_jack_new(name, codec, codec->card);
|
||||
if (!kctl)
|
||||
return -ENOMEM;
|
||||
err = snd_hda_ctl_add(codec, nid, kctl);
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele