source: cmedia/trunk/Cmpci/Ioctl90/ioctl90.html@ 577

Last change on this file since 577 was 354, checked in by stevenhl, 18 years ago

Import untested baseline cmedia sources, work products and binaries
Binaries and work products should be deleted from repository.
once new builds are verified to work.

File size: 54.9 KB
Line 
1<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2<html>
3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta name="Author" content="Joe Nord">
6 <meta name="GENERATOR" content="Mozilla/4.7 [en] (WinNT; U) [Netscape]">
7 <title>Crystal Semiconductor Category 0x90 mixer IOCTLS</title>
8</head>
9<body>
10
11<center><b><u><font color="#3333FF"><font size=+2>Crystal Semiconductor</font></font></u></b>
12<br><b><u><font color="#3333FF"><font size=+2>OS/2 Category 0x90 mixer
13IOCTLs</font></font></u></b></center>
14
15<p>This information is for programmers only.
16<blockquote><b>For feedback, contact <a href="mailto: nord@crystal.cirrus.com">Joe
17Nord</a></b> at Crystal Semiconductor
18<br>Last document update 16-Dec-1999.</blockquote>
19<font color="#3333FF"><font size=+1>Purpose of Category 90 IOCTLs</font></font>
20<p>The category 90 mixer IOCTLs fill in gaps in the MMPM/2 mixer API.
21<p>In particular, these IOCTLs are defined to allow a user to control the
22listening level
23<br>of a CD-ROM or other source which is not controllable via the standard
24MMPM/2 API.
25<p>Users will note that the OS/2 shipped CD-Player application includes
26a volume slider.
27<br>This slider adjust the CD-ROM playback volume at the CD-ROM unit.
28<br>The analog signal from the CD-ROM player is provided to the system
29audio device via an analog cable.
30<br>Under MMPM/2, there is no means to adjust the volume of this signal
31at the audio device.
32<br>Master volume can be adjusted, but the relative volume of the CD input
33cannot be adjusted
34<br>with just the MMPM/2 API.
35<p>The category 90 mixer IOCTLs fill this gap.
36<p>The IOCTLs also support volume control for various other inputs to the
37audio device mixer and the
38<br>ability to override record gain and stream volume for execution of
39WinOS2 and other applications
40<br>that do not implement their own sliders for these controls.
41<p><font color="#3333FF"><font size=+1>STATUS (Drivers known to implement
42this API)</font></font>
43<ul>
44<li>
45Crystal Semiconductor ISA Mode 3 device driver, version 2.08</li>
46
47<ul>
48<li>
49CS4236B, CS4237B, CS4238B, CS4235, CS4239</li>
50</ul>
51
52<li>
53Crystal Semiconductor PCI device driver set, version 3.02</li>
54
55<ul>
56<li>
57CS4614, CS4624, CS4280</li>
58</ul>
59</ul>
60<font color="#3333FF"><font size=+1>Limitations and differences from Windows
61mixer definitions</font></font>
62<br>A programmer will note that this API does not address some of the common
63features of a mixer application.
64<br>Most notable missing function: Master Volume.
65<p>The IOCTL90 definition attempts to not redefine things that are already
66defined in MMPM/2 API.
67<br>Exceptions are made for record gain, record source and stream volume,
68but these exceptions are
69<br>kept to a minimum to avoid complicating the progamming of an audio
70device driver.
71<p>A developed mixer application is expected to use a combination of the
72standard MMPM/2 APIs
73<br>(via MCI commands) along with the the Category 0x90 IOCTLs defined
74in this file.
75<p><font color="#3333FF"><font size=+1>Master Volume</font></font>
76<br>MMPM/2 defines master volume and the operating system ships a master
77volume application.
78<br>The standard application works.
79<p>Since master volume is already handled by the MMPM/2 API, it is not
80re-invented in the category 90 IOCTLs.
81<br>Mixer application developers COULD issue appropriate MCI commands to
82adjust master volume
83<br>outside IOCTL90.&nbsp;&nbsp;&nbsp; They are encouraged to not implement
84master volume in the mixer application.
85<p>The OS/2 shipped "Volume Control" application is not very robust.
86<br>It provides no means for message callbacks.&nbsp; That is, there can
87be at-most ONE controller of
88<br>master volume in the system as any change of master volume by a secondary
89application cannot be reflected
90<br>on the GUI of the OS/2 standard volume control application.
91<p><font color="#3333FF"><font size=+1>Per-Stream Volume and Per-Stream
92Gain</font></font>
93<br>On OS/2, wave audio volume, record gain and record source are defined
94as per-stream concepts.
95<br>This is very different than Windows where application volume and gain
96are defined as system global.
97<p>Any set of these parameters outside the environment of the owning stream
98is defined to be un-done
99<br>when a stream is started.
100<p>Volume and gain are supposed to be different for each application under
101OS/2 and each application
102<br>is expected to implement sliders to support adjustment of its stream
103volume and gain (and most do).
104<p>Unfortunately, a sufficiently large number of applications do not.&nbsp;
105Usually, this is due to the application
106<br>being ported from Windows environment where the support of a global
107external mixer was assumed.
108<p>IOCTL90 allows the mixer application to override MMPM/2 per-stream volume
109and record gain.
110<p>This action is most useful for execution of Windows multimedia applications
111inside WinOS2.
112<br>By allowing the OS/2 native mixer to control these settings globally,
113the OS/2 mixer can effect record
114<br>gain, record source and playback volumes for WinOS2 applications.
115<p>This eliminates the need for a WinOS2 mixer application.
116<p>
117<hr WIDTH="100%"><font color="#3333FF"><font size=+1>Hardware mixer model</font></font>
118<br>The Category 0x90 mixer IOCTLs are modeled on the Intel AC97 Audio
119CODEC definition.
120<br>The AC97 audio CODEC is the mixer architecture which is normally used
121with PCI bus audio devices.
122<p>The same hardware architecture is used by numerous audio system venders,
123thus promoting the portability of the IOCTL90 mixer API.&nbsp; The AC97
124is also a "fairly simple" mixer device and can therefore be emulated on
125many other more full-function devices, again promoting portability of the
126API.
127<p>For details on the AC97 mixer architecture, consult this databook, <a href="ftp://ftp.cirrus.com/pub/pubs/4297.pdf">Crystal
128Clear(tm) SoundFusion(tm) Audio Codec '97 (CS4297)</a>
129<p>All Set/Get functions accept a single parameter (data block pointer)
130which has this definition:
131<blockquote><tt><font color="#3333FF">typedef struct</font></tt>
132<br><tt><font color="#3333FF">{</font></tt>
133<br><tt><font color="#3333FF">&nbsp;&nbsp; ULONG Mute;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
134// UnMute==0, Mute==1</font></tt>
135<br><tt><font color="#3333FF">&nbsp;&nbsp; ULONG VolumeL;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
136// 0..100 percent</font></tt>
137<br><tt><font color="#3333FF">&nbsp;&nbsp; ULONG VolumeR;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
138// 0..100 percent</font></tt>
139<br><tt><font color="#3333FF">} MIXSTRUCT, *PMIXSTRUCT;</font></tt></blockquote>
140The IOCTLs in the 0x40 and 0x60 range are nearly self explanatory.&nbsp;
141(Get/Set volume).
142<br>The 0x80 and 0x81 APIs were added after external review to improve
143evolution of the API.
144<p>The query APIs return the value most recently written, not a calculated
145value based on
146<br>the setting read from the hardware.&nbsp; This avoids granularity issues
147of the physical device
148<br>hardware (often only 32 possible settings) versus 101 possible volume
149settings in the API (0..100 percent).
150<p>
151<hr WIDTH="100%">
152<br><u><font size=+1>40 - MonoInSet</font></u>
153<br>Set volume of system Mono input.
154<p><font color="#009900">Introduced:</font> API Level 1
155<p>Parameters (PMIXSTRUCT).
156<br>&nbsp;
157<table BORDER COLS=2 WIDTH="52%" >
158<tr>
159<td>Mute</td>
160
161<td>0=>Audible, 1=>Mute</td>
162</tr>
163
164<tr>
165<td>Left</td>
166
167<td>Volume range 0..100</td>
168</tr>
169
170<tr>
171<td>Right</td>
172
173<td>Not used.&nbsp; Set = Left.</td>
174</tr>
175</table>
176
177<p><font color="#3333FF">Connection</font>:
178<br>In most add-in card systems, this input is not used.
179<br>In many motherboard installations, this input is used for PC Speaker
180(beeps and clicks).
181<br>It is also used on motherboard systems for the audible signal from
182internal modems.
183<p>The device driver takes the MONO volume from the "left" field of the
184passed structure.
185<br>Application should fill in "right" field of structure with same value
186set for left.
187<br>&nbsp;
188<p><u><font size=+1>41 - PhoneSet</font></u>
189<br>Set volume of system Phone input.
190<p><font color="#009900">Introduced:</font> API Level 1
191<p>Parameters (PMIXSTRUCT).
192<br>&nbsp;
193<table BORDER COLS=2 WIDTH="52%" >
194<tr>
195<td>Mute</td>
196
197<td>0=>Audible, 1=>Mute</td>
198</tr>
199
200<tr>
201<td>Left</td>
202
203<td>Left volume range 0..100</td>
204</tr>
205
206<tr>
207<td>Right</td>
208
209<td>Right volume range 0..100</td>
210</tr>
211</table>
212
213<p><font color="#3333FF">Connection</font>:
214<br>In most add-in card systems, this input is not used.
215<br>In many PCI audio motherboard installations, this input is used connection
216from internal modem.
217<br>&nbsp;
218<p><u><font size=+1>42 - MicSet</font></u>
219<br>Set volume of system microphone.
220<p><font color="#009900">Introduced:</font> API Level 1
221<p>Parameters (PMIXSTRUCT).
222<br>&nbsp;
223<table BORDER COLS=2 WIDTH="52%" >
224<tr>
225<td>Mute</td>
226
227<td>0=>Audible, 1=>Mute</td>
228</tr>
229
230<tr>
231<td>Left</td>
232
233<td>Left volume range 0..100</td>
234</tr>
235
236<tr>
237<td>Right</td>
238
239<td>Right volume range 0..100</td>
240</tr>
241</table>
242
243<p><font color="#3333FF">Connection</font>:
244<br>This IOCTL sets the listening level of the system microphone.&nbsp;
245System microphone is normally muted.
246<br>It can be un-muted to enable karoke mode.
247<p>Note: This IOCTL does not effect the record level for microphone.
248<br>&nbsp;
249<p><u><font size=+1>43 - LineSet</font></u>
250<br>Set volume of system Line-In connection
251<p><font color="#009900">Introduced:</font> API Level 1
252<p>Parameters (PMIXSTRUCT).
253<br>&nbsp;
254<table BORDER COLS=2 WIDTH="52%" >
255<tr>
256<td>Mute</td>
257
258<td>0=>Audible, 1=>Mute</td>
259</tr>
260
261<tr>
262<td>Left</td>
263
264<td>Left volume range 0..100</td>
265</tr>
266
267<tr>
268<td>Right</td>
269
270<td>Right volume range 0..100</td>
271</tr>
272</table>
273
274<p><font color="#3333FF">Connection</font>:
275<br>Line-In is normally an input on the system sound card - accessible
276on the back of the computer system.
277<br>&nbsp;
278<p><u><font size=+1>44 - CDSet</font></u>
279<br>Sets the listening level of the CD-ROM analog signal input to the audio
280device.
281<p><font color="#009900">Introduced:</font> API Level 1
282<p>Parameters (PMIXSTRUCT).
283<br>&nbsp;
284<table BORDER COLS=2 WIDTH="53%" >
285<tr>
286<td>Mute</td>
287
288<td>0=>Audible, 1=>Mute</td>
289</tr>
290
291<tr>
292<td>Left</td>
293
294<td>Left volume range 0..100</td>
295</tr>
296
297<tr>
298<td>Right</td>
299
300<td>Right volume range 0..100</td>
301</tr>
302</table>
303
304<p><font color="#3333FF">Connection</font>:
305<br>CD-ROM input to sound card volume is controlled with this API.
306<p>This input is normally connected to the sound card via connector inside
307the PC system unit.&nbsp; The signal controlled with this API is that which
308arrives on the analog cable from the CD-ROM drive.
309<p><i>Note:</i>
310<br>If CD-DA digital streaming is being used, the sound card views the
311CD data as normal wave-audio.&nbsp;&nbsp; That is, this API will not effect
312CD-ROM lisenting level if CD-DA digital streaming is being used (CD player
313application choice).
314<br>&nbsp;
315<p><u><font size=+1>45 - VideoSet</font></u>
316<br>Sets the listening level of the sound card "video" input.
317<p><font color="#009900">Introduced:</font> API Level 1
318<p>Parameters (PMIXSTRUCT).
319<br>&nbsp;
320<table BORDER COLS=2 WIDTH="52%" >
321<tr>
322<td>Mute</td>
323
324<td>0=>Audible, 1=>Mute</td>
325</tr>
326
327<tr>
328<td>Left</td>
329
330<td>Left volume range 0..100</td>
331</tr>
332
333<tr>
334<td>Right</td>
335
336<td>Right volume range 0..100</td>
337</tr>
338</table>
339
340<p><font color="#3333FF">Connection</font>:
341<br>On equiped systems, effects the lisenting level of movie playback.
342<br>Most systems do not used this mixer input.
343<br>&nbsp;
344<p><u><font size=+1>46 - AuxSet</font></u>
345<br>Sets the listening level of the sound card "aux" input.
346<p><font color="#009900">Introduced:</font> API Level 1
347<p>Parameters (PMIXSTRUCT).
348<br>&nbsp;
349<table BORDER COLS=2 WIDTH="52%" >
350<tr>
351<td>Mute</td>
352
353<td>0=>Audible, 1=>Mute</td>
354</tr>
355
356<tr>
357<td>Left</td>
358
359<td>Left volume range 0..100</td>
360</tr>
361
362<tr>
363<td>Right</td>
364
365<td>Right volume range 0..100</td>
366</tr>
367</table>
368
369<p><font color="#3333FF">Connection</font>:
370<br>On equiped systems, effects the lisenting level of aux input.
371<br>AC97 systems include an Aux connection that may or may not actually
372be populated on system.
373<br>Most ISA devices do not include an Aux connector.
374<br>&nbsp;
375<p><u><font size=+1>4B - BassTrebleSet</font></u>
376<br>Change Bass and Treble settings
377<p><font color="#009900">Introduced:</font> API Level 1
378<p>Parameters (PMIXSTRUCT).
379<br>&nbsp;
380<table BORDER COLS=2 WIDTH="52%" >
381<tr>
382<td>Mute (flags)</td>
383
384<td>not used, set to 0</td>
385</tr>
386
387<tr>
388<td>Left (Bass)</td>
389
390<td>0..100</td>
391</tr>
392
393<tr>
394<td>Right (Treble)</td>
395
396<td>0..100</td>
397</tr>
398</table>
399
400<p><font color="#3333FF">Connection</font>:
401<br>Bass and Treble are not part of the AC97 mixer definition.
402<p>They are implemented on some audio devices as a post processing algorithm
403<br>applied to the output of audio device.&nbsp; Bass and Treble effect
404the sound level
405<br>of low frequency and high frequency sounds independent of volume.
406<p>A device driver can indicate support for Bass only, Treble only or both
407via
408<br>the BassTrebleQuery API.
409<p>Device drivers&nbsp; default both bass and treble to 50%.
410<br>A setting of 50% means no effect to the audio signal.
411<br>&nbsp;
412<p><u><font size=+1>4C - ThreeDSet</font></u>
413<br>Enables or disables 3D sound effect.&nbsp; Popular algorithms include
414SRS and QSOUND.
415<p><font color="#009900">Introduced:</font> API Level 1
416<p>Parameters (PMIXSTRUCT).
417<br>&nbsp;
418<table BORDER COLS=2 WIDTH="52%" >
419<tr>
420<td>Mute (enable)</td>
421
422<td>0x01=No 3D (Muted)
423<br>0x00=Enabled&nbsp;</td>
424</tr>
425
426<tr>
427<td>Left (Space)</td>
428
429<td>0..100</td>
430</tr>
431
432<tr>
433<td>Right (Center)</td>
434
435<td>0..100</td>
436</tr>
437</table>
438
439<p><font color="#3333FF">Connection</font>:
440<br>3D is a post processing algorithm applied to the output of audio device
441to
442<br>artificially make the speakers sound like they are further apart.
443<p>A device driver can indicate support for Space and Center via the ThreeDQuery
444API.
445<p>Enable flags:
446<br>Application should set only bit D0.&nbsp; Other bits should be zero.
447<br>Device driver should reference only bit D0.&nbsp; Other bits are don't
448care.
449<br>&nbsp;
450<p><u><font size=+1>4D - StreamVolSet</font></u>
451<br>Sets the stream playback volume globally - disabling MMPM/2 per-stream
452volume.
453<br>Notice that this API is redundent to and overrides the MMPM/2 defined
454concept of per-stream volume.
455<p>This API is implemented as counterpart to function 4F RecordGainSet.
456<p><font color="#009900">Introduced:</font> API Level 2
457<p>All device drivers implementing this IOCTL are expected to return API
458level 2 or
459<br>beyond on API level query IOCTL.
460<p>Parameters (PMIXSTRUCT).
461<br>&nbsp;
462<table BORDER COLS=2 WIDTH="52%" >
463<tr>
464<td>Mute (Flags)</td>
465
466<td>0x0001=>Mute 0x0002=>Release</td>
467</tr>
468
469<tr>
470<td>Left</td>
471
472<td>Left volume range 0..100</td>
473</tr>
474
475<tr>
476<td>Right</td>
477
478<td>Right volume range 0..100</td>
479</tr>
480</table>
481
482<p><font color="#3333FF">Connection</font>:
483<br>Overrides MMPM/2 per-stream volume.
484<br>Note, this API does not effect system master volume.
485<br>&nbsp;
486<p><u><font size=+1>4E - RecordSrcSet</font></u>
487<br>Overrides MMPM/2 defined per-stream record source.
488<p>Provided record source will be used as global record source.
489<br>Call with "release" bit set in flags to return control to MMPM/2.
490<p><font color="#009900">Introduced:</font> API Level 2
491<p>Parameters (PMIXSTRUCT).
492<br>&nbsp;
493<table BORDER COLS=2 WIDTH="52%" >
494<tr>
495<td>Mute (Flags)</td>
496
497<td>0x0002=>Release</td>
498</tr>
499
500<tr>
501<td>Left</td>
502
503<td>Record Source</td>
504</tr>
505
506<tr>
507<td>Right</td>
508
509<td>Not used, set to 0</td>
510</tr>
511</table>
512
513<p><font color="#3333FF">Record Source Definition</font>
514<table BORDER COLS=2 WIDTH="75%" >
515<tr>
516<td>0x00000000..0x0000000F</td>
517
518<td>Reserved</td>
519</tr>
520
521<tr>
522<td>0x00000010</td>
523
524<td>Mic</td>
525</tr>
526
527<tr>
528<td>0x00000020</td>
529
530<td>CD-ROM</td>
531</tr>
532
533<tr>
534<td>0x00000040</td>
535
536<td>Video</td>
537</tr>
538
539<tr>
540<td>0x00000080</td>
541
542<td>Aux</td>
543</tr>
544
545<tr>
546<td>0x00000100</td>
547
548<td>Line</td>
549</tr>
550
551<tr>
552<td>0x00000200</td>
553
554<td>Reserved</td>
555</tr>
556
557<tr>
558<td>0x00000400</td>
559
560<td>Reserved</td>
561</tr>
562
563<tr>
564<td>0x00000800</td>
565
566<td>Phone</td>
567</tr>
568</table>
569
570<p>On query, device driver indicates whether or not it supports input mixer.
571<p>If input mux, mixer application can set only one source as input.
572<br>If input mixer, mixer application can OR on appropriate bits.
573<p>Application should use results of function 81 (function support map)
574to know
575<br>which inputs the device supports.
576<p><font color="#3333FF">Device Specific Notes</font>:
577<br>On the Crystal Semiconductor ISA Mode 3 device driver, (CS4236B/7B/8B,
578CS4235, CS4239):
579<br>MONO-IN is a playback source and its volume can be adjusted via function
5800x40.
581<br>MONO-IN however is not a possible record source.&nbsp;&nbsp;&nbsp;
582The device driver treats a request to
583<br>record from MONO-IN as a request to record from NULL device (no sound).
584<p><u><font size=+1>4F - RecordGainSet</font></u>
585<br>Sets the record gain globally - disabling MMPM/2 per-stream record
586gain.
587<br>Notice that this API is redundent to and overrides the MMPM/2 defined
588concept of per-stream record gain.
589<p>It can be argued that this API should only effect record gain for WinOS2.
590<br>MMPM/2 already defines record gain as a concept for OS/2 applications.
591<p>The API exists for two primary reasons
592<ul>
593<li>
594Help poorly written OS/2 native applications perform record function -
595adjust their record gain.</li>
596
597<li>
598WinOS2 support - mixer control for record gain as a global concept as defined
599in Windows.</li>
600</ul>
601This API changes definition of record gain from a MMPM/2 per-stream concept
602to a
603<br>mixer application global concept.&nbsp; Once this IOCTL is sent, record
604gain is global.
605<br>The gain sent from the mixer application overrules the per-stream gain
606sent from MMPM/2.
607<p>API Level 2 includes the ability for the mixer application to return
608control of
609<br>gain to traditional MMPM/2 per-stream definition.
610<p><font color="#009900">Introduced:</font> API Level 1, Current implementation
611requires API level 2 (for release)
612<p>Parameters (PMIXSTRUCT).
613<br>&nbsp;
614<table BORDER COLS=2 WIDTH="52%" >
615<tr>
616<td>Mute (Flags)</td>
617
618<td>0x0001=>Mute 0x0002=>Release</td>
619</tr>
620
621<tr>
622<td>Left</td>
623
624<td>Left volume range 0..100</td>
625</tr>
626
627<tr>
628<td>Right</td>
629
630<td>Not used, set to 0</td>
631</tr>
632</table>
633
634<p><font color="#3333FF">Connection</font>:
635<br>Sets the record gain setting just before the Analog/Digital converter
636inside the AC97 mixer.
637<br>This API effects what you "record", not what you "hear".
638<p><font color="#3333FF">Notes</font>:
639<br>Crystal Semiconductor drivers 2.08 (ISA) and 3.03 (PCI) implement this
640API, but implement
641<br>it only with global effect (API level 1).
642<p>Crystal Semiconductor driver 2.09 (ISA) implements this API at API level
6432.
644<br>That is, the "release" bit is defined and recognized by the device
645driver.
646<p>In API level 2, the mixer definition was enhanced to allow the mixer
647to return record gain to be a per-stream concept.
648<br>That is, to cancel the override and again place record gain into the
649control of MMPM/2.
650<p>
651<hr WIDTH="100%">
652<br><u><font size=+1>60 - MonoInQuery</font></u>
653<br>Query volume of system Mono input.
654<p><font color="#009900">Introduced:</font> API Level 1
655<p>Parameters (PMIXSTRUCT).
656<br>&nbsp;
657<table BORDER COLS=2 WIDTH="50%" >
658<tr>
659<td>Mute</td>
660
661<td>0=>Audible, 1=>Mute</td>
662</tr>
663
664<tr>
665<td>Left</td>
666
667<td>Volume range 0..100</td>
668</tr>
669
670<tr>
671<td>Right</td>
672
673<td>Not used, PDD will set to 0&nbsp;</td>
674</tr>
675</table>
676
677<p><font color="#3333FF">Connection</font>:
678<br>In most add-in card systems, this input is not used.
679<br>In many motherboard installations, this input is used for PC Speaker
680(beeps and clicks).
681<br>It is also used on motherboard systems for the audible signal from
682internal modems.
683<p>The device driver sets the left field to value for mono volume.
684<br>&nbsp;
685<p><u><font size=+1>61 - PhoneQuery</font></u>
686<br>Query volume of system Phone input.
687<p><font color="#009900">Introduced:</font> API Level 1
688<p>Parameters (PMIXSTRUCT).
689<br>&nbsp;
690<table BORDER COLS=2 WIDTH="52%" >
691<tr>
692<td>Mute</td>
693
694<td>0=>Audible, 1=>Mute</td>
695</tr>
696
697<tr>
698<td>Left</td>
699
700<td>Left volume range 0..100</td>
701</tr>
702
703<tr>
704<td>Right</td>
705
706<td>Right volume range 0..100</td>
707</tr>
708</table>
709
710<p><font color="#3333FF">Connection</font>:
711<br>In most add-in card systems, this input is not used.
712<br>In many motherboard installations, this input is used connection from
713internal modem.
714<br>&nbsp;
715<p><u><font size=+1>62 - MicQuery</font></u>
716<br>Query volume of system microphone.
717<p><font color="#009900">Introduced:</font> API Level 1
718<p>Parameters (PMIXSTRUCT).
719<br>&nbsp;
720<table BORDER COLS=2 WIDTH="53%" >
721<tr>
722<td>Mute</td>
723
724<td>0=>Audible, 1=>Mute</td>
725</tr>
726
727<tr>
728<td>Left</td>
729
730<td>Left volume range 0..100</td>
731</tr>
732
733<tr>
734<td>Right</td>
735
736<td>Right volume range 0..100</td>
737</tr>
738</table>
739
740<p><font color="#3333FF">Connection</font>:
741<br>This IOCTL sets the listening level of the system microphone.&nbsp;
742System microphone is normally muted.
743<br>It can be un-muted to enable karoke mode.
744<p>Note: This IOCTL does not effect the record level for microphone.
745<br>&nbsp;
746<p><u><font size=+1>63 - LineQuery</font></u>
747<br>Query volume of system Line-In connection
748<p><font color="#009900">Introduced:</font> API Level 1
749<p>Parameters (PMIXSTRUCT).
750<br>&nbsp;
751<table BORDER COLS=2 WIDTH="52%" >
752<tr>
753<td>Mute</td>
754
755<td>0=>Audible, 1=>Mute</td>
756</tr>
757
758<tr>
759<td>Left</td>
760
761<td>Left volume range 0..100</td>
762</tr>
763
764<tr>
765<td>Right</td>
766
767<td>Right volume range 0..100</td>
768</tr>
769</table>
770
771<p><font color="#3333FF">Connection</font>:
772<br>Line-In is normally an input on the system sound card - on the back
773of the PC system unit.
774<br>&nbsp;
775<p><u><font size=+1>64 - CDQuery</font></u>
776<br>Query the listening level of the CD-ROM analog signal input to the
777audio device.
778<p><font color="#009900">Introduced:</font> API Level 1
779<p>Parameters (PMIXSTRUCT).
780<br>&nbsp;
781<table BORDER COLS=2 WIDTH="53%" >
782<tr>
783<td>Mute</td>
784
785<td>0=>Audible, 1=>Mute</td>
786</tr>
787
788<tr>
789<td>Left</td>
790
791<td>Left volume range 0..100</td>
792</tr>
793
794<tr>
795<td>Right</td>
796
797<td>Right volume range 0..100</td>
798</tr>
799</table>
800
801<p><font color="#3333FF">Connection</font>:
802<br>CD-ROM input to sound card volume is controlled with this API.
803<p>If CD-DA digital streaming is being used, the sound card views the CD
804data as wave-out.&nbsp;&nbsp; That is, this API will not effect CD-ROM
805lisenting level if CD-DA digital streaming is being used (CD player application
806choice).
807<br>&nbsp;
808<p><u><font size=+1>65 - VideoQuery</font></u>
809<br>Query the listening level of the sound card "video" input.
810<p><font color="#009900">Introduced:</font> API Level 1
811<p>Parameters (PMIXSTRUCT).
812<br>&nbsp;
813<table BORDER COLS=2 WIDTH="53%" >
814<tr>
815<td>Mute</td>
816
817<td>0=>Audible, 1=>Mute</td>
818</tr>
819
820<tr>
821<td>Left</td>
822
823<td>Left volume range 0..100</td>
824</tr>
825
826<tr>
827<td>Right</td>
828
829<td>Right volume range 0..100</td>
830</tr>
831</table>
832
833<p><font color="#3333FF">Connection</font>:
834<br>On equiped systems, effects the lisenting level of movie playback.
835<br>Most systems do not used this mixer input.
836<br>&nbsp;
837<p><u><font size=+1>66 - AuxQuery</font></u>
838<br>Queries the listening level of the sound card "aux" input.
839<p><font color="#009900">Introduced:</font> API Level 1
840<p>Parameters (PMIXSTRUCT).
841<br>&nbsp;
842<table BORDER COLS=2 WIDTH="52%" >
843<tr>
844<td>Mute</td>
845
846<td>0=>Audible, 1=>Mute</td>
847</tr>
848
849<tr>
850<td>Left</td>
851
852<td>Left volume range 0..100</td>
853</tr>
854
855<tr>
856<td>Right</td>
857
858<td>Right volume range 0..100</td>
859</tr>
860</table>
861
862<p><font color="#3333FF">Connection</font>:
863<br>On equiped systems, effects the lisenting level of aux input.
864<br>AC97 systems include an Aux connection that may or may not actually
865be populated on system.
866<br>Most ISA devices do not include an Aux connector.
867<p><u><font size=+1>6C - ThreeDQuery</font></u>
868<br>Queries 3D sound effect.&nbsp; Popular algorithms include SRS and QSOUND.
869<p><font color="#009900">Introduced:</font> API Level 1
870<p>Parameters (PMIXSTRUCT).
871<br>&nbsp;
872<table BORDER COLS=2 WIDTH="67%" >
873<tr>
874<td>Mute (flags)</td>
875
876<td>D0 = 1 3D Is off (muted)
877<br>D0 = 0 3D Enabled&nbsp;
878<br>D1 = Space is supported
879<br>D2 = Center is supported</td>
880</tr>
881
882<tr>
883<td>Left (Space)</td>
884
885<td>0..100</td>
886</tr>
887
888<tr>
889<td>Right (Center)</td>
890
891<td>0..100</td>
892</tr>
893</table>
894
895<p>A device driver implementing support for 3D sound effect may or may
896not
897<br>support Space and Center.&nbsp; Both are independently programmable
898items.
899<br>The device driver will turn on the 0x02 and 0x04 bits to indicate which
900<br>of the slider options can be implemented in mixer application.
901<p>The 0x01 bit indicates the current state of 3D effect.&nbsp; If bit
902is on, 3D is enabled.
903<p><u><font size=+1>6B - BassTrebleQuery</font></u>
904<br>Query Bass and Treble settings
905<p><font color="#009900">Introduced:</font> API Level 1
906<p>Parameters (PMIXSTRUCT).
907<br>&nbsp;
908<table BORDER COLS=2 WIDTH="52%" >
909<tr>
910<td>Mute (flags)</td>
911
912<td>0x0001 - Bass is supported
913<br>0x0002 - Treble supported</td>
914</tr>
915
916<tr>
917<td>Left (Bass)</td>
918
919<td>0..100</td>
920</tr>
921
922<tr>
923<td>Right (Treble)</td>
924
925<td>0..100</td>
926</tr>
927</table>
928
929<p><font color="#3333FF">Connection</font>:
930<br>See the BassTrebleSet API for description for details on Bass and Treble.
931<p>Device driver returns current setting for Bass and Treble and bit flags
932<br>indicating which Bass/Treble adjustements are supported by the device.
933<p>If either Bass or Treble is not supported, the matching bit in the flags
934<br>will be off and the Left/Right field of the returned parm will be 0.
935<p>A device driver implementing this Ioctl must support at least
936<br>one of the adjustable settings (Bass/Treble).
937<p><u><font size=+1>6D - StreamVolQuery</font></u>
938<br>Query the global stream volume.
939<p>See function 4D (StreamVolSet) for a detailed description of this APIs
940behavior.
941<p><font color="#009900">Introduced:</font> API Level 2
942<p>Parameters (PMIXSTRUCT).
943<br>&nbsp;
944<table BORDER COLS=2 WIDTH="52%" >
945<tr>
946<td>Mute (flags)</td>
947
948<td>0x0001=>Mute&nbsp; 0x0002=>Release</td>
949</tr>
950
951<tr>
952<td>Left</td>
953
954<td>Left volume range 0..100</td>
955</tr>
956
957<tr>
958<td>Right</td>
959
960<td>Right volume range 0..100</td>
961</tr>
962</table>
963
964<p><u>API Level 2:</u>
965<br>The Mute field is a bit mask (flags).
966<br>Bit 0x00000001 -&nbsp; If true, then stream volume is muted.
967<br>Bit 0x00000002 -&nbsp; If true, then stream volume is "released" to
968MMPM/2 control.
969<p><font color="#3333FF">Notes</font>:
970<br>The values returned are dependent on who controls the record gain.
971<br>If under MMPM/2 control (mixer has released), then the mute and volume
972<br>levels returned reflect the most recent value programmed from MMPM/2.
973<p>If mixer application is controlling the setting, then the values returned
974<br>for mute and volume are the most recent values sent via function 4F.
975<br>Note, the values returned may reflect the values sent from a different
976<br>mixer application (multiple mixer clients).
977<p><u><font size=+1>6E - RecordSrcQuery</font></u>
978<br>Query global record source.
979<p><font color="#009900">Introduced:</font> API Level 2
980<p>Parameters (PMIXSTRUCT).
981<br>&nbsp;
982<table BORDER COLS=2 WIDTH="52%" >
983<tr>
984<td>Mute (Flags)</td>
985
986<td>0x0001=>Reserved
987<br>0x0002=>Release
988<br>0x0004=>Input mixer</td>
989</tr>
990
991<tr>
992<td>Left</td>
993
994<td>Record Source</td>
995</tr>
996
997<tr>
998<td>Right</td>
999
1000<td>Not used, set to 0</td>
1001</tr>
1002</table>
1003
1004<p><font color="#3333FF">See function 4E for definition of record sources.</font>
1005<p>The record source value returned is dependent on who controls the record
1006source.
1007<p>Bit D1 will be set in the flags field to let the mixer application know
1008<br>if record source definition is global (0) or MMPM/2 per-stream (1).
1009<p>Bit D2 will be set in the flags field to indicate that the device supports
1010an
1011<br>input mixer rather than the AC97 standard input mux.
1012<p>If under MMPM/2 control (mixer has released), then
1013<br>1) The record source is a per-stream concept.
1014<br>2) The record source returned represents the record source most recently
1015<br>&nbsp;&nbsp;&nbsp; set by MMPM/2.&nbsp; This allows the mixer application
1016to initialize its record
1017<br>&nbsp;&nbsp;&nbsp; source to the record source most recently programmed
1018by MMPM/2.
1019<p>If mixer application controls record source, then
1020<br>1) Record source is a global concept
1021<br>2) Record source may actually be multiple sources (if input mixer)
1022<br>3) Record source returned represents the record source most recently
1023<br>&nbsp;&nbsp;&nbsp; sent via function 4F.
1024<p>Note, the value returned may reflect the value sent from a different
1025<br>mixer application (multiple mixer clients).
1026<br>&nbsp;
1027<p><u><font size=+1>6F - RecordGainQuery</font></u>
1028<br>Query the global record gain level.
1029<p>See function 4F (RecordGainSet) for a detailed description of this APIs
1030behavior.
1031<p><font color="#009900">Introduced:</font> API Level 1.&nbsp; Enhanced
1032in API Level 2.
1033<p><u>In API Level 1</u>
1034<br>If the device driver has never received API call 4F, this IOCTL will
1035return
1036<br>the gain level most recently sent by MMPM/2 for per-stream volume.
1037<br>This technique can be useful to initialize the value of the record
1038gain slider to
1039<br>the volume that is presently in effect per definition from MMPM/2.
1040<p>Once function 4F has been sent, this API returns the record gain level
1041most recently set via function 4F.
1042<p><u>In API Level 2</u>
1043<br>The values returned are dependent on who controls the record gain.
1044<br>If under MMPM/2 control (mixer has released), then the mute and volume
1045<br>levels returned reflect the most recent value programmed from MMPM/2.
1046<p>If mixer application is controlling the setting, then the values returned
1047<br>for mute and volume are the most recent values sent via function 4F.
1048<br>Note, the values returned may reflect the values sent from a different
1049<br>mixer application (multiple mixer clients).
1050<p>Parameters (PMIXSTRUCT).
1051<br>&nbsp;
1052<table BORDER COLS=2 WIDTH="52%" >
1053<tr>
1054<td>Mute (flags)</td>
1055
1056<td>0x0001=>Mute&nbsp; 0x0002=>Release</td>
1057</tr>
1058
1059<tr>
1060<td>Left</td>
1061
1062<td>Left volume range 0..100</td>
1063</tr>
1064
1065<tr>
1066<td>Right</td>
1067
1068<td>Not used, PDD will set to 0</td>
1069</tr>
1070</table>
1071
1072<p><font color="#3333FF">Connection</font>:
1073<br>Reads the record gain setting just before the Analog/Digital converter
1074inside the AC97 mixer.
1075<br>This API effects what you "record", not what you "hear".
1076<p><u>In API Level 1:</u>
1077<br>The Mute field is a boolean.&nbsp; If true, then record gain is muted.
1078<p><u>In API Level 2:</u>
1079<br>The Mute field is a bit mask (flags).
1080<br>Bit 0x00000001 -&nbsp; If true, then record gain is muted.
1081<br>Bit 0x00000002 -&nbsp; If true, then record gain is "released" to MMPM/2
1082control.
1083<p><u><font size=+1>80 - ApiLevelQuery</font></u>
1084<br>In first release, this function returns a ULONG, 0x00000001.
1085<br>As significant changes are made to the Category 90 mixer API, the return
1086value
1087<br>of this function will be incremented.
1088<p>In current specification, audio device drivers should return 2.
1089<p><font color="#009900">Introduced:</font> API Level 1
1090<p>Parameters (PULONG).
1091<br>&nbsp;
1092<table BORDER COLS=2 WIDTH="52%" >
1093<tr>
1094<td>ulAPILevel</td>
1095
1096<td>Driver returns level supported</td>
1097</tr>
1098</table>
1099
1100<p>API Level Functions Map - Where label omitted, API level is 1
1101<table BORDER COLS=2 WIDTH="69%" >
1102<tr>
1103<td>40 - MonoInSet</td>
1104
1105<td>60 - MonoInQuery</td>
1106</tr>
1107
1108<tr>
1109<td>41 - PhoneSet</td>
1110
1111<td>61 - PhoneQuery</td>
1112</tr>
1113
1114<tr>
1115<td>42 - MicSet</td>
1116
1117<td>62 - MicQuery</td>
1118</tr>
1119
1120<tr>
1121<td>43 - LineSet</td>
1122
1123<td>63 - LineQuery</td>
1124</tr>
1125
1126<tr>
1127<td>44 - CDSet</td>
1128
1129<td>64 - CDQuery</td>
1130</tr>
1131
1132<tr>
1133<td>45 - VideoSet</td>
1134
1135<td>65 - VideoQuery</td>
1136</tr>
1137
1138<tr>
1139<td>46 - AuxSet</td>
1140
1141<td>66 - AuxQuery</td>
1142</tr>
1143
1144<tr>
1145<td>4B - BassTrebleSet</td>
1146
1147<td>6B - BassTrebleQuery</td>
1148</tr>
1149
1150<tr>
1151<td>4C - ThreeDSet</td>
1152
1153<td>6C - ThreeDQuery</td>
1154</tr>
1155
1156<tr>
1157<td>4D - StreamVolSet (2)</td>
1158
1159<td>6D - StreamVolQuery (2)</td>
1160</tr>
1161
1162<tr>
1163<td>4E - RecordSrcSet (2)</td>
1164
1165<td>6E - RecordSrcQuery (2)</td>
1166</tr>
1167
1168<tr>
1169<td>4F - RecordGainSet (1,2)</td>
1170
1171<td>4F - RecordGainQuery (1,2)</td>
1172</tr>
1173
1174<tr>
1175<td>80 - ApiLevelQuery</td>
1176
1177<td></td>
1178</tr>
1179
1180<tr>
1181<td>81 - GetApiMap</td>
1182
1183<td></td>
1184</tr>
1185
1186<tr>
1187<td>82 - CallbackReg</td>
1188
1189<td></td>
1190</tr>
1191
1192<tr>
1193<td>83 - MsgBuf</td>
1194
1195<td></td>
1196</tr>
1197</table>
1198
1199<p>Differences from original API definition result in increment of the
1200API level.
1201<p>The table above uses this convention.
1202<br>With no notation, API level 1 is assumed.&nbsp; API level 1 means that
1203if the API is
1204<br>listed in the API support map, it is implemented by the device driver.
1205<p>New API level 1 IOCTLs can be added even after later API levels are
1206defined.
1207<p>The API level is used to describe differences in definition of an IOCTL.
1208<br>These differences are noted in the table and are documented below and
1209<br>in the documentation for each IOCTL.
1210<p><b>(1,2)</b>
1211<br>The RecordGainSet API differs in behavior on API levels 1 and 2.
1212<br>In API level 1, once the mixer application forces an override of record
1213<br>gain, control of record gain is forever in the domain of the mixer
1214application.
1215<br>This is enhanced in API level 2 where the mixer application can return
1216<br>record gain to be a per-stream concept as defined by MMPM/2.
1217<p><b>(2)</b>
1218<br>A device driver implementing StreamVolSet API is expected to return
1219<br>API level 2 or greater.&nbsp; This API follows programming convention
1220of
1221<br>the level 2 implementation of RecordGainSet.
1222<p><u><font size=+1>81 - GetApiMap</font></u>
1223<br>Device driver fills in an application memory buffer (256 bytes) with
1224BYTE size booleans representing which of the possible 256 IOCTL functions
1225that the device driver implements.
1226<p><font color="#009900">Introduced:</font> API Level 1
1227<p>This API can be used to identify mixer components that do not apply
1228for the particular hardware.
1229<p>For example, the Crystal Semiconductor PCI driver set implements the
1230full AC97 defined mixer interface.
1231<br>The Crystal Semiconductor ISA driver however does not implement "Video"
1232or "Phone" volume as
1233<br>these are concepts which are alien to the ISA hardware.
1234<p>Notice that the buffer returned is 256 bytes while it is only possible
1235for an application to send 192 IOCTL functions (IOCTL API requires that
1236function be >= 0x40).&nbsp;&nbsp;&nbsp; Wasting these 64 bytes of memory
1237allows the application to index the array using the IOCTL number rather
1238than IOCTO function number less 0x40.
1239<p><u><font size=+1>82 - CallbackReg</font></u>
1240<br>Application provides handle to shared event semaphore.
1241<p><font color="#009900">Introduced:</font> API Level 1
1242<p>Parameters (HEV).
1243<p>Application provides event semaphore handle to audio device driver.
1244<p>This API is designed to let multiple mixer applications execute concurrently
1245with sliders that "track".
1246<br>Application is responsible for creating the event semahore.
1247<p>When a mixer component state changes, the device driver posts the event
1248semaphore which
1249<br>wakes up an application thread that is blocked on the semaphore.&nbsp;
1250The application should
1251<br>then issue query APIs to read the current state of the mixer.
1252<p>This API is implemented in Crystal Semiconductor PCI driver set 3.04
1253and ISA 2.09.
1254<p>Example code
1255<br><tt><font color="#009900">&nbsp; HEV hevCallback;</font></tt>
1256<br><tt><font color="#009900">&nbsp; ulRC = DosCreateEventSem (NULL, &amp;hevCallback,
1257DC_SEM_SHARED, FALSE);</font></tt>
1258<br><tt><font color="#009900">&nbsp; if (ulRC != 0)</font></tt>
1259<br><tt><font color="#009900">&nbsp; {</font></tt>
1260<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp; printf ("mixerapiInit
1261- CreateSem failed\n");</font></tt>
1262<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp; hevCallback = NULL;</font></tt>
1263<br><tt><font color="#009900">&nbsp; }</font></tt>
1264<br><tt><font color="#009900">&nbsp; else</font></tt>
1265<br><tt><font color="#009900">&nbsp; {</font></tt>
1266<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp; fCallbackThreadAlive
1267= TRUE;</font></tt>
1268<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp; if (_beginthread
1269(CallbackThreadFunc, NULL, 32*1024, NULL) == -1)</font></tt>
1270<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp; {</font></tt>
1271<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1272printf ("mixerapiInit - callback thread create failed\n");</font></tt>
1273<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1274CallbackFunc = NULL;</font></tt>
1275<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1276fCallbackThreadAlive = FALSE;</font></tt>
1277<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1278ulRC = 1;</font></tt>
1279<br><tt><font color="#009900">&nbsp;&nbsp;&nbsp;&nbsp; }</font></tt>
1280<br><tt><font color="#009900">&nbsp; }</font></tt>
1281<br><tt><font color="#009900">&nbsp; ulRC = mixerapiIOCTL90 (CALLBACKREG,
1282&amp;hevCallback, sizeof(hevCallback));</font></tt>
1283<p>When the mixer application terminates or otherwise closes the semaphore,
1284it should
1285<br>contact the audio PDD to de-register.&nbsp; De-register is done by
1286registering a NULL semaphore.
1287<p>Example code
1288<br><tt><font color="#009900">&nbsp; ulZero = 0;</font></tt>
1289<br><tt><font color="#009900">&nbsp; ulRC = mixerapiIOCTL90 (CALLBACKREG,
1290&amp;ulZero, sizeof(ulZero));</font></tt>
1291<br><tt><font color="#009900">&nbsp; ulRC = DosCloseEventSem (hsemCallback);</font></tt>
1292<br><tt><font color="#009900">&nbsp; hsemCallback = NULL;</font></tt>
1293<p><u><font size=+1>83 - MsgBuf</font></u>
1294<br>Device driver fills in an application memory buffer with characters
1295displayed during boot
1296<br>and any strings displayed by device driver for debug or problem diagnosis
1297in the field.
1298<p><font color="#009900">Introduced:</font> API Level 1
1299<p>Parameters (PMSGBUF).
1300<p><tt>typedef struct</tt>
1301<br><tt>{</tt>
1302<br><tt>&nbsp;&nbsp; ULONG pBuffer;&nbsp;&nbsp;&nbsp;&nbsp; // Application
1303linear address to message buffer (in)</tt>
1304<br><tt>&nbsp;&nbsp; ULONG ulSize;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Size
1305of buffer (in).&nbsp; Count of chars (out).</tt>
1306<br><tt>&nbsp;&nbsp; ULONG fClear;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // PDD
1307should clear buffer after copy (in)</tt>
1308<br><tt>&nbsp;&nbsp; ULONG fError;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Message
1309buffer includes error message (out)</tt>
1310<br><tt>&nbsp;&nbsp; ULONG fNewInfo;&nbsp;&nbsp;&nbsp; // Message buffer
1311has new text since last read (out)</tt>
1312<br><tt>&nbsp;&nbsp; ULONG ulCharsLost; // Messages lost - circular queue
1313wrap around (out)</tt>
1314<br><tt>} MIXMSGBUF, *PMIXMSGBUF;</tt>
1315<p>Application should pass NULL buffer on first call.
1316<br>Device driver will set ulSize field to the maximum possible size of
1317returned buffer
1318<br>and will set the boolean return values to indicate what information
1319is in the buffer.
1320<p>Application should then malloc that much memory and call device driver
1321to retrieve
1322<br>message text.
1323<p>If pBuffer points to invalid memory, the application will fail with
1324access violation.
1325<p>fError and ulCharsLost are clearned when buffer is cleared.
1326<br>fNewInfo is cleared on each buffer read where pBuffer is not NULL.
1327<p>When new message text is added to the buffer, the device driver posts
1328<br>the callback semaphore.
1329<p>
1330<hr WIDTH="100%">
1331<br>Useful prototypes (header file)
1332<p>// This structure is passed to the device driver using DosDevIOCTL.
1333<br><tt>typedef struct</tt>
1334<br><tt>{</tt>
1335<br><tt>&nbsp;&nbsp; ULONG Mute;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1336// UnMute==0, Mute==1</tt>
1337<br><tt>&nbsp;&nbsp; ULONG VolumeL;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1338// 0..100 percent</tt>
1339<br><tt>&nbsp;&nbsp; ULONG VolumeR;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1340// 0..100 percent</tt>
1341<br><tt>} MIXSTRUCT, *PMIXSTRUCT;</tt>
1342<p><tt>#define MONOINSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x40&nbsp;&nbsp;&nbsp;
1343// SET functions in the 0x40 range</tt>
1344<br><tt>#define PHONESET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x41</tt>
1345<br><tt>#define MICSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
13460x42</tt>
1347<br><tt>#define LINESET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
13480x43</tt>
1349<br><tt>#define CDSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
13500x44</tt>
1351<br><tt>#define VIDEOSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x45</tt>
1352<br><tt>#define AUXSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
13530x46</tt>
1354<br><tt>#define BASSTREBLESET&nbsp;&nbsp; 0x4B</tt>
1355<br><tt>#define THREEDSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x4C</tt>
1356<br><tt>#define STREAMVOLSET&nbsp;&nbsp;&nbsp; 0x4D</tt>
1357<br><tt>#define RECORDSRCSET&nbsp;&nbsp;&nbsp; 0x4E</tt>
1358<br><tt>#define RECORDGAINSET&nbsp;&nbsp; 0x4F</tt>
1359<p><tt>#define MONOINQUERY&nbsp;&nbsp;&nbsp;&nbsp; 0x60&nbsp;&nbsp;&nbsp;
1360// QUERY functions in the 0x60 range</tt>
1361<br><tt>#define PHONEQUERY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x61</tt>
1362<br><tt>#define MICQUERY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x62</tt>
1363<br><tt>#define LINEQUERY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x63</tt>
1364<br><tt>#define CDQUERY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
13650x64</tt>
1366<br><tt>#define VIDEOQUERY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x65</tt>
1367<br><tt>#define AUXQUERY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x66</tt>
1368<br><tt>#define BASSTREBLEQUERY 0x6B</tt>
1369<br><tt>#define THREEDQUERY&nbsp;&nbsp;&nbsp;&nbsp; 0x6C</tt>
1370<br><tt>#define STREAMVOLQUERY&nbsp; 0x4D</tt>
1371<br><tt>#define RECORDSRCQUERY&nbsp; 0x4E</tt>
1372<br><tt>#define RECORDGAINQUERY 0x4F</tt>
1373<br><tt>#define APILEVELQUERY&nbsp;&nbsp; 0x80</tt>
1374<br><tt>#define GETAPIMAP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x81&nbsp;&nbsp;&nbsp;
1375// Get 256 byte BOOL list of supported IOCTLs</tt>
1376<br><tt>#define CALLBACKREG&nbsp;&nbsp;&nbsp;&nbsp; 0x82&nbsp;&nbsp;&nbsp;
1377// Provide HSEM for mixer change callbacks</tt>
1378<br><tt>#define MSGBUF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
13790x83&nbsp;&nbsp;&nbsp; // Get PDD error log message buffer</tt>
1380<p>
1381<hr WIDTH="100%">
1382<br><font color="#3333FF"><font size=+1>Example Query PDD Name:</font></font>
1383<p>The application will query the 8 character device driver name by calling
1384MMPM/2 MCI APIs to get the PDD name for the "WaveAudio" MCI device.&nbsp;&nbsp;
1385Application should then issue DosOpen on the device name and finally DosDevIOCTL
1386to perform mixer operations.
1387<p>NOTE: The device driver names used by Crystal Semiconductor device drivers
1388DO change and are not guaranteed to remain the same for any given release.&nbsp;
1389USE the availalbe MMPM/2 APIs!
1390<p><tt>//</tt>
1391<br><tt>// OS/2 32-bit program to query the Physical Device Driver name</tt>
1392<br><tt>// for the default MMPM/2 WaveAudio device.&nbsp; Joe Nord 10-Mar-1999</tt>
1393<br><tt>//</tt>
1394<p><tt>#include &lt;stdlib.h></tt>
1395<br><tt>#include &lt;stdio.h></tt>
1396<br><tt>#include &lt;string.h></tt>
1397<p><tt>#include &lt;os2.h></tt>
1398<p><tt>#define INCL_OS2MM</tt>
1399<br><tt>#include &lt;os2me.h></tt>
1400<p><tt>ULONG GetAudioPDDName (char *pszPDDName)</tt>
1401<br><tt>{</tt>
1402<br><tt>&nbsp;&nbsp; ULONG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1403ulRC;</tt>
1404<br><tt>&nbsp;&nbsp; char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1405szAmpMix[9] = "AMPMIX01";</tt>
1406<p><tt>&nbsp;&nbsp; MCI_SYSINFO_PARMS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1407SysInfo;</tt>
1408<br><tt>&nbsp;&nbsp; MCI_SYSINFO_LOGDEVICE&nbsp;&nbsp; SysInfoParm;</tt>
1409<br><tt>&nbsp;&nbsp; MCI_SYSINFO_QUERY_NAME&nbsp; QueryNameParm;</tt>
1410<p><tt>&nbsp;&nbsp; memset (&amp;SysInfo, '\0', sizeof(SysInfo));</tt>
1411<br><tt>&nbsp;&nbsp; memset (&amp;SysInfoParm, '\0', sizeof(SysInfoParm));</tt>
1412<br><tt>&nbsp;&nbsp; memset (&amp;QueryNameParm, '\0', sizeof(QueryNameParm));</tt>
1413<p><tt>&nbsp;&nbsp; SysInfo.ulItem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1414= MCI_SYSINFO_QUERY_NAMES;</tt>
1415<br><tt>&nbsp;&nbsp; SysInfo.usDeviceType&nbsp; = MCI_DEVTYPE_WAVEFORM_AUDIO;</tt>
1416<br><tt>&nbsp;&nbsp; SysInfo.pSysInfoParm = &amp;QueryNameParm;</tt>
1417<p><tt>&nbsp;&nbsp; strcpy (QueryNameParm.szLogicalName, szAmpMix);</tt>
1418<p><tt>&nbsp;&nbsp; ulRC = mciSendCommand (0,</tt>
1419<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1420MCI_SYSINFO,</tt>
1421<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1422MCI_SYSINFO_ITEM | MCI_WAIT,</tt>
1423<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1424(PVOID) &amp;SysInfo,</tt>
1425<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
14260);</tt>
1427<br><tt>&nbsp;&nbsp; if (ulRC != 0)</tt>
1428<br><tt>&nbsp;&nbsp; {</tt>
1429<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf ("mciSendCommand ulRC=%u\n",
1430ulRC);</tt>
1431<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (ulRC);</tt>
1432<br><tt>&nbsp;&nbsp; }</tt>
1433<p><tt>&nbsp;&nbsp; // Get PDD associated with our AmpMixer</tt>
1434<br><tt>&nbsp;&nbsp; // Device name is in pSysInfoParm->szPDDName</tt>
1435<p><tt>&nbsp;&nbsp; SysInfo.ulItem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1436= MCI_SYSINFO_QUERY_DRIVER;</tt>
1437<br><tt>&nbsp;&nbsp; SysInfo.usDeviceType = MCI_DEVTYPE_WAVEFORM_AUDIO;</tt>
1438<br><tt>&nbsp;&nbsp; SysInfo.pSysInfoParm = &amp;SysInfoParm;</tt>
1439<p><tt>&nbsp;&nbsp; strcpy (SysInfoParm.szInstallName, QueryNameParm.szInstallName);</tt>
1440<p><tt>&nbsp;&nbsp; ulRC = mciSendCommand (0,</tt>
1441<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1442MCI_SYSINFO,</tt>
1443<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1444MCI_SYSINFO_ITEM | MCI_WAIT,</tt>
1445<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1446(PVOID) &amp;SysInfo,</tt>
1447<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
14480);</tt>
1449<br><tt>&nbsp;&nbsp; if (ulRC != 0)</tt>
1450<br><tt>&nbsp;&nbsp; {</tt>
1451<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf ("mciSendCommand ulRC=%u\n",
1452ulRC);</tt>
1453<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return (ulRC);</tt>
1454<br><tt>&nbsp;&nbsp; }</tt>
1455<p><tt>&nbsp;&nbsp; strcpy (pszPDDName, SysInfoParm.szPDDName);</tt>
1456<p><tt>&nbsp;&nbsp; return (ulRC);</tt>
1457<br><tt>}</tt>
1458<br>&nbsp;
1459<p><tt>int main (void)</tt>
1460<br><tt>{</tt>
1461<br><tt>&nbsp;&nbsp; ULONG ulRC;</tt>
1462<br><tt>&nbsp;&nbsp; char&nbsp; szPddName [256];</tt>
1463<p><tt>&nbsp;&nbsp; ulRC = GetAudioPDDName (&amp;szPddName);</tt>
1464<br><tt>&nbsp;&nbsp; printf ("GetAudioPDDName ulRC=%u\n", ulRC);</tt>
1465<br><tt>&nbsp;&nbsp; printf ("&nbsp;&nbsp; PddName=%s\n", szPddName);</tt>
1466<p><tt>&nbsp;&nbsp; return (0);</tt>
1467<br><tt>}</tt>
1468<br>&nbsp;
1469<p>
1470<hr WIDTH="100%">
1471<br><font color="#3333FF"><font size=+1>Example DosOpen:</font></font>
1472<p>Driver name in call to the open function should include "<b>\\DEV\\</b>"
1473<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Example: hPdd = DevOpen ("\\DEV\\BSAUD1$");
1474or
1475<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Example: hPdd = DevOpen ("\\DEV\\CWCAUD1$");
1476<p><tt>HFILE DevOpen (char *ddName)</tt>
1477<br><tt>{</tt>
1478<br><tt>&nbsp;&nbsp; ULONG ulRC;</tt>
1479<br><tt>&nbsp;&nbsp; ULONG OpenFlags;</tt>
1480<br><tt>&nbsp;&nbsp; ULONG OpenMode;</tt>
1481<br><tt>&nbsp;&nbsp; ULONG ulFileSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0;</tt>
1482<br><tt>&nbsp;&nbsp; ULONG ulFileAttribute = 0;</tt>
1483<br><tt>&nbsp;&nbsp; ULONG ulActionTaken&nbsp;&nbsp; = 0;</tt>
1484<br><tt>&nbsp;&nbsp; HFILE hPdd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1485= NULL;</tt>
1486<p><tt>&nbsp;&nbsp; OpenFlags = OPEN_ACTION_OPEN_IF_EXISTS;&nbsp;&nbsp;
1487// Do not create file</tt>
1488<p><tt>&nbsp;&nbsp; OpenMode&nbsp; = OPEN_ACCESS_READWRITE +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1489// Read/Write file</tt>
1490<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1491OPEN_SHARE_DENYNONE +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
1492Non-exclusive access</tt>
1493<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1494OPEN_FLAGS_FAIL_ON_ERROR;&nbsp;&nbsp;&nbsp;&nbsp; // No system popups on
1495errors</tt>
1496<p><tt>&nbsp;&nbsp; ulRC = DosOpen (ddName,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1497// in</tt>
1498<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1499&amp;hPdd,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1500//&nbsp;&nbsp;&nbsp; out (handle)</tt>
1501<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1502&amp;ulActionTaken,&nbsp; //&nbsp;&nbsp;&nbsp; out</tt>
1503<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1504ulFileSize,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // in</tt>
1505<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1506ulFileAttribute, // in</tt>
1507<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1508OpenFlags,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // in</tt>
1509<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1510OpenMode,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // in</tt>
1511<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1512NULL);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // in</tt>
1513<p><tt>&nbsp;&nbsp; printf ("DosOpen RC = %x\n", ulRC);</tt>
1514<p><tt>&nbsp;&nbsp; if (ulRC != 0)</tt>
1515<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hPdd = NULL;</tt>
1516<p><tt>&nbsp;&nbsp; return (hPdd);</tt>
1517<br><tt>}</tt>
1518<p>
1519<hr WIDTH="100%">
1520<br><font color="#3333FF"><font size=+1>Example DosDevIOCTL:</font></font>
1521<p><tt>ULONG SendIOCTL (HFILE hPdd, ULONG ulFunc, PMIXSTRUCT pMix)</tt>
1522<br><tt>{</tt>
1523<br><tt>&nbsp;&nbsp; ULONG&nbsp;&nbsp;&nbsp;&nbsp; ulRC;</tt>
1524<br><tt>&nbsp;&nbsp; ULONG&nbsp;&nbsp;&nbsp;&nbsp; ulSizeOfStruct =&nbsp;
1525= sizeof (MixStruct);</tt>
1526<p><tt>&nbsp;&nbsp; ulRC = DosDevIOCtl</tt>
1527<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (hPdd,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1528// Device Handle</tt>
1529<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x90,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1530// Category (user defined >= 0x80)</tt>
1531<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ulFunc,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1532// Function Use defines in .H file</tt>
1533<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1534// in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Address of parm data (not used)</tt>
1535<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1536// in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Max size of parm data structure</tt>
1537<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NULL,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1538// in out&nbsp; Actual size of parm data structure</tt>
1539<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pMix,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1540// in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Address of command data</tt>
1541<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ulSizeOfStruct,&nbsp;&nbsp;&nbsp;&nbsp;
1542// in&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Maximum size of command data</tt>
1543<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;ulSizeOfStruct);&nbsp;&nbsp;
1544// in out&nbsp; Size of command data</tt>
1545<p><tt>&nbsp;&nbsp; printf ("DosDevIOCtl ulRC = %d\n", ulRC);</tt>
1546<p><tt>&nbsp;&nbsp; return (ulRC);</tt>
1547<br><tt>}</tt>
1548<p>
1549<hr WIDTH="100%">
1550<br><font color="#3333FF"><font size=+1>Device Specific Information:</font></font>
1551<p><font color="#000000">The Ioctl90 API is based on AC97 mixer architecture
1552(common hardware for PCI bus audio).&nbsp; It does not necessarily exactly
1553map to other mixer architectures.&nbsp; Where known, differences are documented
1554below.</font>
1555<p><tt><font color="#000000">AC97 Definition&nbsp;&nbsp; CS4236B/7B/8B&nbsp;&nbsp;
1556CS4235/9</font></tt>
1557<br><tt><font color="#000000">PCI Bus designs&nbsp;&nbsp; ISA Mode 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1558ISA Mode 3</font></tt>
1559<br><tt><font color="#000000">---------------&nbsp;&nbsp; -------------&nbsp;&nbsp;
1560--------</font></tt>
1561<br><tt><font color="#000000">MonoIn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1562MonoIn&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MonoIn</font></tt>
1563<br><tt><font color="#000000">Phone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1564none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1565none</font></tt>
1566<br><tt><font color="#000000">Microphone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1567Mic&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1568Mic</font></tt>
1569<br><tt><font color="#000000">Line-In&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1570Aux1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1571Aux1&nbsp;&nbsp;&nbsp; Aux1 = Line-In connector on card</font></tt>
1572<br><tt><font color="#000000">CD-ROM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1573Aux2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1574Aux2&nbsp;&nbsp;&nbsp; Aux2 = CD-ROM Analog cable</font></tt>
1575<br><tt><font color="#000000">Video&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1576none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1577none</font></tt>
1578<br><tt><font color="#000000">Aux&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1579Line&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1580DAC2&nbsp;&nbsp;&nbsp; CS4236B=FM Volume, CS4235=Digital vol</font></tt>
1581<p>Record sources:
1582<br>On the Crystal Semiconductor ISA Mode 3 device driver, (CS4236B/7B/8B,
1583CS4235, CS4239):
1584<br>MONO-IN is not a possible record source.
1585<br>&nbsp;
1586</body>
1587</html>
Note: See TracBrowser for help on using the repository browser.