Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133045
b: refs/heads/master
c: 8bb0ac5
h: refs/heads/master
i:
  133043: 49568e0
v: v3
  • Loading branch information
Matthew Ranostay authored and Takashi Iwai committed Feb 13, 2009
1 parent dd4c04a commit ef8ffb1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 18 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: ae374d667a54fb5e2c9c0c4e87b206bd665f3ad6
refs/heads/master: 8bb0ac5573ff0879fef511e1a80a4a4db0316daa
52 changes: 35 additions & 17 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ enum {
enum {
STAC_92HD83XXX_REF,
STAC_92HD83XXX_PWR_REF,
STAC_DELL_S14,
STAC_92HD83XXX_MODELS
};

Expand Down Expand Up @@ -480,10 +481,9 @@ static hda_nid_t stac92hd73xx_pin_nids[13] = {
0x14, 0x22, 0x23
};

static hda_nid_t stac92hd83xxx_pin_nids[14] = {
static hda_nid_t stac92hd83xxx_pin_nids[10] = {
0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
0x0f, 0x10, 0x11, 0x12, 0x13,
0x1d, 0x1e, 0x1f, 0x20
0x0f, 0x10, 0x11, 0x1f, 0x20,
};

#define STAC92HD71BXX_NUM_PINS 13
Expand Down Expand Up @@ -857,9 +857,9 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = {
};

static struct hda_verb stac92hd83xxx_core_init[] = {
{ 0xa, AC_VERB_SET_CONNECT_SEL, 0x0},
{ 0xb, AC_VERB_SET_CONNECT_SEL, 0x0},
{ 0xd, AC_VERB_SET_CONNECT_SEL, 0x1},
{ 0xa, AC_VERB_SET_CONNECT_SEL, 0x1},
{ 0xb, AC_VERB_SET_CONNECT_SEL, 0x1},
{ 0xd, AC_VERB_SET_CONNECT_SEL, 0x0},

/* power state controls amps */
{ 0x01, AC_VERB_SET_EAPD, 1 << 2},
Expand Down Expand Up @@ -1730,21 +1730,28 @@ static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
{} /* terminator */
};

static unsigned int ref92hd83xxx_pin_configs[14] = {
static unsigned int ref92hd83xxx_pin_configs[10] = {
0x02214030, 0x02211010, 0x02a19020, 0x02170130,
0x01014050, 0x01819040, 0x01014020, 0x90a3014e,
0x40f000f0, 0x40f000f0, 0x40f000f0, 0x40f000f0,
0x01451160, 0x98560170,
};

static unsigned int dell_s14_pin_configs[10] = {
0x02214030, 0x02211010, 0x02a19020, 0x01014050,
0x40f000f0, 0x01819040, 0x40f000f0, 0x90a60160,
0x40f000f0, 0x40f000f0,
};

static unsigned int *stac92hd83xxx_brd_tbl[STAC_92HD83XXX_MODELS] = {
[STAC_92HD83XXX_REF] = ref92hd83xxx_pin_configs,
[STAC_92HD83XXX_PWR_REF] = ref92hd83xxx_pin_configs,
[STAC_DELL_S14] = dell_s14_pin_configs,
};

static const char *stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
[STAC_92HD83XXX_REF] = "ref",
[STAC_92HD83XXX_PWR_REF] = "mic-ref",
[STAC_DELL_S14] = "dell-s14",
};

static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
Expand All @@ -1753,6 +1760,8 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
"DFI LanParty", STAC_92HD83XXX_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DFI, 0x3101,
"DFI LanParty", STAC_92HD83XXX_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba,
"unknown Dell", STAC_DELL_S14),
{} /* terminator */
};

Expand Down Expand Up @@ -4822,6 +4831,7 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
hda_nid_t conn[STAC92HD83_DAC_COUNT + 1];
int err;
int num_dacs;
hda_nid_t nid;

spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL)
Expand All @@ -4840,15 +4850,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
spec->num_pwrs = ARRAY_SIZE(stac92hd83xxx_pwr_nids);
spec->multiout.dac_nids = spec->dac_nids;


/* set port 0xe to select the last DAC
*/
num_dacs = snd_hda_get_connections(codec, 0x0e,
conn, STAC92HD83_DAC_COUNT + 1) - 1;

snd_hda_codec_write_cache(codec, 0xe, 0,
AC_VERB_SET_CONNECT_SEL, num_dacs);

spec->init = stac92hd83xxx_core_init;
spec->mixer = stac92hd83xxx_mixer;
spec->num_pins = ARRAY_SIZE(stac92hd83xxx_pin_nids);
Expand Down Expand Up @@ -4900,6 +4901,23 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
return err;
}

switch (spec->board_config) {
case STAC_DELL_S14:
nid = 0xf;
break;
default:
nid = 0xe;
break;
}

num_dacs = snd_hda_get_connections(codec, nid,
conn, STAC92HD83_DAC_COUNT + 1) - 1;

/* set port X to select the last DAC
*/
snd_hda_codec_write_cache(codec, nid, 0,
AC_VERB_SET_CONNECT_SEL, num_dacs);

codec->patch_ops = stac92xx_patch_ops;

codec->proc_widget_hook = stac92hd_proc_hook;
Expand Down

0 comments on commit ef8ffb1

Please sign in to comment.