On 10/13/2011 08:40 AM, Takashi Iwai wrote:
Thanks for the explanation and for your thoughts about what you think could lie ahead. What would you think about the following instead:
struct detectable_jack { hda_nid_t nid; int jack_type; /* SND_JACK_xxx */ };
#define MAX_DETECTABLE_JACKS 16
struct auto_pin_cfg { /* ... */ struct detectable_jack detectable_jacks[MAX_DETECTABLE_JACKS]; };
We will let snd_hda_parse_pin_def_config fill this in as well, and the unsol_tag will be index to this array. Tags over MAX_DETECTABLE_JACKS can be used by codec specific stuff, e g sigmatel's power events.
Hmm... This sounds trickier. Can't it be simply a list of nid, event_type and jack_type? Or just add jack_type to the event struct in patch_sigmatel.c.
When we track all unsol events in the table, the hardware initialization can be simplified. Create a function to call SET_UNSOL_ENABLE verb for the all entries, and call it from the codec_patch init callback.
Just for the record - I think we can to talk about this next week to see if we can merge our thoughts and come to a conclusion we're both happy with.