Changeset 348 for GPL/branches/alsa-resync1/alsa-kernel/pci
- Timestamp:
- Apr 21, 2008, 2:52:19 AM (17 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel/pci
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/pci/ac97/ac97_patch.c
r290 r348 2161 2161 unsigned short misc; 2162 2162 2163 patch_ad1881(ac97); 2163 2164 ac97->build_ops = &patch_ad1985_build_ops; 2164 2165 misc = snd_ac97_read(ac97, AC97_AD_MISC); -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1.c
r256 r348 101 101 static struct pci_device_id snd_emu10k1_ids[] = { 102 102 { 0x1102, 0x0002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* EMU10K1 */ 103 #if 0 /* FIXME: not working! */ 103 104 { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1) */ 105 #endif 104 106 { 0x1102, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy */ 105 107 { 0x1102, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, /* Audigy 2 Value SB0400 */ -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1_callback.c
r84 r348 428 428 /* invalidate maps */ 429 429 temp = ((unsigned int)hw->silent_page.addr << 1) | MAP_PTI_MASK; 430 // temp = ((unsigned int)hw->silent_page_dmaaddr << 1) | MAP_PTI_MASK;431 430 snd_emu10k1_ptr_write(hw, MAPA, ch, temp); 432 431 snd_emu10k1_ptr_write(hw, MAPB, ch, temp); -
GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emufx.c
r207 r348 30 30 31 31 #include <sound/driver.h> 32 #include <linux/pci.h> 32 33 #include <linux/delay.h> 33 34 #include <linux/slab.h> -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/aureon.c
r281 r348 410 410 unsigned int i; 411 411 412 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) 412 if (ice->eeprom.subvendor == VT1724_SUBDEVICE_AUREON51_SKY) { 413 413 ice->num_total_dacs = 6; 414 else 414 ice->num_total_adcs = 6; 415 } else { 415 416 ice->num_total_dacs = 8; 417 ice->num_total_adcs = 8; 418 } 416 419 417 420 /* to remeber the register values */ -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/delta.c
r300 r348 91 91 break; 92 92 case ICE1712_SUBDEVICE_AUDIOPHILE: 93 case ICE1712_SUBDEVICE_DELTA410: 93 94 tmp |= ICE1712_DELTA_AP_CCLK | ICE1712_DELTA_AP_CS_CODEC; 94 95 tmp &= ~ICE1712_DELTA_AP_CS_DIGITAL; … … 113 114 break; 114 115 case ICE1712_SUBDEVICE_AUDIOPHILE: 116 case ICE1712_SUBDEVICE_DELTA410: 115 117 tmp |= ICE1712_DELTA_AP_CS_DIGITAL; 116 118 break; … … 512 514 case ICE1712_SUBDEVICE_AUDIOPHILE: 513 515 ice->num_total_dacs = 2; 516 ice->num_total_adcs = 2; 514 517 break; 515 518 case ICE1712_SUBDEVICE_DELTA410: 516 519 ice->num_total_dacs = 8; 520 ice->num_total_adcs = 2; 517 521 break; 518 522 case ICE1712_SUBDEVICE_DELTA44: 519 523 case ICE1712_SUBDEVICE_DELTA66: 520 524 ice->num_total_dacs = ice->omni ? 8 : 4; 525 ice->num_total_adcs = ice->omni ? 8 : 4; 521 526 break; 522 527 case ICE1712_SUBDEVICE_DELTA1010: 523 528 case ICE1712_SUBDEVICE_DELTA1010LT: 524 529 ice->num_total_dacs = 8; 530 ice->num_total_adcs = 8; 525 531 break; 526 532 case ICE1712_SUBDEVICE_VX442: 527 533 ice->num_total_dacs = 4; 534 ice->num_total_adcs = 4; 528 535 break; 529 536 } -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ews.c
r250 r348 407 407 case ICE1712_SUBDEVICE_EWX2496: 408 408 ice->num_total_dacs = 2; 409 ice->num_total_adcs = 2; 409 410 break; 410 411 case ICE1712_SUBDEVICE_EWS88MT: 411 412 case ICE1712_SUBDEVICE_EWS88MT_NEW: 412 413 ice->num_total_dacs = 8; 414 ice->num_total_adcs = 8; 413 415 break; 414 416 case ICE1712_SUBDEVICE_EWS88D: … … 416 418 case ICE1712_SUBDEVICE_DMX6FIRE: 417 419 ice->num_total_dacs = 6; 420 ice->num_total_adcs = 6; 418 421 break; 419 422 } -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/hoontech.c
r256 r348 154 154 155 155 ice->num_total_dacs = 8; 156 ice->num_total_adcs = 8; 156 157 157 158 ice->hoontech_boxbits[0] = -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.c
r300 r348 83 83 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ 84 84 static int omni[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0}; /* Delta44 & 66 Omni I/O support */ 85 static int cs8427_timeout[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 500}; /* CS8427 S/PDIF transciever reset timeout value in msec */ 85 86 86 87 MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); … … 96 97 MODULE_PARM_DESC(omni, "Enable Midiman M-Audio Delta Omni I/O support."); 97 98 MODULE_PARM_SYNTAX(omni, SNDRV_ENABLED "," SNDRV_ENABLE_DESC); 99 MODULE_PARM(cs8427_timeout, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 100 MODULE_PARM_DESC(cs8427_timeout, "Define reset timeout for cs8427 chip in msec resolution."); 101 MODULE_PARM_SYNTAX(cs8427_timeout, SNDRV_ENABLED ", allows:{{1,1000}},default=500,skill:advanced"); 98 102 99 103 #ifndef PCI_VENDOR_ID_ICE … … 387 391 int err; 388 392 389 if ((err = snd_cs8427_create(ice->i2c, addr, &ice->cs8427)) < 0) { 393 if ((err = snd_cs8427_create(ice->i2c, addr, 394 (ice->cs8427_timeout * HZ) / 1000, 395 &ice->cs8427)) < 0) { 390 396 snd_printk("CS8427 initialization failed\n"); 391 397 return err; … … 887 893 ice->pcm = pcm; 888 894 889 snd_pcm_lib_preallocate_pci_pages_for_all(ice->pci, pcm, 64*1024, 64*1024); 895 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 896 snd_dma_pci_data(ice->pci), 64*1024, 64*1024); 890 897 891 898 if (rpcm) … … 923 930 ice->pcm_ds = pcm; 924 931 925 snd_pcm_lib_preallocate_pci_pages_for_all(ice->pci, pcm, 64*1024, 128*1024); 932 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 933 snd_dma_pci_data(ice->pci), 64*1024, 128*1024); 926 934 927 935 if (rpcm) … … 1270 1278 strcpy(pcm->name, "ICE1712 multi"); 1271 1279 1272 snd_pcm_lib_preallocate_pci_pages_for_all(ice->pci, pcm, 256*1024, 256*1024); 1280 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1281 snd_dma_pci_data(ice->pci), 256*1024, 256*1024); 1273 1282 1274 1283 ice->pcm_pro = pcm; … … 1382 1391 1383 1392 1384 static snd_kcontrol_new_t snd_ice1712_multi_ ctrls[] __devinitdata = {1393 static snd_kcontrol_new_t snd_ice1712_multi_playback_ctrls[] __devinitdata = { 1385 1394 { 1386 1395 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, … … 1401 1410 .count = 10, 1402 1411 }, 1403 { 1412 }; 1413 1414 static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_switch __devinitdata = { 1404 1415 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1405 .name = "Multi Capture Switch",1416 .name = "H/W Multi Capture Switch", 1406 1417 .info = snd_ice1712_pro_mixer_switch_info, 1407 1418 .get = snd_ice1712_pro_mixer_switch_get, 1408 1419 .put = snd_ice1712_pro_mixer_switch_put, 1409 1420 .private_value = 10, 1410 .count = 10, 1411 }, 1412 1421 }; 1422 1423 static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_switch __devinitdata = { 1413 1424 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1414 .name = "Multi Capture Volume", 1425 .name = "IEC958 Multi Capture Switch", 1426 .info = snd_ice1712_pro_mixer_switch_info, 1427 .get = snd_ice1712_pro_mixer_switch_get, 1428 .put = snd_ice1712_pro_mixer_switch_put, 1429 .private_value = 18, 1430 .count = 2, 1431 }; 1432 1433 static snd_kcontrol_new_t snd_ice1712_multi_capture_analog_volume __devinitdata = { 1434 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1435 .name = "H/W Multi Capture Volume", 1415 1436 .info = snd_ice1712_pro_mixer_volume_info, 1416 1437 .get = snd_ice1712_pro_mixer_volume_get, 1417 1438 .put = snd_ice1712_pro_mixer_volume_put, 1418 1439 .private_value = 10, 1419 .count = 10, 1420 }, 1440 }; 1441 1442 static snd_kcontrol_new_t snd_ice1712_multi_capture_spdif_volume __devinitdata = { 1443 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1444 .name = "IEC958 Multi Capture Volume", 1445 .info = snd_ice1712_pro_mixer_volume_info, 1446 .get = snd_ice1712_pro_mixer_volume_get, 1447 .put = snd_ice1712_pro_mixer_volume_put, 1448 .private_value = 18, 1449 .count = 2, 1421 1450 }; 1422 1451 … … 1428 1457 1429 1458 /* multi-channel mixer */ 1430 for (idx = 0; idx < ARRAY_SIZE(snd_ice1712_multi_ ctrls); idx++) {1431 err = snd_ctl_add(card, snd_ctl_new1(&snd_ice1712_multi_ ctrls[idx], ice));1459 for (idx = 0; idx < ARRAY_SIZE(snd_ice1712_multi_playback_ctrls); idx++) { 1460 err = snd_ctl_add(card, snd_ctl_new1(&snd_ice1712_multi_playback_ctrls[idx], ice)); 1432 1461 if (err < 0) 1433 1462 return err; 1434 1463 } 1435 1464 1465 if (ice->num_total_adcs > 0) { 1466 snd_kcontrol_new_t tmp = snd_ice1712_multi_capture_analog_switch; 1467 tmp.count = ice->num_total_adcs; 1468 err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice)); 1469 if (err < 0) 1470 return err; 1471 } 1472 1473 err = snd_ctl_add(card, snd_ctl_new1(&snd_ice1712_multi_capture_spdif_switch, ice)); 1474 if (err < 0) 1475 return err; 1476 1477 if (ice->num_total_adcs > 0) { 1478 snd_kcontrol_new_t tmp = snd_ice1712_multi_capture_analog_volume; 1479 tmp.count = ice->num_total_adcs; 1480 err = snd_ctl_add(card, snd_ctl_new1(&tmp, ice)); 1481 if (err < 0) 1482 return err; 1483 } 1484 1485 err = snd_ctl_add(card, snd_ctl_new1(&snd_ice1712_multi_capture_spdif_volume, ice)); 1486 if (err < 0) 1487 return err; 1488 1436 1489 /* initialize volumes */ 1437 for (idx = 0; idx < 20; idx++) {1490 for (idx = 0; idx < 10; idx++) { 1438 1491 ice->pro_volumes[idx] = 0x80008000; /* mute */ 1439 1492 snd_ice1712_update_volume(ice, idx); 1440 1493 } 1494 for (idx = 10; idx < 10 + ice->num_total_adcs; idx++) { 1495 ice->pro_volumes[idx] = 0x80008000; /* mute */ 1496 snd_ice1712_update_volume(ice, idx); 1497 } 1498 for (idx = 18; idx < 20; idx++) { 1499 ice->pro_volumes[idx] = 0x80008000; /* mute */ 1500 snd_ice1712_update_volume(ice, idx); 1501 } 1441 1502 return 0; 1442 1503 } … … 1451 1512 { 1452 1513 int err; 1514 ac97_t ac97; 1515 ac97_bus_t bus, *pbus; 1453 1516 1454 1517 if (ice_has_con_ac97(ice)) { 1455 ac97_bus_t bus, *pbus;1456 ac97_t ac97;1457 1518 memset(&bus, 0, sizeof(bus)); 1458 1519 bus.write = snd_ice1712_ac97_write; … … 1473 1534 1474 1535 if (! (ice->eeprom.data[ICE_EEP1_ACLINK] & ICE1712_CFG_PRO_I2S)) { 1475 ac97_bus_t bus, *pbus;1476 ac97_t ac97;1477 1536 memset(&bus, 0, sizeof(bus)); 1478 1537 bus.write = snd_ice1712_pro_ac97_write; … … 2350 2409 struct pci_dev *pci, 2351 2410 int omni, 2411 int cs8427_timeout, 2352 2412 ice1712_t ** r_ice1712) 2353 2413 { … … 2374 2434 return -ENOMEM; 2375 2435 ice->omni = omni ? 1 : 0; 2436 if (cs8427_timeout < 1) 2437 cs8427_timeout = 1; 2438 else if (cs8427_timeout > 1000) 2439 cs8427_timeout = 1000; 2440 ice->cs8427_timeout = cs8427_timeout; 2376 2441 spin_lock_init(&ice->reg_lock); 2377 2442 init_MUTEX(&ice->gpio_mutex); … … 2493 2558 strcpy(card->shortname, "ICEnsemble ICE1712"); 2494 2559 2495 if ((err = snd_ice1712_create(card, pci, omni[dev], &ice)) < 0) {2560 if ((err = snd_ice1712_create(card, pci, omni[dev], cs8427_timeout[dev], &ice)) < 0) { 2496 2561 snd_card_free(card); 2497 2562 return err; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.h
r300 r348 331 331 unsigned int vt1724: 1; 332 332 unsigned int num_total_dacs; /* total DACs */ 333 unsigned int num_total_adcs; /* total ADCs */ 333 334 unsigned char hoontech_boxbits[4]; 334 335 unsigned int hoontech_config; … … 346 347 snd_i2c_device_t *cs8404; /* CS8404A I2C device */ 347 348 snd_i2c_device_t *cs8427; /* CS8427 I2C device */ 349 unsigned int cs8427_timeout; /* CS8427 reset timeout in HZ/100 */ 348 350 snd_i2c_device_t *i2cdevs[2]; /* additional i2c devices */ 349 351 -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1724.c
r300 r348 757 757 strcpy(pcm->name, "ICE1724"); 758 758 759 snd_pcm_lib_preallocate_pci_pages_for_all(ice->pci, pcm, 256*1024, 256*1024); 759 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 760 snd_dma_pci_data(ice->pci), 256*1024, 256*1024); 760 761 761 762 ice->pcm_pro = pcm; … … 911 912 strcpy(pcm->name, "ICE1724 IEC958"); 912 913 913 snd_pcm_lib_preallocate_pci_pages_for_all(ice->pci, pcm, 64*1024, 64*1024); 914 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 915 snd_dma_pci_data(ice->pci), 64*1024, 64*1024); 914 916 915 917 ice->pcm = pcm; … … 1032 1034 strcpy(pcm->name, "ICE1724 Surround PCM"); 1033 1035 1034 snd_pcm_lib_preallocate_pci_pages_for_all(ice->pci, pcm, 64*1024, 64*1024); 1036 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 1037 snd_dma_pci_data(ice->pci), 64*1024, 64*1024); 1035 1038 1036 1039 ice->pcm_ds = pcm; -
GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/revo.c
r262 r348 129 129 case VT1724_SUBDEVICE_REVOLUTION71: 130 130 ice->num_total_dacs = 8; 131 ice->num_total_adcs = 4; 131 132 break; 132 133 default: -
GPL/branches/alsa-resync1/alsa-kernel/pci/intel8x0.c
r300 r348 108 108 MODULE_PARM(ac97_quirk, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); 109 109 MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); 110 MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1, 3}},dialog:list,default:-1");110 MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1,4}},dialog:list,default:-1"); 111 111 #ifdef SUPPORT_JOYSTICK 112 112 MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i"); … … 862 862 863 863 if ((status & chip->int_sta_mask) == 0) { 864 static int err_count = 10;865 864 if (status) { 866 865 /* ack */ … … 2982 2981 /* workaround for 440MX */ 2983 2982 if (chip->fix_nocache) 2984 fill_nocache(chip->bdbars , chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, 1);2983 fill_nocache(chip->bdbars.area, chip->bdbars.bytes, 1); 2985 2984 int_sta_masks = 0; 2986 2985 for (i = 0; i < chip->bdbars_count; i++) { … … 3237 3236 pci_read_config_word(pci, 0xe6, &val); 3238 3237 #ifdef SUPPORT_JOYSTICK 3238 val &= ~0x100; 3239 3239 if (joystick[dev]) { 3240 3240 if (! request_region(ich_gameport.io, 8, "ICH gameport")) { … … 3249 3249 #endif 3250 3250 #ifdef SUPPORT_MIDI 3251 val &= ~0x20; 3251 3252 if (mpu_port[dev] > 0) { 3252 3253 if (mpu_port[dev] == 0x300 || mpu_port[dev] == 0x330) { -
GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c
r290 r348 348 348 struct resource *res_iomem2; 349 349 350 struct snd_dma_device dma_dev; 351 352 struct snd_dma_buffer dma_dsp; 353 struct snd_dma_buffer dma_play; 354 struct snd_dma_buffer dma_rec; 355 struct snd_dma_buffer dma_shared; 356 350 357 u32 dspCodeSize; 351 u32 dspMemPhy; // DSP memory block handle (Physical Address)352 void * dspMemPtr; // block memory (Virtual Address)353 358 354 359 u32 DataBufsSize; … … 358 363 359 364 KorgSharedBuffer * sharedBufferPtr; 365 360 366 u32 RecDataPhy; 361 367 u32 PlayDataPhy; … … 1239 1245 snd_korg1212_setCardState(korg1212, K1212_STATE_DSP_IN_PROCESS); 1240 1246 1241 memcpy(korg1212->d spMemPtr, dspCode, korg1212->dspCodeSize);1247 memcpy(korg1212->dma_dsp.area, dspCode, korg1212->dspCodeSize); 1242 1248 1243 1249 rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_StartDSPDownload, 1244 UpperWordSwap(korg1212->d spMemPhy),1250 UpperWordSwap(korg1212->dma_dsp.addr), 1245 1251 0, 0, 0); 1246 1252 … … 2135 2141 // free up memory resources used for the DSP download. 2136 2142 // ---------------------------------------------------- 2137 if (korg1212->dspMemPtr) { 2138 snd_free_pci_pages(korg1212->pci, korg1212->dspCodeSize, 2139 korg1212->dspMemPtr, (dma_addr_t)korg1212->dspMemPhy); 2140 korg1212->dspMemPhy = 0; 2141 korg1212->dspMemPtr = 0; 2142 korg1212->dspCodeSize = 0; 2143 if (korg1212->dma_dsp.area) { 2144 snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_dsp); 2145 korg1212->dma_dsp.area = NULL; 2143 2146 } 2144 2147 … … 2148 2151 // free up memory resources used for the Play/Rec Buffers 2149 2152 // ------------------------------------------------------ 2150 if (korg1212->playDataBufsPtr) { 2151 snd_free_pci_pages(korg1212->pci, korg1212->DataBufsSize, 2152 korg1212->playDataBufsPtr, (dma_addr_t)korg1212->PlayDataPhy); 2153 korg1212->PlayDataPhy = 0; 2154 korg1212->playDataBufsPtr = NULL; 2155 } 2156 2157 if (korg1212->recordDataBufsPtr) { 2158 snd_free_pci_pages(korg1212->pci, korg1212->DataBufsSize, 2159 korg1212->recordDataBufsPtr, (dma_addr_t)korg1212->RecDataPhy); 2160 korg1212->RecDataPhy = 0; 2161 korg1212->recordDataBufsPtr = NULL; 2153 if (korg1212->dma_play.area) { 2154 snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_play); 2155 korg1212->dma_play.area = NULL; 2156 } 2157 2158 if (korg1212->dma_rec.area) { 2159 snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_rec); 2160 korg1212->dma_rec.area = NULL; 2162 2161 } 2163 2162 … … 2167 2166 // free up memory resources used for the Shared Buffers 2168 2167 // ---------------------------------------------------- 2169 if (korg1212->sharedBufferPtr) { 2170 snd_free_pci_pages(korg1212->pci, (u32) sizeof(KorgSharedBuffer), 2171 korg1212->sharedBufferPtr, (dma_addr_t)korg1212->sharedBufferPhy); 2172 korg1212->sharedBufferPhy = 0; 2173 korg1212->sharedBufferPtr = NULL; 2168 if (korg1212->dma_shared.area) { 2169 snd_dma_free_pages(&korg1212->dma_dev, &korg1212->dma_shared); 2170 korg1212->dma_shared.area = NULL; 2174 2171 } 2175 2172 … … 2194 2191 unsigned int i; 2195 2192 unsigned ioport_size, iomem_size, iomem2_size; 2196 dma_addr_t phys_addr;2197 2193 korg1212_t * korg1212; 2198 2194 … … 2333 2329 #endif 2334 2330 2335 korg1212->sharedBufferPtr = (KorgSharedBuffer *) snd_malloc_pci_pages(korg1212->pci, sizeof(KorgSharedBuffer), &phys_addr); 2336 korg1212->sharedBufferPhy = (unsigned long)phys_addr; 2337 2338 if (korg1212->sharedBufferPtr == NULL) { 2331 memset(&korg1212->dma_dev, 0, sizeof(korg1212->dma_dev)); 2332 korg1212->dma_dev.type = SNDRV_DMA_TYPE_DEV; 2333 korg1212->dma_dev.dev = snd_dma_pci_data(korg1212->pci); 2334 2335 if (snd_dma_alloc_pages(&korg1212->dma_dev, sizeof(KorgSharedBuffer), &korg1212->dma_shared) < 0) { 2339 2336 snd_printk(KERN_ERR "can not allocate shared buffer memory (%Zd bytes)\n", sizeof(KorgSharedBuffer)); 2340 2337 return -ENOMEM; 2341 2338 } 2339 korg1212->sharedBufferPtr = (KorgSharedBuffer *)korg1212->dma_shared.area; 2340 korg1212->sharedBufferPhy = korg1212->dma_shared.addr; 2342 2341 2343 2342 #if K1212_DEBUG_LEVEL > 0 … … 2349 2348 korg1212->DataBufsSize = sizeof(KorgAudioBuffer) * kNumBuffers; 2350 2349 2351 korg1212->playDataBufsPtr = (KorgAudioBuffer *) snd_malloc_pci_pages(korg1212->pci, korg1212->DataBufsSize, &phys_addr); 2352 korg1212->PlayDataPhy = (u32)phys_addr; 2353 2354 if (korg1212->playDataBufsPtr == NULL) { 2350 if (snd_dma_alloc_pages(&korg1212->dma_dev, korg1212->DataBufsSize, &korg1212->dma_play) < 0) { 2355 2351 snd_printk(KERN_ERR "can not allocate play data buffer memory (%d bytes)\n", korg1212->DataBufsSize); 2356 2352 return -ENOMEM; 2357 2353 } 2354 korg1212->playDataBufsPtr = (KorgAudioBuffer *)korg1212->dma_play.area; 2355 korg1212->PlayDataPhy = korg1212->dma_play.addr; 2358 2356 2359 2357 #if K1212_DEBUG_LEVEL > 0 … … 2362 2360 #endif 2363 2361 2364 korg1212->recordDataBufsPtr = (KorgAudioBuffer *) snd_malloc_pci_pages(korg1212->pci, korg1212->DataBufsSize, &phys_addr); 2365 korg1212->RecDataPhy = (u32)phys_addr; 2366 2367 if (korg1212->recordDataBufsPtr == NULL) { 2362 if (snd_dma_alloc_pages(&korg1212->dma_dev, korg1212->DataBufsSize, &korg1212->dma_rec) < 0) { 2368 2363 snd_printk(KERN_ERR "can not allocate record data buffer memory (%d bytes)\n", korg1212->DataBufsSize); 2369 2364 return -ENOMEM; 2370 2365 } 2366 korg1212->recordDataBufsPtr = (KorgAudioBuffer *)korg1212->dma_rec.area; 2367 korg1212->RecDataPhy = korg1212->dma_rec.addr; 2371 2368 2372 2369 #if K1212_DEBUG_LEVEL > 0 2373 2370 K1212_DEBUG_PRINTK("K1212_DEBUG: Record Data Area = 0x%p (0x%08x), %d bytes\n", 2374 korg1212->recordDataBufsPtr, korg1212->RecData Phy, korg1212->DataBufsSize);2371 korg1212->recordDataBufsPtr, korg1212->RecDataBufsPhy, korg1212->DataBufsSize); 2375 2372 #endif 2376 2373 … … 2393 2390 offsetof(KorgSharedBuffer, AdatTimeCode); 2394 2391 2395 korg1212->dspMemPtr = snd_malloc_pci_pages(korg1212->pci, korg1212->dspCodeSize, &phys_addr); 2396 korg1212->dspMemPhy = (u32)phys_addr; 2397 2398 if (korg1212->dspMemPtr == NULL) { 2392 if (snd_dma_alloc_pages(&korg1212->dma_dev, korg1212->dspCodeSize, &korg1212->dma_dsp) < 0) { 2399 2393 snd_printk(KERN_ERR "can not allocate dsp code memory (%d bytes)\n", korg1212->dspCodeSize); 2400 2394 return -ENOMEM; … … 2403 2397 #if K1212_DEBUG_LEVEL > 0 2404 2398 K1212_DEBUG_PRINTK("K1212_DEBUG: DSP Code area = 0x%p (0x%08x) %d bytes [%s]\n", 2405 korg1212->d spMemPtr, korg1212->dspMemPhy, korg1212->dspCodeSize,2399 korg1212->dma_dsp.area, korg1212->dma_dsp.addr, korg1212->dspCodeSize, 2406 2400 stateName[korg1212->cardState]); 2407 2401 #endif … … 2426 2420 "RoutingTablePhy = %08x L[%08x]\n" 2427 2421 "AdatTimeCodePhy = %08x L[%08x]\n", 2428 korg1212->d spMemPhy, UpperWordSwap(korg1212->dspMemPhy),2422 korg1212->dma_dsp.addr, UpperWordSwap(korg1212->dma_dsp.addr), 2429 2423 korg1212->PlayDataPhy, LowerWordSwap(korg1212->PlayDataPhy), 2430 2424 korg1212->RecDataPhy, LowerWordSwap(korg1212->RecDataPhy), -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c
r290 r348 1719 1719 rme96->spdif_pcm->info_flags = 0; 1720 1720 1721 snd_pcm_lib_preallocate_pages_for_all(rme96->spdif_pcm, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE, GFP_KERNEL); 1721 snd_pcm_lib_preallocate_pages_for_all(rme96->spdif_pcm, 1722 SNDRV_DMA_TYPE_CONTINUOUS, 1723 snd_dma_continuous_data(GFP_KERNEL), 1724 RME96_BUFFER_SIZE, 1725 RME96_BUFFER_SIZE); 1722 1726 1723 1727 /* set up ALSA pcm device for ADAT */ … … 1739 1743 rme96->adat_pcm->info_flags = 0; 1740 1744 1741 snd_pcm_lib_preallocate_pages_for_all(rme96->adat_pcm, RME96_BUFFER_SIZE, RME96_BUFFER_SIZE, GFP_KERNEL); 1745 snd_pcm_lib_preallocate_pages_for_all(rme96->adat_pcm, 1746 SNDRV_DMA_TYPE_CONTINUOUS, 1747 snd_dma_continuous_data(GFP_KERNEL), 1748 RME96_BUFFER_SIZE, 1749 RME96_BUFFER_SIZE); 1742 1750 } 1743 1751 -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hdsp.c
r300 r348 570 570 struct snd_dma_buffer dmbuf; 571 571 572 snd_dma_device_pci(&pdev, pci, capture); 572 memset(&pdev, 0, sizeof(pdev)); 573 pdev.type = SNDRV_DMA_TYPE_DEV; 574 pdev.dev = snd_dma_pci_data(pci); 575 pdev.id = capture; 573 576 dmbuf.bytes = 0; 574 577 if (! snd_dma_get_reserved(&pdev, &dmbuf)) { … … 583 586 static void snd_hammerfall_free_buffer(struct pci_dev *pci, size_t size, void *ptr, dma_addr_t addr, int capture) 584 587 { 585 struct snd_dma_device dev; 586 snd_dma_device_pci(&dev, pci, capture); 587 snd_dma_free_reserved(&dev); 588 struct snd_dma_device pdev; 589 590 memset(&pdev, 0, sizeof(pdev)); 591 pdev.type = SNDRV_DMA_TYPE_DEV; 592 pdev.dev = snd_dma_pci_data(pci); 593 pdev.id = capture; 594 snd_dma_free_reserved(&pdev); 588 595 } 589 596 -
GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c
r290 r348 315 315 struct snd_dma_buffer dmbuf; 316 316 317 snd_dma_device_pci(&pdev, pci, capture); 317 memset(&pdev, 0, sizeof(pdev)); 318 pdev.type = SNDRV_DMA_TYPE_DEV; 319 pdev.dev = snd_dma_pci_data(pci); 320 pdev.id = capture; 318 321 dmbuf.bytes = 0; 319 322 if (! snd_dma_get_reserved(&pdev, &dmbuf)) { … … 328 331 static void snd_hammerfall_free_buffer(struct pci_dev *pci, size_t size, void *ptr, dma_addr_t addr, int capture) 329 332 { 330 struct snd_dma_device dev; 331 snd_dma_device_pci(&dev, pci, capture); 332 snd_dma_free_reserved(&dev); 333 struct snd_dma_device pdev; 334 335 memset(&pdev, 0, sizeof(pdev)); 336 pdev.type = SNDRV_DMA_TYPE_DEV; 337 pdev.dev = snd_dma_pci_data(pci); 338 pdev.id = capture; 339 snd_dma_free_reserved(&pdev); 333 340 } 334 341 -
GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c
r290 r348 891 891 sonic->pcm = pcm; 892 892 893 snd_pcm_lib_preallocate_pci_pages_for_all(sonic->pci, pcm, 64*1024, 128*1024); 893 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 894 snd_dma_pci_data(sonic->pci), 64*1024, 128*1024); 894 895 895 896 if (rpcm) -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c
r290 r348 3580 3580 } 3581 3581 trident->irq = pci->irq; 3582 3583 memset(&trident->dma_dev, 0, sizeof(trident->dma_dev)); 3584 trident->dma_dev.type = SNDRV_DMA_TYPE_DEV; 3585 trident->dma_dev.dev = snd_dma_pci_data(pci); 3582 3586 3583 3587 /* allocate 16k-aligned TLB for NX cards */ -
GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_memory.c
r210 r348 80 80 __set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_page.addr); 81 81 __set_tlb_bus(trident, page+1, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_page.addr); 82 // __set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page, trident->tlb.silent_page_dmaaddr);83 // __set_tlb_bus(trident, page+1, (unsigned long)trident->tlb.silent_page, trident->tlb.silent_page_dmaaddr);84 82 } 85 83 … … 116 114 for (i = 0; i < UNIT_PAGES; i++, page++) 117 115 __set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page.area, trident->tlb.silent_page.addr); 118 // __set_tlb_bus(trident, page, (unsigned long)trident->tlb.silent_page, trident->tlb.silent_page_dmaaddr);119 116 } 120 117
Note:
See TracChangeset
for help on using the changeset viewer.