aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-12 18:17:58 +0100
committerTakashi Iwai <tiwai@suse.de>2009-03-12 18:17:58 +0100
commit307282c8990c5658604b9fda8a64a9a07079b850 (patch)
tree6518dadb37793a18badb268ce69ad31120e7dc83 /sound/pci
parent9421f9543b3a0a870499f64498406003de8214b4 (diff)
ALSA: hda - Add model=vaio for STAC9872
Add the default pin config for model=vaio (in case of broken BIOS). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_sigmatel.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 72c87aa20bd..e06fc7decd3 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -155,6 +155,12 @@ enum {
STAC_927X_MODELS
};
+enum {
+ STAC_9872_AUTO,
+ STAC_9872_VAIO,
+ STAC_9872_MODELS
+};
+
struct sigmatel_event {
hda_nid_t nid;
unsigned char type;
@@ -5588,6 +5594,25 @@ static hda_nid_t stac9872_mux_nids[] = {
0x15
};
+static unsigned int stac9872_vaio_pin_configs[9] = {
+ 0x03211020, 0x411111f0, 0x411111f0, 0x03a15030,
+ 0x411111f0, 0x90170110, 0x411111f0, 0x411111f0,
+ 0x90a7013e
+};
+
+static const char *stac9872_models[STAC_9872_MODELS] = {
+ [STAC_9872_AUTO] = "auto",
+ [STAC_9872_VAIO] = "vaio",
+};
+
+static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = {
+ [STAC_9872_VAIO] = stac9872_vaio_pin_configs,
+};
+
+static struct snd_pci_quirk stac9872_cfg_tbl[] = {
+ {} /* terminator */
+};
+
static int patch_stac9872(struct hda_codec *codec)
{
struct sigmatel_spec *spec;
@@ -5598,11 +5623,15 @@ static int patch_stac9872(struct hda_codec *codec)
return -ENOMEM;
codec->spec = spec;
-#if 0 /* no model right now */
spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS,
stac9872_models,
stac9872_cfg_tbl);
-#endif
+ if (spec->board_config < 0)
+ snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9872, "
+ "using BIOS defaults\n");
+ else
+ stac92xx_set_config_regs(codec,
+ stac9872_brd_tbl[spec->board_config]);
spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
spec->pin_nids = stac9872_pin_nids;