BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / drivers / audio / echo / generic / CLaylaDspCommObject.h
blobc20ac98dd0ed85fc1f0a457fd368c2613ffe94c8
1 // ****************************************************************************
2 //
3 // CLaylaDspCommObject.H
4 //
5 // Include file for EchoGals generic driver Layla DSP interface class.
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
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 #ifndef _LAYLADSPCOMMOBJECT_
31 #define _LAYLADSPCOMMOBJECT_
33 #include "CDspCommObject.h"
35 //*****************************************************************************
37 // Layla clock numbers to send to DSP
39 //*****************************************************************************
41 #define LAYLA20_CLOCK_INTERNAL 0
42 #define LAYLA20_CLOCK_SPDIF 1
43 #define LAYLA20_CLOCK_WORD 2
44 #define LAYLA20_CLOCK_SUPER 3
47 //*****************************************************************************
49 // CLaylaDspCommObject
51 //*****************************************************************************
54 class CLaylaDspCommObject : public CDspCommObject
56 protected:
58 enum
60 LAYLA20_INPUT_TRIMS = 8
63 BYTE m_byInputTrims[LAYLA20_INPUT_TRIMS]; // Input trims for Layla20's 8 analog
64 // inputs
66 public:
68 // Construction/destruction
70 CLaylaDspCommObject( PDWORD pdwRegBase, PCOsSupport pOsSupport );
71 virtual ~CLaylaDspCommObject();
74 // Set the DSP sample rate
75 // Return rate that was set, -1 if error
77 virtual DWORD SetSampleRate( DWORD dwNewSampleRate );
79 // Send current setting to DSP & return what it is
81 virtual DWORD SetSampleRate()
82 { return( SetSampleRate( GetSampleRate() ) ); }
85 // Card information
87 virtual WORD GetCardType()
88 { return( LAYLA ); }
91 // Set clocks
93 virtual ECHOSTATUS SetOutputClock(WORD wClock);
94 virtual ECHOSTATUS SetInputClock(WORD wClock);
97 // Input gain
98 //
99 virtual ECHOSTATUS SetBusInGain(WORD wBusIn,INT32 iGain);
100 virtual ECHOSTATUS GetBusInGain(WORD wBusIn,INT32 &iGain);
101 virtual ECHOSTATUS SetNominalLevel( WORD wBus, BOOL bState );
103 protected:
105 virtual BOOL LoadASIC();
108 // Check status of ASIC - loaded or not loaded
110 enum
112 NUM_ASIC_ATTEMPTS = 5,
113 NUM_ASIC_WINS = 3
116 virtual BOOL CheckAsicStatus();
118 }; // class CLaylaDspCommObject
120 typedef CLaylaDspCommObject * PCLaylaDspCommObject;
122 #endif
124 // **** LaylaDspCommObject.h ****