xref: /haiku/src/add-ons/kernel/drivers/audio/echo/generic/CGdDspCommObject.h (revision 626bc4bee107897c38c596c3440cf0a74b4b9c40)
13895766dSshatty // ****************************************************************************
23895766dSshatty //
33895766dSshatty //		CGdDspCommObject.H
43895766dSshatty //
53895766dSshatty //		Darla20 and Gina20 are very similar; this class is used for both.
63895766dSshatty //		CGinaDspCommObject and CDarlaDspCommObject dervie from this class, in
73895766dSshatty //		turn.
83895766dSshatty //
93895766dSshatty // ----------------------------------------------------------------------------
103895766dSshatty //
11c2ddc71cSJérôme Duval // ----------------------------------------------------------------------------
12c2ddc71cSJérôme Duval //
13*626bc4beSJérôme Duval // This file is part of Echo Digital Audio's generic driver library.
14*626bc4beSJérôme Duval // Copyright Echo Digital Audio Corporation (c) 1998 - 2005
153895766dSshatty // All rights reserved
163895766dSshatty // www.echoaudio.com
173895766dSshatty //
18*626bc4beSJérôme Duval // This library is free software; you can redistribute it and/or
19*626bc4beSJérôme Duval // modify it under the terms of the GNU Lesser General Public
20*626bc4beSJérôme Duval // License as published by the Free Software Foundation; either
21*626bc4beSJérôme Duval // version 2.1 of the License, or (at your option) any later version.
223895766dSshatty //
23*626bc4beSJérôme Duval // This library is distributed in the hope that it will be useful,
24c2ddc71cSJérôme Duval // but WITHOUT ANY WARRANTY; without even the implied warranty of
25*626bc4beSJérôme Duval // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26*626bc4beSJérôme Duval // Lesser General Public License for more details.
273895766dSshatty //
28*626bc4beSJérôme Duval // You should have received a copy of the GNU Lesser General Public
29*626bc4beSJérôme Duval // License along with this library; if not, write to the Free Software
30*626bc4beSJérôme Duval // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
313895766dSshatty //
323895766dSshatty // ****************************************************************************
333895766dSshatty 
343895766dSshatty #ifndef	_GDDSPCOMMOBJECT_
353895766dSshatty #define	_GDDSPCOMMOBJECT_
363895766dSshatty 
373895766dSshatty #include "CDspCommObject.h"
383895766dSshatty 
393895766dSshatty 
403895766dSshatty class CGdDspCommObject : public CDspCommObject
413895766dSshatty {
423895766dSshatty public:
433895766dSshatty 	//
443895766dSshatty 	//	Construction/destruction
453895766dSshatty 	//
463895766dSshatty 	CGdDspCommObject( PDWORD pdwRegBase, PCOsSupport pOsSupport  );
473895766dSshatty 	virtual ~CGdDspCommObject();
483895766dSshatty 
493895766dSshatty 	//
503895766dSshatty 	//	Set the DSP sample rate.
513895766dSshatty 	//	Return rate that was set, -1 if error
523895766dSshatty 	//
533895766dSshatty 	virtual DWORD SetSampleRate( DWORD dwNewSampleRate );
543895766dSshatty 	//
553895766dSshatty 	//	Send current setting to DSP & return what it is
563895766dSshatty 	//
SetSampleRate()573895766dSshatty 	virtual DWORD SetSampleRate()
583895766dSshatty 	{ return SetSampleRate( GetSampleRate() ); }
593895766dSshatty 
60c2ddc71cSJérôme Duval 	//
61c2ddc71cSJérôme Duval 	// Put the card to sleep
62c2ddc71cSJérôme Duval 	//
63c2ddc71cSJérôme Duval 	virtual ECHOSTATUS GoComatose();
64c2ddc71cSJérôme Duval 
653895766dSshatty protected:
663895766dSshatty 	BYTE 	m_byGDCurrentSpdifStatus;
673895766dSshatty 	BYTE 	m_byGDCurrentClockState;
683895766dSshatty 
693895766dSshatty 	//
703895766dSshatty 	//	Called after load firmware to restore old gains, meters on, monitors, etc.
713895766dSshatty 	//	No error checking is done here.
723895766dSshatty 	//
733895766dSshatty 	virtual void RestoreDspSettings();
743895766dSshatty 
753895766dSshatty 	// SelectGinaDarlaSpdifStatus
763895766dSshatty 	BYTE SelectGinaDarlaSpdifStatus( DWORD dwNewSampleRate );
773895766dSshatty 
783895766dSshatty };		// class CGdDspCommObject
793895766dSshatty 
803895766dSshatty typedef CGdDspCommObject * PCGdDspCommObject;
813895766dSshatty 
823895766dSshatty #endif
833895766dSshatty 
843895766dSshatty // **** GdDspCommObject.h ****
85