1// ****************************************************************************
2//
3//		CGMLDspCommObject.H
4//
5//		Common DSP interface class for Gina24, Layla24, and Mona
6//
7// ----------------------------------------------------------------------------
8//
9// This file is part of Echo Digital Audio's generic driver library.
10// Copyright Echo Digital Audio Corporation (c) 1998 - 2005
11// All rights reserved
12// www.echoaudio.com
13//
14// This library is free software; you can redistribute it and/or
15// modify it under the terms of the GNU Lesser General Public
16// License as published by the Free Software Foundation; either
17// version 2.1 of the License, or (at your option) any later version.
18//
19// This library is distributed in the hope that it will be useful,
20// but WITHOUT ANY WARRANTY; without even the implied warranty of
21// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22// Lesser General Public License for more details.
23//
24// You should have received a copy of the GNU Lesser General Public
25// License along with this library; if not, write to the Free Software
26// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27//
28// ****************************************************************************
29
30#ifndef	_GMLDSPCOMMOBJECT_
31#define	_GMLDSPCOMMOBJECT_
32
33class CGMLDspCommObject : public CDspCommObject
34{
35public:
36	CGMLDspCommObject( PDWORD pdwRegBase, PCOsSupport pOsSupport )
37		: CDspCommObject(pdwRegBase, pOsSupport)
38	{
39	}
40
41	virtual ~CGMLDspCommObject() {}
42
43	//
44	//	Get mask of all supported digital modes
45	//	(See ECHOCAPS_HAS_DIGITAL_MODE_??? defines in EchoGalsXface.h)
46	//
47	virtual DWORD GetDigitalModes()
48		{ return( ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_RCA	  |
49					 ECHOCAPS_HAS_DIGITAL_MODE_SPDIF_OPTICAL |
50					 ECHOCAPS_HAS_DIGITAL_MODE_ADAT ); }
51
52	//
53	//	Set digital mode
54	//
55	virtual ECHOSTATUS SetDigitalMode
56	(
57		BYTE	byNewMode
58	);
59
60	//
61	// Set get S/PDIF output format
62	//
63	virtual void SetProfessionalSpdif( BOOL bNewStatus );
64
65	virtual BOOL IsProfessionalSpdif()
66		{ return( m_bProfessionalSpdif ); }
67
68	//
69	// Get/Set S/PDIF out non-audio status bit
70	//
71	virtual BOOL IsSpdifOutNonAudio()
72	{
73			return m_bNonAudio;
74	}
75
76	virtual void SetSpdifOutNonAudio(BOOL bNonAudio);
77
78protected:
79	//
80	// Write the Gina24/Mona/Layla24 control reg
81	//
82	virtual ECHOSTATUS WriteControlReg( DWORD dwControlReg, BOOL fForceWrite = FALSE );
83
84	//
85	// Member variables
86	//
87	BOOL m_bProfessionalSpdif;
88	BOOL m_bNonAudio;
89
90};		// class CGMLDspCommObject
91
92#endif // _GMLDSPCOMMOBJECT_
93
94// **** GMLDspCommObject.h ****
95