19 while ( ( ! ready ) && (
timeout > 0 ) )
38 DPRINT(
"Writing 0x%x to Sound Blaster card (data)\n",
Data);
53 DPRINT(
"Read 0x%x from Sound Blaster card (data)\n", *
Data);
69 DPRINT(
"Waiting for SB to acknowledge our reset request\n");
73 DPRINT(
"Didn't get an ACK :(\n");
87 DPRINT(
"Didn't get an ACK :(\n");
98 UCHAR MajorVer, MinorVer;
100 DPRINT(
"Querying DSP version\n");
112 DPRINT(
"Version %d.%d\n", MajorVer, MinorVer);
114 SBDevice->
dsp_version = (MajorVer * 256) + MinorVer;
118 else if ( ( SBDevice->
dsp_version & 0xFF00 ) == 0x0200 )
120 else if ( ( SBDevice->
dsp_version & 0xFF00 ) == 0x0300 )
148 DPRINT(
"Setting sample rate\n");
161 DPRINT(
"Enabling speaker\n");
170 DPRINT(
"Disabling speaker\n");
182 DPRINT(
"Initializing output with %d channels at %d bits/sample\n", Channels, BitDepth);
186 if ( ( Channels < 1 ) || ( Channels > 2 ) )
189 if ( ( BitDepth != 8 ) && ( BitDepth != 16 ) )
194 case 8 :
command = 0xc6;
break;
195 case 16 :
command = 0xb6;
break;
200 case 1 :
mode = 0x00;
break;
201 case 2 :
mode = 0x20;
break;
204 first_byte = (BitDepth == 16) ? 0xb6 : 0xc6;
205 second_byte = (Channels == 1) ? 0x20 : 0x00;
219 DPRINT(
"Finished programming the DSP\n");
#define SbWriteReset(sbdevice, data)
#define SbWrite(sbdevice, subport, data)
#define SbRead(sbdevice, subport)
#define SbReadDataWithoutWait(sbdevice)
#define WaitToRead(sbdevice)
#define WaitToWrite(sbdevice)