Changeset 305 for GPL/branches/uniaud-2.0/lib32/ioctl.c
- Timestamp:
- Mar 24, 2008, 2:43:42 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud-2.0/lib32/ioctl.c
r111 r305 6 6 */ 7 7 8 #include <sound/ driver.h>8 #include <sound/core.h> 9 9 #include <sound/control.h> 10 10 #include <sound/info.h> … … 29 29 * set by snd_ctl_notify() 30 30 */ 31 s nd_pcm_substream_t*substream_int[8*256] = {0}; // interrupted substream31 struct snd_pcm_substream *substream_int[8*256] = {0}; // interrupted substream 32 32 int control_id_changed = 0; 33 33 int card_id_changed = 0; … … 71 71 int i = 0; 72 72 int j = 0; 73 s nd_pcm_file_t*pcm_file = NULL;74 s nd_pcm_substream_t*substream;75 s nd_pcm_runtime_t*runtime;73 struct snd_pcm_file *pcm_file = NULL; 74 struct snd_pcm_substream *substream; 75 struct snd_pcm_runtime *runtime; 76 76 soundhandle *pHandle = (soundhandle *)handle; 77 77 struct file *pfile; … … 85 85 return -ENXIO; 86 86 87 pcm_file = (s nd_pcm_file_t*)pfile->private_data;87 pcm_file = (struct snd_pcm_file *)pfile->private_data; 88 88 89 89 if (pcm_file == NULL) … … 284 284 OSSSTREAMID streamid = 0; 285 285 soundhandle *pHandle; 286 s nd_pcm_info_t*pcminfo = NULL;287 s nd_pcm_hw_params_t*params;286 struct snd_pcm_info *pcminfo = NULL; 287 struct snd_pcm_hw_params *params; 288 288 int ret, fmt, j; 289 289 ULONG format_mask; 290 s nd_mask_t*mask;290 struct snd_mask *mask; 291 291 int pcms = 0; 292 292 … … 297 297 298 298 //these structures are too big to put on the stack 299 pcminfo = (s nd_pcm_info_t *)kmalloc(sizeof(snd_pcm_info_t)+sizeof(snd_pcm_hw_params_t), GFP_KERNEL);299 pcminfo = (struct snd_pcm_info *)kmalloc(sizeof(struct snd_pcm_info)+sizeof(struct snd_pcm_hw_params), GFP_KERNEL); 300 300 if(pcminfo == NULL) { 301 301 DebugInt3(); … … 303 303 return OSSERR_OUT_OF_MEMORY; 304 304 } 305 params = (s nd_pcm_hw_params_t*)(pcminfo+1);305 params = (struct snd_pcm_hw_params *)(pcminfo+1); 306 306 307 307 for (i=0; i<pcms;i++) … … 383 383 pWaveCaps->ulMaxRate = hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->max; 384 384 385 mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_RATE_MASK); 385 // mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_RATE_MASK); 386 mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT); 386 387 pWaveCaps->ulRateFlags = mask->bits[0]; 387 388 … … 525 526 mixerhandle *pHandle = NULL; 526 527 int ret, i, j; 527 // s nd_ctl_card_info_t*pinfo;528 // struct snd_ctl_card_info *pinfo; 528 529 529 530 if(alsa_fops == NULL) { … … 556 557 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, 557 558 SNDRV_CTL_IOCTL_CARD_INFO, 558 (ULONG)(s nd_ctl_card_info_t*)info);559 (ULONG)(struct snd_ctl_card_info *)info); 559 560 if(ret) { 560 561 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); … … 692 693 693 694 //allocate memory for all mixer elements 694 pHandle->pids = (s nd_ctl_elem_id_t*)pids;695 //kmalloc(sizeof(s nd_ctl_elem_id_t)*pHandle->list.count, GFP_KERNEL);695 pHandle->pids = (struct snd_ctl_elem_id *)pids; 696 //kmalloc(sizeof(struct snd_ctl_elem_id)*pHandle->list.count, GFP_KERNEL); 696 697 if(pHandle->pids == NULL) { 697 698 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); … … 711 712 // if (pids) 712 713 // memcpy(pids, pHandle->pids, 713 // sizeof(s nd_ctl_elem_id_t)*pHandle->list.count);714 // sizeof(struct snd_ctl_elem_id)*pHandle->list.count); 714 715 715 716 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); … … 730 731 int GetUniaudControlInfo(ULONG deviceid, ULONG id, void *info) 731 732 { 732 s nd_ctl_elem_value_t*pElem = NULL;733 s nd_ctl_elem_info_t*pElemInfo = NULL;733 struct snd_ctl_elem_value *pElem = NULL; 734 struct snd_ctl_elem_info *pElemInfo = NULL; 734 735 mixerhandle *pHandle = NULL; 735 736 int ret, i, j, sz; … … 764 765 765 766 //allocate memory for info element 766 pElemInfo = (s nd_ctl_elem_info_t*)info;767 pElemInfo = (struct snd_ctl_elem_info *)info; 767 768 if(pElemInfo == NULL) { 768 769 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); … … 770 771 } 771 772 772 // printk("sizeof elem_info %i\n",sizeof(s nd_ctl_elem_info_t));773 // printk("sizeof elem_info %i\n",sizeof(struct snd_ctl_elem_info)); 773 774 774 775 pElemInfo->id.numid = id; … … 789 790 int GetUniaudControlValueGet(ULONG deviceid, ULONG id, void *value) 790 791 { 791 s nd_ctl_elem_value_t*pElem = NULL;792 s nd_ctl_elem_info_t*pElemInfo = NULL;792 struct snd_ctl_elem_value *pElem = NULL; 793 struct snd_ctl_elem_info *pElemInfo = NULL; 793 794 mixerhandle *pHandle = NULL; 794 795 int ret, i, j, sz; … … 822 823 } 823 824 824 pElem = (s nd_ctl_elem_value_t*)value;825 pElem = (struct snd_ctl_elem_value *)value; 825 826 if(pElem == NULL) { 826 827 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); … … 828 829 } 829 830 830 // printk("sizeof elem_info %i\n",sizeof(s nd_ctl_elem_info_t));831 // printk("sizeof elem_info %i\n",sizeof(struct snd_ctl_elem_info)); 831 832 832 833 pElem->id.numid = id; … … 847 848 int GetUniaudControlValuePut(ULONG deviceid, ULONG id, void *value) 848 849 { 849 s nd_ctl_elem_value_t*pElem = NULL;850 s nd_ctl_elem_info_t*pElemInfo = NULL;850 struct snd_ctl_elem_value *pElem = NULL; 851 struct snd_ctl_elem_info *pElemInfo = NULL; 851 852 mixerhandle *pHandle = NULL; 852 853 int ret, i, j, sz; … … 880 881 } 881 882 882 pElem = (s nd_ctl_elem_value_t*)value;883 pElem = (struct snd_ctl_elem_value *)value; 883 884 if(pElem == NULL) { 884 885 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); … … 886 887 } 887 888 888 // printk("sizeof elem_info %i\n",sizeof(s nd_ctl_elem_info_t));889 // printk("sizeof elem_info %i\n",sizeof(struct snd_ctl_elem_info)); 889 890 890 891 pElem->id.numid = id; … … 908 909 int ret; 909 910 soundhandle *pHandle = (soundhandle *)streamid; 910 s nd_pcm_hw_params_t*params = NULL;911 912 params = (s nd_pcm_hw_params_t*)pHwParams;911 struct snd_pcm_hw_params *params = NULL; 912 913 params = (struct snd_pcm_hw_params *)pHwParams; 913 914 914 915 if (!params) return -1001; … … 925 926 int ret; 926 927 soundhandle *pHandle = (soundhandle *)streamid; 927 s nd_pcm_hw_params_t*params = NULL;928 929 params = (s nd_pcm_hw_params_t*)pHwParams;928 struct snd_pcm_hw_params *params = NULL; 929 930 params = (struct snd_pcm_hw_params *)pHwParams; 930 931 931 932 if (!params) return -1001; … … 941 942 int ret; 942 943 soundhandle *pHandle = (soundhandle *)streamid; 943 s nd_pcm_sw_params_t*params = NULL;944 945 params = (s nd_pcm_sw_params_t*)pSwParams;944 struct snd_pcm_sw_params *params = NULL; 945 946 params = (struct snd_pcm_sw_params *)pSwParams; 946 947 947 948 if (!params) return -1001; … … 958 959 int ret; 959 960 soundhandle *pHandle = (soundhandle *)streamid; 960 s nd_pcm_status_t *status = (snd_pcm_status_t*)pstatus;961 struct snd_pcm_status *status = (struct snd_pcm_status *)pstatus; 961 962 962 963 if (!status) return -1001;
Note:
See TracChangeset
for help on using the changeset viewer.