ALSA: hda - Manage unsol tags in hda_jack.c

Manage the tags assigned for unsolicited events dynamically together
with the jack-detection routines.  Basically this is almost same as what
we've done in patch_sigmatel.c.  Assign the new tag number for each new
unsol event, associate with the given NID and the action type, etc.

With this change, now all pins looked over in snd_hda_jack_add_kctls()
are actually enabled for detection now even if the pins aren't used for
jack-retasking by the driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2011-10-28 01:16:55 +02:00
orang tua 01a61e12b4
melakukan 3a93897ea3
8 mengubah file dengan 105 tambahan dan 126 penghapusan

Melihat File

@@ -1714,9 +1714,8 @@ static void via_gpio_control(struct hda_codec *codec)
static void via_unsol_event(struct hda_codec *codec,
unsigned int res)
{
snd_hda_jack_set_dirty_all(codec); /* FIXME: to be more fine-grained */
res >>= 26;
res = snd_hda_jack_get_action(codec, res);
if (res & VIA_JACK_EVENT)
set_widgets_power_state(codec);