Changeset 352 for GPL/branches/uniaud32-2.0/lib32/sound.c
- Timestamp:
- Apr 21, 2008, 11:54:49 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.