Changeset 352
- Timestamp:
- Apr 21, 2008, 11:54:49 AM (17 years ago)
- Location:
- GPL/branches/uniaud32-2.0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.0/drv32/rmhelp.cpp
r65 r352 156 156 157 157 Resource.ResourceType = RS_TYPE_IRQ; 158 Resource.IRQResource.IRQLevel = (USHORT)ulIrq ;158 Resource.IRQResource.IRQLevel = (USHORT)ulIrq & 0xff; 159 159 Resource.IRQResource.IRQFlags = ( fShared ) ? RS_IRQ_SHARED : RS_IRQ_EXCLUSIVE; 160 Resource.IRQResource.PCIIrqPin = RS_PCI_INT_NONE;160 Resource.IRQResource.PCIIrqPin = (USHORT)( (ulIrq >> 8) & 0xf); 161 161 162 162 rc = RMAllocResource(DriverHandle, // Handle to driver. -
GPL/branches/uniaud32-2.0/lib32/irq.c
r316 r352 69 69 unsigned long x0, const char *x1, void *x2) 70 70 { 71 IRQ_SLOT *pSlot = FindSlot(irq );71 IRQ_SLOT *pSlot = FindSlot(irq & 0xff); 72 72 unsigned u, uSlotNo = (unsigned)-1; 73 73 if( !pSlot ) … … 86 86 if( pSlot ) 87 87 { 88 if(RMRequestIRQ(/*hResMgr,*/ irq, (x0 & SA_SHIRQ) != 0) == FALSE) {88 if(RMRequestIRQ(/*hResMgr,*/ irq , (x0 & SA_SHIRQ) != 0) == FALSE) { 89 89 dprintf(("RMRequestIRQ failed for irq %d", irq)); 90 90 // return 0; … … 95 95 if( pSlot->irqHandlers[u].handler == NULL ) 96 96 { 97 pSlot->irqNo = irq ;97 pSlot->irqNo = irq & 0xff; 98 98 pSlot->irqHandlers[u].handler = handler; 99 99 pSlot->irqHandlers[u].x0 = x0; … … 102 102 103 103 if( pSlot->flHandlers != 0 || 104 ALSA_SetIrq( irq, uSlotNo, (x0 & SA_SHIRQ) != 0) )104 ALSA_SetIrq( irq & 0xff, uSlotNo, (x0 & SA_SHIRQ) != 0) ) 105 105 { 106 106 pSlot->flHandlers |= 1 << u; … … 113 113 } 114 114 115 dprintf(("request_irq: Unable to register irq handler for irq %d\n", irq ));115 dprintf(("request_irq: Unable to register irq handler for irq %d\n", irq & 0xff )); 116 116 return 1; 117 117 } … … 162 162 if( pSlot ) pSlot->fEOI = 1; 163 163 */ 164 eoiIrq[irq ]++;164 eoiIrq[irq & 0xff]++; 165 165 } 166 166 -
GPL/branches/uniaud32-2.0/lib32/sound.c
r344 r352 778 778 BOOL fTryAgain = FALSE; 779 779 ULONG ulMinRate, ulMaxRate; 780 struct snd_pcm_info *pcminfo = NULL;781 780 782 781 #ifdef DEBUG … … 803 802 return OSSERR_INVALID_PARAMETER; 804 803 } 805 806 // Get pcminfo so that we have the device & mixer name so we can do chipset specific hacks807 pcminfo = (struct snd_pcm_info *)kmalloc(sizeof(struct snd_pcm_info)+sizeof(struct snd_pcm_hw_params), GFP_KERNEL);808 //set operation to non-blocking809 pHandle->file.f_flags = O_NONBLOCK;810 811 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_INFO, (ULONG)pcminfo);812 813 804 tryagain: 814 805 //set operation to non-blocking … … 930 921 minperiodbytes = hw_param_interval((¶ms), SNDRV_PCM_HW_PARAM_PERIOD_BYTES)->min; 931 922 maxperiodbytes = hw_param_interval((¶ms), SNDRV_PCM_HW_PARAM_PERIOD_BYTES)->max; 923 932 924 if(periodbytes < minperiodbytes) { 933 925 periodbytes = minperiodbytes; … … 955 947 //make sure period size is a whole fraction of the buffer size 956 948 bufsize = hw_param_interval((¶ms), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->max; 949 950 #if 0 957 951 if(periodsize) { 958 952 nrperiods = bufsize/periodbytes; … … 964 958 return OSSERR_INVALID_PARAMETER; 965 959 } 960 #else 961 nrperiods = 3; 962 #endif 966 963 //check nr of periods against lower and upper boundaries 967 964 minnrperiods = hw_param_interval((¶ms), SNDRV_PCM_HW_PARAM_PERIODS)->min; … … 1012 1009 1013 1010 //#ifdef DEBUG_PK 1014 printk("Hardware parameters: sample rate %i, data type %i, channels %i, period size %i, nrperiods %i\n",1015 pHwParams->ulSampleRate, pHwParams->ulDataType, pHwParams->ulNumChannels, period size, nrperiods);1011 printk("Hardware parameters: sample rate %i, data type %i, channels %i, period bytes %i, period size %i, nrperiods %i\n", 1012 pHwParams->ulSampleRate, pHwParams->ulDataType, pHwParams->ulNumChannels, periodbytes, periodsize, nrperiods); 1016 1013 //#endif 1017 1014 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_PARAMS, (ULONG)__Stack32ToFlat(¶ms));
Note:
See TracChangeset
for help on using the changeset viewer.