aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-12 13:17:58 -0400
committerTakashi Iwai <tiwai@suse.de>2009-03-12 13:17:58 -0400
commit307282c8990c5658604b9fda8a64a9a07079b850 (patch)
tree6518dadb37793a18badb268ce69ad31120e7dc83 /sound/pci/hda
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/hda')
-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 72c87aa20bd9..e06fc7decd31 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -155,6 +155,12 @@ enum {
155 STAC_927X_MODELS 155 STAC_927X_MODELS
156}; 156};
157 157
158enum {
159 STAC_9872_AUTO,
160 STAC_9872_VAIO,
161 STAC_9872_MODELS
162};
163
158struct sigmatel_event { 164struct sigmatel_event {
159 hda_nid_t nid; 165 hda_nid_t nid;
160 unsigned char type; 166 unsigned char type;
@@ -5588,6 +5594,25 @@ static hda_nid_t stac9872_mux_nids[] = {
5588 0x15 5594 0x15
5589}; 5595};
5590 5596
5597static unsigned int stac9872_vaio_pin_configs[9] = {
5598 0x03211020, 0x411111f0, 0x411111f0, 0x03a15030,
5599 0x411111f0, 0x90170110, 0x411111f0, 0x411111f0,
5600 0x90a7013e
5601};
5602
5603static const char *stac9872_models[STAC_9872_MODELS] = {
5604 [STAC_9872_AUTO] = "auto",
5605 [STAC_9872_VAIO] = "vaio",
5606};
5607
5608static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = {
5609 [STAC_9872_VAIO] = stac9872_vaio_pin_configs,
5610};
5611
5612static struct snd_pci_quirk stac9872_cfg_tbl[] = {
5613 {} /* terminator */
5614};
5615
5591static int patch_stac9872(struct hda_codec *codec) 5616static int patch_stac9872(struct hda_codec *codec)
5592{ 5617{
5593 struct sigmatel_spec *spec; 5618 struct sigmatel_spec *spec;
@@ -5598,11 +5623,15 @@ static int patch_stac9872(struct hda_codec *codec)
5598 return -ENOMEM; 5623 return -ENOMEM;
5599 codec->spec = spec; 5624 codec->spec = spec;
5600 5625
5601#if 0 /* no model right now */
5602 spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, 5626 spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS,
5603 stac9872_models, 5627 stac9872_models,
5604 stac9872_cfg_tbl); 5628 stac9872_cfg_tbl);
5605#endif 5629 if (spec->board_config < 0)
5630 snd_printdd(KERN_INFO "hda_codec: Unknown model for STAC9872, "
5631 "using BIOS defaults\n");
5632 else
5633 stac92xx_set_config_regs(codec,
5634 stac9872_brd_tbl[spec->board_config]);
5606 5635
5607 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids); 5636 spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
5608 spec->pin_nids = stac9872_pin_nids; 5637 spec->pin_nids = stac9872_pin_nids;