Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257669
b: refs/heads/master
c: cb053a8
h: refs/heads/master
i:
  257667: 1ae8e94
v: v3
  • Loading branch information
Takashi Iwai committed Jun 27, 2011
1 parent 1de43ad commit b7f8782
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 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: 1f0f4b8036b1fe1347cb4f1f199601b87de9be46
refs/heads/master: cb053a8265954518d4c9e865d8a0d682405825d2
42 changes: 23 additions & 19 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -5330,9 +5330,10 @@ static int add_control_with_pfx(struct alc_spec *spec, int type,
#define ALC880_PIN_CD_NID 0x1c

/* fill in the dac_nids table from the parsed pin configuration */
static int alc880_auto_fill_dac_nids(struct alc_spec *spec,
const struct auto_pin_cfg *cfg)
static int alc880_auto_fill_dac_nids(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
const struct auto_pin_cfg *cfg = &spec->autocfg;
hda_nid_t nid;
int assigned[4];
int i, j;
Expand Down Expand Up @@ -5706,7 +5707,8 @@ static void alc880_auto_init_input_src(struct hda_codec *codec)
}
}

static int alc_auto_add_multi_channel_mode(struct hda_codec *codec);
static int alc_auto_add_multi_channel_mode(struct hda_codec *codec,
int (*fill_dac)(struct hda_codec *));

/* parse the BIOS configuration and set up the alc_spec */
/* return 1 if successful, 0 if the proper config is not found,
Expand All @@ -5725,10 +5727,10 @@ static int alc880_parse_auto_config(struct hda_codec *codec)
if (!spec->autocfg.line_outs)
return 0; /* can't find valid BIOS pin config */

err = alc880_auto_fill_dac_nids(spec, &spec->autocfg);
err = alc880_auto_fill_dac_nids(codec);
if (err < 0)
return err;
err = alc_auto_add_multi_channel_mode(codec);
err = alc_auto_add_multi_channel_mode(codec, alc880_auto_fill_dac_nids);
if (err < 0)
return err;
err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg);
Expand Down Expand Up @@ -11165,10 +11167,10 @@ static int alc882_parse_auto_config(struct hda_codec *codec)
if (!spec->autocfg.line_outs)
return 0; /* can't find valid BIOS pin config */

err = alc880_auto_fill_dac_nids(spec, &spec->autocfg);
err = alc880_auto_fill_dac_nids(codec);
if (err < 0)
return err;
err = alc_auto_add_multi_channel_mode(codec);
err = alc_auto_add_multi_channel_mode(codec, alc880_auto_fill_dac_nids);
if (err < 0)
return err;
err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg);
Expand Down Expand Up @@ -15859,10 +15861,10 @@ static hda_nid_t alc861_look_for_dac(struct hda_codec *codec, hda_nid_t pin)
}

/* fill in the dac_nids table from the parsed pin configuration */
static int alc861_auto_fill_dac_nids(struct hda_codec *codec,
const struct auto_pin_cfg *cfg)
static int alc861_auto_fill_dac_nids(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
const struct auto_pin_cfg *cfg = &spec->autocfg;
int i;
hda_nid_t nid, dac;

Expand Down Expand Up @@ -16027,10 +16029,10 @@ static int alc861_parse_auto_config(struct hda_codec *codec)
if (!spec->autocfg.line_outs)
return 0; /* can't find valid BIOS pin config */

err = alc861_auto_fill_dac_nids(codec, &spec->autocfg);
err = alc861_auto_fill_dac_nids(codec);
if (err < 0)
return err;
err = alc_auto_add_multi_channel_mode(codec);
err = alc_auto_add_multi_channel_mode(codec, alc861_auto_fill_dac_nids);
if (err < 0)
return err;
err = alc861_auto_create_multi_out_ctls(codec, &spec->autocfg);
Expand Down Expand Up @@ -17091,10 +17093,10 @@ static int alc861vd_parse_auto_config(struct hda_codec *codec)
if (!spec->autocfg.line_outs)
return 0; /* can't find valid BIOS pin config */

err = alc880_auto_fill_dac_nids(spec, &spec->autocfg);
err = alc880_auto_fill_dac_nids(codec);
if (err < 0)
return err;
err = alc_auto_add_multi_channel_mode(codec);
err = alc_auto_add_multi_channel_mode(codec, alc880_auto_fill_dac_nids);
if (err < 0)
return err;
err = alc861vd_auto_create_multi_out_ctls(spec, &spec->autocfg);
Expand Down Expand Up @@ -18764,10 +18766,10 @@ static hda_nid_t alc_auto_look_for_dac(struct hda_codec *codec, hda_nid_t pin)
}

/* fill in the dac_nids table from the parsed pin configuration */
static int alc662_auto_fill_dac_nids(struct hda_codec *codec,
const struct auto_pin_cfg *cfg)
static int alc662_auto_fill_dac_nids(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
const struct auto_pin_cfg *cfg = &spec->autocfg;
int i;
hda_nid_t dac;

Expand Down Expand Up @@ -19073,7 +19075,8 @@ static const struct snd_kcontrol_new alc_auto_channel_mode_enum = {
.put = alc_auto_ch_mode_put,
};

static int alc_auto_add_multi_channel_mode(struct hda_codec *codec)
static int alc_auto_add_multi_channel_mode(struct hda_codec *codec,
int (*fill_dac)(struct hda_codec *))
{
struct alc_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
Expand All @@ -19090,7 +19093,8 @@ static int alc_auto_add_multi_channel_mode(struct hda_codec *codec)
cfg->hp_outs = 0;
memset(cfg->hp_pins, 0, sizeof(cfg->hp_pins));
cfg->line_out_type = AUTO_PIN_HP_OUT;
alc662_auto_fill_dac_nids(codec, cfg);
if (fill_dac)
fill_dac(codec);
}
if (cfg->line_outs != 1 ||
cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
Expand Down Expand Up @@ -19131,10 +19135,10 @@ static int alc662_parse_auto_config(struct hda_codec *codec)
if (!spec->autocfg.line_outs)
return 0; /* can't find valid BIOS pin config */

err = alc662_auto_fill_dac_nids(codec, &spec->autocfg);
err = alc662_auto_fill_dac_nids(codec);
if (err < 0)
return err;
err = alc_auto_add_multi_channel_mode(codec);
err = alc_auto_add_multi_channel_mode(codec, alc662_auto_fill_dac_nids);
if (err < 0)
return err;
err = alc662_auto_create_multi_out_ctls(codec, &spec->autocfg);
Expand Down

0 comments on commit b7f8782

Please sign in to comment.