aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2009-02-12 16:50:01 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-13 08:35:08 +0100
commit8bb0ac5573ff0879fef511e1a80a4a4db0316daa (patch)
tree2f2734519b42feb2c020cb0b49917dbed62b3cff /sound/pci/hda/patch_sigmatel.c
parentae374d667a54fb5e2c9c0c4e87b206bd665f3ad6 (diff)
ALSA: hda: Add STAC_DELL_S14 quirk
Add STAC_DELL_S14 quirk for new laptop series. Removed un-needed pins in pin_nids for stac92hd83xxx. Also reorganized connection selection code for the respective ports per quirk define. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c52
1 files changed, 35 insertions, 17 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 3c84817ccd2..1ebb36ca2e0 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -83,6 +83,7 @@ enum {
enum {
STAC_92HD83XXX_REF,
STAC_92HD83XXX_PWR_REF,
+ STAC_DELL_S14,
STAC_92HD83XXX_MODELS
};
@@ -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
@@ -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},
@@ -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[] = {
@@ -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 */
};
@@ -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)
@@ -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);
@@ -4900,6 +4901,23 @@ again:
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;