xref: /haiku/src/add-ons/kernel/drivers/audio/echo/generic/CGdDspCommObject.h (revision 626bc4bee107897c38c596c3440cf0a74b4b9c40)
1 // ****************************************************************************
2 //
3 //		CGdDspCommObject.H
4 //
5 //		Darla20 and Gina20 are very similar; this class is used for both.
6 //		CGinaDspCommObject and CDarlaDspCommObject dervie from this class, in
7 //		turn.
8 //
9 // ----------------------------------------------------------------------------
10 //
11 // ----------------------------------------------------------------------------
12 //
13 // This file is part of Echo Digital Audio's generic driver library.
14 // Copyright Echo Digital Audio Corporation (c) 1998 - 2005
15 // All rights reserved
16 // www.echoaudio.com
17 //
18 // This library is free software; you can redistribute it and/or
19 // modify it under the terms of the GNU Lesser General Public
20 // License as published by the Free Software Foundation; either
21 // version 2.1 of the License, or (at your option) any later version.
22 //
23 // This library is distributed in the hope that it will be useful,
24 // but WITHOUT ANY WARRANTY; without even the implied warranty of
25 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26 // Lesser General Public License for more details.
27 //
28 // You should have received a copy of the GNU Lesser General Public
29 // License along with this library; if not, write to the Free Software
30 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
31 //
32 // ****************************************************************************
33 
34 #ifndef	_GDDSPCOMMOBJECT_
35 #define	_GDDSPCOMMOBJECT_
36 
37 #include "CDspCommObject.h"
38 
39 
40 class CGdDspCommObject : public CDspCommObject
41 {
42 public:
43 	//
44 	//	Construction/destruction
45 	//
46 	CGdDspCommObject( PDWORD pdwRegBase, PCOsSupport pOsSupport  );
47 	virtual ~CGdDspCommObject();
48 
49 	//
50 	//	Set the DSP sample rate.
51 	//	Return rate that was set, -1 if error
52 	//
53 	virtual DWORD SetSampleRate( DWORD dwNewSampleRate );
54 	//
55 	//	Send current setting to DSP & return what it is
56 	//
SetSampleRate()57 	virtual DWORD SetSampleRate()
58 	{ return SetSampleRate( GetSampleRate() ); }
59 
60 	//
61 	// Put the card to sleep
62 	//
63 	virtual ECHOSTATUS GoComatose();
64 
65 protected:
66 	BYTE 	m_byGDCurrentSpdifStatus;
67 	BYTE 	m_byGDCurrentClockState;
68 
69 	//
70 	//	Called after load firmware to restore old gains, meters on, monitors, etc.
71 	//	No error checking is done here.
72 	//
73 	virtual void RestoreDspSettings();
74 
75 	// SelectGinaDarlaSpdifStatus
76 	BYTE SelectGinaDarlaSpdifStatus( DWORD dwNewSampleRate );
77 
78 };		// class CGdDspCommObject
79 
80 typedef CGdDspCommObject * PCGdDspCommObject;
81 
82 #endif
83 
84 // **** GdDspCommObject.h ****
85