Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353044
b: refs/heads/master
c: 9eb413e
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 12, 2013
1 parent 398d5da commit 5dd93f6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12c93df60ccf926f8798723f97f9f45175fce85b
refs/heads/master: 9eb413e5e4801753f7851ec6c46528adcc15579f
24 changes: 15 additions & 9 deletions trunk/sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 1 addition & 3 deletions trunk/sound/pci/hda/hda_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 5dd93f6

Please sign in to comment.