diff options
Diffstat (limited to 'usr/src/dkms_source_tree')
| -rw-r--r-- | usr/src/dkms_source_tree/patch_cirrus.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/usr/src/dkms_source_tree/patch_cirrus.c b/usr/src/dkms_source_tree/patch_cirrus.c index 059565f..44427c1 100644 --- a/usr/src/dkms_source_tree/patch_cirrus.c +++ b/usr/src/dkms_source_tree/patch_cirrus.c | |||
| @@ -65,6 +65,7 @@ struct cs_spec { | |||
| 65 | 65 | ||
| 66 | /* available models */ | 66 | /* available models */ |
| 67 | enum { | 67 | enum { |
| 68 | CS420X_MBP53, | ||
| 68 | CS420X_MBP55, | 69 | CS420X_MBP55, |
| 69 | CS420X_IMAC27, | 70 | CS420X_IMAC27, |
| 70 | CS420X_AUTO, | 71 | CS420X_AUTO, |
| @@ -838,7 +839,8 @@ static void cs_automute(struct hda_codec *codec) | |||
| 838 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 839 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
| 839 | hp_present ? 0 : PIN_OUT); | 840 | hp_present ? 0 : PIN_OUT); |
| 840 | } | 841 | } |
| 841 | if (spec->board_config == CS420X_MBP55 || | 842 | if (spec->board_config == CS420X_MBP53 || |
| 843 | spec->board_config == CS420X_MBP55 || | ||
| 842 | spec->board_config == CS420X_IMAC27) { | 844 | spec->board_config == CS420X_IMAC27) { |
| 843 | unsigned int gpio = hp_present ? 0x02 : 0x08; | 845 | unsigned int gpio = hp_present ? 0x02 : 0x08; |
| 844 | snd_hda_codec_write(codec, 0x01, 0, | 846 | snd_hda_codec_write(codec, 0x01, 0, |
| @@ -1130,6 +1132,7 @@ static int cs_parse_auto_config(struct hda_codec *codec) | |||
| 1130 | } | 1132 | } |
| 1131 | 1133 | ||
| 1132 | static const char *cs420x_models[CS420X_MODELS] = { | 1134 | static const char *cs420x_models[CS420X_MODELS] = { |
| 1135 | [CS420X_MBP53] = "mbp53", | ||
| 1133 | [CS420X_MBP55] = "mbp55", | 1136 | [CS420X_MBP55] = "mbp55", |
| 1134 | [CS420X_IMAC27] = "imac27", | 1137 | [CS420X_IMAC27] = "imac27", |
| 1135 | [CS420X_AUTO] = "auto", | 1138 | [CS420X_AUTO] = "auto", |
| @@ -1137,7 +1140,10 @@ static const char *cs420x_models[CS420X_MODELS] = { | |||
| 1137 | 1140 | ||
| 1138 | 1141 | ||
| 1139 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { | 1142 | static struct snd_pci_quirk cs420x_cfg_tbl[] = { |
| 1143 | SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53), | ||
| 1144 | SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55), | ||
| 1140 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), | 1145 | SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), |
| 1146 | SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55), | ||
| 1141 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), | 1147 | SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), |
| 1142 | {} /* terminator */ | 1148 | {} /* terminator */ |
| 1143 | }; | 1149 | }; |
| @@ -1147,6 +1153,20 @@ struct cs_pincfg { | |||
| 1147 | u32 val; | 1153 | u32 val; |
| 1148 | }; | 1154 | }; |
| 1149 | 1155 | ||
| 1156 | static struct cs_pincfg mbp53_pincfgs[] = { | ||
| 1157 | { 0x09, 0x012b4050 }, | ||
| 1158 | { 0x0a, 0x90100141 }, | ||
| 1159 | { 0x0b, 0x90100140 }, | ||
| 1160 | { 0x0c, 0x018b3020 }, | ||
| 1161 | { 0x0d, 0x90a00110 }, | ||
| 1162 | { 0x0e, 0x400000f0 }, | ||
| 1163 | { 0x0f, 0x01cbe030 }, | ||
| 1164 | { 0x10, 0x014be060 }, | ||
| 1165 | { 0x12, 0x400000f0 }, | ||
| 1166 | { 0x15, 0x400000f0 }, | ||
| 1167 | {} /* terminator */ | ||
| 1168 | }; | ||
| 1169 | |||
| 1150 | static struct cs_pincfg mbp55_pincfgs[] = { | 1170 | static struct cs_pincfg mbp55_pincfgs[] = { |
| 1151 | { 0x09, 0x012b4030 }, | 1171 | { 0x09, 0x012b4030 }, |
| 1152 | { 0x0a, 0x90100121 }, | 1172 | { 0x0a, 0x90100121 }, |
| @@ -1176,6 +1196,7 @@ static struct cs_pincfg imac27_pincfgs[] = { | |||
| 1176 | }; | 1196 | }; |
| 1177 | 1197 | ||
| 1178 | static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { | 1198 | static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { |
| 1199 | [CS420X_MBP53] = mbp53_pincfgs, | ||
| 1179 | [CS420X_MBP55] = mbp55_pincfgs, | 1200 | [CS420X_MBP55] = mbp55_pincfgs, |
| 1180 | [CS420X_IMAC27] = imac27_pincfgs, | 1201 | [CS420X_IMAC27] = imac27_pincfgs, |
| 1181 | }; | 1202 | }; |
| @@ -1208,6 +1229,7 @@ static int patch_cs420x(struct hda_codec *codec) | |||
| 1208 | 1229 | ||
| 1209 | switch (spec->board_config) { | 1230 | switch (spec->board_config) { |
| 1210 | case CS420X_IMAC27: | 1231 | case CS420X_IMAC27: |
| 1232 | case CS420X_MBP53: | ||
| 1211 | case CS420X_MBP55: | 1233 | case CS420X_MBP55: |
| 1212 | /* GPIO1 = headphones */ | 1234 | /* GPIO1 = headphones */ |
| 1213 | /* GPIO3 = speakers */ | 1235 | /* GPIO3 = speakers */ |
