1 // ****************************************************************************
3 // CGinaDspCommObject.cpp
5 // Implementation file Gina20 DSP interface class.
7 // ----------------------------------------------------------------------------
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
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.
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.
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
28 // ****************************************************************************
30 #include "CEchoGals.h"
31 #include "CGinaDspCommObject.h"
33 #include "Gina20DSP.c"
36 /****************************************************************************
38 Construction and destruction
40 ****************************************************************************/
42 //===========================================================================
46 //===========================================================================
48 CGinaDspCommObject::CGinaDspCommObject
50 PDWORD pdwRegBase
, // Virtual ptr to DSP registers
51 PCOsSupport pOsSupport
52 ) : CGdDspCommObject( pdwRegBase
, pOsSupport
)
54 strcpy( m_szCardName
, "Gina" );
55 m_pdwDspRegBase
= pdwRegBase
; // Virtual addr DSP's register base
61 m_wFirstDigitalBusOut
= 8;
62 m_wFirstDigitalBusIn
= 2;
66 m_wNumMidiOut
= 0; // # MIDI out channels
67 m_wNumMidiIn
= 0; // # MIDI in channels
69 m_pwDspCodeToLoad
= pwGina20DSP
;
72 // Since this card has no ASIC, mark it as loaded so everything works OK
76 } // CGinaDspCommObject::CGinaDspCommObject( DWORD dwPhysRegBase )
79 //===========================================================================
83 //===========================================================================
85 CGinaDspCommObject::~CGinaDspCommObject()
87 } // CGinaDspCommObject::~CGinaDspCommObject()
92 /****************************************************************************
96 ****************************************************************************/
98 //===========================================================================
102 //===========================================================================
104 ECHOSTATUS
CGinaDspCommObject::SetInputClock(WORD wClock
)
106 ECHO_DEBUGPRINTF( ( "CGinaDspCommObject::SetInputClock:\n" ) );
110 case ECHO_CLOCK_INTERNAL
:
112 // Reset the audio state to unknown (just in case)
113 m_byGDCurrentClockState
= GD_CLOCK_UNDEF
;
114 m_byGDCurrentSpdifStatus
= GD_SPDIF_STATUS_UNDEF
;
118 m_wInputClock
= wClock
;
120 ECHO_DEBUGPRINTF( ( "\tSet Gina clock to INTERNAL\n" ) );
123 case ECHO_CLOCK_SPDIF
:
124 m_pDspCommPage
->byGDClockState
= GD_CLOCK_SPDIFIN
;
125 m_pDspCommPage
->byGDSpdifStatus
= GD_SPDIF_STATUS_NOCHANGE
;
128 SendVector( DSP_VC_SET_GD_AUDIO_STATE
);
130 m_byGDCurrentClockState
= GD_CLOCK_SPDIFIN
;
132 ECHO_DEBUGPRINTF( ( "\tSet Gina clock to SPDIF\n" ) );
134 m_wInputClock
= wClock
;
138 return ECHOSTATUS_CLOCK_NOT_SUPPORTED
;
140 } // switch ( wClock )
142 return ECHOSTATUS_OK
;
144 } // ECHOSTATUS CGinaDspCommObject::SetInputClock()
147 // **** GinaDspCommObject.cpp ****