]>
Commit | Line | Data |
---|---|---|
1 | From: Matthew Ranostay <mranostay@embeddedalley.com> | |
2 | Subject: ALSA: hda: Add STAC_DELL_M4_3 quirk | |
3 | Patch-mainline: | |
4 | References: bnc#446025 | |
5 | ||
6 | Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the | |
7 | board config switch to assign number of digital muxes, microphones, | |
8 | and SPDIF muxes via the PCI quirk defined. | |
9 | ||
10 | Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> | |
11 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
12 | ||
13 | --- | |
14 | Documentation/sound/alsa/ALSA-Configuration.txt | 1 | |
15 | sound/pci/hda/patch_sigmatel.c | 26 ++++++++++++++++++++---- | |
16 | 2 files changed, 23 insertions(+), 4 deletions(-) | |
17 | ||
18 | --- a/Documentation/sound/alsa/ALSA-Configuration.txt | |
19 | +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |
20 | @@ -1076,6 +1076,7 @@ Prior to version 0.9.0rc4 options had a | |
21 | ref Reference board | |
22 | dell-m4-1 Dell desktops | |
23 | dell-m4-2 Dell desktops | |
24 | + dell-m4-3 Dell desktops | |
25 | ||
26 | STAC92HD73* | |
27 | ref Reference board | |
28 | --- a/sound/pci/hda/patch_sigmatel.c | |
29 | +++ b/sound/pci/hda/patch_sigmatel.c | |
30 | @@ -84,6 +84,7 @@ enum { | |
31 | STAC_92HD71BXX_REF, | |
32 | STAC_DELL_M4_1, | |
33 | STAC_DELL_M4_2, | |
34 | + STAC_DELL_M4_3, | |
35 | STAC_HP_M4, | |
36 | STAC_92HD71BXX_MODELS | |
37 | }; | |
38 | @@ -1675,10 +1676,17 @@ static unsigned int dell_m4_2_pin_config | |
39 | 0x40f000f0, 0x044413b0, 0x044413b0, | |
40 | }; | |
41 | ||
42 | +static unsigned int dell_m4_3_pin_configs[11] = { | |
43 | + 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110, | |
44 | + 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a000f0, | |
45 | + 0x40f000f0, 0x044413b0, 0x044413b0, | |
46 | +}; | |
47 | + | |
48 | static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { | |
49 | [STAC_92HD71BXX_REF] = ref92hd71bxx_pin_configs, | |
50 | [STAC_DELL_M4_1] = dell_m4_1_pin_configs, | |
51 | [STAC_DELL_M4_2] = dell_m4_2_pin_configs, | |
52 | + [STAC_DELL_M4_3] = dell_m4_3_pin_configs, | |
53 | [STAC_HP_M4] = NULL, | |
54 | }; | |
55 | ||
56 | @@ -1686,6 +1694,7 @@ static const char *stac92hd71bxx_models[ | |
57 | [STAC_92HD71BXX_REF] = "ref", | |
58 | [STAC_DELL_M4_1] = "dell-m4-1", | |
59 | [STAC_DELL_M4_2] = "dell-m4-2", | |
60 | + [STAC_DELL_M4_3] = "dell-m4-3", | |
61 | [STAC_HP_M4] = "hp-m4", | |
62 | }; | |
63 | ||
64 | @@ -1721,6 +1730,8 @@ static struct snd_pci_quirk stac92hd71bx | |
65 | "unknown Dell", STAC_DELL_M4_2), | |
66 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0264, | |
67 | "unknown Dell", STAC_DELL_M4_2), | |
68 | + SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02aa, | |
69 | + "unknown Dell", STAC_DELL_M4_3), | |
70 | {} /* terminator */ | |
71 | }; | |
72 | ||
73 | @@ -4575,14 +4586,21 @@ again: | |
74 | ||
75 | switch (spec->board_config) { | |
76 | case STAC_HP_M4: | |
77 | - spec->num_dmics = 0; | |
78 | - spec->num_smuxes = 0; | |
79 | - spec->num_dmuxes = 0; | |
80 | - | |
81 | /* enable internal microphone */ | |
82 | stac92xx_set_config_reg(codec, 0x0e, 0x01813040); | |
83 | stac92xx_auto_set_pinctl(codec, 0x0e, | |
84 | AC_PINCTL_IN_EN | AC_PINCTL_VREF_80); | |
85 | + /* fallthru */ | |
86 | + case STAC_DELL_M4_2: | |
87 | + spec->num_dmics = 0; | |
88 | + spec->num_smuxes = 0; | |
89 | + spec->num_dmuxes = 0; | |
90 | + break; | |
91 | + case STAC_DELL_M4_1: | |
92 | + case STAC_DELL_M4_3: | |
93 | + spec->num_dmics = 1; | |
94 | + spec->num_smuxes = 0; | |
95 | + spec->num_dmuxes = 0; | |
96 | break; | |
97 | default: | |
98 | spec->num_dmics = STAC92HD71BXX_NUM_DMICS; |