Changeset 518 for GPL/trunk/lib32/soundmidi.c
- Timestamp:
- Jul 20, 2010, 5:46:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/lib32/soundmidi.c
r305 r518 108 108 ret = alsa_fops->open(&pHandle->inode, &pHandle->file); 109 109 if(ret) { 110 dprintf(("Midi Open %d failed with error %d", streamtype, ret));110 rprintf(("Midi Open %d failed with error %d", streamtype, ret)); 111 111 kfree(pHandle); 112 112 return UNIXToOSSError(ret); … … 116 116 117 117 pHandle->state |= MIDISTATE_OPENED; 118 printk("Opened MIDI %x\n",(ULONG)pHandle);119 if(streamtype == OSS32_STREAM_FM_MIDIOUT) 118 dprintf(("Opened MIDI %x\n",(ULONG)pHandle)); 119 if(streamtype == OSS32_STREAM_FM_MIDIOUT) 120 120 { 121 121 //get the client id 122 122 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_CLIENT_ID, (ULONG)&pHandle->clientid); 123 123 if(ret) { 124 dprintf(("Get client id failed with error %d", ret));124 rprintf(("Get client id failed with error %d", ret)); 125 125 kfree(pHandle); 126 126 return UNIXToOSSError(ret); 127 127 } 128 128 129 129 //find the FM device 130 for(i=64;i<64+((deviceid+1)<<3);i++) 130 for(i=64;i<64+((deviceid+1)<<3);i++) 131 131 { 132 132 memset((PVOID)__Stack32ToFlat(&clientinfo), 0, sizeof(clientinfo)); … … 143 143 } 144 144 if(i == 64+((deviceid+1)<<3)) { 145 dprintf(("Couldn't find OPL3 device"));145 rprintf(("Couldn't find OPL3 device")); 146 146 ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file); 147 147 kfree(pHandle); … … 159 159 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_CREATE_PORT, (ULONG)__Stack32ToFlat(&portinfo)); 160 160 if(ret) { 161 dprintf(("subscribe error %d", ret));161 rprintf(("subscribe error %d", ret)); 162 162 kfree(pHandle); 163 163 return UNIXToOSSError(ret); … … 165 165 pHandle->clientport = portinfo.addr.port; 166 166 pHandle->state |= MIDISTATE_PORTCREATED; 167 167 168 168 //subscribe to FM device port 169 169 memset(&subs, 0, sizeof(subs)); … … 174 174 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, (ULONG)__Stack32ToFlat(&subs)); 175 175 if(ret) { 176 dprintf(("subscribe error %d", ret));176 rprintf(("subscribe error %d", ret)); 177 177 kfree(pHandle); 178 178 return UNIXToOSSError(ret); 179 179 } 180 180 pHandle->state |= MIDISTATE_SUBSCRIBED; 181 181 182 182 #if 0 183 183 //Load FM instruments (only done once) … … 200 200 return OSSERR_INVALID_STREAMID; 201 201 } 202 printk("Closing MIDI %x\n",(ULONG)streamid);202 dprintf(("Closing MIDI %x\n",(ULONG)streamid)); 203 203 204 204 //set operation to non-blocking … … 214 214 ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, (ULONG)__Stack32ToFlat(&subs)); 215 215 if(ret) { 216 dprintf(("unsubscribe error %d", ret));216 rprintf(("unsubscribe error %d", ret)); 217 217 DebugInt3(); 218 218 } 219 219 } 220 220 221 221 //delete port 222 222 if(pHandle->state & MIDISTATE_SUBSCRIBED) { 223 223 struct snd_seq_port_info portinfo; 224 224 225 225 memset(&portinfo, 0, sizeof(portinfo)); 226 226 strcpy(portinfo.name, "Unamed port"); … … 248 248 OSSRET OSS32_MidiWrite(OSSSTREAMID streamid, ULONG midiByte) 249 249 { 250 printk("MIDI write %x\n",(ULONG)streamid);250 dprintf(("MIDI write %x\n",(ULONG)streamid)); 251 251 return OSSERR_INVALID_STREAMID; 252 252 } … … 269 269 if (ret > 0) 270 270 { 271 printk("MIDI read %i bytes from %x. first byte is: %x\n",ret, (ULONG)streamid, (char*)buffer[0]);271 dprintf(("MIDI read %i bytes from %x. first byte is: %x\n",ret, (ULONG)streamid, (char*)buffer[0])); 272 272 *pTransferred = ret; 273 273 return OSSERR_SUCCESS; … … 279 279 OSSRET OSS32_MidiQueryCaps(OSSSTREAMID streamid, POSS32_MIDICAPS pCaps) 280 280 { 281 printk("MIDI query caps %x\n",(ULONG)streamid);281 dprintf(("MIDI query caps %x\n",(ULONG)streamid)); 282 282 return OSSERR_INVALID_STREAMID; 283 283 } … … 295 295 return OSSERR_INVALID_STREAMID; 296 296 } 297 printk("MIDI command %x\n",(ULONG)streamid);297 dprintf(("MIDI command %x\n",(ULONG)streamid)); 298 298 299 299 //set operation to non-blocking … … 334 334 335 335 if(transferred < 0) { 336 dprintf(("OSS32_MidiNoteOn failed!!"));336 rprintf(("OSS32_MidiNoteOn failed!!")); 337 337 DebugInt3(); 338 338 return UNIXToOSSError(transferred);
Note:
See TracChangeset
for help on using the changeset viewer.