From 5dd93f6d413a8be30abe13c8be4101234570326f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 19 Dec 2012 14:41:21 +0100 Subject: [PATCH] --- yaml --- r: 353044 b: refs/heads/master c: 9eb413e5e4801753f7851ec6c46528adcc15579f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_generic.c | 24 +++++++++++++++--------- trunk/sound/pci/hda/hda_generic.h | 4 +--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 705d1d40c76c..deb4f1f384ac 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 12c93df60ccf926f8798723f97f9f45175fce85b +refs/heads/master: 9eb413e5e4801753f7851ec6c46528adcc15579f diff --git a/trunk/sound/pci/hda/hda_generic.c b/trunk/sound/pci/hda/hda_generic.c index 49e968c8140b..e512cab22e91 100644 --- a/trunk/sound/pci/hda/hda_generic.c +++ b/trunk/sound/pci/hda/hda_generic.c @@ -2785,21 +2785,23 @@ static int check_auto_mic_availability(struct hda_codec *codec) } -/* parse the BIOS configuration and set up the hda_gen_spec */ -/* return 1 if successful, 0 if the proper config is not found, +/* + * Parse the given BIOS configuration and set up the hda_gen_spec + * + * return 1 if successful, 0 if the proper config is not found, * or a negative error code */ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, - const hda_nid_t *ignore_nids) + struct auto_pin_cfg *cfg) { struct hda_gen_spec *spec = codec->spec; - struct auto_pin_cfg *cfg = &spec->autocfg; int err; - err = snd_hda_parse_pin_defcfg(codec, cfg, ignore_nids, - spec->parse_flags); - if (err < 0) - return err; + if (cfg != &spec->autocfg) { + spec->autocfg = *cfg; + cfg = &spec->autocfg; + } + if (!cfg->line_outs) { if (cfg->dig_outs || cfg->dig_in_pin) { spec->multiout.max_channels = 2; @@ -3586,7 +3588,11 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec) snd_hda_gen_spec_init(spec); codec->spec = spec; - err = snd_hda_gen_parse_auto_config(codec, NULL); + err = snd_hda_parse_pin_defcfg(codec, &spec->autocfg, NULL, 0); + if (err < 0) + return err; + + err = snd_hda_gen_parse_auto_config(codec, &spec->autocfg); if (err < 0) goto error; diff --git a/trunk/sound/pci/hda/hda_generic.h b/trunk/sound/pci/hda/hda_generic.h index d71e86de9060..1a3b4042c5ba 100644 --- a/trunk/sound/pci/hda/hda_generic.h +++ b/trunk/sound/pci/hda/hda_generic.h @@ -152,8 +152,6 @@ struct hda_gen_spec { unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */ unsigned int own_eapd_ctl:1; /* set EAPD by own function */ - unsigned int parse_flags; /* passed to snd_hda_parse_pin_defcfg() */ - /* for virtual master */ hda_nid_t vmaster_nid; struct hda_vmaster_mute_hook vmaster_mute; @@ -197,7 +195,7 @@ snd_hda_gen_add_kctl(struct hda_gen_spec *spec, const char *name, const struct snd_kcontrol_new *temp); int snd_hda_gen_parse_auto_config(struct hda_codec *codec, - const hda_nid_t *ignore_nids); + struct auto_pin_cfg *cfg); int snd_hda_gen_build_controls(struct hda_codec *codec); int snd_hda_gen_build_pcms(struct hda_codec *codec);