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:
Takashi Iwai
2014-09-11 14:06:53 +02:00
parent 998052b745
commit 62f949bf6b
10 changed files with 23 additions and 73 deletions

View File

@@ -135,8 +135,6 @@ enum {
#define CS421X_IDX_DAC_CFG 0x03
#define CS421X_IDX_SPK_CTL 0x04
#define SPDIF_EVENT 0x04
/* Cirrus Logic CS4213 is like CS4210 but does not have SPDIF input/output */
#define CS4213_VENDOR_NID 0x09
@@ -1019,7 +1017,6 @@ static void parse_cs421x_digital(struct hda_codec *codec)
if (get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) {
spec->spdif_detect = 1;
snd_hda_jack_detect_enable_callback(codec, nid,
SPDIF_EVENT,
cs4210_spdif_automute);
}
}