aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorVince Weaver <vweaver1@eecs.utk.edu>2010-09-22 17:31:37 -0400
committerTakashi Iwai <tiwai@suse.de>2010-09-23 13:40:46 -0400
commit4e7d7c6018567fa03f387d06602d4145c75ebbe0 (patch)
tree592b3c975aa4cb0605d773da0adffa3fd6fca893 /sound
parentabdd8f510686da0a58e475bc0143d1069e5f53da (diff)
ALSA: hda - MacBookPro 5,3 line-in support
I've found the following patch is necessary to enable line-in on my MacBookPro 5,3 machine. With the patch applied I've successfully recorded audio from the line-in jack. This is based on the existing 5,5 support. Signed-off-by: Vince Weaver <vweaver1@eecs.utk.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_cirrus.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 483c3f2d8d39..5c00106cbc2e 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -65,6 +65,7 @@ struct cs_spec {
65 65
66/* available models */ 66/* available models */
67enum { 67enum {
68 CS420X_MBP53,
68 CS420X_MBP55, 69 CS420X_MBP55,
69 CS420X_IMAC27, 70 CS420X_IMAC27,
70 CS420X_AUTO, 71 CS420X_AUTO,
@@ -839,7 +840,8 @@ static void cs_automute(struct hda_codec *codec)
839 AC_VERB_SET_PIN_WIDGET_CONTROL, 840 AC_VERB_SET_PIN_WIDGET_CONTROL,
840 hp_present ? 0 : PIN_OUT); 841 hp_present ? 0 : PIN_OUT);
841 } 842 }
842 if (spec->board_config == CS420X_MBP55 || 843 if (spec->board_config == CS420X_MBP53 ||
844 spec->board_config == CS420X_MBP55 ||
843 spec->board_config == CS420X_IMAC27) { 845 spec->board_config == CS420X_IMAC27) {
844 unsigned int gpio = hp_present ? 0x02 : 0x08; 846 unsigned int gpio = hp_present ? 0x02 : 0x08;
845 snd_hda_codec_write(codec, 0x01, 0, 847 snd_hda_codec_write(codec, 0x01, 0,
@@ -1128,6 +1130,7 @@ static int cs_parse_auto_config(struct hda_codec *codec)
1128} 1130}
1129 1131
1130static const char *cs420x_models[CS420X_MODELS] = { 1132static const char *cs420x_models[CS420X_MODELS] = {
1133 [CS420X_MBP53] = "mbp53",
1131 [CS420X_MBP55] = "mbp55", 1134 [CS420X_MBP55] = "mbp55",
1132 [CS420X_IMAC27] = "imac27", 1135 [CS420X_IMAC27] = "imac27",
1133 [CS420X_AUTO] = "auto", 1136 [CS420X_AUTO] = "auto",
@@ -1135,6 +1138,7 @@ static const char *cs420x_models[CS420X_MODELS] = {
1135 1138
1136 1139
1137static struct snd_pci_quirk cs420x_cfg_tbl[] = { 1140static struct snd_pci_quirk cs420x_cfg_tbl[] = {
1141 SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53),
1138 SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55), 1142 SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
1139 SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27), 1143 SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),
1140 {} /* terminator */ 1144 {} /* terminator */
@@ -1145,6 +1149,20 @@ struct cs_pincfg {
1145 u32 val; 1149 u32 val;
1146}; 1150};
1147 1151
1152static struct cs_pincfg mbp53_pincfgs[] = {
1153 { 0x09, 0x012b4050 },
1154 { 0x0a, 0x90100141 },
1155 { 0x0b, 0x90100140 },
1156 { 0x0c, 0x018b3020 },
1157 { 0x0d, 0x90a00110 },
1158 { 0x0e, 0x400000f0 },
1159 { 0x0f, 0x01cbe030 },
1160 { 0x10, 0x014be060 },
1161 { 0x12, 0x400000f0 },
1162 { 0x15, 0x400000f0 },
1163 {} /* terminator */
1164};
1165
1148static struct cs_pincfg mbp55_pincfgs[] = { 1166static struct cs_pincfg mbp55_pincfgs[] = {
1149 { 0x09, 0x012b4030 }, 1167 { 0x09, 0x012b4030 },
1150 { 0x0a, 0x90100121 }, 1168 { 0x0a, 0x90100121 },
@@ -1174,6 +1192,7 @@ static struct cs_pincfg imac27_pincfgs[] = {
1174}; 1192};
1175 1193
1176static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = { 1194static struct cs_pincfg *cs_pincfgs[CS420X_MODELS] = {
1195 [CS420X_MBP53] = mbp53_pincfgs,
1177 [CS420X_MBP55] = mbp55_pincfgs, 1196 [CS420X_MBP55] = mbp55_pincfgs,
1178 [CS420X_IMAC27] = imac27_pincfgs, 1197 [CS420X_IMAC27] = imac27_pincfgs,
1179}; 1198};
@@ -1206,6 +1225,7 @@ static int patch_cs420x(struct hda_codec *codec)
1206 1225
1207 switch (spec->board_config) { 1226 switch (spec->board_config) {
1208 case CS420X_IMAC27: 1227 case CS420X_IMAC27:
1228 case CS420X_MBP53:
1209 case CS420X_MBP55: 1229 case CS420X_MBP55:
1210 /* GPIO1 = headphones */ 1230 /* GPIO1 = headphones */
1211 /* GPIO3 = speakers */ 1231 /* GPIO3 = speakers */