xref: /haiku/src/add-ons/kernel/drivers/audio/echo/generic/CMia.h (revision d5cd5d63ff0ad395989db6cf4841a64d5b545d1d)
1 // ****************************************************************************
2 //
3 //		CMia.H
4 //
5 //		Include file for interfacing with the CMia generic driver class
6 //		Set editor tabs to 3 for your viewing pleasure.
7 //
8 // ----------------------------------------------------------------------------
9 //
10 //		Copyright Echo Digital Audio Corporation (c) 1998 - 2002
11 //		All rights reserved
12 //		www.echoaudio.com
13 //
14 //		Permission is hereby granted, free of charge, to any person obtaining a
15 //		copy of this software and associated documentation files (the
16 //		"Software"), to deal with the Software without restriction, including
17 //		without limitation the rights to use, copy, modify, merge, publish,
18 //		distribute, sublicense, and/or sell copies of the Software, and to
19 //		permit persons to whom the Software is furnished to do so, subject to
20 //		the following conditions:
21 //
22 //		- Redistributions of source code must retain the above copyright
23 //		notice, this list of conditions and the following disclaimers.
24 //
25 //		- Redistributions in binary form must reproduce the above copyright
26 //		notice, this list of conditions and the following disclaimers in the
27 //		documentation and/or other materials provided with the distribution.
28 //
29 //		- Neither the name of Echo Digital Audio, nor the names of its
30 //		contributors may be used to endorse or promote products derived from
31 //		this Software without specific prior written permission.
32 //
33 //		THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 //		EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
35 //		MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
36 //		IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR
37 //		ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
38 //		TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
39 //		SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
40 //
41 // ****************************************************************************
42 
43 //	Prevent problems with multiple includes
44 #ifndef _MIAOBJECT_
45 #define _MIAOBJECT_
46 
47 #include "CEchoGals.h"
48 #include "CMiaDspCommObject.h"
49 
50 //
51 //	Class used for interfacing with the Mia audio card.
52 //
53 class CMia : public CEchoGals
54 {
55 public:
56 	//
57 	//	Construction/destruction
58 	//
59 	CMia( PCOsSupport pOsSupport );
60 
61 	virtual ~CMia();
62 
63 	//
64 	// Setup & initialization methods
65 	//
66 
67 	virtual ECHOSTATUS InitHw();
68 
69 	//
70 	//	Adapter information methods
71 	//
72 
73 	//
74 	//	Return the capabilities of this card; card type, card name,
75 	//	# analog inputs, # analog outputs, # digital channels,
76 	//	# MIDI ports and supported clocks.
77 	//	See ECHOGALS_CAPS definition above.
78 	//
79 	virtual ECHOSTATUS GetCapabilities
80 	(
81 		PECHOGALS_CAPS	pCapabilities
82 	);
83 
84 	//
85 	//	Audio Interface methods
86 	//
87 
88 	virtual ECHOSTATUS QueryAudioSampleRate
89 	(
90 		DWORD		dwSampleRate
91 	);
92 
93 	//
94 	// Get a bitmask of all the clocks the hardware is currently detecting
95 	//
96 	virtual ECHOSTATUS GetInputClockDetect(DWORD &dwClockDetectBits);
97 
98 	//
99 	// Adjust all the output pipe levels for a particular output bus
100 	//
101 	virtual ECHOSTATUS AdjustPipesOutForBusOut(WORD wBusOut,int iBusOutGain);
102 
103 	//
104 	//	Overload new & delete so memory for this object is allocated from
105 	//	non-paged memory.
106 	//
107 	PVOID operator new( size_t Size );
108 	VOID  operator delete( PVOID pVoid );
109 
110 protected:
111 	//
112 	//	Get access to the appropriate DSP comm object
113 	//
114 	PCMiaDspCommObject GetDspCommObject()
115 		{ return( (PCMiaDspCommObject) m_pDspCommObject ); }
116 };		// class CMia
117 
118 typedef CMia * PCMia;
119 
120 #endif
121 
122 // *** Mia.H ***
123