ALSA: hda - Get rid of action field from struct hda_jack_tbl
The action value assigned to each hda_jack_tbl entry is mostly superfluous. The actually used values are either the widget NID or a value specific to the callback. The former case can be simply replaced by a reference to widget NID itself. The only place doing the latter is STAC/IDT codec driver for the powermap handling. But, the code doesn't need to check the action field at all -- the function jack_update_power() is called either with a specific pin or with NULL. So the check of jack->action can be removed completely there, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -2165,7 +2165,7 @@ static int generic_hdmi_init(struct hda_codec *codec)
|
||||
hda_nid_t pin_nid = per_pin->pin_nid;
|
||||
|
||||
hdmi_init_pin(codec, pin_nid);
|
||||
snd_hda_jack_detect_enable_callback(codec, pin_nid, pin_nid,
|
||||
snd_hda_jack_detect_enable_callback(codec, pin_nid,
|
||||
codec->jackpoll_interval > 0 ? jack_callback : NULL);
|
||||
}
|
||||
return 0;
|
||||
@@ -2428,7 +2428,7 @@ static int simple_playback_init(struct hda_codec *codec)
|
||||
if (get_wcaps(codec, pin) & AC_WCAP_OUT_AMP)
|
||||
snd_hda_codec_write(codec, pin, 0, AC_VERB_SET_AMP_GAIN_MUTE,
|
||||
AMP_OUT_UNMUTE);
|
||||
snd_hda_jack_detect_enable(codec, pin, pin);
|
||||
snd_hda_jack_detect_enable(codec, pin);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user