diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-12 13:17:58 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-12 13:17:58 -0400 |
commit | 307282c8990c5658604b9fda8a64a9a07079b850 (patch) | |
tree | 6518dadb37793a18badb268ce69ad31120e7dc83 /sound | |
parent | 9421f9543b3a0a870499f64498406003de8214b4 (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')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 33 |
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 { | |||
155 | STAC_927X_MODELS | 155 | STAC_927X_MODELS |
156 | }; | 156 | }; |
157 | 157 | ||
158 | enum { | ||
159 | STAC_9872_AUTO, | ||
160 | STAC_9872_VAIO, | ||
161 | STAC_9872_MODELS | ||
162 | }; | ||
163 | |||
158 | struct sigmatel_event { | 164 | struct 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 | ||
5597 | static unsigned int stac9872_vaio_pin_configs[9] = { | ||
5598 | 0x03211020, 0x411111f0, 0x411111f0, 0x03a15030, | ||
5599 | 0x411111f0, 0x90170110, 0x411111f0, 0x411111f0, | ||
5600 | 0x90a7013e | ||
5601 | }; | ||
5602 | |||
5603 | static const char *stac9872_models[STAC_9872_MODELS] = { | ||
5604 | [STAC_9872_AUTO] = "auto", | ||
5605 | [STAC_9872_VAIO] = "vaio", | ||
5606 | }; | ||
5607 | |||
5608 | static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = { | ||
5609 | [STAC_9872_VAIO] = stac9872_vaio_pin_configs, | ||
5610 | }; | ||
5611 | |||
5612 | static struct snd_pci_quirk stac9872_cfg_tbl[] = { | ||
5613 | {} /* terminator */ | ||
5614 | }; | ||
5615 | |||
5591 | static int patch_stac9872(struct hda_codec *codec) | 5616 | static 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; |