aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-14 08:29:36 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-14 12:14:49 -0500
commitfc268c10cadb4fb171381cd1fe04849877412e40 (patch)
tree693274532ff7694d032519b13dc34e91b237aa4a /sound
parentd2077d40cbfc8c08cacd153f5b02f9b177f10da0 (diff)
ALSA: hda - Use standard fixup table for STAC9872
Now for STAC9872. It has a small fixup table, fortunately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_sigmatel.c49
1 files changed, 28 insertions, 21 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 4c98b3009e51..533afb698fb9 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -176,7 +176,6 @@ enum {
176}; 176};
177 177
178enum { 178enum {
179 STAC_9872_AUTO,
180 STAC_9872_VAIO, 179 STAC_9872_VAIO,
181 STAC_9872_MODELS 180 STAC_9872_MODELS
182}; 181};
@@ -6606,22 +6605,32 @@ static const unsigned long stac9872_capvols[] = {
6606}; 6605};
6607#define stac9872_capsws stac9872_capvols 6606#define stac9872_capsws stac9872_capvols
6608 6607
6609static const unsigned int stac9872_vaio_pin_configs[9] = { 6608static const struct hda_pintbl stac9872_vaio_pin_configs[] = {
6610 0x03211020, 0x411111f0, 0x411111f0, 0x03a15030, 6609 { 0x0a, 0x03211020 },
6611 0x411111f0, 0x90170110, 0x411111f0, 0x411111f0, 6610 { 0x0b, 0x411111f0 },
6612 0x90a7013e 6611 { 0x0c, 0x411111f0 },
6612 { 0x0d, 0x03a15030 },
6613 { 0x0e, 0x411111f0 },
6614 { 0x0f, 0x90170110 },
6615 { 0x11, 0x411111f0 },
6616 { 0x13, 0x411111f0 },
6617 { 0x14, 0x90a7013e },
6618 {}
6613}; 6619};
6614 6620
6615static const char * const stac9872_models[STAC_9872_MODELS] = { 6621static const struct hda_model_fixup stac9872_models[] = {
6616 [STAC_9872_AUTO] = "auto", 6622 { .id = STAC_9872_VAIO, .name = "vaio" },
6617 [STAC_9872_VAIO] = "vaio", 6623 {}
6618}; 6624};
6619 6625
6620static const unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = { 6626static const struct hda_fixup stac9872_fixups[] = {
6621 [STAC_9872_VAIO] = stac9872_vaio_pin_configs, 6627 [STAC_9872_VAIO] = {
6628 .type = HDA_FIXUP_PINS,
6629 .v.pins = stac9872_vaio_pin_configs,
6630 },
6622}; 6631};
6623 6632
6624static const struct snd_pci_quirk stac9872_cfg_tbl[] = { 6633static const struct snd_pci_quirk stac9872_fixup_tbl[] = {
6625 SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0, 6634 SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
6626 "Sony VAIO F/S", STAC_9872_VAIO), 6635 "Sony VAIO F/S", STAC_9872_VAIO),
6627 {} /* terminator */ 6636 {} /* terminator */
@@ -6640,25 +6649,20 @@ static int patch_stac9872(struct hda_codec *codec)
6640 spec = codec->spec; 6649 spec = codec->spec;
6641 spec->linear_tone_beep = 1; 6650 spec->linear_tone_beep = 1;
6642 6651
6643 spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS, 6652 snd_hda_pick_fixup(codec, stac9872_models, stac9872_fixup_tbl,
6644 stac9872_models, 6653 stac9872_fixups);
6645 stac9872_cfg_tbl);
6646 if (spec->board_config < 0)
6647 snd_printdd(KERN_INFO "hda_codec: %s: BIOS auto-probing.\n",
6648 codec->chip_name);
6649 else
6650 stac92xx_set_config_regs(codec,
6651 stac9872_brd_tbl[spec->board_config]);
6652 6654
6653 spec->multiout.dac_nids = spec->dac_nids; 6655 spec->multiout.dac_nids = spec->dac_nids;
6654 spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids); 6656 spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids);
6655 spec->adc_nids = stac9872_adc_nids; 6657 spec->adc_nids = stac9872_adc_nids;
6656 spec->num_muxes = ARRAY_SIZE(stac9872_mux_nids); 6658 spec->num_muxes = ARRAY_SIZE(stac9872_mux_nids);
6657 spec->mux_nids = stac9872_mux_nids; 6659 spec->mux_nids = stac9872_mux_nids;
6658 spec->init = stac9872_core_init;
6659 spec->num_caps = 1; 6660 spec->num_caps = 1;
6660 spec->capvols = stac9872_capvols; 6661 spec->capvols = stac9872_capvols;
6661 spec->capsws = stac9872_capsws; 6662 spec->capsws = stac9872_capsws;
6663 snd_hda_add_verbs(codec, stac9872_core_init);
6664
6665 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
6662 6666
6663 err = stac92xx_parse_auto_config(codec); 6667 err = stac92xx_parse_auto_config(codec);
6664 if (err < 0) { 6668 if (err < 0) {
@@ -6667,6 +6671,9 @@ static int patch_stac9872(struct hda_codec *codec)
6667 } 6671 }
6668 spec->input_mux = &spec->private_imux; 6672 spec->input_mux = &spec->private_imux;
6669 codec->patch_ops = stac92xx_patch_ops; 6673 codec->patch_ops = stac92xx_patch_ops;
6674
6675 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
6676
6670 return 0; 6677 return 0;
6671} 6678}
6672 6679