aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt3
-rw-r--r--sound/pci/hda/patch_sigmatel.c33
2 files changed, 33 insertions, 3 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index f9253ea3c19..8eec05bc079 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -368,4 +368,5 @@ STAC92HD83*
368 368
369STAC9872 369STAC9872
370======== 370========
371 N/A 371 vaio VAIO laptop without SPDIF
372 auto BIOS setup (default)
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
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;