Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157876
b: refs/heads/master
c: e2aec17
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Sep 1, 2009
1 parent 8d7fe4d commit 54daa7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 148 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: d94ff6b7cab20cc014e22b2fd5f0ff35d3e2308f
refs/heads/master: e2aec17100331669ecae8550a83f551f5e8fc4b8
151 changes: 4 additions & 147 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,20 +329,15 @@ static hda_nid_t stac92hd73xx_adc_nids[2] = {
0x1a, 0x1b
};

#define DELL_M6_AMP 2
static hda_nid_t stac92hd73xx_amp_nids[3] = {
0x0b, 0x0c, 0x0e
};

#define STAC92HD73XX_NUM_DMICS 2
static hda_nid_t stac92hd73xx_dmic_nids[STAC92HD73XX_NUM_DMICS + 1] = {
0x13, 0x14, 0
};

#define STAC92HD73_DAC_COUNT 5

static hda_nid_t stac92hd73xx_mux_nids[4] = {
0x28, 0x29, 0x2a, 0x2b,
static hda_nid_t stac92hd73xx_mux_nids[2] = {
0x20, 0x21,
};

static hda_nid_t stac92hd73xx_dmux_nids[2] = {
Expand Down Expand Up @@ -920,84 +915,16 @@ static struct hda_verb stac9200_eapd_init[] = {
{}
};

static struct hda_verb stac92hd73xx_6ch_core_init[] = {
/* set master volume and direct control */
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* setup adcs to point to mixer */
{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{ 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
/* setup import muxs */
{ 0x28, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x29, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2b, AC_VERB_SET_CONNECT_SEL, 0x00},
{}
};

static struct hda_verb dell_eq_core_init[] = {
/* set master volume to max value without distortion
* and direct control */
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xec},
/* setup adcs to point to mixer */
{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
/* setup import muxs */
{ 0x28, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x29, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2b, AC_VERB_SET_CONNECT_SEL, 0x00},
{}
};

static struct hda_verb dell_m6_core_init[] = {
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* setup adcs to point to mixer */
{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
/* setup import muxs */
{ 0x28, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x29, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2b, AC_VERB_SET_CONNECT_SEL, 0x00},
{}
};

static struct hda_verb stac92hd73xx_8ch_core_init[] = {
/* set master volume and direct control */
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* setup adcs to point to mixer */
{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{ 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
/* setup import muxs */
{ 0x28, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x29, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2b, AC_VERB_SET_CONNECT_SEL, 0x03},
{}
};

static struct hda_verb stac92hd73xx_10ch_core_init[] = {
static struct hda_verb stac92hd73xx_core_init[] = {
/* set master volume and direct control */
{ 0x1f, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* dac3 is connected to import3 mux */
{ 0x18, AC_VERB_SET_AMP_GAIN_MUTE, 0xb07f},
/* setup adcs to point to mixer */
{ 0x20, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x21, AC_VERB_SET_CONNECT_SEL, 0x0b},
{ 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{ 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
{ 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
/* setup import muxs */
{ 0x28, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x29, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2a, AC_VERB_SET_CONNECT_SEL, 0x01},
{ 0x2b, AC_VERB_SET_CONNECT_SEL, 0x03},
{}
};

Expand Down Expand Up @@ -1130,28 +1057,6 @@ static struct snd_kcontrol_new stac9200_mixer[] = {
{ } /* end */
};

#define DELL_M6_MIXER 6
static struct snd_kcontrol_new stac92hd73xx_6ch_mixer[] = {
/* start of config #1 */
HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),

HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),

HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),

/* start of config #2 */
HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),

HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),

{ } /* end */
};

static struct snd_kcontrol_new stac92hd73xx_6ch_loopback[] = {
STAC_ANALOG_LOOPBACK(0xFA0, 0x7A1, 3),
{}
Expand All @@ -1167,42 +1072,6 @@ static struct snd_kcontrol_new stac92hd73xx_10ch_loopback[] = {
{}
};

static struct snd_kcontrol_new stac92hd73xx_8ch_mixer[] = {
HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),

HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),

HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),

HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),

HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
{ } /* end */
};

static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = {
HDA_CODEC_VOLUME("Front Mic Mixer Capture Volume", 0x1d, 0, HDA_INPUT),
HDA_CODEC_MUTE("Front Mic Mixer Capture Switch", 0x1d, 0, HDA_INPUT),

HDA_CODEC_VOLUME("Mic Mixer Capture Volume", 0x1d, 0x1, HDA_INPUT),
HDA_CODEC_MUTE("Mic Mixer Capture Switch", 0x1d, 0x1, HDA_INPUT),

HDA_CODEC_VOLUME("Line In Mixer Capture Volume", 0x1d, 0x2, HDA_INPUT),
HDA_CODEC_MUTE("Line In Mixer Capture Switch", 0x1d, 0x2, HDA_INPUT),

HDA_CODEC_VOLUME("DAC Mixer Capture Volume", 0x1d, 0x3, HDA_INPUT),
HDA_CODEC_MUTE("DAC Mixer Capture Switch", 0x1d, 0x3, HDA_INPUT),

HDA_CODEC_VOLUME("CD Mixer Capture Volume", 0x1d, 0x4, HDA_INPUT),
HDA_CODEC_MUTE("CD Mixer Capture Switch", 0x1d, 0x4, HDA_INPUT),
{ } /* end */
};


static struct snd_kcontrol_new stac92hd71bxx_loopback[] = {
STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2)
Expand Down Expand Up @@ -5188,20 +5057,15 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
"number of channels defaulting to DAC count\n");
num_dacs = STAC92HD73_DAC_COUNT;
}
spec->init = stac92hd73xx_core_init;
switch (num_dacs) {
case 0x3: /* 6 Channel */
spec->mixer = stac92hd73xx_6ch_mixer;
spec->init = stac92hd73xx_6ch_core_init;
spec->aloopback_ctl = stac92hd73xx_6ch_loopback;
break;
case 0x4: /* 8 Channel */
spec->mixer = stac92hd73xx_8ch_mixer;
spec->init = stac92hd73xx_8ch_core_init;
spec->aloopback_ctl = stac92hd73xx_8ch_loopback;
break;
case 0x5: /* 10 Channel */
spec->mixer = stac92hd73xx_10ch_mixer;
spec->init = stac92hd73xx_10ch_core_init;
spec->aloopback_ctl = stac92hd73xx_10ch_loopback;
break;
}
Expand All @@ -5216,8 +5080,6 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
spec->dmic_nids = stac92hd73xx_dmic_nids;
spec->dmux_nids = stac92hd73xx_dmux_nids;
spec->smux_nids = stac92hd73xx_smux_nids;
spec->amp_nids = stac92hd73xx_amp_nids;
spec->num_amps = ARRAY_SIZE(stac92hd73xx_amp_nids);

spec->num_muxes = ARRAY_SIZE(stac92hd73xx_mux_nids);
spec->num_adcs = ARRAY_SIZE(stac92hd73xx_adc_nids);
Expand All @@ -5235,13 +5097,8 @@ static int patch_stac92hd73xx(struct hda_codec *codec)
case STAC_DELL_M6_DMIC:
case STAC_DELL_M6_BOTH:
spec->num_smuxes = 0;
spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER];
spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP];
spec->eapd_switch = 0;
spec->num_amps = 1;

if (spec->board_config != STAC_DELL_EQ)
spec->init = dell_m6_core_init;
switch (spec->board_config) {
case STAC_DELL_M6_AMIC: /* Analog Mics */
snd_hda_codec_set_pincfg(codec, 0x0b, 0x90A70170);
Expand Down

0 comments on commit 54daa7b

Please sign in to comment.