aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2008-02-21 01:51:14 -0500
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:14 -0400
commita7662640104599249e15cda7839e9050f92e6a0e (patch)
treec77d9f2a345bb2241dc7999180135286725009c1 /sound/pci
parent7989fba979daea99285079dc0099ab658e4db759 (diff)
[ALSA] hda: 92HDxxxx PCI Quirks
Added PCI_QUIRKS for laptop that have the 92HDxxx family of codecs. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_sigmatel.c103
1 files changed, 97 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 70c569459758..a0c290cef763 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -64,11 +64,14 @@ enum {
64 64
65enum { 65enum {
66 STAC_92HD73XX_REF, 66 STAC_92HD73XX_REF,
67 STAC_DELL_M6,
67 STAC_92HD73XX_MODELS 68 STAC_92HD73XX_MODELS
68}; 69};
69 70
70enum { 71enum {
71 STAC_92HD71BXX_REF, 72 STAC_92HD71BXX_REF,
73 STAC_DELL_M4_1,
74 STAC_DELL_M4_2,
72 STAC_92HD71BXX_MODELS 75 STAC_92HD71BXX_MODELS
73}; 76};
74 77
@@ -334,10 +337,10 @@ static hda_nid_t stac922x_pin_nids[10] = {
334 0x0f, 0x10, 0x11, 0x15, 0x1b, 337 0x0f, 0x10, 0x11, 0x15, 0x1b,
335}; 338};
336 339
337static hda_nid_t stac92hd73xx_pin_nids[12] = { 340static hda_nid_t stac92hd73xx_pin_nids[13] = {
338 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 341 0x0a, 0x0b, 0x0c, 0x0d, 0x0e,
339 0x0f, 0x10, 0x11, 0x12, 0x13, 342 0x0f, 0x10, 0x11, 0x12, 0x13,
340 0x14, 0x22 343 0x14, 0x1e, 0x22
341}; 344};
342 345
343static hda_nid_t stac92hd71bxx_pin_nids[10] = { 346static hda_nid_t stac92hd71bxx_pin_nids[10] = {
@@ -1220,24 +1223,48 @@ static struct snd_pci_quirk stac925x_cfg_tbl[] = {
1220 {} /* terminator */ 1223 {} /* terminator */
1221}; 1224};
1222 1225
1223static unsigned int ref92hd73xx_pin_configs[12] = { 1226static unsigned int ref92hd73xx_pin_configs[13] = {
1224 0x02214030, 0x02a19040, 0x01a19020, 0x02214030, 1227 0x02214030, 0x02a19040, 0x01a19020, 0x02214030,
1225 0x0181302e, 0x01014010, 0x01014020, 0x01014030, 1228 0x0181302e, 0x01014010, 0x01014020, 0x01014030,
1226 0x02319040, 0x90a000f0, 0x90a000f0, 0x01452050, 1229 0x02319040, 0x90a000f0, 0x90a000f0, 0x01452050,
1230 0x01452050,
1231};
1232
1233static unsigned int dell_m6_pin_configs[13] = {
1234 0x0321101f, 0x4f00000f, 0x4f0000f0, 0x90170110,
1235 0x03a11020, 0x03011050, 0x4f0000f0, 0x4f0000f0,
1236 0x4f0000f0, 0x90a60160, 0x4f0000f0, 0x4f0000f0,
1237 0x4f0000f0,
1227}; 1238};
1228 1239
1229static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = { 1240static unsigned int *stac92hd73xx_brd_tbl[STAC_92HD73XX_MODELS] = {
1230 [STAC_92HD73XX_REF] = ref92hd73xx_pin_configs, 1241 [STAC_92HD73XX_REF] = ref92hd73xx_pin_configs,
1242 [STAC_DELL_M6] = dell_m6_pin_configs,
1231}; 1243};
1232 1244
1233static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = { 1245static const char *stac92hd73xx_models[STAC_92HD73XX_MODELS] = {
1234 [STAC_92HD73XX_REF] = "ref", 1246 [STAC_92HD73XX_REF] = "ref",
1247 [STAC_DELL_M6] = "dell-m6",
1235}; 1248};
1236 1249
1237static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = { 1250static struct snd_pci_quirk stac92hd73xx_cfg_tbl[] = {
1238 /* SigmaTel reference board */ 1251 /* SigmaTel reference board */
1239 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, 1252 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
1240 "DFI LanParty", STAC_92HD73XX_REF), 1253 "DFI LanParty", STAC_92HD73XX_REF),
1254 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0254,
1255 "unknown Dell", STAC_DELL_M6),
1256 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0255,
1257 "unknown Dell", STAC_DELL_M6),
1258 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0256,
1259 "unknown Dell", STAC_DELL_M6),
1260 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0257,
1261 "unknown Dell", STAC_DELL_M6),
1262 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025e,
1263 "unknown Dell", STAC_DELL_M6),
1264 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x025f,
1265 "unknown Dell", STAC_DELL_M6),
1266 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0271,
1267 "unknown Dell", STAC_DELL_M6),
1241 {} /* terminator */ 1268 {} /* terminator */
1242}; 1269};
1243 1270
@@ -1247,18 +1274,56 @@ static unsigned int ref92hd71bxx_pin_configs[10] = {
1247 0x90a000f0, 0x01452050, 1274 0x90a000f0, 0x01452050,
1248}; 1275};
1249 1276
1277static unsigned int dell_m4_1_pin_configs[13] = {
1278 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110,
1279 0x23a1902e, 0x23014250, 0x40f000f0, 0x4f0000f0,
1280 0x40f000f0, 0x4f0000f0,
1281};
1282
1283static unsigned int dell_m4_2_pin_configs[13] = {
1284 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110,
1285 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
1286 0x40f000f0, 0x044413b0,
1287};
1288
1250static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = { 1289static unsigned int *stac92hd71bxx_brd_tbl[STAC_92HD71BXX_MODELS] = {
1251 [STAC_92HD71BXX_REF] = ref92hd71bxx_pin_configs, 1290 [STAC_92HD71BXX_REF] = ref92hd71bxx_pin_configs,
1291 [STAC_DELL_M4_1] = dell_m4_1_pin_configs,
1292 [STAC_DELL_M4_2] = dell_m4_2_pin_configs,
1252}; 1293};
1253 1294
1254static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = { 1295static const char *stac92hd71bxx_models[STAC_92HD71BXX_MODELS] = {
1255 [STAC_92HD71BXX_REF] = "ref", 1296 [STAC_92HD71BXX_REF] = "ref",
1297 [STAC_DELL_M4_1] = "dell-m4-1",
1298 [STAC_DELL_M4_2] = "dell-m4-2",
1256}; 1299};
1257 1300
1258static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { 1301static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
1259 /* SigmaTel reference board */ 1302 /* SigmaTel reference board */
1260 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, 1303 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
1261 "DFI LanParty", STAC_92HD71BXX_REF), 1304 "DFI LanParty", STAC_92HD71BXX_REF),
1305 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233,
1306 "unknown Dell", STAC_DELL_M4_1),
1307 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0234,
1308 "unknown Dell", STAC_DELL_M4_1),
1309 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0250,
1310 "unknown Dell", STAC_DELL_M4_1),
1311 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x024f,
1312 "unknown Dell", STAC_DELL_M4_1),
1313 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x024d,
1314 "unknown Dell", STAC_DELL_M4_1),
1315 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0251,
1316 "unknown Dell", STAC_DELL_M4_1),
1317 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0277,
1318 "unknown Dell", STAC_DELL_M4_1),
1319 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0263,
1320 "unknown Dell", STAC_DELL_M4_2),
1321 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0265,
1322 "unknown Dell", STAC_DELL_M4_2),
1323 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0262,
1324 "unknown Dell", STAC_DELL_M4_2),
1325 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0264,
1326 "unknown Dell", STAC_DELL_M4_2),
1262 {} /* terminator */ 1327 {} /* terminator */
1263}; 1328};
1264 1329
@@ -3356,13 +3421,39 @@ again:
3356 3421
3357 spec->num_muxes = ARRAY_SIZE(stac92hd73xx_mux_nids); 3422 spec->num_muxes = ARRAY_SIZE(stac92hd73xx_mux_nids);
3358 spec->num_adcs = ARRAY_SIZE(stac92hd73xx_adc_nids); 3423 spec->num_adcs = ARRAY_SIZE(stac92hd73xx_adc_nids);
3359 spec->num_dmics = STAC92HD73XX_NUM_DMICS;
3360 spec->num_dmuxes = ARRAY_SIZE(stac92hd73xx_dmux_nids); 3424 spec->num_dmuxes = ARRAY_SIZE(stac92hd73xx_dmux_nids);
3361 spec->dinput_mux = &stac92hd73xx_dmux; 3425 spec->dinput_mux = &stac92hd73xx_dmux;
3362 /* GPIO0 High = Enable EAPD */ 3426 /* GPIO0 High = Enable EAPD */
3363 spec->gpio_mask = spec->gpio_dir = 0x1; 3427 spec->gpio_mask = spec->gpio_dir = 0x1;
3364 spec->gpio_data = 0x01; 3428 spec->gpio_data = 0x01;
3365 3429
3430 switch (spec->board_config) {
3431 case STAC_DELL_M6:
3432 switch (codec->subsystem_id) {
3433 case 0x1028025e: /* Analog Mics */
3434 case 0x1028025f:
3435 stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
3436 spec->num_dmics = 0;
3437 break;
3438 case 0x10280254: /* Digital Mics */
3439 case 0x10280255:
3440 case 0x10280271:
3441 case 0x10280272:
3442 stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
3443 spec->num_dmics = 1;
3444 break;
3445 case 0x10280256: /* Both */
3446 case 0x10280057:
3447 stac92xx_set_config_reg(codec, 0x0b, 0x90A70170);
3448 stac92xx_set_config_reg(codec, 0x13, 0x90A60160);
3449 spec->num_dmics = 1;
3450 break;
3451 }
3452 break;
3453 default:
3454 spec->num_dmics = STAC92HD73XX_NUM_DMICS;
3455 }
3456
3366 spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids); 3457 spec->num_pwrs = ARRAY_SIZE(stac92hd73xx_pwr_nids);
3367 spec->pwr_nids = stac92hd73xx_pwr_nids; 3458 spec->pwr_nids = stac92hd73xx_pwr_nids;
3368 3459