From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Subject: [PATCH 03/12] ALSA: hda - Use standard fixup table for STAC9872
Date: Tue, 15 Jan 2013 12:09:40 +0100 [thread overview]
Message-ID: <1358248189-14166-4-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1358248189-14166-1-git-send-email-tiwai@suse.de>
Now for STAC9872. It has a small fixup table, fortunately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/patch_sigmatel.c | 49 ++++++++++++++++++++++++------------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 4c98b30..533afb6 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -176,7 +176,6 @@ enum {
};
enum {
- STAC_9872_AUTO,
STAC_9872_VAIO,
STAC_9872_MODELS
};
@@ -6606,22 +6605,32 @@ static const unsigned long stac9872_capvols[] = {
};
#define stac9872_capsws stac9872_capvols
-static const unsigned int stac9872_vaio_pin_configs[9] = {
- 0x03211020, 0x411111f0, 0x411111f0, 0x03a15030,
- 0x411111f0, 0x90170110, 0x411111f0, 0x411111f0,
- 0x90a7013e
+static const struct hda_pintbl stac9872_vaio_pin_configs[] = {
+ { 0x0a, 0x03211020 },
+ { 0x0b, 0x411111f0 },
+ { 0x0c, 0x411111f0 },
+ { 0x0d, 0x03a15030 },
+ { 0x0e, 0x411111f0 },
+ { 0x0f, 0x90170110 },
+ { 0x11, 0x411111f0 },
+ { 0x13, 0x411111f0 },
+ { 0x14, 0x90a7013e },
+ {}
};
-static const char * const stac9872_models[STAC_9872_MODELS] = {
- [STAC_9872_AUTO] = "auto",
- [STAC_9872_VAIO] = "vaio",
+static const struct hda_model_fixup stac9872_models[] = {
+ { .id = STAC_9872_VAIO, .name = "vaio" },
+ {}
};
-static const unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = {
- [STAC_9872_VAIO] = stac9872_vaio_pin_configs,
+static const struct hda_fixup stac9872_fixups[] = {
+ [STAC_9872_VAIO] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = stac9872_vaio_pin_configs,
+ },
};
-static const struct snd_pci_quirk stac9872_cfg_tbl[] = {
+static const struct snd_pci_quirk stac9872_fixup_tbl[] = {
SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
"Sony VAIO F/S", STAC_9872_VAIO),
{} /* terminator */
@@ -6640,25 +6649,20 @@ static int patch_stac9872(struct hda_codec *codec)
spec = codec->spec;
spec->linear_tone_beep = 1;
- spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS,
- stac9872_models,
- stac9872_cfg_tbl);
- if (spec->board_config < 0)
- snd_printdd(KERN_INFO "hda_codec: %s: BIOS auto-probing.\n",
- codec->chip_name);
- else
- stac92xx_set_config_regs(codec,
- stac9872_brd_tbl[spec->board_config]);
+ snd_hda_pick_fixup(codec, stac9872_models, stac9872_fixup_tbl,
+ stac9872_fixups);
spec->multiout.dac_nids = spec->dac_nids;
spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids);
spec->adc_nids = stac9872_adc_nids;
spec->num_muxes = ARRAY_SIZE(stac9872_mux_nids);
spec->mux_nids = stac9872_mux_nids;
- spec->init = stac9872_core_init;
spec->num_caps = 1;
spec->capvols = stac9872_capvols;
spec->capsws = stac9872_capsws;
+ snd_hda_add_verbs(codec, stac9872_core_init);
+
+ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
err = stac92xx_parse_auto_config(codec);
if (err < 0) {
@@ -6667,6 +6671,9 @@ static int patch_stac9872(struct hda_codec *codec)
}
spec->input_mux = &spec->private_imux;
codec->patch_ops = stac92xx_patch_ops;
+
+ snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
+
return 0;
}
--
1.8.1
next prev parent reply other threads:[~2013-01-15 11:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 11:09 [PATCH 00/12] Use standard fixup table for STAC/IDT codecs Takashi Iwai
2013-01-15 11:09 ` [PATCH 01/12] ALSA: hda - Use standard fixup table for STAC9200 Takashi Iwai
2013-01-15 11:09 ` [PATCH 02/12] ALSA: hda - Use standard fixup table for STAC925x Takashi Iwai
2013-01-15 11:09 ` Takashi Iwai [this message]
2013-01-15 11:09 ` [PATCH 04/12] ALSA: hda - Use standard fixup table for STAC9205 Takashi Iwai
2013-01-15 11:09 ` [PATCH 05/12] ALSA: hda - Use standard fixup table for STAC922x Takashi Iwai
2013-01-15 11:09 ` [PATCH 06/12] ALSA: hda - Use standard fixup table for STAC927x Takashi Iwai
2013-01-15 11:09 ` [PATCH 07/12] ALSA: hda - Use standard fixup table for IDT92HD71Bxx Takashi Iwai
2013-01-15 11:09 ` [PATCH 08/12] ALSA: hda - Use standard fixup table for IDT92HD73xx Takashi Iwai
2013-01-15 11:09 ` [PATCH 09/12] ALSA: hda - Use standard fixup table for IDT92HD83xxx Takashi Iwai
2013-01-15 11:09 ` [PATCH 10/12] ALSA: hda/sigmatel - Remove PCI id check in find_mute_led_cfg() Takashi Iwai
2013-01-15 11:09 ` [PATCH 11/12] ALSA: hda/sigmatel - Move w/a for HP Mini 110 LED to fixup table Takashi Iwai
2013-01-15 11:09 ` [PATCH 12/12] ALSA: hda/sigmatel - Remove superfluous fields from sigmatel_spec Takashi Iwai
2013-01-15 11:28 ` [PATCH 00/12] Use standard fixup table for STAC/IDT codecs Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358248189-14166-4-git-send-email-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox