Commit 20c18f56 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda/realtek - Remove unused fields and macro definitions

Also arranged alc_spec definitions to optimize bit fields.
Use a bit field for spec->need_dac_fix, too.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 480967db
...@@ -73,8 +73,6 @@ struct alc_multi_io { ...@@ -73,8 +73,6 @@ struct alc_multi_io {
unsigned int ctl_in; /* cached input-pin control value */ unsigned int ctl_in; /* cached input-pin control value */
}; };
#define MAX_VOL_NIDS 0x40
/* make compatible with old code */ /* make compatible with old code */
#define alc_apply_pincfgs snd_hda_apply_pincfgs #define alc_apply_pincfgs snd_hda_apply_pincfgs
#define alc_apply_fixup snd_hda_apply_fixup #define alc_apply_fixup snd_hda_apply_fixup
...@@ -161,7 +159,6 @@ struct alc_spec { ...@@ -161,7 +159,6 @@ struct alc_spec {
unsigned int cur_adc_format; unsigned int cur_adc_format;
/* capture source */ /* capture source */
unsigned int num_mux_defs;
struct hda_input_mux input_mux; struct hda_input_mux input_mux;
unsigned int cur_mux[3]; unsigned int cur_mux[3];
hda_nid_t ext_mic_pin; hda_nid_t ext_mic_pin;
...@@ -171,7 +168,6 @@ struct alc_spec { ...@@ -171,7 +168,6 @@ struct alc_spec {
/* channel model */ /* channel model */
const struct hda_channel_mode *channel_mode; const struct hda_channel_mode *channel_mode;
int num_channel_mode; int num_channel_mode;
int need_dac_fix;
int const_channel_count; /* min. channel count (for speakers) */ int const_channel_count; /* min. channel count (for speakers) */
int ext_channel_count; /* current channel count for multi-io */ int ext_channel_count; /* current channel count for multi-io */
...@@ -218,19 +214,15 @@ struct alc_spec { ...@@ -218,19 +214,15 @@ struct alc_spec {
unsigned int keep_vref_in_automute:1; /* Don't clear VREF in automute */ unsigned int keep_vref_in_automute:1; /* Don't clear VREF in automute */
/* other flags */ /* other flags */
unsigned int need_dac_fix:1; /* need to limit DACs for multi channels */
unsigned int no_analog :1; /* digital I/O only */ unsigned int no_analog :1; /* digital I/O only */
unsigned int dyn_adc_switch:1; /* switch ADCs (for ALC275) */ unsigned int dyn_adc_switch:1; /* switch ADCs (for ALC275) */
unsigned int single_input_src:1;
unsigned int vol_in_capsrc:1; /* use capsrc volume (ADC has no vol) */
unsigned int parse_flags; /* passed to snd_hda_parse_pin_defcfg() */
unsigned int shared_mic_hp:1; /* HP/Mic-in sharing */ unsigned int shared_mic_hp:1; /* HP/Mic-in sharing */
unsigned int inv_dmic_fixup:1; /* has inverted digital-mic workaround */ unsigned int inv_dmic_fixup:1; /* has inverted digital-mic workaround */
unsigned int inv_dmic_muted:1; /* R-ch of inv d-mic is muted? */ unsigned int inv_dmic_muted:1; /* R-ch of inv d-mic is muted? */
unsigned int no_primary_hp:1; /* Don't prefer HP pins to speaker pins */ unsigned int no_primary_hp:1; /* Don't prefer HP pins to speaker pins */
/* auto-mute control */ unsigned int parse_flags; /* passed to snd_hda_parse_pin_defcfg() */
int automute_mode;
hda_nid_t automute_mixer_nid[AUTO_CFG_MAX_OUTS];
int init_amp; int init_amp;
int codec_variant; /* flag for other variants */ int codec_variant; /* flag for other variants */
...@@ -612,9 +604,6 @@ static void alc_line_automute(struct hda_codec *codec, struct hda_jack_tbl *jack ...@@ -612,9 +604,6 @@ static void alc_line_automute(struct hda_codec *codec, struct hda_jack_tbl *jack
call_update_outputs(codec); call_update_outputs(codec);
} }
#define get_connection_index(codec, mux, nid) \
snd_hda_get_conn_index(codec, mux, nid, 0)
/* standard mic auto-switch helper */ /* standard mic auto-switch helper */
static void alc_mic_automute(struct hda_codec *codec, struct hda_jack_tbl *jack) static void alc_mic_automute(struct hda_codec *codec, struct hda_jack_tbl *jack)
{ {
...@@ -1619,8 +1608,6 @@ static const char * const alc_slave_pfxs[] = { ...@@ -1619,8 +1608,6 @@ static const char * const alc_slave_pfxs[] = {
* build control elements * build control elements
*/ */
#define NID_MAPPING (-1)
static void alc_free_kctls(struct hda_codec *codec); static void alc_free_kctls(struct hda_codec *codec);
#ifdef CONFIG_SND_HDA_INPUT_BEEP #ifdef CONFIG_SND_HDA_INPUT_BEEP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment