Merge remote-tracking branch 'moduleh/module.h-split'
[linux-2.6/next.git] / sound / pci / asihpi / hpi.h
blobf20727288994932c4d64bb1c3c8c2a0de3b6cc88
1 /******************************************************************************
3 AudioScience HPI driver
4 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of version 2 of the GNU General Public License as
8 published by the Free Software Foundation;
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 /** \file hpi.h
22 AudioScience Hardware Programming Interface (HPI)
23 public API definition.
25 The HPI is a low-level hardware abstraction layer to all
26 AudioScience digital audio adapters
28 (C) Copyright AudioScience Inc. 1998-2010
31 #ifndef _HPI_H_
32 #define _HPI_H_
33 /* HPI Version
34 If HPI_VER_MINOR is odd then its a development release not intended for the
35 public. If HPI_VER_MINOR is even then is a release version
36 i.e 3.05.02 is a development version
38 #define HPI_VERSION_CONSTRUCTOR(maj, min, rel) \
39 ((maj << 16) + (min << 8) + rel)
41 #define HPI_VER_MAJOR(v) ((int)(v >> 16))
42 #define HPI_VER_MINOR(v) ((int)((v >> 8) & 0xFF))
43 #define HPI_VER_RELEASE(v) ((int)(v & 0xFF))
45 #define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 8, 0)
46 #define HPI_VER_STRING "4.08.00"
48 /* Library version as documented in hpi-api-versions.txt */
49 #define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(10, 0, 0)
51 #include <linux/types.h>
52 #define HPI_BUILD_EXCLUDE_DEPRECATED
53 #define HPI_BUILD_KERNEL_MODE
55 /******************************************************************************/
56 /******** HPI API DEFINITIONS *****/
57 /******************************************************************************/
59 /*******************************************/
60 /** Audio format types
61 \ingroup stream
63 enum HPI_FORMATS {
64 /** Used internally on adapter. */
65 HPI_FORMAT_MIXER_NATIVE = 0,
66 /** 8-bit unsigned PCM. Windows equivalent is WAVE_FORMAT_PCM. */
67 HPI_FORMAT_PCM8_UNSIGNED = 1,
68 /** 16-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM. */
69 HPI_FORMAT_PCM16_SIGNED = 2,
70 /** MPEG-1 Layer-1. */
71 HPI_FORMAT_MPEG_L1 = 3,
72 /** MPEG-1 Layer-2.
74 Windows equivalent is WAVE_FORMAT_MPEG.
76 The following table shows what combinations of mode and bitrate are possible:
78 <table border=1 cellspacing=0 cellpadding=5>
79 <tr>
80 <td><p><b>Bitrate (kbs)</b></p>
81 <td><p><b>Mono</b></p>
82 <td><p><b>Stereo,<br>Joint Stereo or<br>Dual Channel</b></p>
84 <tr><td>32<td>X<td>_
85 <tr><td>40<td>_<td>_
86 <tr><td>48<td>X<td>_
87 <tr><td>56<td>X<td>_
88 <tr><td>64<td>X<td>X
89 <tr><td>80<td>X<td>_
90 <tr><td>96<td>X<td>X
91 <tr><td>112<td>X<td>X
92 <tr><td>128<td>X<td>X
93 <tr><td>160<td>X<td>X
94 <tr><td>192<td>X<td>X
95 <tr><td>224<td>_<td>X
96 <tr><td>256<td>-<td>X
97 <tr><td>320<td>-<td>X
98 <tr><td>384<td>_<td>X
99 </table>
101 HPI_FORMAT_MPEG_L2 = 4,
102 /** MPEG-1 Layer-3.
103 Windows equivalent is WAVE_FORMAT_MPEG.
105 The following table shows what combinations of mode and bitrate are possible:
107 <table border=1 cellspacing=0 cellpadding=5>
108 <tr>
109 <td><p><b>Bitrate (kbs)</b></p>
110 <td><p><b>Mono<br>Stereo @ 8,<br>11.025 and<br>12kHz*</b></p>
111 <td><p><b>Mono<br>Stereo @ 16,<br>22.050 and<br>24kHz*</b></p>
112 <td><p><b>Mono<br>Stereo @ 32,<br>44.1 and<br>48kHz</b></p>
114 <tr><td>16<td>X<td>X<td>_
115 <tr><td>24<td>X<td>X<td>_
116 <tr><td>32<td>X<td>X<td>X
117 <tr><td>40<td>X<td>X<td>X
118 <tr><td>48<td>X<td>X<td>X
119 <tr><td>56<td>X<td>X<td>X
120 <tr><td>64<td>X<td>X<td>X
121 <tr><td>80<td>_<td>X<td>X
122 <tr><td>96<td>_<td>X<td>X
123 <tr><td>112<td>_<td>X<td>X
124 <tr><td>128<td>_<td>X<td>X
125 <tr><td>144<td>_<td>X<td>_
126 <tr><td>160<td>_<td>X<td>X
127 <tr><td>192<td>_<td>_<td>X
128 <tr><td>224<td>_<td>_<td>X
129 <tr><td>256<td>-<td>_<td>X
130 <tr><td>320<td>-<td>_<td>X
131 </table>
132 \b * Available on the ASI6000 series only
134 HPI_FORMAT_MPEG_L3 = 5,
135 /** Dolby AC-2. */
136 HPI_FORMAT_DOLBY_AC2 = 6,
137 /** Dolbt AC-3. */
138 HPI_FORMAT_DOLBY_AC3 = 7,
139 /** 16-bit PCM big-endian. */
140 HPI_FORMAT_PCM16_BIGENDIAN = 8,
141 /** TAGIT-1 algorithm - hits. */
142 HPI_FORMAT_AA_TAGIT1_HITS = 9,
143 /** TAGIT-1 algorithm - inserts. */
144 HPI_FORMAT_AA_TAGIT1_INSERTS = 10,
145 /** 32-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM.
146 Each sample is a 32bit word. The most significant 24 bits contain a 24-bit
147 sample and the least significant 8 bits are set to 0.
149 HPI_FORMAT_PCM32_SIGNED = 11,
150 /** Raw bitstream - unknown format. */
151 HPI_FORMAT_RAW_BITSTREAM = 12,
152 /** TAGIT-1 algorithm hits - extended. */
153 HPI_FORMAT_AA_TAGIT1_HITS_EX1 = 13,
154 /** 32-bit PCM as an IEEE float. Windows equivalent is WAVE_FORMAT_IEEE_FLOAT.
155 Each sample is a 32bit word in IEEE754 floating point format.
156 The range is +1.0 to -1.0, which corresponds to digital fullscale.
158 HPI_FORMAT_PCM32_FLOAT = 14,
159 /** 24-bit PCM signed. Windows equivalent is WAVE_FORMAT_PCM. */
160 HPI_FORMAT_PCM24_SIGNED = 15,
161 /** OEM format 1 - private. */
162 HPI_FORMAT_OEM1 = 16,
163 /** OEM format 2 - private. */
164 HPI_FORMAT_OEM2 = 17,
165 /** Undefined format. */
166 HPI_FORMAT_UNDEFINED = 0xffff
169 /*******************************************/
170 /** Stream States
171 \ingroup stream
173 enum HPI_STREAM_STATES {
174 /** State stopped - stream is stopped. */
175 HPI_STATE_STOPPED = 1,
176 /** State playing - stream is playing audio. */
177 HPI_STATE_PLAYING = 2,
178 /** State recording - stream is recording. */
179 HPI_STATE_RECORDING = 3,
180 /** State drained - playing stream ran out of data to play. */
181 HPI_STATE_DRAINED = 4,
182 /** State generate sine - to be implemented. */
183 HPI_STATE_SINEGEN = 5,
184 /** State wait - used for inter-card sync to mean waiting for all
185 cards to be ready. */
186 HPI_STATE_WAIT = 6
188 /*******************************************/
189 /** Source node types
190 \ingroup mixer
192 enum HPI_SOURCENODES {
193 /** This define can be used instead of 0 to indicate
194 that there is no valid source node. A control that
195 exists on a destination node can be searched for using a source
196 node value of either 0, or HPI_SOURCENODE_NONE */
197 HPI_SOURCENODE_NONE = 100,
198 /** Out Stream (Play) node. */
199 HPI_SOURCENODE_OSTREAM = 101,
200 /** Line in node - could be analog, AES/EBU or network. */
201 HPI_SOURCENODE_LINEIN = 102,
202 HPI_SOURCENODE_AESEBU_IN = 103, /**< AES/EBU input node. */
203 HPI_SOURCENODE_TUNER = 104, /**< tuner node. */
204 HPI_SOURCENODE_RF = 105, /**< RF input node. */
205 HPI_SOURCENODE_CLOCK_SOURCE = 106, /**< clock source node. */
206 HPI_SOURCENODE_RAW_BITSTREAM = 107, /**< raw bitstream node. */
207 HPI_SOURCENODE_MICROPHONE = 108, /**< microphone node. */
208 /** Cobranet input node -
209 Audio samples come from the Cobranet network and into the device. */
210 HPI_SOURCENODE_COBRANET = 109,
211 HPI_SOURCENODE_ANALOG = 110, /**< analog input node. */
212 HPI_SOURCENODE_ADAPTER = 111, /**< adapter node. */
213 /** RTP stream input node - This node is a destination for
214 packets of RTP audio samples from other devices. */
215 HPI_SOURCENODE_RTP_DESTINATION = 112,
216 HPI_SOURCENODE_GP_IN = 113, /**< general purpose input. */
217 /* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */
218 HPI_SOURCENODE_LAST_INDEX = 113 /**< largest ID */
219 /* AX6 max sourcenode types = 15 */
222 /*******************************************/
223 /** Destination node types
224 \ingroup mixer
226 enum HPI_DESTNODES {
227 /** This define can be used instead of 0 to indicate
228 that there is no valid destination node. A control that
229 exists on a source node can be searched for using a destination
230 node value of either 0, or HPI_DESTNODE_NONE */
231 HPI_DESTNODE_NONE = 200,
232 /** In Stream (Record) node. */
233 HPI_DESTNODE_ISTREAM = 201,
234 HPI_DESTNODE_LINEOUT = 202, /**< line out node. */
235 HPI_DESTNODE_AESEBU_OUT = 203, /**< AES/EBU output node. */
236 HPI_DESTNODE_RF = 204, /**< RF output node. */
237 HPI_DESTNODE_SPEAKER = 205, /**< speaker output node. */
238 /** Cobranet output node -
239 Audio samples from the device are sent out on the Cobranet network.*/
240 HPI_DESTNODE_COBRANET = 206,
241 HPI_DESTNODE_ANALOG = 207, /**< analog output node. */
242 /** RTP stream output node - This node is a source for
243 packets of RTP audio samples that are sent to other devices. */
244 HPI_DESTNODE_RTP_SOURCE = 208,
245 HPI_DESTNODE_GP_OUT = 209, /**< general purpose output node. */
246 /* !!!Update this AND hpidebug.h if you add a new destnode type!!! */
247 HPI_DESTNODE_LAST_INDEX = 209 /**< largest ID */
248 /* AX6 max destnode types = 15 */
251 /*******************************************/
252 /** Mixer control types
253 \ingroup mixer
255 enum HPI_CONTROLS {
256 HPI_CONTROL_GENERIC = 0, /**< generic control. */
257 HPI_CONTROL_CONNECTION = 1, /**< A connection between nodes. */
258 HPI_CONTROL_VOLUME = 2, /**< volume control - works in dB_fs. */
259 HPI_CONTROL_METER = 3, /**< peak meter control. */
260 HPI_CONTROL_MUTE = 4, /*mute control - not used at present. */
261 HPI_CONTROL_MULTIPLEXER = 5, /**< multiplexer control. */
263 HPI_CONTROL_AESEBU_TRANSMITTER = 6, /**< AES/EBU transmitter control */
264 HPI_CONTROL_AESEBUTX = 6, /* HPI_CONTROL_AESEBU_TRANSMITTER */
266 HPI_CONTROL_AESEBU_RECEIVER = 7, /**< AES/EBU receiver control. */
267 HPI_CONTROL_AESEBURX = 7, /* HPI_CONTROL_AESEBU_RECEIVER */
269 HPI_CONTROL_LEVEL = 8, /**< level/trim control - works in d_bu. */
270 HPI_CONTROL_TUNER = 9, /**< tuner control. */
271 /* HPI_CONTROL_ONOFFSWITCH = 10 */
272 HPI_CONTROL_VOX = 11, /**< vox control. */
273 /* HPI_CONTROL_AES18_TRANSMITTER = 12 */
274 /* HPI_CONTROL_AES18_RECEIVER = 13 */
275 /* HPI_CONTROL_AES18_BLOCKGENERATOR = 14 */
276 HPI_CONTROL_CHANNEL_MODE = 15, /**< channel mode control. */
278 HPI_CONTROL_BITSTREAM = 16, /**< bitstream control. */
279 HPI_CONTROL_SAMPLECLOCK = 17, /**< sample clock control. */
280 HPI_CONTROL_MICROPHONE = 18, /**< microphone control. */
281 HPI_CONTROL_PARAMETRIC_EQ = 19, /**< parametric EQ control. */
282 HPI_CONTROL_EQUALIZER = 19, /*HPI_CONTROL_PARAMETRIC_EQ */
284 HPI_CONTROL_COMPANDER = 20, /**< compander control. */
285 HPI_CONTROL_COBRANET = 21, /**< cobranet control. */
286 HPI_CONTROL_TONEDETECTOR = 22, /**< tone detector control. */
287 HPI_CONTROL_SILENCEDETECTOR = 23, /**< silence detector control. */
288 HPI_CONTROL_PAD = 24, /**< tuner PAD control. */
289 HPI_CONTROL_SRC = 25, /**< samplerate converter control. */
290 HPI_CONTROL_UNIVERSAL = 26, /**< universal control. */
292 /* !!! Update this AND hpidebug.h if you add a new control type!!!*/
293 HPI_CONTROL_LAST_INDEX = 26 /**<highest control type ID */
294 /* WARNING types 256 or greater impact bit packing in all AX6 DSP code */
297 /*******************************************/
298 /** Adapter properties
299 These are used in HPI_AdapterSetProperty() and HPI_AdapterGetProperty()
300 \ingroup adapter
302 enum HPI_ADAPTER_PROPERTIES {
303 /** \internal Used in dwProperty field of HPI_AdapterSetProperty() and
304 HPI_AdapterGetProperty(). This errata applies to all ASI6000 cards with both
305 analog and digital outputs. The CS4224 A/D+D/A has a one sample delay between
306 left and right channels on both its input (ADC) and output (DAC).
307 More details are available in Cirrus Logic errata ER284B2.
308 PDF available from www.cirrus.com, released by Cirrus in 2001.
310 HPI_ADAPTER_PROPERTY_ERRATA_1 = 1,
312 /** Adapter grouping property
313 Indicates whether the adapter supports the grouping API (for ASIO and SSX2)
315 HPI_ADAPTER_PROPERTY_GROUPING = 2,
317 /** Driver SSX2 property
318 Tells the kernel driver to turn on SSX2 stream mapping.
319 This feature is not used by the DSP. In fact the call is completely processed
320 by the driver and is not passed on to the DSP at all.
322 HPI_ADAPTER_PROPERTY_ENABLE_SSX2 = 3,
324 /** Adapter SSX2 property
325 Indicates the state of the adapter's SSX2 setting. This setting is stored in
326 non-volatile memory on the adapter. A typical call sequence would be to use
327 HPI_ADAPTER_PROPERTY_SSX2_SETTING to set SSX2 on the adapter and then to reload
328 the driver. The driver would query HPI_ADAPTER_PROPERTY_SSX2_SETTING during
329 startup and if SSX2 is set, it would then call HPI_ADAPTER_PROPERTY_ENABLE_SSX2
330 to enable SSX2 stream mapping within the kernel level of the driver.
332 HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4,
334 /** Enables/disables PCI(e) IRQ.
335 A setting of 0 indicates that no interrupts are being generated. A DSP boot
336 this property is set to 0. Setting to a non-zero value specifies the number
337 of frames of audio that should be processed between interrupts. This property
338 should be set to multiple of the mixer interval as read back from the
339 HPI_ADAPTER_PROPERTY_INTERVAL property.
341 HPI_ADAPTER_PROPERTY_IRQ_RATE = 5,
343 /** Base number for readonly properties */
344 HPI_ADAPTER_PROPERTY_READONLYBASE = 256,
346 /** Readonly adapter latency property.
347 This property returns in the input and output latency in samples.
348 Property 1 is the estimated input latency
349 in samples, while Property 2 is that output latency in samples.
351 HPI_ADAPTER_PROPERTY_LATENCY = 256,
353 /** Readonly adapter granularity property.
354 The granulariy is the smallest size chunk of stereo samples that is processed by
355 the adapter.
356 This property returns the record granularity in samples in Property 1.
357 Property 2 returns the play granularity.
359 HPI_ADAPTER_PROPERTY_GRANULARITY = 257,
361 /** Readonly adapter number of current channels property.
362 Property 1 is the number of record channels per record device.
363 Property 2 is the number of play channels per playback device.*/
364 HPI_ADAPTER_PROPERTY_CURCHANNELS = 258,
366 /** Readonly adapter software version.
367 The SOFTWARE_VERSION property returns the version of the software running
368 on the adapter as Major.Minor.Release.
369 Property 1 contains Major in bits 15..8 and Minor in bits 7..0.
370 Property 2 contains Release in bits 7..0. */
371 HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION = 259,
373 /** Readonly adapter MAC address MSBs.
374 The MAC_ADDRESS_MSB property returns
375 the most significant 32 bits of the MAC address.
376 Property 1 contains bits 47..32 of the MAC address.
377 Property 2 contains bits 31..16 of the MAC address. */
378 HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB = 260,
380 /** Readonly adapter MAC address LSBs
381 The MAC_ADDRESS_LSB property returns
382 the least significant 16 bits of the MAC address.
383 Property 1 contains bits 15..0 of the MAC address. */
384 HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB = 261,
386 /** Readonly extended adapter type number
387 The EXTENDED_ADAPTER_TYPE property returns the 4 digits of an extended
388 adapter type, i.e ASI8920-0022, 0022 is the extended type.
389 The digits are returned as ASCII characters rather than the hex digits that
390 are returned for the main type
391 Property 1 returns the 1st two (left most) digits, i.e "00"
392 in the example above, the upper byte being the left most digit.
393 Property 2 returns the 2nd two digits, i.e "22" in the example above*/
394 HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE = 262,
396 /** Readonly debug log buffer information */
397 HPI_ADAPTER_PROPERTY_LOGTABLEN = 263,
398 HPI_ADAPTER_PROPERTY_LOGTABBEG = 264,
400 /** Readonly adapter IP address
401 For 192.168.1.101
402 Property 1 returns the 1st two (left most) digits, i.e 192*256 + 168
403 in the example above, the upper byte being the left most digit.
404 Property 2 returns the 2nd two digits, i.e 1*256 + 101 in the example above, */
405 HPI_ADAPTER_PROPERTY_IP_ADDRESS = 265,
407 /** Readonly adapter buffer processed count. Returns a buffer processed count
408 that is incremented every time all buffers for all streams are updated. This
409 is useful for checking completion of all stream operations across the adapter
410 when using grouped streams.
412 HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT = 266,
414 /** Readonly mixer and stream intervals
416 These intervals are measured in mixer frames.
417 To convert to time, divide by the adapter samplerate.
419 The mixer interval is the number of frames processed in one mixer iteration.
420 The stream update interval is the interval at which streams check for and
421 process data, and BBM host buffer counters are updated.
423 Property 1 is the mixer interval in mixer frames.
424 Property 2 is the stream update interval in mixer frames.
426 HPI_ADAPTER_PROPERTY_INTERVAL = 267,
427 /** Adapter capabilities 1
428 Property 1 - adapter can do multichannel (SSX1)
429 Property 2 - adapter can do stream grouping (supports SSX2)
431 HPI_ADAPTER_PROPERTY_CAPS1 = 268,
432 /** Adapter capabilities 2
433 Property 1 - adapter can do samplerate conversion (MRX)
434 Property 2 - adapter can do timestretch (TSX)
436 HPI_ADAPTER_PROPERTY_CAPS2 = 269,
438 /** Readonly adapter sync header connection count.
440 HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS = 270,
441 /** Readonly supports SSX2 property.
442 Indicates the adapter supports SSX2 in some mode setting. The
443 return value is true (1) or false (0). If the current adapter
444 mode is MONO SSX2 is disabled, even though this property will
445 return true.
447 HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271,
448 /** Readonly supports PCI(e) IRQ.
449 Indicates that the adapter in it's current mode supports interrupts
450 across the host bus. Note, this does not imply that interrupts are
451 enabled. Instead it indicates that they can be enabled.
453 HPI_ADAPTER_PROPERTY_SUPPORTS_IRQ = 272
456 /** Adapter mode commands
458 Used in wQueryOrSet parameter of HPI_AdapterSetModeEx().
459 \ingroup adapter
461 enum HPI_ADAPTER_MODE_CMDS {
462 /** Set the mode to the given parameter */
463 HPI_ADAPTER_MODE_SET = 0,
464 /** Return 0 or error depending whether mode is valid,
465 but don't set the mode */
466 HPI_ADAPTER_MODE_QUERY = 1
469 /** Adapter Modes
470 These are used by HPI_AdapterSetModeEx()
472 \warning - more than 16 possible modes breaks
473 a bitmask in the Windows WAVE DLL
474 \ingroup adapter
476 enum HPI_ADAPTER_MODES {
477 /** 4 outstream mode.
478 - ASI6114: 1 instream
479 - ASI6044: 4 instreams
480 - ASI6012: 1 instream
481 - ASI6102: no instreams
482 - ASI6022, ASI6122: 2 instreams
483 - ASI5111, ASI5101: 2 instreams
484 - ASI652x, ASI662x: 2 instreams
485 - ASI654x, ASI664x: 4 instreams
487 HPI_ADAPTER_MODE_4OSTREAM = 1,
489 /** 6 outstream mode.
490 - ASI6012: 1 instream,
491 - ASI6022, ASI6122: 2 instreams
492 - ASI652x, ASI662x: 4 instreams
494 HPI_ADAPTER_MODE_6OSTREAM = 2,
496 /** 8 outstream mode.
497 - ASI6114: 8 instreams
498 - ASI6118: 8 instreams
499 - ASI6585: 8 instreams
501 HPI_ADAPTER_MODE_8OSTREAM = 3,
503 /** 16 outstream mode.
504 - ASI6416 16 instreams
505 - ASI6518, ASI6618 16 instreams
506 - ASI6118 16 mono out and in streams
508 HPI_ADAPTER_MODE_16OSTREAM = 4,
510 /** one outstream mode.
511 - ASI5111 1 outstream, 1 instream
513 HPI_ADAPTER_MODE_1OSTREAM = 5,
515 /** ASI504X mode 1. 12 outstream, 4 instream 0 to 48kHz sample rates
516 (see ASI504X datasheet for more info).
518 HPI_ADAPTER_MODE_1 = 6,
520 /** ASI504X mode 2. 4 outstreams, 4 instreams at 0 to 192kHz sample rates
521 (see ASI504X datasheet for more info).
523 HPI_ADAPTER_MODE_2 = 7,
525 /** ASI504X mode 3. 4 outstreams, 4 instreams at 0 to 192kHz sample rates
526 (see ASI504X datasheet for more info).
528 HPI_ADAPTER_MODE_3 = 8,
530 /** ASI504X multichannel mode.
531 2 outstreams -> 4 line outs = 1 to 8 channel streams),
532 4 lineins -> 1 instream (1 to 8 channel streams) at 0-48kHz.
533 For more info see the SSX Specification.
535 HPI_ADAPTER_MODE_MULTICHANNEL = 9,
537 /** 12 outstream mode.
538 - ASI6514, ASI6614: 2 instreams
539 - ASI6540,ASI6544: 8 instreams
540 - ASI6640,ASI6644: 8 instreams
542 HPI_ADAPTER_MODE_12OSTREAM = 10,
544 /** 9 outstream mode.
545 - ASI6044: 8 instreams
547 HPI_ADAPTER_MODE_9OSTREAM = 11,
549 /** mono mode.
550 - ASI6416: 16 outstreams/instreams
551 - ASI5402: 2 outstreams/instreams
553 HPI_ADAPTER_MODE_MONO = 12,
555 /** Low latency mode.
556 - ASI6416/ASI6316: 1 16 channel outstream and instream
558 HPI_ADAPTER_MODE_LOW_LATENCY = 13
561 /* Note, adapters can have more than one capability -
562 encoding as bitfield is recommended. */
563 #define HPI_CAPABILITY_NONE (0)
564 #define HPI_CAPABILITY_MPEG_LAYER3 (1)
566 /* Set this equal to maximum capability index,
567 Must not be greater than 32 - see axnvdef.h */
568 #define HPI_CAPABILITY_MAX 1
569 /* #define HPI_CAPABILITY_AAC 2 */
571 /******************************************* STREAM ATTRIBUTES ****/
573 /** MPEG Ancillary Data modes
575 The mode for the ancillary data insertion or extraction to operate in.
576 \ingroup stream
578 enum HPI_MPEG_ANC_MODES {
579 /** the MPEG frames have energy information stored in them (5 bytes per stereo frame, 3 per mono) */
580 HPI_MPEG_ANC_HASENERGY = 0,
581 /** the entire ancillary data field is taken up by data from the Anc data buffer
582 On encode, the encoder will insert the energy bytes before filling the remainder
583 of the ancillary data space with data from the ancillary data buffer.
585 HPI_MPEG_ANC_RAW = 1
588 /** Ancillary Data Alignment
589 \ingroup instream
591 enum HPI_ISTREAM_MPEG_ANC_ALIGNS {
592 /** data is packed against the end of data, then padded to the end of frame */
593 HPI_MPEG_ANC_ALIGN_LEFT = 0,
594 /** data is packed against the end of the frame */
595 HPI_MPEG_ANC_ALIGN_RIGHT = 1
598 /** MPEG modes
599 MPEG modes - can be used optionally for HPI_FormatCreate()
600 parameter dwAttributes.
602 Using any mode setting other than HPI_MPEG_MODE_DEFAULT
603 with single channel format will return an error.
604 \ingroup stream
606 enum HPI_MPEG_MODES {
607 /** Causes the MPEG-1 Layer II bitstream to be recorded
608 in single_channel mode when the number of channels is 1 and in stereo when the
609 number of channels is 2. */
610 HPI_MPEG_MODE_DEFAULT = 0,
611 /** Standard stereo without joint-stereo compression */
612 HPI_MPEG_MODE_STEREO = 1,
613 /** Joint stereo */
614 HPI_MPEG_MODE_JOINTSTEREO = 2,
615 /** Left and Right channels are completely independent */
616 HPI_MPEG_MODE_DUALCHANNEL = 3
618 /******************************************* MIXER ATTRIBUTES ****/
620 /* \defgroup mixer_flags Mixer flags for HPI_MIXER_GET_CONTROL_MULTIPLE_VALUES
623 #define HPI_MIXER_GET_CONTROL_MULTIPLE_CHANGED (0)
624 #define HPI_MIXER_GET_CONTROL_MULTIPLE_RESET (1)
625 /*}*/
627 /** Commands used by HPI_MixerStore()
628 \ingroup mixer
630 enum HPI_MIXER_STORE_COMMAND {
631 /** Save all mixer control settings. */
632 HPI_MIXER_STORE_SAVE = 1,
633 /** Restore all controls from saved. */
634 HPI_MIXER_STORE_RESTORE = 2,
635 /** Delete saved control settings. */
636 HPI_MIXER_STORE_DELETE = 3,
637 /** Enable auto storage of some control settings. */
638 HPI_MIXER_STORE_ENABLE = 4,
639 /** Disable auto storage of some control settings. */
640 HPI_MIXER_STORE_DISABLE = 5,
641 /** Save the attributes of a single control. */
642 HPI_MIXER_STORE_SAVE_SINGLE = 6
645 /****************************/
646 /* CONTROL ATTRIBUTE VALUES */
647 /****************************/
649 /** Used by mixer plugin enable functions
651 E.g. HPI_ParametricEq_SetState()
652 \ingroup mixer
654 enum HPI_SWITCH_STATES {
655 HPI_SWITCH_OFF = 0, /**< turn the mixer plugin on. */
656 HPI_SWITCH_ON = 1 /**< turn the mixer plugin off. */
659 /* Volume control special gain values */
661 /** volumes units are 100ths of a dB
662 \ingroup volume
664 #define HPI_UNITS_PER_dB 100
665 /** turns volume control OFF or MUTE
666 \ingroup volume
668 #define HPI_GAIN_OFF (-100 * HPI_UNITS_PER_dB)
670 /** channel mask specifying all channels
671 \ingroup volume
673 #define HPI_BITMASK_ALL_CHANNELS (0xFFFFFFFF)
675 /** value returned for no signal
676 \ingroup meter
678 #define HPI_METER_MINIMUM (-150 * HPI_UNITS_PER_dB)
680 /** autofade profiles
681 \ingroup volume
683 enum HPI_VOLUME_AUTOFADES {
684 /** log fade - dB attenuation changes linearly over time */
685 HPI_VOLUME_AUTOFADE_LOG = 2,
686 /** linear fade - amplitude changes linearly */
687 HPI_VOLUME_AUTOFADE_LINEAR = 3
690 /** The physical encoding format of the AESEBU I/O.
692 Used in HPI_Aesebu_Transmitter_SetFormat(), HPI_Aesebu_Receiver_SetFormat()
693 along with related Get and Query functions
694 \ingroup aestx
696 enum HPI_AESEBU_FORMATS {
697 /** AES/EBU physical format - AES/EBU balanced "professional" */
698 HPI_AESEBU_FORMAT_AESEBU = 1,
699 /** AES/EBU physical format - S/PDIF unbalanced "consumer" */
700 HPI_AESEBU_FORMAT_SPDIF = 2
703 /** AES/EBU error status bits
705 Returned by HPI_Aesebu_Receiver_GetErrorStatus()
706 \ingroup aesrx
708 enum HPI_AESEBU_ERRORS {
709 /** bit0: 1 when PLL is not locked */
710 HPI_AESEBU_ERROR_NOT_LOCKED = 0x01,
711 /** bit1: 1 when signal quality is poor */
712 HPI_AESEBU_ERROR_POOR_QUALITY = 0x02,
713 /** bit2: 1 when there is a parity error */
714 HPI_AESEBU_ERROR_PARITY_ERROR = 0x04,
715 /** bit3: 1 when there is a bi-phase coding violation */
716 HPI_AESEBU_ERROR_BIPHASE_VIOLATION = 0x08,
717 /** bit4: 1 when the validity bit is high */
718 HPI_AESEBU_ERROR_VALIDITY = 0x10,
719 /** bit5: 1 when the CRC error bit is high */
720 HPI_AESEBU_ERROR_CRC = 0x20
723 /** \addtogroup pad
726 /** The text string containing the station/channel combination. */
727 #define HPI_PAD_CHANNEL_NAME_LEN 16
728 /** The text string containing the artist. */
729 #define HPI_PAD_ARTIST_LEN 64
730 /** The text string containing the title. */
731 #define HPI_PAD_TITLE_LEN 64
732 /** The text string containing the comment. */
733 #define HPI_PAD_COMMENT_LEN 256
734 /** The PTY when the tuner has not received any PTY. */
735 #define HPI_PAD_PROGRAM_TYPE_INVALID 0xffff
736 /** \} */
738 /** Data types for PTY string translation.
739 \ingroup rds
741 enum eHPI_RDS_type {
742 HPI_RDS_DATATYPE_RDS = 0, /**< RDS bitstream.*/
743 HPI_RDS_DATATYPE_RBDS = 1 /**< RBDS bitstream.*/
746 /** Tuner bands
748 Used for HPI_Tuner_SetBand(),HPI_Tuner_GetBand()
749 \ingroup tuner
751 enum HPI_TUNER_BAND {
752 HPI_TUNER_BAND_AM = 1, /**< AM band */
753 HPI_TUNER_BAND_FM = 2, /**< FM band (mono) */
754 HPI_TUNER_BAND_TV_NTSC_M = 3, /**< NTSC-M TV band*/
755 HPI_TUNER_BAND_TV = 3, /* use TV_NTSC_M */
756 HPI_TUNER_BAND_FM_STEREO = 4, /**< FM band (stereo) */
757 HPI_TUNER_BAND_AUX = 5, /**< auxiliary input */
758 HPI_TUNER_BAND_TV_PAL_BG = 6, /**< PAL-B/G TV band*/
759 HPI_TUNER_BAND_TV_PAL_I = 7, /**< PAL-I TV band*/
760 HPI_TUNER_BAND_TV_PAL_DK = 8, /**< PAL-D/K TV band*/
761 HPI_TUNER_BAND_TV_SECAM_L = 9, /**< SECAM-L TV band*/
762 HPI_TUNER_BAND_LAST = 9 /**< the index of the last tuner band. */
765 /** Tuner mode attributes
767 Used by HPI_Tuner_SetMode(), HPI_Tuner_GetMode()
768 \ingroup tuner
771 enum HPI_TUNER_MODES {
772 HPI_TUNER_MODE_RSS = 1, /**< control RSS */
773 HPI_TUNER_MODE_RDS = 2 /**< control RBDS/RDS */
776 /** Tuner mode attribute values
778 Used by HPI_Tuner_SetMode(), HPI_Tuner_GetMode()
779 \ingroup tuner
781 enum HPI_TUNER_MODE_VALUES {
782 /* RSS attribute values */
783 HPI_TUNER_MODE_RSS_DISABLE = 0, /**< RSS disable */
784 HPI_TUNER_MODE_RSS_ENABLE = 1, /**< RSS enable */
786 /* RDS mode attributes */
787 HPI_TUNER_MODE_RDS_DISABLE = 0, /**< RDS - disabled */
788 HPI_TUNER_MODE_RDS_RDS = 1, /**< RDS - RDS mode */
789 HPI_TUNER_MODE_RDS_RBDS = 2 /**< RDS - RBDS mode */
792 /** Tuner Status Bits
794 These bitfield values are returned by a call to HPI_Tuner_GetStatus().
795 Multiple fields are returned from a single call.
796 \ingroup tuner
798 enum HPI_TUNER_STATUS_BITS {
799 HPI_TUNER_VIDEO_COLOR_PRESENT = 0x0001, /**< video color is present. */
800 HPI_TUNER_VIDEO_IS_60HZ = 0x0020, /**< 60 hz video detected. */
801 HPI_TUNER_VIDEO_HORZ_SYNC_MISSING = 0x0040, /**< video HSYNC is missing. */
802 HPI_TUNER_VIDEO_STATUS_VALID = 0x0100, /**< video status is valid. */
803 HPI_TUNER_DIGITAL = 0x0200, /**< tuner reports digital programming. */
804 HPI_TUNER_MULTIPROGRAM = 0x0400, /**< tuner reports multiple programs. */
805 HPI_TUNER_PLL_LOCKED = 0x1000, /**< the tuner's PLL is locked. */
806 HPI_TUNER_FM_STEREO = 0x2000 /**< tuner reports back FM stereo. */
809 /** Channel Modes
810 Used for HPI_ChannelModeSet/Get()
811 \ingroup channelmode
813 enum HPI_CHANNEL_MODES {
814 /** Left channel out = left channel in, Right channel out = right channel in. */
815 HPI_CHANNEL_MODE_NORMAL = 1,
816 /** Left channel out = right channel in, Right channel out = left channel in. */
817 HPI_CHANNEL_MODE_SWAP = 2,
818 /** Left channel out = left channel in, Right channel out = left channel in. */
819 HPI_CHANNEL_MODE_LEFT_TO_STEREO = 3,
820 /** Left channel out = right channel in, Right channel out = right channel in.*/
821 HPI_CHANNEL_MODE_RIGHT_TO_STEREO = 4,
822 /** Left channel out = (left channel in + right channel in)/2,
823 Right channel out = mute. */
824 HPI_CHANNEL_MODE_STEREO_TO_LEFT = 5,
825 /** Left channel out = mute,
826 Right channel out = (right channel in + left channel in)/2. */
827 HPI_CHANNEL_MODE_STEREO_TO_RIGHT = 6,
828 HPI_CHANNEL_MODE_LAST = 6
831 /** SampleClock source values
832 \ingroup sampleclock
834 enum HPI_SAMPLECLOCK_SOURCES {
835 /** The sampleclock output is derived from its local samplerate generator.
836 The local samplerate may be set using HPI_SampleClock_SetLocalRate(). */
837 HPI_SAMPLECLOCK_SOURCE_LOCAL = 1,
838 /** The adapter is clocked from a dedicated AES/EBU SampleClock input.*/
839 HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC = 2,
840 /** From external wordclock connector */
841 HPI_SAMPLECLOCK_SOURCE_WORD = 3,
842 /** Board-to-board header */
843 HPI_SAMPLECLOCK_SOURCE_WORD_HEADER = 4,
844 /** FUTURE - SMPTE clock. */
845 HPI_SAMPLECLOCK_SOURCE_SMPTE = 5,
846 /** One of the aesebu inputs */
847 HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT = 6,
848 /** From a network interface e.g. Cobranet or Livewire at either 48 or 96kHz */
849 HPI_SAMPLECLOCK_SOURCE_NETWORK = 8,
850 /** From previous adjacent module (ASI2416 only)*/
851 HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10,
852 /*! Update this if you add a new clock source.*/
853 HPI_SAMPLECLOCK_SOURCE_LAST = 10
856 /** Equalizer filter types. Used by HPI_ParametricEq_SetBand()
857 \ingroup parmeq
859 enum HPI_FILTER_TYPE {
860 HPI_FILTER_TYPE_BYPASS = 0, /**< filter is turned off */
862 HPI_FILTER_TYPE_LOWSHELF = 1, /**< EQ low shelf */
863 HPI_FILTER_TYPE_HIGHSHELF = 2, /**< EQ high shelf */
864 HPI_FILTER_TYPE_EQ_BAND = 3, /**< EQ gain */
866 HPI_FILTER_TYPE_LOWPASS = 4, /**< standard low pass */
867 HPI_FILTER_TYPE_HIGHPASS = 5, /**< standard high pass */
868 HPI_FILTER_TYPE_BANDPASS = 6, /**< standard band pass */
869 HPI_FILTER_TYPE_BANDSTOP = 7 /**< standard band stop/notch */
872 /** Async Event sources
873 \ingroup async
875 enum ASYNC_EVENT_SOURCES {
876 HPI_ASYNC_EVENT_GPIO = 1, /**< GPIO event. */
877 HPI_ASYNC_EVENT_SILENCE = 2, /**< silence event detected. */
878 HPI_ASYNC_EVENT_TONE = 3 /**< tone event detected. */
880 /*******************************************/
881 /** HPI Error codes
883 Almost all HPI functions return an error code
884 A return value of zero means there was no error.
885 Otherwise one of these error codes is returned.
886 Error codes can be converted to a descriptive string using HPI_GetErrorText()
888 \note When a new error code is added HPI_GetErrorText() MUST be updated.
889 \note Codes 1-100 are reserved for driver use
890 \ingroup utility
892 enum HPI_ERROR_CODES {
893 /** Message type does not exist. */
894 HPI_ERROR_INVALID_TYPE = 100,
895 /** Object type does not exist. */
896 HPI_ERROR_INVALID_OBJ = 101,
897 /** Function does not exist. */
898 HPI_ERROR_INVALID_FUNC = 102,
899 /** The specified object does not exist. */
900 HPI_ERROR_INVALID_OBJ_INDEX = 103,
901 /** Trying to access an object that has not been opened yet. */
902 HPI_ERROR_OBJ_NOT_OPEN = 104,
903 /** Trying to open an already open object. */
904 HPI_ERROR_OBJ_ALREADY_OPEN = 105,
905 /** PCI, ISA resource not valid. */
906 HPI_ERROR_INVALID_RESOURCE = 106,
907 /* HPI_ERROR_SUBSYSFINDADAPTERS_GETINFO= 107 */
908 /** Default response was never updated with actual error code. */
909 HPI_ERROR_INVALID_RESPONSE = 108,
910 /** wSize field of response was not updated,
911 indicating that the message was not processed. */
912 HPI_ERROR_PROCESSING_MESSAGE = 109,
913 /** The network did not respond in a timely manner. */
914 HPI_ERROR_NETWORK_TIMEOUT = 110,
915 /* An HPI handle is invalid (uninitialised?). */
916 HPI_ERROR_INVALID_HANDLE = 111,
917 /** A function or attribute has not been implemented yet. */
918 HPI_ERROR_UNIMPLEMENTED = 112,
919 /** There are too many clients attempting
920 to access a network resource. */
921 HPI_ERROR_NETWORK_TOO_MANY_CLIENTS = 113,
922 /** Response buffer passed to HPI_Message
923 was smaller than returned response.
924 wSpecificError field of hpi response contains the required size.
926 HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL = 114,
927 /** The returned response did not match the sent message */
928 HPI_ERROR_RESPONSE_MISMATCH = 115,
929 /** A control setting that should have been cached was not. */
930 HPI_ERROR_CONTROL_CACHING = 116,
931 /** A message buffer in the path to the adapter was smaller
932 than the message size.
933 wSpecificError field of hpi response contains the actual size.
935 HPI_ERROR_MESSAGE_BUFFER_TOO_SMALL = 117,
937 /* HPI_ERROR_TOO_MANY_ADAPTERS= 200 */
938 /** Bad adpater. */
939 HPI_ERROR_BAD_ADAPTER = 201,
940 /** Adapter number out of range or not set properly. */
941 HPI_ERROR_BAD_ADAPTER_NUMBER = 202,
942 /** 2 adapters with the same adapter number. */
943 HPI_ERROR_DUPLICATE_ADAPTER_NUMBER = 203,
944 /** DSP code failed to bootload. (unused?) */
945 HPI_ERROR_DSP_BOOTLOAD = 204,
946 /** Couldn't find or open the DSP code file. */
947 HPI_ERROR_DSP_FILE_NOT_FOUND = 206,
948 /** Internal DSP hardware error. */
949 HPI_ERROR_DSP_HARDWARE = 207,
950 /** Could not allocate memory */
951 HPI_ERROR_MEMORY_ALLOC = 208,
952 /** Failed to correctly load/config PLD. (unused) */
953 HPI_ERROR_PLD_LOAD = 209,
954 /** Unexpected end of file, block length too big etc. */
955 HPI_ERROR_DSP_FILE_FORMAT = 210,
957 /** Found but could not open DSP code file. */
958 HPI_ERROR_DSP_FILE_ACCESS_DENIED = 211,
959 /** First DSP code section header not found in DSP file. */
960 HPI_ERROR_DSP_FILE_NO_HEADER = 212,
961 /* HPI_ERROR_DSP_FILE_READ_ERROR= 213, */
962 /** DSP code for adapter family not found. */
963 HPI_ERROR_DSP_SECTION_NOT_FOUND = 214,
964 /** Other OS specific error opening DSP file. */
965 HPI_ERROR_DSP_FILE_OTHER_ERROR = 215,
966 /** Sharing violation opening DSP code file. */
967 HPI_ERROR_DSP_FILE_SHARING_VIOLATION = 216,
968 /** DSP code section header had size == 0. */
969 HPI_ERROR_DSP_FILE_NULL_HEADER = 217,
971 /* HPI_ERROR_FLASH = 220, */
973 /** Flash has bad checksum */
974 HPI_ERROR_BAD_CHECKSUM = 221,
975 HPI_ERROR_BAD_SEQUENCE = 222,
976 HPI_ERROR_FLASH_ERASE = 223,
977 HPI_ERROR_FLASH_PROGRAM = 224,
978 HPI_ERROR_FLASH_VERIFY = 225,
979 HPI_ERROR_FLASH_TYPE = 226,
980 HPI_ERROR_FLASH_START = 227,
982 /** Reserved for OEMs. */
983 HPI_ERROR_RESERVED_1 = 290,
985 /* HPI_ERROR_INVALID_STREAM = 300 use HPI_ERROR_INVALID_OBJ_INDEX */
986 /** Invalid compression format. */
987 HPI_ERROR_INVALID_FORMAT = 301,
988 /** Invalid format samplerate */
989 HPI_ERROR_INVALID_SAMPLERATE = 302,
990 /** Invalid format number of channels. */
991 HPI_ERROR_INVALID_CHANNELS = 303,
992 /** Invalid format bitrate. */
993 HPI_ERROR_INVALID_BITRATE = 304,
994 /** Invalid datasize used for stream read/write. */
995 HPI_ERROR_INVALID_DATASIZE = 305,
996 /* HPI_ERROR_BUFFER_FULL = 306 use HPI_ERROR_INVALID_DATASIZE */
997 /* HPI_ERROR_BUFFER_EMPTY = 307 use HPI_ERROR_INVALID_DATASIZE */
998 /** Null data pointer used for stream read/write. */
999 HPI_ERROR_INVALID_DATA_POINTER = 308,
1000 /** Packet ordering error for stream read/write. */
1001 HPI_ERROR_INVALID_PACKET_ORDER = 309,
1003 /** Object can't do requested operation in its current
1004 state, eg set format, change rec mux state while recording.*/
1005 HPI_ERROR_INVALID_OPERATION = 310,
1007 /** Where a SRG is shared amongst streams, an incompatible samplerate
1008 is one that is different to any currently active stream. */
1009 HPI_ERROR_INCOMPATIBLE_SAMPLERATE = 311,
1010 /** Adapter mode is illegal.*/
1011 HPI_ERROR_BAD_ADAPTER_MODE = 312,
1013 /** There have been too many attempts to set the adapter's
1014 capabilities (using bad keys), the card should be returned
1015 to ASI if further capabilities updates are required */
1016 HPI_ERROR_TOO_MANY_CAPABILITY_CHANGE_ATTEMPTS = 313,
1017 /** Streams on different adapters cannot be grouped. */
1018 HPI_ERROR_NO_INTERADAPTER_GROUPS = 314,
1019 /** Streams on different DSPs cannot be grouped. */
1020 HPI_ERROR_NO_INTERDSP_GROUPS = 315,
1021 /** Stream wait cancelled before threshold reached. */
1022 HPI_ERROR_WAIT_CANCELLED = 316,
1024 /** Invalid mixer node for this adapter. */
1025 HPI_ERROR_INVALID_NODE = 400,
1026 /** Invalid control. */
1027 HPI_ERROR_INVALID_CONTROL = 401,
1028 /** Invalid control value was passed. */
1029 HPI_ERROR_INVALID_CONTROL_VALUE = 402,
1030 /** Control attribute not supported by this control. */
1031 HPI_ERROR_INVALID_CONTROL_ATTRIBUTE = 403,
1032 /** Control is disabled. */
1033 HPI_ERROR_CONTROL_DISABLED = 404,
1034 /** I2C transaction failed due to a missing ACK. */
1035 HPI_ERROR_CONTROL_I2C_MISSING_ACK = 405,
1036 HPI_ERROR_I2C_MISSING_ACK = 405,
1037 /** Control is busy, or coming out of
1038 reset and cannot be accessed at this time. */
1039 HPI_ERROR_CONTROL_NOT_READY = 407,
1041 /** Non volatile memory */
1042 HPI_ERROR_NVMEM_BUSY = 450,
1043 HPI_ERROR_NVMEM_FULL = 451,
1044 HPI_ERROR_NVMEM_FAIL = 452,
1046 /** I2C */
1047 HPI_ERROR_I2C_BAD_ADR = 460,
1049 /** Entity errors */
1050 HPI_ERROR_ENTITY_TYPE_MISMATCH = 470,
1051 HPI_ERROR_ENTITY_ITEM_COUNT = 471,
1052 HPI_ERROR_ENTITY_TYPE_INVALID = 472,
1053 HPI_ERROR_ENTITY_ROLE_INVALID = 473,
1054 HPI_ERROR_ENTITY_SIZE_MISMATCH = 474,
1056 /* AES18 specific errors were 500..507 */
1058 /** custom error to use for debugging */
1059 HPI_ERROR_CUSTOM = 600,
1061 /** hpioct32.c can't obtain mutex */
1062 HPI_ERROR_MUTEX_TIMEOUT = 700,
1064 /** Backend errors used to be greater than this.
1065 \deprecated Now, all backends return only errors defined here in hpi.h
1067 HPI_ERROR_BACKEND_BASE = 900,
1069 /** Communication with DSP failed */
1070 HPI_ERROR_DSP_COMMUNICATION = 900
1071 /* Note that the dsp communication error is set to this value so that
1072 it remains compatible with any software that expects such errors
1073 to be backend errors i.e. >= 900.
1074 Do not define any new error codes with values > 900.
1078 /** \defgroup maximums HPI maximum values
1081 /** Maximum number of adapters per HPI sub-system
1082 WARNING: modifying this value changes the response structure size.*/
1083 #define HPI_MAX_ADAPTERS 20
1084 /** Maximum number of in or out streams per adapter */
1085 #define HPI_MAX_STREAMS 16
1086 #define HPI_MAX_CHANNELS 2 /* per stream */
1087 #define HPI_MAX_NODES 8 /* per mixer ? */
1088 #define HPI_MAX_CONTROLS 4 /* per node ? */
1089 /** maximum number of ancillary bytes per MPEG frame */
1090 #define HPI_MAX_ANC_BYTES_PER_FRAME (64)
1091 #define HPI_STRING_LEN 16
1093 /** Velocity units */
1094 #define HPI_OSTREAM_VELOCITY_UNITS 4096
1095 /** OutStream timescale units */
1096 #define HPI_OSTREAM_TIMESCALE_UNITS 10000
1097 /** OutStream timescale passthrough - turns timescaling on in passthough mode */
1098 #define HPI_OSTREAM_TIMESCALE_PASSTHROUGH 99999
1100 /**\}*/
1102 /**************/
1103 /* STRUCTURES */
1104 #ifndef DISABLE_PRAGMA_PACK1
1105 #pragma pack(push, 1)
1106 #endif
1108 /** Structure containing sample format information.
1109 See also HPI_FormatCreate().
1111 struct hpi_format {
1112 u32 sample_rate;
1113 /**< 11025, 32000, 44100 ... */
1114 u32 bit_rate; /**< for MPEG */
1115 u32 attributes;
1116 /**< Stereo/JointStereo/Mono */
1117 u16 mode_legacy;
1118 /**< Legacy ancillary mode or idle bit */
1119 u16 unused; /**< Unused */
1120 u16 channels; /**< 1,2..., (or ancillary mode or idle bit */
1121 u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see #HPI_FORMATS. */
1124 struct hpi_anc_frame {
1125 u32 valid_bits_in_this_frame;
1126 u8 b_data[HPI_MAX_ANC_BYTES_PER_FRAME];
1129 /** An object for containing a single async event.
1131 struct hpi_async_event {
1132 u16 event_type; /**< type of event. \sa async_event */
1133 u16 sequence; /**< Sequence number, allows lost event detection */
1134 u32 state; /**< New state */
1135 u32 h_object; /**< handle to the object returning the event. */
1136 union {
1137 struct {
1138 u16 index; /**< GPIO bit index. */
1139 } gpio;
1140 struct {
1141 u16 node_index; /**< what node is the control on ? */
1142 u16 node_type; /**< what type of node is the control on ? */
1143 } control;
1144 } u;
1147 /* skip host side function declarations for
1148 DSP compile and documentation extraction */
1150 #ifndef DISABLE_PRAGMA_PACK1
1151 #pragma pack(pop)
1152 #endif
1154 /*****************/
1155 /* HPI FUNCTIONS */
1156 /*****************/
1158 /* Stream */
1159 u16 hpi_stream_estimate_buffer_size(struct hpi_format *pF,
1160 u32 host_polling_rate_in_milli_seconds, u32 *recommended_buffer_size);
1162 /*************/
1163 /* SubSystem */
1164 /*************/
1166 u16 hpi_subsys_get_version_ex(u32 *pversion_ex);
1168 u16 hpi_subsys_get_num_adapters(int *pn_num_adapters);
1170 u16 hpi_subsys_get_adapter(int iterator, u32 *padapter_index,
1171 u16 *pw_adapter_type);
1173 /***********/
1174 /* Adapter */
1175 /***********/
1177 u16 hpi_adapter_open(u16 adapter_index);
1179 u16 hpi_adapter_close(u16 adapter_index);
1181 u16 hpi_adapter_get_info(u16 adapter_index, u16 *pw_num_outstreams,
1182 u16 *pw_num_instreams, u16 *pw_version, u32 *pserial_number,
1183 u16 *pw_adapter_type);
1185 u16 hpi_adapter_get_module_by_index(u16 adapter_index, u16 module_index,
1186 u16 *pw_num_outputs, u16 *pw_num_inputs, u16 *pw_version,
1187 u32 *pserial_number, u16 *pw_module_type, u32 *ph_module);
1189 u16 hpi_adapter_set_mode(u16 adapter_index, u32 adapter_mode);
1191 u16 hpi_adapter_set_mode_ex(u16 adapter_index, u32 adapter_mode,
1192 u16 query_or_set);
1194 u16 hpi_adapter_get_mode(u16 adapter_index, u32 *padapter_mode);
1196 u16 hpi_adapter_get_assert2(u16 adapter_index, u16 *p_assert_count,
1197 char *psz_assert, u32 *p_param1, u32 *p_param2,
1198 u32 *p_dsp_string_addr, u16 *p_processor_id);
1200 u16 hpi_adapter_test_assert(u16 adapter_index, u16 assert_id);
1202 u16 hpi_adapter_enable_capability(u16 adapter_index, u16 capability, u32 key);
1204 u16 hpi_adapter_self_test(u16 adapter_index);
1206 u16 hpi_adapter_debug_read(u16 adapter_index, u32 dsp_address, char *p_bytes,
1207 int *count_bytes);
1209 u16 hpi_adapter_set_property(u16 adapter_index, u16 property, u16 paramter1,
1210 u16 paramter2);
1212 u16 hpi_adapter_get_property(u16 adapter_index, u16 property,
1213 u16 *pw_paramter1, u16 *pw_paramter2);
1215 u16 hpi_adapter_enumerate_property(u16 adapter_index, u16 index,
1216 u16 what_to_enumerate, u16 property_index, u32 *psetting);
1217 /*************/
1218 /* OutStream */
1219 /*************/
1220 u16 hpi_outstream_open(u16 adapter_index, u16 outstream_index,
1221 u32 *ph_outstream);
1223 u16 hpi_outstream_close(u32 h_outstream);
1225 u16 hpi_outstream_get_info_ex(u32 h_outstream, u16 *pw_state,
1226 u32 *pbuffer_size, u32 *pdata_to_play, u32 *psamples_played,
1227 u32 *pauxiliary_data_to_play);
1229 u16 hpi_outstream_write_buf(u32 h_outstream, const u8 *pb_write_buf,
1230 u32 bytes_to_write, const struct hpi_format *p_format);
1232 u16 hpi_outstream_start(u32 h_outstream);
1234 u16 hpi_outstream_wait_start(u32 h_outstream);
1236 u16 hpi_outstream_stop(u32 h_outstream);
1238 u16 hpi_outstream_sinegen(u32 h_outstream);
1240 u16 hpi_outstream_reset(u32 h_outstream);
1242 u16 hpi_outstream_query_format(u32 h_outstream, struct hpi_format *p_format);
1244 u16 hpi_outstream_set_format(u32 h_outstream, struct hpi_format *p_format);
1246 u16 hpi_outstream_set_punch_in_out(u32 h_outstream, u32 punch_in_sample,
1247 u32 punch_out_sample);
1249 u16 hpi_outstream_set_velocity(u32 h_outstream, short velocity);
1251 u16 hpi_outstream_ancillary_reset(u32 h_outstream, u16 mode);
1253 u16 hpi_outstream_ancillary_get_info(u32 h_outstream, u32 *pframes_available);
1255 u16 hpi_outstream_ancillary_read(u32 h_outstream,
1256 struct hpi_anc_frame *p_anc_frame_buffer,
1257 u32 anc_frame_buffer_size_in_bytes,
1258 u32 number_of_ancillary_frames_to_read);
1260 u16 hpi_outstream_set_time_scale(u32 h_outstream, u32 time_scaleX10000);
1262 u16 hpi_outstream_host_buffer_allocate(u32 h_outstream, u32 size_in_bytes);
1264 u16 hpi_outstream_host_buffer_free(u32 h_outstream);
1266 u16 hpi_outstream_group_add(u32 h_outstream, u32 h_stream);
1268 u16 hpi_outstream_group_get_map(u32 h_outstream, u32 *poutstream_map,
1269 u32 *pinstream_map);
1271 u16 hpi_outstream_group_reset(u32 h_outstream);
1273 /************/
1274 /* InStream */
1275 /************/
1276 u16 hpi_instream_open(u16 adapter_index, u16 instream_index,
1277 u32 *ph_instream);
1279 u16 hpi_instream_close(u32 h_instream);
1281 u16 hpi_instream_query_format(u32 h_instream,
1282 const struct hpi_format *p_format);
1284 u16 hpi_instream_set_format(u32 h_instream,
1285 const struct hpi_format *p_format);
1287 u16 hpi_instream_read_buf(u32 h_instream, u8 *pb_read_buf, u32 bytes_to_read);
1289 u16 hpi_instream_start(u32 h_instream);
1291 u16 hpi_instream_wait_start(u32 h_instream);
1293 u16 hpi_instream_stop(u32 h_instream);
1295 u16 hpi_instream_reset(u32 h_instream);
1297 u16 hpi_instream_get_info_ex(u32 h_instream, u16 *pw_state, u32 *pbuffer_size,
1298 u32 *pdata_recorded, u32 *psamples_recorded,
1299 u32 *pauxiliary_data_recorded);
1301 u16 hpi_instream_ancillary_reset(u32 h_instream, u16 bytes_per_frame,
1302 u16 mode, u16 alignment, u16 idle_bit);
1304 u16 hpi_instream_ancillary_get_info(u32 h_instream, u32 *pframe_space);
1306 u16 hpi_instream_ancillary_write(u32 h_instream,
1307 const struct hpi_anc_frame *p_anc_frame_buffer,
1308 u32 anc_frame_buffer_size_in_bytes,
1309 u32 number_of_ancillary_frames_to_write);
1311 u16 hpi_instream_host_buffer_allocate(u32 h_instream, u32 size_in_bytes);
1313 u16 hpi_instream_host_buffer_free(u32 h_instream);
1315 u16 hpi_instream_group_add(u32 h_instream, u32 h_stream);
1317 u16 hpi_instream_group_get_map(u32 h_instream, u32 *poutstream_map,
1318 u32 *pinstream_map);
1320 u16 hpi_instream_group_reset(u32 h_instream);
1322 /*********/
1323 /* Mixer */
1324 /*********/
1325 u16 hpi_mixer_open(u16 adapter_index, u32 *ph_mixer);
1327 u16 hpi_mixer_close(u32 h_mixer);
1329 u16 hpi_mixer_get_control(u32 h_mixer, u16 src_node_type,
1330 u16 src_node_type_index, u16 dst_node_type, u16 dst_node_type_index,
1331 u16 control_type, u32 *ph_control);
1333 u16 hpi_mixer_get_control_by_index(u32 h_mixer, u16 control_index,
1334 u16 *pw_src_node_type, u16 *pw_src_node_index, u16 *pw_dst_node_type,
1335 u16 *pw_dst_node_index, u16 *pw_control_type, u32 *ph_control);
1337 u16 hpi_mixer_store(u32 h_mixer, enum HPI_MIXER_STORE_COMMAND command,
1338 u16 index);
1339 /************/
1340 /* Controls */
1341 /************/
1342 /******************/
1343 /* Volume control */
1344 /******************/
1345 u16 hpi_volume_set_gain(u32 h_control, short an_gain0_01dB[HPI_MAX_CHANNELS]
1348 u16 hpi_volume_get_gain(u32 h_control,
1349 short an_gain0_01dB_out[HPI_MAX_CHANNELS]
1352 u16 hpi_volume_set_mute(u32 h_control, u32 mute);
1354 u16 hpi_volume_get_mute(u32 h_control, u32 *mute);
1356 #define hpi_volume_get_range hpi_volume_query_range
1357 u16 hpi_volume_query_range(u32 h_control, short *min_gain_01dB,
1358 short *max_gain_01dB, short *step_gain_01dB);
1360 u16 hpi_volume_query_channels(const u32 h_volume, u32 *p_channels);
1362 u16 hpi_volume_auto_fade(u32 h_control,
1363 short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms);
1365 u16 hpi_volume_auto_fade_profile(u32 h_control,
1366 short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms,
1367 u16 profile);
1369 /*****************/
1370 /* Level control */
1371 /*****************/
1372 u16 hpi_level_query_range(u32 h_control, short *min_gain_01dB,
1373 short *max_gain_01dB, short *step_gain_01dB);
1375 u16 hpi_level_set_gain(u32 h_control, short an_gain0_01dB[HPI_MAX_CHANNELS]
1378 u16 hpi_level_get_gain(u32 h_control,
1379 short an_gain0_01dB_out[HPI_MAX_CHANNELS]
1382 /*****************/
1383 /* Meter control */
1384 /*****************/
1385 u16 hpi_meter_query_channels(const u32 h_meter, u32 *p_channels);
1387 u16 hpi_meter_get_peak(u32 h_control,
1388 short an_peak0_01dB_out[HPI_MAX_CHANNELS]
1391 u16 hpi_meter_get_rms(u32 h_control, short an_peak0_01dB_out[HPI_MAX_CHANNELS]
1394 u16 hpi_meter_set_peak_ballistics(u32 h_control, u16 attack, u16 decay);
1396 u16 hpi_meter_set_rms_ballistics(u32 h_control, u16 attack, u16 decay);
1398 u16 hpi_meter_get_peak_ballistics(u32 h_control, u16 *attack, u16 *decay);
1400 u16 hpi_meter_get_rms_ballistics(u32 h_control, u16 *attack, u16 *decay);
1402 /************************/
1403 /* ChannelMode control */
1404 /************************/
1405 u16 hpi_channel_mode_query_mode(const u32 h_mode, const u32 index,
1406 u16 *pw_mode);
1408 u16 hpi_channel_mode_set(u32 h_control, u16 mode);
1410 u16 hpi_channel_mode_get(u32 h_control, u16 *mode);
1412 /*****************/
1413 /* Tuner control */
1414 /*****************/
1415 u16 hpi_tuner_query_band(const u32 h_tuner, const u32 index, u16 *pw_band);
1417 u16 hpi_tuner_set_band(u32 h_control, u16 band);
1419 u16 hpi_tuner_get_band(u32 h_control, u16 *pw_band);
1421 u16 hpi_tuner_query_frequency(const u32 h_tuner, const u32 index,
1422 const u16 band, u32 *pfreq);
1424 u16 hpi_tuner_set_frequency(u32 h_control, u32 freq_ink_hz);
1426 u16 hpi_tuner_get_frequency(u32 h_control, u32 *pw_freq_ink_hz);
1428 u16 hpi_tuner_get_rf_level(u32 h_control, short *pw_level);
1430 u16 hpi_tuner_get_raw_rf_level(u32 h_control, short *pw_level);
1432 u16 hpi_tuner_query_gain(const u32 h_tuner, const u32 index, u16 *pw_gain);
1434 u16 hpi_tuner_set_gain(u32 h_control, short gain);
1436 u16 hpi_tuner_get_gain(u32 h_control, short *pn_gain);
1438 u16 hpi_tuner_get_status(u32 h_control, u16 *pw_status_mask, u16 *pw_status);
1440 u16 hpi_tuner_set_mode(u32 h_control, u32 mode, u32 value);
1442 u16 hpi_tuner_get_mode(u32 h_control, u32 mode, u32 *pn_value);
1444 u16 hpi_tuner_get_rds(u32 h_control, char *p_rds_data);
1446 u16 hpi_tuner_query_deemphasis(const u32 h_tuner, const u32 index,
1447 const u16 band, u32 *pdeemphasis);
1449 u16 hpi_tuner_set_deemphasis(u32 h_control, u32 deemphasis);
1450 u16 hpi_tuner_get_deemphasis(u32 h_control, u32 *pdeemphasis);
1452 u16 hpi_tuner_query_program(const u32 h_tuner, u32 *pbitmap_program);
1454 u16 hpi_tuner_set_program(u32 h_control, u32 program);
1456 u16 hpi_tuner_get_program(u32 h_control, u32 *pprogram);
1458 u16 hpi_tuner_get_hd_radio_dsp_version(u32 h_control, char *psz_dsp_version,
1459 const u32 string_size);
1461 u16 hpi_tuner_get_hd_radio_sdk_version(u32 h_control, char *psz_sdk_version,
1462 const u32 string_size);
1464 u16 hpi_tuner_get_hd_radio_signal_quality(u32 h_control, u32 *pquality);
1466 u16 hpi_tuner_get_hd_radio_signal_blend(u32 h_control, u32 *pblend);
1468 u16 hpi_tuner_set_hd_radio_signal_blend(u32 h_control, const u32 blend);
1470 /***************/
1471 /* PAD control */
1472 /***************/
1474 u16 hpi_pad_get_channel_name(u32 h_control, char *psz_string,
1475 const u32 string_length);
1477 u16 hpi_pad_get_artist(u32 h_control, char *psz_string,
1478 const u32 string_length);
1480 u16 hpi_pad_get_title(u32 h_control, char *psz_string,
1481 const u32 string_length);
1483 u16 hpi_pad_get_comment(u32 h_control, char *psz_string,
1484 const u32 string_length);
1486 u16 hpi_pad_get_program_type(u32 h_control, u32 *ppTY);
1488 u16 hpi_pad_get_rdsPI(u32 h_control, u32 *ppI);
1490 u16 hpi_pad_get_program_type_string(u32 h_control, const u32 data_type,
1491 const u32 pTY, char *psz_string, const u32 string_length);
1493 /****************************/
1494 /* AES/EBU Receiver control */
1495 /****************************/
1496 u16 hpi_aesebu_receiver_query_format(const u32 h_aes_rx, const u32 index,
1497 u16 *pw_format);
1499 u16 hpi_aesebu_receiver_set_format(u32 h_control, u16 source);
1501 u16 hpi_aesebu_receiver_get_format(u32 h_control, u16 *pw_source);
1503 u16 hpi_aesebu_receiver_get_sample_rate(u32 h_control, u32 *psample_rate);
1505 u16 hpi_aesebu_receiver_get_user_data(u32 h_control, u16 index, u16 *pw_data);
1507 u16 hpi_aesebu_receiver_get_channel_status(u32 h_control, u16 index,
1508 u16 *pw_data);
1510 u16 hpi_aesebu_receiver_get_error_status(u32 h_control, u16 *pw_error_data);
1512 /*******************************/
1513 /* AES/EBU Transmitter control */
1514 /*******************************/
1515 u16 hpi_aesebu_transmitter_set_sample_rate(u32 h_control, u32 sample_rate);
1517 u16 hpi_aesebu_transmitter_set_user_data(u32 h_control, u16 index, u16 data);
1519 u16 hpi_aesebu_transmitter_set_channel_status(u32 h_control, u16 index,
1520 u16 data);
1522 u16 hpi_aesebu_transmitter_get_channel_status(u32 h_control, u16 index,
1523 u16 *pw_data);
1525 u16 hpi_aesebu_transmitter_query_format(const u32 h_aes_tx, const u32 index,
1526 u16 *pw_format);
1528 u16 hpi_aesebu_transmitter_set_format(u32 h_control, u16 output_format);
1530 u16 hpi_aesebu_transmitter_get_format(u32 h_control, u16 *pw_output_format);
1532 /***********************/
1533 /* Multiplexer control */
1534 /***********************/
1535 u16 hpi_multiplexer_set_source(u32 h_control, u16 source_node_type,
1536 u16 source_node_index);
1538 u16 hpi_multiplexer_get_source(u32 h_control, u16 *source_node_type,
1539 u16 *source_node_index);
1541 u16 hpi_multiplexer_query_source(u32 h_control, u16 index,
1542 u16 *source_node_type, u16 *source_node_index);
1544 /***************/
1545 /* Vox control */
1546 /***************/
1547 u16 hpi_vox_set_threshold(u32 h_control, short an_gain0_01dB);
1549 u16 hpi_vox_get_threshold(u32 h_control, short *an_gain0_01dB);
1551 /*********************/
1552 /* Bitstream control */
1553 /*********************/
1554 u16 hpi_bitstream_set_clock_edge(u32 h_control, u16 edge_type);
1556 u16 hpi_bitstream_set_data_polarity(u32 h_control, u16 polarity);
1558 u16 hpi_bitstream_get_activity(u32 h_control, u16 *pw_clk_activity,
1559 u16 *pw_data_activity);
1561 /***********************/
1562 /* SampleClock control */
1563 /***********************/
1565 u16 hpi_sample_clock_query_source(const u32 h_clock, const u32 index,
1566 u16 *pw_source);
1568 u16 hpi_sample_clock_set_source(u32 h_control, u16 source);
1570 u16 hpi_sample_clock_get_source(u32 h_control, u16 *pw_source);
1572 u16 hpi_sample_clock_query_source_index(const u32 h_clock, const u32 index,
1573 const u32 source, u16 *pw_source_index);
1575 u16 hpi_sample_clock_set_source_index(u32 h_control, u16 source_index);
1577 u16 hpi_sample_clock_get_source_index(u32 h_control, u16 *pw_source_index);
1579 u16 hpi_sample_clock_get_sample_rate(u32 h_control, u32 *psample_rate);
1581 u16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index,
1582 u32 *psource);
1584 u16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate);
1586 u16 hpi_sample_clock_get_local_rate(u32 h_control, u32 *psample_rate);
1588 u16 hpi_sample_clock_set_auto(u32 h_control, u32 enable);
1590 u16 hpi_sample_clock_get_auto(u32 h_control, u32 *penable);
1592 u16 hpi_sample_clock_set_local_rate_lock(u32 h_control, u32 lock);
1594 u16 hpi_sample_clock_get_local_rate_lock(u32 h_control, u32 *plock);
1596 /***********************/
1597 /* Microphone control */
1598 /***********************/
1599 u16 hpi_microphone_set_phantom_power(u32 h_control, u16 on_off);
1601 u16 hpi_microphone_get_phantom_power(u32 h_control, u16 *pw_on_off);
1603 /********************************/
1604 /* Parametric Equalizer control */
1605 /********************************/
1606 u16 hpi_parametric_eq_get_info(u32 h_control, u16 *pw_number_of_bands,
1607 u16 *pw_enabled);
1609 u16 hpi_parametric_eq_set_state(u32 h_control, u16 on_off);
1611 u16 hpi_parametric_eq_set_band(u32 h_control, u16 index, u16 type,
1612 u32 frequency_hz, short q100, short gain0_01dB);
1614 u16 hpi_parametric_eq_get_band(u32 h_control, u16 index, u16 *pn_type,
1615 u32 *pfrequency_hz, short *pnQ100, short *pn_gain0_01dB);
1617 u16 hpi_parametric_eq_get_coeffs(u32 h_control, u16 index, short coeffs[5]
1620 /*******************************/
1621 /* Compressor Expander control */
1622 /*******************************/
1624 u16 hpi_compander_set_enable(u32 h_control, u32 on);
1626 u16 hpi_compander_get_enable(u32 h_control, u32 *pon);
1628 u16 hpi_compander_set_makeup_gain(u32 h_control, short makeup_gain0_01dB);
1630 u16 hpi_compander_get_makeup_gain(u32 h_control, short *pn_makeup_gain0_01dB);
1632 u16 hpi_compander_set_attack_time_constant(u32 h_control, u32 index,
1633 u32 attack);
1635 u16 hpi_compander_get_attack_time_constant(u32 h_control, u32 index,
1636 u32 *pw_attack);
1638 u16 hpi_compander_set_decay_time_constant(u32 h_control, u32 index,
1639 u32 decay);
1641 u16 hpi_compander_get_decay_time_constant(u32 h_control, u32 index,
1642 u32 *pw_decay);
1644 u16 hpi_compander_set_threshold(u32 h_control, u32 index,
1645 short threshold0_01dB);
1647 u16 hpi_compander_get_threshold(u32 h_control, u32 index,
1648 short *pn_threshold0_01dB);
1650 u16 hpi_compander_set_ratio(u32 h_control, u32 index, u32 ratio100);
1652 u16 hpi_compander_get_ratio(u32 h_control, u32 index, u32 *pw_ratio100);
1654 /********************/
1655 /* Cobranet control */
1656 /********************/
1657 u16 hpi_cobranet_hmi_write(u32 h_control, u32 hmi_address, u32 byte_count,
1658 u8 *pb_data);
1660 u16 hpi_cobranet_hmi_read(u32 h_control, u32 hmi_address, u32 max_byte_count,
1661 u32 *pbyte_count, u8 *pb_data);
1663 u16 hpi_cobranet_hmi_get_status(u32 h_control, u32 *pstatus,
1664 u32 *preadable_size, u32 *pwriteable_size);
1666 u16 hpi_cobranet_get_ip_address(u32 h_control, u32 *pdw_ip_address);
1668 u16 hpi_cobranet_set_ip_address(u32 h_control, u32 dw_ip_address);
1670 u16 hpi_cobranet_get_static_ip_address(u32 h_control, u32 *pdw_ip_address);
1672 u16 hpi_cobranet_set_static_ip_address(u32 h_control, u32 dw_ip_address);
1674 u16 hpi_cobranet_get_macaddress(u32 h_control, u32 *p_mac_msbs,
1675 u32 *p_mac_lsbs);
1677 /*************************/
1678 /* Tone Detector control */
1679 /*************************/
1680 u16 hpi_tone_detector_get_state(u32 hC, u32 *state);
1682 u16 hpi_tone_detector_set_enable(u32 hC, u32 enable);
1684 u16 hpi_tone_detector_get_enable(u32 hC, u32 *enable);
1686 u16 hpi_tone_detector_set_event_enable(u32 hC, u32 event_enable);
1688 u16 hpi_tone_detector_get_event_enable(u32 hC, u32 *event_enable);
1690 u16 hpi_tone_detector_set_threshold(u32 hC, int threshold);
1692 u16 hpi_tone_detector_get_threshold(u32 hC, int *threshold);
1694 u16 hpi_tone_detector_get_frequency(u32 hC, u32 index, u32 *frequency);
1696 /****************************/
1697 /* Silence Detector control */
1698 /****************************/
1699 u16 hpi_silence_detector_get_state(u32 hC, u32 *state);
1701 u16 hpi_silence_detector_set_enable(u32 hC, u32 enable);
1703 u16 hpi_silence_detector_get_enable(u32 hC, u32 *enable);
1705 u16 hpi_silence_detector_set_event_enable(u32 hC, u32 event_enable);
1707 u16 hpi_silence_detector_get_event_enable(u32 hC, u32 *event_enable);
1709 u16 hpi_silence_detector_set_delay(u32 hC, u32 delay);
1711 u16 hpi_silence_detector_get_delay(u32 hC, u32 *delay);
1713 u16 hpi_silence_detector_set_threshold(u32 hC, int threshold);
1715 u16 hpi_silence_detector_get_threshold(u32 hC, int *threshold);
1716 /*********************/
1717 /* Utility functions */
1718 /*********************/
1720 u16 hpi_format_create(struct hpi_format *p_format, u16 channels, u16 format,
1721 u32 sample_rate, u32 bit_rate, u32 attributes);
1723 #endif /*_HPI_H_ */