Changeset 188
- Timestamp:
- Sep 9, 2001, 5:31:35 PM (24 years ago)
- Location:
- sbliveos2/trunk
- Files:
-
- 3 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
sbliveos2/trunk/ChangeLog
r185 r188 1 1 $Id$ 2 3 2001-09-09: Sander van Leeuwen <sandervl@xs4all.nl> 4 - DRV16: Put back joystick code 5 6 2001-09-09: Ruediger Ihle 7 - DRV16: Workaround added for MMPM/2 device share bug 8 Fix for NULL buffers 2 9 3 10 2001-05-24: Sander van Leeuwen <sandervl@xs4all.nl> -
sbliveos2/trunk/bin/control.scr
r153 r188 65 65 ssgroup=17 66 66 ssname="SoundBlaster Live! Wave Audio" 67 ssversion="0. 6.0"67 ssversion="0.7.5" 68 68 sssize=300 69 69 ssdll="genin.dll" -
sbliveos2/trunk/drv16/init.cpp
r178 r188 65 65 #define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002UL 66 66 #endif 67 #define PCI_ID ((PCI_DEVICE_ID_CREATIVE_EMU10K1<<16UL)|PCI_VENDOR_ID_CREATIVE) 67 68 #ifndef PCI_DEVICE_ID_CREATIVE_EMU10K1_JOYSTICK 69 #define PCI_DEVICE_ID_CREATIVE_EMU10K1_JOYSTICK 0x7002 70 #endif 71 72 #define PCI_ID ((PCI_DEVICE_ID_CREATIVE_EMU10K1<<16UL)|PCI_VENDOR_ID_CREATIVE) 73 #define PCI_IDJOY ((PCI_DEVICE_ID_CREATIVE_EMU10K1_JOYSTICK<<16UL)|PCI_VENDOR_ID_CREATIVE) 68 74 69 75 // Default MIDI timer interval, milliseconds. … … 76 82 static char szSBLiveAllocResFailed1[] = "Another device driver was granted exclusive access to IRQ "; 77 83 static char szSBLiveAllocResFailed2[] = "Unable to allocate hardware resources! Aborting..."; 78 static char szSBLiveConfig1[] = "SB Live! configuration: IRQ ";79 static char szSBLiveConfig2[] = ", IO Port 0x";80 84 static char szSBLiveConfig1[] = "SB Live! configuration: IRQ "; 85 static char szSBLiveConfig2[] = ", IO Port 0x"; 86 static char szSBLiveConfigJoy[] = "SB Live! Joystick : IO Port 0x"; 81 87 82 88 // … … 183 189 HexWordToASCII(digit, pResources->uIOBase[0], 0); 184 190 DosWrite(1, (VOID FAR*)digit, strlen(digit), &result); 185 186 DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);187 DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);188 191 } 189 192 delete pResources; 193 194 //Joystick detection 195 if(pRM->bIsDevDetected(PCI_IDJOY, SEARCH_ID_DEVICEID, TRUE)) 196 { 197 pResources = pRM->pGetDevResources(PCI_IDJOY, SEARCH_ID_DEVICEID, TRUE, TRUE); 198 if((pResources) && !pResources->isEmpty() && fVerbose) { 199 USHORT result; 200 DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result); 201 DosWrite(1, (VOID FAR*)szSBLiveConfigJoy, sizeof(szSBLiveConfigJoy)-1, &result); 202 HexWordToASCII(digit, pResources->uIOBase[0], 0); 203 DosWrite(1, (VOID FAR*)digit, strlen(digit), &result); 204 } 205 delete pResources; 206 } 207 if (fVerbose) { 208 USHORT result; 209 DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result); 210 DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result); 211 } 190 212 191 213 // Build the MPU401 object only if we got a good 2115 init. -
sbliveos2/trunk/drv16/ioctl.cpp
r186 r188 108 108 } 109 109 else { 110 delete pstream; 110 #if 1 111 // Rudi: Workaround for MMPM device sharing bug 112 if (pstream->ulStreamState & STREAM_STREAMING) { 113 CONTROL_PARM dummy; 114 pstream->PauseStream(&dummy); 115 pstream->ResumeStream(); 116 p->pvReserved = (VOID FAR *) (ULONG)prp->s.ioctl.usSysFileNum; 117 p->sReturnCode = 0; 118 return; 119 } 120 #endif 121 delete pstream; 111 122 } 112 123 } -
sbliveos2/trunk/drv16/wavestrm.cpp
r178 r188 165 165 //underrun: stop playback 166 166 dprintf(("underrun: stop playback")); 167 167 pahw->Stop(this); 168 168 fUnderrun = TRUE; 169 169 return; … … 171 171 space = OSS16_StreamGetSpace(this); 172 172 while(space) { 173 byteswritten = AddBuffer(space); 173 byteswritten = AddBuffer(space); 174 if(byteswritten == (ULONG)-1) break; 174 175 space -= byteswritten; 175 if(byteswritten == 0) break; 176 } 176 } 177 177 } 178 178 } … … 191 191 192 192 if(!pTemp || pTemp->ulBuffpos >= (pTemp->ulBuffsz & 0xFFFFFFFC)) { 193 193 pTemp = (PSTREAMBUFFER)qhInProcess.Head(); 194 194 } 195 195 if(!pTemp) { 196 196 dprintf4(("AddBuffer: pTemp == NULL")); 197 return 0;197 return (ULONG)-1; 198 198 } 199 199 … … 202 202 Buff_left = pTemp->ulBuffsz - pTemp->ulBuffpos; 203 203 204 // write the audio buffer 205 Buff_left = min(Buff_left, space); 206 byteswritten = OSS16_StreamAddBuffer(this, pdataBuf, Buff_left); 207 if(byteswritten == 0) { 208 return 0; //no more room 209 } 210 211 // update the buffer pos counter 212 pTemp->ulBuffpos += byteswritten; 213 214 if(pTemp != qhDone.Tail()) { 215 qhDone.PushOnTail(qhInProcess.PopHead()); 204 if(Buff_left) { 205 // write the audio buffer 206 Buff_left = min(Buff_left, space); 207 byteswritten = OSS16_StreamAddBuffer(this, pdataBuf, Buff_left); 208 if(byteswritten == 0) { 209 return (ULONG)-1; //no more room 210 } 211 212 // update the buffer pos counter 213 pTemp->ulBuffpos += byteswritten; 214 } 215 else byteswritten = 0; 216 217 if(pTemp == qhInProcess.Head()) { 218 qhDone.PushOnTail(qhInProcess.PopHead()); 216 219 } 217 220 dprintf4(("AddBuffer %lx size %d, bytes written %d", pdataBuf, (USHORT)Buff_left, (USHORT)byteswritten)); … … 299 302 else break; //shouldn't happen 300 303 } 301 302 //Get rid of empty buffers 303 ptemp = (PSTREAMBUFFER)qhInProcess.Head(); 304 if(ptemp && (ptemp->ulBuffsz == 0 || ptemp->pBuffptr == NULL)) { 305 dprintf(("Returning 0 size buffer immediately")); 306 ReturnBuffer(); 307 } 308 AddBuffers(FALSE); 309 break; 310 } 311 case STREAM_READ: 312 while(_vReadAudioBuf()); 313 break; 304 AddBuffers(FALSE); 305 break; 306 } 307 case STREAM_READ: 308 while(_vReadAudioBuf()); 309 break; 314 310 default: 315 311 break; -
sbliveos2/trunk/include/kee.h
r142 r188 101 101 //NOTE: esp and ebp are modified when this function returns 102 102 // --> can cause problems if compiler uses i.e. ebp for storing a value!! 103 104 #ifdef __WATCOMC__ 105 ULONG KernThunkStackTo32(VOID); 106 #pragma aux KernThunkStackTo32 "KernThunkStackTo32" modify exact [eax ecx edx] value [edx]; 107 #else 103 108 ULONG APIENTRY KernThunkStackTo32(VOID); 104 #pragma aux KernThunkStackTo32 "KernThunkStackTo32" modify exact [edx]; 109 #endif 110 105 111 106 112 /*ordinal 42*/ -
sbliveos2/trunk/include/linux/kernel.h
r142 r188 15 15 /* Optimization barrier */ 16 16 /* The "volatile" is due to gcc bugs */ 17 #define barrier() __asm__ __volatile__("": : :"memory") 17 //#define barrier() __asm__ __volatile__("": : :"memory") 18 #define barrier() 18 19 19 20 #define STACK_MAGIC 0xdeadbeef … … 55 56 extern int session_of_pgrp(int pgrp); 56 57 57 int printk(const char * fmt, ...);58 extern int printk(const char * fmt, ...); 58 59 59 60 -
sbliveos2/trunk/include/sbversion.h
r163 r188 25 25 #define __SBVERSION_H__ 26 26 27 #define SBLIVE_VERSION "0.7. 0"27 #define SBLIVE_VERSION "0.7.5" 28 28 29 29 #endif //__SBVERSION_H__ -
sbliveos2/trunk/include/version.mak
r163 r188 11 11 12 12 _VENDOR = Creative Labs SoundBlaster Live 13 _VERSION = 0.7 0.00013 _VERSION = 0.75.000 14 14 15 15 FILEVER = @^#$(_VENDOR):$(_VERSION)^#@ -
sbliveos2/trunk/install/control.scr
r153 r188 65 65 ssgroup=17 66 66 ssname="SoundBlaster Live! Wave Audio" 67 ssversion="0. 6.0"67 ssversion="0.7.5" 68 68 sssize=300 69 69 ssdll="genin.dll" -
sbliveos2/trunk/lib32/spinlock.c
r142 r188 28 28 #include <asm/hardirq.h> 29 29 30 31 unsigned long __lock(void); 32 #pragma aux __lock = \ 33 "pushfd" \ 34 "cli" \ 35 "pop eax" \ 36 modify exact [eax] \ 37 value [eax]; 38 39 40 void __unlock(unsigned long cpuflags); 41 #pragma aux __unlock = \ 42 "push eax" \ 43 "popfd" \ 44 modify exact [] \ 45 parm [eax]; 46 47 48 30 49 void spin_lock_init(spinlock_t *lock) 31 50 { … … 35 54 void spin_lock(spinlock_t *lock) 36 55 { 37 unsigned long cpuflags; 38 39 _asm { 40 pushfd 41 pop eax 42 mov [cpuflags], eax 43 cli 44 } 45 *lock = cpuflags; 56 *lock = __lock(); 46 57 } 47 58 48 59 void spin_lock_flag(spinlock_t *lock, unsigned long *flag) 49 60 { 50 spin_lock(lock);61 *lock = __lock(); 51 62 } 52 63 … … 65 76 void spin_unlock(spinlock_t *lock) 66 77 { 67 unsigned long cpuflags = *lock; 78 __unlock(*lock); 79 } 68 80 69 _asm { 70 mov eax, [cpuflags] 71 push eax 72 popfd 73 } 74 } 81 -
sbliveos2/trunk/lib32/waitqueue.c
r142 r188 46 46 } 47 47 48 long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout) 49 { 50 return 1; 51 } 48 52 49 53 void interruptible_sleep_on(wait_queue_head_t *q) -
sbliveos2/trunk/readme.txt
r153 r188 1 SoundBlaster Live! OS/2 Audio driver version 0. 60(beta)1 SoundBlaster Live! OS/2 Audio driver version 0.75 (beta) 2 2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 3 … … 37 37 Crystal Semiconductor and supported by the Crystal OS/2 audio drivers) 38 38 - RTMIDI playback & recording 39 --> Note: this is not the same as midi playback via MMPM/2 (midi applet) 40 Playing midi files requires an external MIDI device 39 41 40 42 41 43 3 History 42 44 ========= 45 0.75 46 - Put back joystick code 47 - Fix for playing small wave files 48 49 0.70 50 - Fail to load if resource manager returned error while allocating resources. 51 (prevents SB Live driver from allocating irq when the (e.g.) the USB driver 52 has already claimed exclusive access) 53 - Added new DirectAudio interface used by Odin for wave playback 54 43 55 0.60 56 - Fixed detection of SB Live on some systems 44 57 - Fixed video mixer control 45 58 - Changed wave volume level 46 59 - Fixed clicks when playing wave files with large audio buffers 60 - Print joystick port during init + register joystick device + it's resources 47 61 48 62 0.50 … … 59 73 - OS/2 Warp 4 or Warp Server for e-Business 60 74 (Warp 3 not tested) 61 - Creative Labs SoundBlaster Live! soundcard 75 - Creative Labs SoundBlaster Live! or 76 Creative Labs SoundBlaster PCI 512 soundcard 62 77 63 78 … … 65 80 ======================== 66 81 To install the SB Live driver: 82 - Make sure your BIOS configures the SB Live! card (assigns IRQ and IO addresses) 83 Look for a 'PnP OS' (or similar) setting in your BIOS options and set it to 84 'No' or 'Off'. 85 The SB Live! driver does not work if the BIOS doesn't assign hardware 86 resources to the card. 67 87 - Unzip driver archive 68 88 - Run install.cmd … … 73 93 as described above, but select zero SB Live cards when asked. 74 94 95 To use the SB Live's joystick port you need to install one of the 96 OS/2 joystick drivers and tell it to you the IO port that the 97 sb live driver prints during boot. 98 I.e.: Sblive16 prints this during boot: 99 SB Live! joystick at : 0xE400 100 Change the joystick port address to E400 for the gamedd2 driver: 101 DEVICE=C:\GAMEDD.SYS /P:E400 /W:400 /C:1E 102 103 Note that this is not an ideal solution as the SB Live's joystick 104 port address can be changed by the BIOS when hardware is added or 105 removed. 106 However, it's safer than mapping it to the standard joystick port address 107 (i.e. 0x201) due to the risk of a conflict with other (audio) hardware. 108 109 75 110 6 Config.sys options 76 111 ==================== 77 112 DEVICE=J:\MMOS2\SBLIVE16.SYS /V /C /M /L 78 113 - /V: verbose (prints copyrights during driver init) 79 - /C: enable CD audio input 80 - /M: enable microphone audio input 81 - /L: enable linein audio input 114 - /C: enable CD audio input (default muted; can be changed with mixer app) 115 - /M: enable microphone audio input (default muted; can be changed with mixer app) 116 - /L: enable linein audio input (default muted; can be changed with mixer app) 82 117 83 118 DEVICE=J:\MMOS2\SBLIVE32.SYS /D … … 95 130 If you find a way to reliably reproduce this, please contact the author. 96 131 (see section 9) 97 - Small distortions when recording at 44.1khz 16 bits stereo98 132 - Crash in PMMERGE when installing the driver on a system that uses the Scitech 99 133 display drivers. … … 118 152 - reboot 119 153 154 - IRQ conflicts can occurs with drivers that are unable to share their interrupt. 155 (the USB drivers have this problem, but only on some systems) 156 The SBLive driver can detect some of these conflicts and will print the 157 following messages: 158 Another device driver was granted exclusive access to IRQ xx 159 Unable to allocate hardware resources! Aborting... 160 161 When you see this message, you must force the BIOS to allocate another 162 interrupt for the sblive driver. 163 164 120 165 8 File listing 121 166 ============== … … 175 220 10.1 SoundBlaster Live OS/2 mailinglist 176 221 ====================================== 177 A mailinglist to discuss the OS/2 sblive driver has been created at egroups.com.178 Go to www. egroups.com to subscribe to sbliveos2@egroups.com.222 A mailinglist to discuss the OS/2 sblive driver has been created at yahoogroups.com. 223 Go to www.yahoogroups.com to subscribe to sbliveos2@yahoogroups.com. 179 224 180 225
Note:
See TracChangeset
for help on using the changeset viewer.