]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - sound/pci/asihpi/hpi.h
Merge branch 'xen/dev-evtchn' into upstream/evtchn
[mirror_ubuntu-hirsute-kernel.git] / sound / pci / asihpi / hpi.h
1 /******************************************************************************
2
3 AudioScience HPI driver
4 Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com>
5
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;
9
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.
14
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
18
19 */
20 /** \file hpi.h
21
22 AudioScience Hardware Programming Interface (HPI)
23 public API definition.
24
25 The HPI is a low-level hardware abstraction layer to all
26 AudioScience digital audio adapters
27 */
28 /*
29 You must define one operating system that the HPI is to be compiled under
30 HPI_OS_WIN32_USER 32bit Windows
31 HPI_OS_DSP_C6000 DSP TI C6000 (automatically set)
32 HPI_OS_WDM Windows WDM kernel driver
33 HPI_OS_LINUX Linux userspace
34 HPI_OS_LINUX_KERNEL Linux kernel (automatically set)
35
36 (C) Copyright AudioScience Inc. 1998-2010
37 ******************************************************************************/
38 #ifndef _HPI_H_
39 #define _HPI_H_
40 /* HPI Version
41 If HPI_VER_MINOR is odd then its a development release not intended for the
42 public. If HPI_VER_MINOR is even then is a release version
43 i.e 3.05.02 is a development version
44 */
45 #define HPI_VERSION_CONSTRUCTOR(maj, min, rel) \
46 ((maj << 16) + (min << 8) + rel)
47
48 #define HPI_VER_MAJOR(v) ((int)(v >> 16))
49 #define HPI_VER_MINOR(v) ((int)((v >> 8) & 0xFF))
50 #define HPI_VER_RELEASE(v) ((int)(v & 0xFF))
51
52 /* Use single digits for versions less that 10 to avoid octal. */
53 #define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 4, 1)
54 #define HPI_VER_STRING "4.04.01"
55
56 /* Library version as documented in hpi-api-versions.txt */
57 #define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(9, 0, 0)
58
59 #include <linux/types.h>
60 #define HPI_EXCLUDE_DEPRECATED
61
62 /******************************************************************************/
63 /******************************************************************************/
64 /******** HPI API DEFINITIONS *****/
65 /******************************************************************************/
66 /******************************************************************************/
67 /*******************************************/
68 /** Audio format types
69 \ingroup stream
70 */
71 enum HPI_FORMATS {
72 /** Used internally on adapter. */
73 HPI_FORMAT_MIXER_NATIVE = 0,
74 /** 8-bit unsigned PCM. Windows equivalent is WAVE_FORMAT_PCM. */
75 HPI_FORMAT_PCM8_UNSIGNED = 1,
76 /** 16-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM. */
77 HPI_FORMAT_PCM16_SIGNED = 2,
78 /** MPEG-1 Layer-1. */
79 HPI_FORMAT_MPEG_L1 = 3,
80 /** MPEG-1 Layer-2.
81
82 Windows equivalent is WAVE_FORMAT_MPEG.
83
84 The following table shows what combinations of mode and bitrate are possible:
85
86 <table border=1 cellspacing=0 cellpadding=5>
87 <tr>
88 <td><p><b>Bitrate (kbs)</b></p>
89 <td><p><b>Mono</b></p>
90 <td><p><b>Stereo,<br>Joint Stereo or<br>Dual Channel</b></p>
91
92 <tr><td>32<td>X<td>_
93 <tr><td>40<td>_<td>_
94 <tr><td>48<td>X<td>_
95 <tr><td>56<td>X<td>_
96 <tr><td>64<td>X<td>X
97 <tr><td>80<td>X<td>_
98 <tr><td>96<td>X<td>X
99 <tr><td>112<td>X<td>X
100 <tr><td>128<td>X<td>X
101 <tr><td>160<td>X<td>X
102 <tr><td>192<td>X<td>X
103 <tr><td>224<td>_<td>X
104 <tr><td>256<td>-<td>X
105 <tr><td>320<td>-<td>X
106 <tr><td>384<td>_<td>X
107 </table>
108 */
109 HPI_FORMAT_MPEG_L2 = 4,
110 /** MPEG-1 Layer-3.
111 Windows equivalent is WAVE_FORMAT_MPEG.
112
113 The following table shows what combinations of mode and bitrate are possible:
114
115 <table border=1 cellspacing=0 cellpadding=5>
116 <tr>
117 <td><p><b>Bitrate (kbs)</b></p>
118 <td><p><b>Mono<br>Stereo @ 8,<br>11.025 and<br>12kHz*</b></p>
119 <td><p><b>Mono<br>Stereo @ 16,<br>22.050 and<br>24kHz*</b></p>
120 <td><p><b>Mono<br>Stereo @ 32,<br>44.1 and<br>48kHz</b></p>
121
122 <tr><td>16<td>X<td>X<td>_
123 <tr><td>24<td>X<td>X<td>_
124 <tr><td>32<td>X<td>X<td>X
125 <tr><td>40<td>X<td>X<td>X
126 <tr><td>48<td>X<td>X<td>X
127 <tr><td>56<td>X<td>X<td>X
128 <tr><td>64<td>X<td>X<td>X
129 <tr><td>80<td>_<td>X<td>X
130 <tr><td>96<td>_<td>X<td>X
131 <tr><td>112<td>_<td>X<td>X
132 <tr><td>128<td>_<td>X<td>X
133 <tr><td>144<td>_<td>X<td>_
134 <tr><td>160<td>_<td>X<td>X
135 <tr><td>192<td>_<td>_<td>X
136 <tr><td>224<td>_<td>_<td>X
137 <tr><td>256<td>-<td>_<td>X
138 <tr><td>320<td>-<td>_<td>X
139 </table>
140 \b * Available on the ASI6000 series only
141 */
142 HPI_FORMAT_MPEG_L3 = 5,
143 /** Dolby AC-2. */
144 HPI_FORMAT_DOLBY_AC2 = 6,
145 /** Dolbt AC-3. */
146 HPI_FORMAT_DOLBY_AC3 = 7,
147 /** 16-bit PCM big-endian. */
148 HPI_FORMAT_PCM16_BIGENDIAN = 8,
149 /** TAGIT-1 algorithm - hits. */
150 HPI_FORMAT_AA_TAGIT1_HITS = 9,
151 /** TAGIT-1 algorithm - inserts. */
152 HPI_FORMAT_AA_TAGIT1_INSERTS = 10,
153 /** 32-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM.
154 Each sample is a 32bit word. The most significant 24 bits contain a 24-bit
155 sample and the least significant 8 bits are set to 0.
156 */
157 HPI_FORMAT_PCM32_SIGNED = 11,
158 /** Raw bitstream - unknown format. */
159 HPI_FORMAT_RAW_BITSTREAM = 12,
160 /** TAGIT-1 algorithm hits - extended. */
161 HPI_FORMAT_AA_TAGIT1_HITS_EX1 = 13,
162 /** 32-bit PCM as an IEEE float. Windows equivalent is WAVE_FORMAT_IEEE_FLOAT.
163 Each sample is a 32bit word in IEEE754 floating point format.
164 The range is +1.0 to -1.0, which corresponds to digital fullscale.
165 */
166 HPI_FORMAT_PCM32_FLOAT = 14,
167 /** 24-bit PCM signed. Windows equivalent is WAVE_FORMAT_PCM. */
168 HPI_FORMAT_PCM24_SIGNED = 15,
169 /** OEM format 1 - private. */
170 HPI_FORMAT_OEM1 = 16,
171 /** OEM format 2 - private. */
172 HPI_FORMAT_OEM2 = 17,
173 /** Undefined format. */
174 HPI_FORMAT_UNDEFINED = 0xffff
175 };
176
177 /******************************************* in/out Stream states */
178 /*******************************************/
179 /** Stream States
180 \ingroup stream
181 */
182 enum HPI_STREAM_STATES {
183 /** State stopped - stream is stopped. */
184 HPI_STATE_STOPPED = 1,
185 /** State playing - stream is playing audio. */
186 HPI_STATE_PLAYING = 2,
187 /** State recording - stream is recording. */
188 HPI_STATE_RECORDING = 3,
189 /** State drained - playing stream ran out of data to play. */
190 HPI_STATE_DRAINED = 4,
191 /** State generate sine - to be implemented. */
192 HPI_STATE_SINEGEN = 5,
193 /** State wait - used for inter-card sync to mean waiting for all
194 cards to be ready. */
195 HPI_STATE_WAIT = 6
196 };
197 /******************************************* mixer source node types */
198 /** Source node types
199 \ingroup mixer
200 */
201 enum HPI_SOURCENODES {
202 /** This define can be used instead of 0 to indicate
203 that there is no valid source node. A control that
204 exists on a destination node can be searched for using a source
205 node value of either 0, or HPI_SOURCENODE_NONE */
206 HPI_SOURCENODE_NONE = 100,
207 /** Out Stream (Play) node. */
208 HPI_SOURCENODE_OSTREAM = 101,
209 /** Line in node - could be analog, AES/EBU or network. */
210 HPI_SOURCENODE_LINEIN = 102,
211 HPI_SOURCENODE_AESEBU_IN = 103, /**< AES/EBU input node. */
212 HPI_SOURCENODE_TUNER = 104, /**< tuner node. */
213 HPI_SOURCENODE_RF = 105, /**< RF input node. */
214 HPI_SOURCENODE_CLOCK_SOURCE = 106, /**< clock source node. */
215 HPI_SOURCENODE_RAW_BITSTREAM = 107, /**< raw bitstream node. */
216 HPI_SOURCENODE_MICROPHONE = 108, /**< microphone node. */
217 /** Cobranet input node -
218 Audio samples come from the Cobranet network and into the device. */
219 HPI_SOURCENODE_COBRANET = 109,
220 HPI_SOURCENODE_ANALOG = 110, /**< analog input node. */
221 HPI_SOURCENODE_ADAPTER = 111, /**< adapter node. */
222 /* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */
223 HPI_SOURCENODE_LAST_INDEX = 111 /**< largest ID */
224 /* AX6 max sourcenode types = 15 */
225 };
226
227 /******************************************* mixer dest node types */
228 /** Destination node types
229 \ingroup mixer
230 */
231 enum HPI_DESTNODES {
232 /** This define can be used instead of 0 to indicate
233 that there is no valid destination node. A control that
234 exists on a source node can be searched for using a destination
235 node value of either 0, or HPI_DESTNODE_NONE */
236 HPI_DESTNODE_NONE = 200,
237 /** In Stream (Record) node. */
238 HPI_DESTNODE_ISTREAM = 201,
239 HPI_DESTNODE_LINEOUT = 202, /**< line out node. */
240 HPI_DESTNODE_AESEBU_OUT = 203, /**< AES/EBU output node. */
241 HPI_DESTNODE_RF = 204, /**< RF output node. */
242 HPI_DESTNODE_SPEAKER = 205, /**< speaker output node. */
243 /** Cobranet output node -
244 Audio samples from the device are sent out on the Cobranet network.*/
245 HPI_DESTNODE_COBRANET = 206,
246 HPI_DESTNODE_ANALOG = 207, /**< analog output node. */
247
248 /* !!!Update this AND hpidebug.h if you add a new destnode type!!! */
249 HPI_DESTNODE_LAST_INDEX = 207 /**< largest ID */
250 /* AX6 max destnode types = 15 */
251 };
252
253 /*******************************************/
254 /** Mixer control types
255 \ingroup mixer
256 */
257 enum HPI_CONTROLS {
258 HPI_CONTROL_GENERIC = 0, /**< generic control. */
259 HPI_CONTROL_CONNECTION = 1, /**< A connection between nodes. */
260 HPI_CONTROL_VOLUME = 2, /**< volume control - works in dB_fs. */
261 HPI_CONTROL_METER = 3, /**< peak meter control. */
262 HPI_CONTROL_MUTE = 4, /*mute control - not used at present. */
263 HPI_CONTROL_MULTIPLEXER = 5, /**< multiplexer control. */
264
265 HPI_CONTROL_AESEBU_TRANSMITTER = 6, /**< AES/EBU transmitter control. */
266 HPI_CONTROL_AESEBUTX = HPI_CONTROL_AESEBU_TRANSMITTER,
267
268 HPI_CONTROL_AESEBU_RECEIVER = 7, /**< AES/EBU receiver control. */
269 HPI_CONTROL_AESEBURX = HPI_CONTROL_AESEBU_RECEIVER,
270
271 HPI_CONTROL_LEVEL = 8, /**< level/trim control - works in d_bu. */
272 HPI_CONTROL_TUNER = 9, /**< tuner control. */
273 /* HPI_CONTROL_ONOFFSWITCH = 10 */
274 HPI_CONTROL_VOX = 11, /**< vox control. */
275 /* HPI_CONTROL_AES18_TRANSMITTER = 12 */
276 /* HPI_CONTROL_AES18_RECEIVER = 13 */
277 /* HPI_CONTROL_AES18_BLOCKGENERATOR = 14 */
278 HPI_CONTROL_CHANNEL_MODE = 15, /**< channel mode control. */
279
280 HPI_CONTROL_BITSTREAM = 16, /**< bitstream control. */
281 HPI_CONTROL_SAMPLECLOCK = 17, /**< sample clock control. */
282 HPI_CONTROL_MICROPHONE = 18, /**< microphone control. */
283 HPI_CONTROL_PARAMETRIC_EQ = 19, /**< parametric EQ control. */
284 HPI_CONTROL_EQUALIZER = HPI_CONTROL_PARAMETRIC_EQ,
285
286 HPI_CONTROL_COMPANDER = 20, /**< compander control. */
287 HPI_CONTROL_COBRANET = 21, /**< cobranet control. */
288 HPI_CONTROL_TONEDETECTOR = 22, /**< tone detector control. */
289 HPI_CONTROL_SILENCEDETECTOR = 23, /**< silence detector control. */
290 HPI_CONTROL_PAD = 24, /**< tuner PAD control. */
291 HPI_CONTROL_SRC = 25, /**< samplerate converter control. */
292 HPI_CONTROL_UNIVERSAL = 26, /**< universal control. */
293
294 /* !!! Update this AND hpidebug.h if you add a new control type!!!*/
295 HPI_CONTROL_LAST_INDEX = 26 /**<highest control type ID */
296 /* WARNING types 256 or greater impact bit packing in all AX6 DSP code */
297 };
298
299 /* Shorthand names that match attribute names */
300
301 /******************************************* ADAPTER ATTRIBUTES ****/
302
303 /** Adapter properties
304 These are used in HPI_AdapterSetProperty() and HPI_AdapterGetProperty()
305 \ingroup adapter
306 */
307 enum HPI_ADAPTER_PROPERTIES {
308 /** \internal Used in dwProperty field of HPI_AdapterSetProperty() and
309 HPI_AdapterGetProperty(). This errata applies to all ASI6000 cards with both
310 analog and digital outputs. The CS4224 A/D+D/A has a one sample delay between
311 left and right channels on both its input (ADC) and output (DAC).
312 More details are available in Cirrus Logic errata ER284B2.
313 PDF available from www.cirrus.com, released by Cirrus in 2001.
314 */
315 HPI_ADAPTER_PROPERTY_ERRATA_1 = 1,
316
317 /** Adapter grouping property
318 Indicates whether the adapter supports the grouping API (for ASIO and SSX2)
319 */
320 HPI_ADAPTER_PROPERTY_GROUPING = 2,
321
322 /** Driver SSX2 property
323 Tells the kernel driver to turn on SSX2 stream mapping.
324 This feature is not used by the DSP. In fact the call is completely processed
325 by the driver and is not passed on to the DSP at all.
326 */
327 HPI_ADAPTER_PROPERTY_ENABLE_SSX2 = 3,
328
329 /** Adapter SSX2 property
330 Indicates the state of the adapter's SSX2 setting. This setting is stored in
331 non-volatile memory on the adapter. A typical call sequence would be to use
332 HPI_ADAPTER_PROPERTY_SSX2_SETTING to set SSX2 on the adapter and then to reload
333 the driver. The driver would query HPI_ADAPTER_PROPERTY_SSX2_SETTING during startup
334 and if SSX2 is set, it would then call HPI_ADAPTER_PROPERTY_ENABLE_SSX2 to enable
335 SSX2 stream mapping within the kernel level of the driver.
336 */
337 HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4,
338
339 /** Base number for readonly properties */
340 HPI_ADAPTER_PROPERTY_READONLYBASE = 256,
341
342 /** Readonly adapter latency property.
343 This property returns in the input and output latency in samples.
344 Property 1 is the estimated input latency
345 in samples, while Property 2 is that output latency in samples.
346 */
347 HPI_ADAPTER_PROPERTY_LATENCY = 256,
348
349 /** Readonly adapter granularity property.
350 The granulariy is the smallest size chunk of stereo samples that is processed by
351 the adapter.
352 This property returns the record granularity in samples in Property 1.
353 Property 2 returns the play granularity.
354 */
355 HPI_ADAPTER_PROPERTY_GRANULARITY = 257,
356
357 /** Readonly adapter number of current channels property.
358 Property 1 is the number of record channels per record device.
359 Property 2 is the number of play channels per playback device.*/
360 HPI_ADAPTER_PROPERTY_CURCHANNELS = 258,
361
362 /** Readonly adapter software version.
363 The SOFTWARE_VERSION property returns the version of the software running
364 on the adapter as Major.Minor.Release.
365 Property 1 contains Major in bits 15..8 and Minor in bits 7..0.
366 Property 2 contains Release in bits 7..0. */
367 HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION = 259,
368
369 /** Readonly adapter MAC address MSBs.
370 The MAC_ADDRESS_MSB property returns
371 the most significant 32 bits of the MAC address.
372 Property 1 contains bits 47..32 of the MAC address.
373 Property 2 contains bits 31..16 of the MAC address. */
374 HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB = 260,
375
376 /** Readonly adapter MAC address LSBs
377 The MAC_ADDRESS_LSB property returns
378 the least significant 16 bits of the MAC address.
379 Property 1 contains bits 15..0 of the MAC address. */
380 HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB = 261,
381
382 /** Readonly extended adapter type number
383 The EXTENDED_ADAPTER_TYPE property returns the 4 digits of an extended
384 adapter type, i.e ASI8920-0022, 0022 is the extended type.
385 The digits are returned as ASCII characters rather than the hex digits that
386 are returned for the main type
387 Property 1 returns the 1st two (left most) digits, i.e "00"
388 in the example above, the upper byte being the left most digit.
389 Property 2 returns the 2nd two digits, i.e "22" in the example above*/
390 HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE = 262,
391
392 /** Readonly debug log buffer information */
393 HPI_ADAPTER_PROPERTY_LOGTABLEN = 263,
394 HPI_ADAPTER_PROPERTY_LOGTABBEG = 264,
395
396 /** Readonly adapter IP address
397 For 192.168.1.101
398 Property 1 returns the 1st two (left most) digits, i.e 192*256 + 168
399 in the example above, the upper byte being the left most digit.
400 Property 2 returns the 2nd two digits, i.e 1*256 + 101 in the example above, */
401 HPI_ADAPTER_PROPERTY_IP_ADDRESS = 265,
402
403 /** Readonly adapter buffer processed count. Returns a buffer processed count
404 that is incremented every time all buffers for all streams are updated. This
405 is useful for checking completion of all stream operations across the adapter
406 when using grouped streams.
407 */
408 HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT = 266,
409
410 /** Readonly mixer and stream intervals
411
412 These intervals are measured in mixer frames.
413 To convert to time, divide by the adapter samplerate.
414
415 The mixer interval is the number of frames processed in one mixer iteration.
416 The stream update interval is the interval at which streams check for and
417 process data, and BBM host buffer counters are updated.
418
419 Property 1 is the mixer interval in mixer frames.
420 Property 2 is the stream update interval in mixer frames.
421 */
422 HPI_ADAPTER_PROPERTY_INTERVAL = 267,
423 /** Adapter capabilities 1
424 Property 1 - adapter can do multichannel (SSX1)
425 Property 2 - adapter can do stream grouping (supports SSX2)
426 */
427 HPI_ADAPTER_PROPERTY_CAPS1 = 268,
428 /** Adapter capabilities 2
429 Property 1 - adapter can do samplerate conversion (MRX)
430 Property 2 - adapter can do timestretch (TSX)
431 */
432 HPI_ADAPTER_PROPERTY_CAPS2 = 269,
433
434 /** Readonly adapter sync header connection count.
435 */
436 HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS = 270,
437 /** Readonly supports SSX2 property.
438 Indicates the adapter supports SSX2 in some mode setting. The
439 return value is true (1) or false (0). If the current adapter
440 mode is MONO SSX2 is disabled, even though this property will
441 return true.
442 */
443 HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271
444 };
445
446 /** Adapter mode commands
447
448 Used in wQueryOrSet field of HPI_AdapterSetModeEx().
449 \ingroup adapter
450 */
451 enum HPI_ADAPTER_MODE_CMDS {
452 HPI_ADAPTER_MODE_SET = 0,
453 HPI_ADAPTER_MODE_QUERY = 1
454 };
455
456 /** Adapter Modes
457 These are used by HPI_AdapterSetModeEx()
458
459 \warning - more than 16 possible modes breaks
460 a bitmask in the Windows WAVE DLL
461 \ingroup adapter
462 */
463 enum HPI_ADAPTER_MODES {
464 /** 4 outstream mode.
465 - ASI6114: 1 instream
466 - ASI6044: 4 instreams
467 - ASI6012: 1 instream
468 - ASI6102: no instreams
469 - ASI6022, ASI6122: 2 instreams
470 - ASI5111, ASI5101: 2 instreams
471 - ASI652x, ASI662x: 2 instreams
472 - ASI654x, ASI664x: 4 instreams
473 */
474 HPI_ADAPTER_MODE_4OSTREAM = 1,
475
476 /** 6 outstream mode.
477 - ASI6012: 1 instream,
478 - ASI6022, ASI6122: 2 instreams
479 - ASI652x, ASI662x: 4 instreams
480 */
481 HPI_ADAPTER_MODE_6OSTREAM = 2,
482
483 /** 8 outstream mode.
484 - ASI6114: 8 instreams
485 - ASI6118: 8 instreams
486 - ASI6585: 8 instreams
487 */
488 HPI_ADAPTER_MODE_8OSTREAM = 3,
489
490 /** 16 outstream mode.
491 - ASI6416 16 instreams
492 - ASI6518, ASI6618 16 instreams
493 - ASI6118 16 mono out and in streams
494 */
495 HPI_ADAPTER_MODE_16OSTREAM = 4,
496
497 /** one outstream mode.
498 - ASI5111 1 outstream, 1 instream
499 */
500 HPI_ADAPTER_MODE_1OSTREAM = 5,
501
502 /** ASI504X mode 1. 12 outstream, 4 instream 0 to 48kHz sample rates
503 (see ASI504X datasheet for more info).
504 */
505 HPI_ADAPTER_MODE_1 = 6,
506
507 /** ASI504X mode 2. 4 outstreams, 4 instreams at 0 to 192kHz sample rates
508 (see ASI504X datasheet for more info).
509 */
510 HPI_ADAPTER_MODE_2 = 7,
511
512 /** ASI504X mode 3. 4 outstreams, 4 instreams at 0 to 192kHz sample rates
513 (see ASI504X datasheet for more info).
514 */
515 HPI_ADAPTER_MODE_3 = 8,
516
517 /** ASI504X multichannel mode.
518 2 outstreams -> 4 line outs = 1 to 8 channel streams),
519 4 lineins -> 1 instream (1 to 8 channel streams) at 0-48kHz.
520 For more info see the SSX Specification.
521 */
522 HPI_ADAPTER_MODE_MULTICHANNEL = 9,
523
524 /** 12 outstream mode.
525 - ASI6514, ASI6614: 2 instreams
526 - ASI6540,ASI6544: 8 instreams
527 - ASI6640,ASI6644: 8 instreams
528 */
529 HPI_ADAPTER_MODE_12OSTREAM = 10,
530
531 /** 9 outstream mode.
532 - ASI6044: 8 instreams
533 */
534 HPI_ADAPTER_MODE_9OSTREAM = 11,
535
536 /** mono mode.
537 - ASI6416: 16 outstreams/instreams
538 - ASI5402: 2 outstreams/instreams
539 */
540 HPI_ADAPTER_MODE_MONO = 12,
541
542 /** Low latency mode.
543 - ASI6416/ASI6316: 1 16 channel outstream and instream
544 */
545 HPI_ADAPTER_MODE_LOW_LATENCY = 13
546 };
547
548 /* Note, adapters can have more than one capability -
549 encoding as bitfield is recommended. */
550 #define HPI_CAPABILITY_NONE (0)
551 #define HPI_CAPABILITY_MPEG_LAYER3 (1)
552
553 /* Set this equal to maximum capability index,
554 Must not be greater than 32 - see axnvdef.h */
555 #define HPI_CAPABILITY_MAX 1
556 /* #define HPI_CAPABILITY_AAC 2 */
557
558 /******************************************* STREAM ATTRIBUTES ****/
559
560 /** MPEG Ancillary Data modes
561
562 The mode for the ancillary data insertion or extraction to operate in.
563 \ingroup stream
564 */
565 enum HPI_MPEG_ANC_MODES {
566 /** the MPEG frames have energy information stored in them (5 bytes per stereo frame, 3 per mono) */
567 HPI_MPEG_ANC_HASENERGY = 0,
568 /** the entire ancillary data field is taken up by data from the Anc data buffer
569 On encode, the encoder will insert the energy bytes before filling the remainder
570 of the ancillary data space with data from the ancillary data buffer.
571 */
572 HPI_MPEG_ANC_RAW = 1
573 };
574
575 /** Ancillary Data Alignment
576 \ingroup instream
577 */
578 enum HPI_ISTREAM_MPEG_ANC_ALIGNS {
579 /** data is packed against the end of data, then padded to the end of frame */
580 HPI_MPEG_ANC_ALIGN_LEFT = 0,
581 /** data is packed against the end of the frame */
582 HPI_MPEG_ANC_ALIGN_RIGHT = 1
583 };
584
585 /** MPEG modes
586 MPEG modes - can be used optionally for HPI_FormatCreate()
587 parameter dwAttributes.
588
589 Using any mode setting other than HPI_MPEG_MODE_DEFAULT
590 with single channel format will return an error.
591 \ingroup stream
592 */
593 enum HPI_MPEG_MODES {
594 /** Causes the MPEG-1 Layer II bitstream to be recorded
595 in single_channel mode when the number of channels is 1 and in stereo when the
596 number of channels is 2. */
597 HPI_MPEG_MODE_DEFAULT = 0,
598 /** Standard stereo without joint-stereo compression */
599 HPI_MPEG_MODE_STEREO = 1,
600 /** Joint stereo */
601 HPI_MPEG_MODE_JOINTSTEREO = 2,
602 /** Left and Right channels are completely independent */
603 HPI_MPEG_MODE_DUALCHANNEL = 3
604 };
605 /******************************************* MIXER ATTRIBUTES ****/
606
607 /* \defgroup mixer_flags Mixer flags for HPI_MIXER_GET_CONTROL_MULTIPLE_VALUES
608 {
609 */
610 #define HPI_MIXER_GET_CONTROL_MULTIPLE_CHANGED (0)
611 #define HPI_MIXER_GET_CONTROL_MULTIPLE_RESET (1)
612 /*}*/
613
614 /** Commands used by HPI_MixerStore()
615 \ingroup mixer
616 */
617 enum HPI_MIXER_STORE_COMMAND {
618 /** Save all mixer control settings. */
619 HPI_MIXER_STORE_SAVE = 1,
620 /** Restore all controls from saved. */
621 HPI_MIXER_STORE_RESTORE = 2,
622 /** Delete saved control settings. */
623 HPI_MIXER_STORE_DELETE = 3,
624 /** Enable auto storage of some control settings. */
625 HPI_MIXER_STORE_ENABLE = 4,
626 /** Disable auto storage of some control settings. */
627 HPI_MIXER_STORE_DISABLE = 5,
628 /** Save the attributes of a single control. */
629 HPI_MIXER_STORE_SAVE_SINGLE = 6
630 };
631
632 /************************************* CONTROL ATTRIBUTE VALUES ****/
633 /** Used by mixer plugin enable functions
634
635 E.g. HPI_ParametricEQ_SetState()
636 \ingroup mixer
637 */
638 enum HPI_SWITCH_STATES {
639 HPI_SWITCH_OFF = 0, /**< turn the mixer plugin on. */
640 HPI_SWITCH_ON = 1 /**< turn the mixer plugin off. */
641 };
642
643 /* Volume control special gain values */
644 /** volumes units are 100ths of a dB
645 \ingroup volume
646 */
647 #define HPI_UNITS_PER_dB 100
648 /** turns volume control OFF or MUTE
649 \ingroup volume
650 */
651 #define HPI_GAIN_OFF (-100 * HPI_UNITS_PER_dB)
652
653 /** value returned for no signal
654 \ingroup meter
655 */
656 #define HPI_METER_MINIMUM (-150 * HPI_UNITS_PER_dB)
657
658 /** autofade profiles
659 \ingroup volume
660 */
661 enum HPI_VOLUME_AUTOFADES {
662 /** log fade - dB attenuation changes linearly over time */
663 HPI_VOLUME_AUTOFADE_LOG = 2,
664 /** linear fade - amplitude changes linearly */
665 HPI_VOLUME_AUTOFADE_LINEAR = 3
666 };
667
668 /** The physical encoding format of the AESEBU I/O.
669
670 Used in HPI_AESEBU_Transmitter_SetFormat(), HPI_AESEBU_Receiver_SetFormat()
671 along with related Get and Query functions
672 \ingroup aestx
673 */
674 enum HPI_AESEBU_FORMATS {
675 /** AES/EBU physical format - AES/EBU balanced "professional" */
676 HPI_AESEBU_FORMAT_AESEBU = 1,
677 /** AES/EBU physical format - S/PDIF unbalanced "consumer" */
678 HPI_AESEBU_FORMAT_SPDIF = 2
679 };
680
681 /** AES/EBU error status bits
682
683 Returned by HPI_AESEBU_Receiver_GetErrorStatus()
684 \ingroup aesrx
685 */
686 enum HPI_AESEBU_ERRORS {
687 /** bit0: 1 when PLL is not locked */
688 HPI_AESEBU_ERROR_NOT_LOCKED = 0x01,
689 /** bit1: 1 when signal quality is poor */
690 HPI_AESEBU_ERROR_POOR_QUALITY = 0x02,
691 /** bit2: 1 when there is a parity error */
692 HPI_AESEBU_ERROR_PARITY_ERROR = 0x04,
693 /** bit3: 1 when there is a bi-phase coding violation */
694 HPI_AESEBU_ERROR_BIPHASE_VIOLATION = 0x08,
695 /** bit4: 1 when the validity bit is high */
696 HPI_AESEBU_ERROR_VALIDITY = 0x10,
697 /** bit5: 1 when the CRC error bit is high */
698 HPI_AESEBU_ERROR_CRC = 0x20
699 };
700
701 /** \addtogroup pad
702 \{
703 */
704 /** The text string containing the station/channel combination. */
705 #define HPI_PAD_CHANNEL_NAME_LEN 16
706 /** The text string containing the artist. */
707 #define HPI_PAD_ARTIST_LEN 64
708 /** The text string containing the title. */
709 #define HPI_PAD_TITLE_LEN 64
710 /** The text string containing the comment. */
711 #define HPI_PAD_COMMENT_LEN 256
712 /** The PTY when the tuner has not recieved any PTY. */
713 #define HPI_PAD_PROGRAM_TYPE_INVALID 0xffff
714 /** \} */
715
716 /** Data types for PTY string translation.
717 \ingroup rds
718 */
719 enum eHPI_RDS_type {
720 HPI_RDS_DATATYPE_RDS = 0, /**< RDS bitstream.*/
721 HPI_RDS_DATATYPE_RBDS = 1 /**< RBDS bitstream.*/
722 };
723
724 /** Tuner bands
725
726 Used for HPI_Tuner_SetBand(),HPI_Tuner_GetBand()
727 \ingroup tuner
728 */
729 enum HPI_TUNER_BAND {
730 HPI_TUNER_BAND_AM = 1, /**< AM band */
731 HPI_TUNER_BAND_FM = 2, /**< FM band (mono) */
732 HPI_TUNER_BAND_TV_NTSC_M = 3, /**< NTSC-M TV band*/
733 HPI_TUNER_BAND_TV = 3, /* use TV_NTSC_M */
734 HPI_TUNER_BAND_FM_STEREO = 4, /**< FM band (stereo) */
735 HPI_TUNER_BAND_AUX = 5, /**< auxiliary input */
736 HPI_TUNER_BAND_TV_PAL_BG = 6, /**< PAL-B/G TV band*/
737 HPI_TUNER_BAND_TV_PAL_I = 7, /**< PAL-I TV band*/
738 HPI_TUNER_BAND_TV_PAL_DK = 8, /**< PAL-D/K TV band*/
739 HPI_TUNER_BAND_TV_SECAM_L = 9, /**< SECAM-L TV band*/
740 HPI_TUNER_BAND_LAST = 9 /**< the index of the last tuner band. */
741 };
742
743 /** Tuner mode attributes
744
745 Used by HPI_Tuner_SetMode(), HPI_Tuner_GetMode()
746 \ingroup tuner
747
748 */
749 enum HPI_TUNER_MODES {
750 HPI_TUNER_MODE_RSS = 1, /**< control RSS */
751 HPI_TUNER_MODE_RDS = 2 /**< control RBDS/RDS */
752 };
753
754 /** Tuner mode attribute values
755
756 Used by HPI_Tuner_SetMode(), HPI_Tuner_GetMode()
757 \ingroup tuner
758 */
759 enum HPI_TUNER_MODE_VALUES {
760 /* RSS attribute values */
761 HPI_TUNER_MODE_RSS_DISABLE = 0, /**< RSS disable */
762 HPI_TUNER_MODE_RSS_ENABLE = 1, /**< RSS enable */
763
764 /* RDS mode attributes */
765 HPI_TUNER_MODE_RDS_DISABLE = 0, /**< RDS - disabled */
766 HPI_TUNER_MODE_RDS_RDS = 1, /**< RDS - RDS mode */
767 HPI_TUNER_MODE_RDS_RBDS = 2 /**< RDS - RBDS mode */
768 };
769
770 /** Tuner Level settings
771 \ingroup tuner
772 */
773 enum HPI_TUNER_LEVEL {
774 HPI_TUNER_LEVEL_AVERAGE = 0,
775 HPI_TUNER_LEVEL_RAW = 1
776 };
777
778 /** Tuner Status Bits
779
780 These bitfield values are returned by a call to HPI_Tuner_GetStatus().
781 Multiple fields are returned from a single call.
782 \ingroup tuner
783 */
784 enum HPI_TUNER_STATUS_BITS {
785 HPI_TUNER_VIDEO_COLOR_PRESENT = 0x0001, /**< video color is present. */
786 HPI_TUNER_VIDEO_IS_60HZ = 0x0020, /**< 60 hz video detected. */
787 HPI_TUNER_VIDEO_HORZ_SYNC_MISSING = 0x0040, /**< video HSYNC is missing. */
788 HPI_TUNER_VIDEO_STATUS_VALID = 0x0100, /**< video status is valid. */
789 HPI_TUNER_PLL_LOCKED = 0x1000, /**< the tuner's PLL is locked. */
790 HPI_TUNER_FM_STEREO = 0x2000, /**< tuner reports back FM stereo. */
791 HPI_TUNER_DIGITAL = 0x0200, /**< tuner reports digital programming. */
792 HPI_TUNER_MULTIPROGRAM = 0x0400 /**< tuner reports multiple programs. */
793 };
794
795 /** Channel Modes
796 Used for HPI_ChannelModeSet/Get()
797 \ingroup channelmode
798 */
799 enum HPI_CHANNEL_MODES {
800 /** Left channel out = left channel in, Right channel out = right channel in. */
801 HPI_CHANNEL_MODE_NORMAL = 1,
802 /** Left channel out = right channel in, Right channel out = left channel in. */
803 HPI_CHANNEL_MODE_SWAP = 2,
804 /** Left channel out = left channel in, Right channel out = left channel in. */
805 HPI_CHANNEL_MODE_LEFT_TO_STEREO = 3,
806 /** Left channel out = right channel in, Right channel out = right channel in.*/
807 HPI_CHANNEL_MODE_RIGHT_TO_STEREO = 4,
808 /** Left channel out = (left channel in + right channel in)/2,
809 Right channel out = mute. */
810 HPI_CHANNEL_MODE_STEREO_TO_LEFT = 5,
811 /** Left channel out = mute,
812 Right channel out = (right channel in + left channel in)/2. */
813 HPI_CHANNEL_MODE_STEREO_TO_RIGHT = 6,
814 HPI_CHANNEL_MODE_LAST = 6
815 };
816
817 /** SampleClock source values
818 \ingroup sampleclock
819 */
820 enum HPI_SAMPLECLOCK_SOURCES {
821 /** The sampleclock output is derived from its local samplerate generator.
822 The local samplerate may be set using HPI_SampleClock_SetLocalRate(). */
823 HPI_SAMPLECLOCK_SOURCE_LOCAL = 1,
824 /** The adapter is clocked from a dedicated AES/EBU SampleClock input.*/
825 HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC = 2,
826 /** From external wordclock connector */
827 HPI_SAMPLECLOCK_SOURCE_WORD = 3,
828 /** Board-to-board header */
829 HPI_SAMPLECLOCK_SOURCE_WORD_HEADER = 4,
830 /** FUTURE - SMPTE clock. */
831 HPI_SAMPLECLOCK_SOURCE_SMPTE = 5,
832 /** One of the aesebu inputs */
833 HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT = 6,
834 /** From a network interface e.g. Cobranet or Livewire at either 48 or 96kHz */
835 HPI_SAMPLECLOCK_SOURCE_NETWORK = 8,
836 /** From previous adjacent module (ASI2416 only)*/
837 HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10,
838 /*! Update this if you add a new clock source.*/
839 HPI_SAMPLECLOCK_SOURCE_LAST = 10
840 };
841
842 /** Equalizer filter types. Used by HPI_ParametricEQ_SetBand()
843 \ingroup parmeq
844 */
845 enum HPI_FILTER_TYPE {
846 HPI_FILTER_TYPE_BYPASS = 0, /**< filter is turned off */
847
848 HPI_FILTER_TYPE_LOWSHELF = 1, /**< EQ low shelf */
849 HPI_FILTER_TYPE_HIGHSHELF = 2, /**< EQ high shelf */
850 HPI_FILTER_TYPE_EQ_BAND = 3, /**< EQ gain */
851
852 HPI_FILTER_TYPE_LOWPASS = 4, /**< standard low pass */
853 HPI_FILTER_TYPE_HIGHPASS = 5, /**< standard high pass */
854 HPI_FILTER_TYPE_BANDPASS = 6, /**< standard band pass */
855 HPI_FILTER_TYPE_BANDSTOP = 7 /**< standard band stop/notch */
856 };
857
858 /** Async Event sources
859 \ingroup async
860 */
861 enum ASYNC_EVENT_SOURCES {
862 HPI_ASYNC_EVENT_GPIO = 1, /**< GPIO event. */
863 HPI_ASYNC_EVENT_SILENCE = 2, /**< silence event detected. */
864 HPI_ASYNC_EVENT_TONE = 3 /**< tone event detected. */
865 };
866 /*******************************************/
867 /** HPI Error codes
868
869 Almost all HPI functions return an error code
870 A return value of zero means there was no error.
871 Otherwise one of these error codes is returned.
872 Error codes can be converted to a descriptive string using HPI_GetErrorText()
873
874 \note When a new error code is added HPI_GetErrorText() MUST be updated.
875 \note Codes 1-100 are reserved for driver use
876 \ingroup utility
877 */
878 enum HPI_ERROR_CODES {
879 /** Message type does not exist. */
880 HPI_ERROR_INVALID_TYPE = 100,
881 /** Object type does not exist. */
882 HPI_ERROR_INVALID_OBJ = 101,
883 /** Function does not exist. */
884 HPI_ERROR_INVALID_FUNC = 102,
885 /** The specified object (adapter/Stream) does not exist. */
886 HPI_ERROR_INVALID_OBJ_INDEX = 103,
887 /** Trying to access an object that has not been opened yet. */
888 HPI_ERROR_OBJ_NOT_OPEN = 104,
889 /** Trying to open an already open object. */
890 HPI_ERROR_OBJ_ALREADY_OPEN = 105,
891 /** PCI, ISA resource not valid. */
892 HPI_ERROR_INVALID_RESOURCE = 106,
893 /** GetInfo call from SubSysFindAdapters failed. */
894 HPI_ERROR_SUBSYSFINDADAPTERS_GETINFO = 107,
895 /** Default response was never updated with actual error code. */
896 HPI_ERROR_INVALID_RESPONSE = 108,
897 /** wSize field of response was not updated,
898 indicating that the message was not processed. */
899 HPI_ERROR_PROCESSING_MESSAGE = 109,
900 /** The network did not respond in a timely manner. */
901 HPI_ERROR_NETWORK_TIMEOUT = 110,
902 /** An HPI handle is invalid (uninitialised?). */
903 HPI_ERROR_INVALID_HANDLE = 111,
904 /** A function or attribute has not been implemented yet. */
905 HPI_ERROR_UNIMPLEMENTED = 112,
906 /** There are too many clients attempting to access a network resource. */
907 HPI_ERROR_NETWORK_TOO_MANY_CLIENTS = 113,
908 /** Response buffer passed to HPI_Message was smaller than returned response */
909 HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL = 114,
910 /** The returned response did not match the sent message */
911 HPI_ERROR_RESPONSE_MISMATCH = 115,
912
913 /** Too many adapters.*/
914 HPI_ERROR_TOO_MANY_ADAPTERS = 200,
915 /** Bad adpater. */
916 HPI_ERROR_BAD_ADAPTER = 201,
917 /** Adapter number out of range or not set properly. */
918 HPI_ERROR_BAD_ADAPTER_NUMBER = 202,
919 /** 2 adapters with the same adapter number. */
920 HPI_DUPLICATE_ADAPTER_NUMBER = 203,
921 /** DSP code failed to bootload. */
922 HPI_ERROR_DSP_BOOTLOAD = 204,
923 /** Adapter failed DSP code self test. */
924 HPI_ERROR_DSP_SELFTEST = 205,
925 /** Couldn't find or open the DSP code file. */
926 HPI_ERROR_DSP_FILE_NOT_FOUND = 206,
927 /** Internal DSP hardware error. */
928 HPI_ERROR_DSP_HARDWARE = 207,
929 /** Could not allocate memory in DOS. */
930 HPI_ERROR_DOS_MEMORY_ALLOC = 208,
931 /** Could not allocate memory */
932 HPI_ERROR_MEMORY_ALLOC = 208,
933 /** Failed to correctly load/config PLD .*/
934 HPI_ERROR_PLD_LOAD = 209,
935 /** Unexpected end of file, block length too big etc. */
936 HPI_ERROR_DSP_FILE_FORMAT = 210,
937
938 /** Found but could not open DSP code file. */
939 HPI_ERROR_DSP_FILE_ACCESS_DENIED = 211,
940 /** First DSP code section header not found in DSP file. */
941 HPI_ERROR_DSP_FILE_NO_HEADER = 212,
942 /** File read operation on DSP code file failed. */
943 HPI_ERROR_DSP_FILE_READ_ERROR = 213,
944 /** DSP code for adapter family not found. */
945 HPI_ERROR_DSP_SECTION_NOT_FOUND = 214,
946 /** Other OS specific error opening DSP file. */
947 HPI_ERROR_DSP_FILE_OTHER_ERROR = 215,
948 /** Sharing violation opening DSP code file. */
949 HPI_ERROR_DSP_FILE_SHARING_VIOLATION = 216,
950 /** DSP code section header had size == 0. */
951 HPI_ERROR_DSP_FILE_NULL_HEADER = 217,
952
953 /** Base number for flash errors. */
954 HPI_ERROR_FLASH = 220,
955
956 /** Flash has bad checksum */
957 HPI_ERROR_BAD_CHECKSUM = (HPI_ERROR_FLASH + 1),
958 HPI_ERROR_BAD_SEQUENCE = (HPI_ERROR_FLASH + 2),
959 HPI_ERROR_FLASH_ERASE = (HPI_ERROR_FLASH + 3),
960 HPI_ERROR_FLASH_PROGRAM = (HPI_ERROR_FLASH + 4),
961 HPI_ERROR_FLASH_VERIFY = (HPI_ERROR_FLASH + 5),
962 HPI_ERROR_FLASH_TYPE = (HPI_ERROR_FLASH + 6),
963 HPI_ERROR_FLASH_START = (HPI_ERROR_FLASH + 7),
964
965 /** Reserved for OEMs. */
966 HPI_ERROR_RESERVED_1 = 290,
967
968 /** Stream does not exist. */
969 HPI_ERROR_INVALID_STREAM = 300,
970 /** Invalid compression format. */
971 HPI_ERROR_INVALID_FORMAT = 301,
972 /** Invalid format samplerate */
973 HPI_ERROR_INVALID_SAMPLERATE = 302,
974 /** Invalid format number of channels. */
975 HPI_ERROR_INVALID_CHANNELS = 303,
976 /** Invalid format bitrate. */
977 HPI_ERROR_INVALID_BITRATE = 304,
978 /** Invalid datasize used for stream read/write. */
979 HPI_ERROR_INVALID_DATASIZE = 305,
980 /** Stream buffer is full during stream write. */
981 HPI_ERROR_BUFFER_FULL = 306,
982 /** Stream buffer is empty during stream read. */
983 HPI_ERROR_BUFFER_EMPTY = 307,
984 /** Invalid datasize used for stream read/write. */
985 HPI_ERROR_INVALID_DATA_TRANSFER = 308,
986 /** Packet ordering error for stream read/write. */
987 HPI_ERROR_INVALID_PACKET_ORDER = 309,
988
989 /** Object can't do requested operation in its current
990 state, eg set format, change rec mux state while recording.*/
991 HPI_ERROR_INVALID_OPERATION = 310,
992
993 /** Where an SRG is shared amongst streams, an incompatible samplerate is one
994 that is different to any currently playing or recording stream. */
995 HPI_ERROR_INCOMPATIBLE_SAMPLERATE = 311,
996 /** Adapter mode is illegal.*/
997 HPI_ERROR_BAD_ADAPTER_MODE = 312,
998
999 /** There have been too many attempts to set the adapter's
1000 capabilities (using bad keys), the card should be returned
1001 to ASI if further capabilities updates are required */
1002 HPI_ERROR_TOO_MANY_CAPABILITY_CHANGE_ATTEMPTS = 313,
1003 /** Streams on different adapters cannot be grouped. */
1004 HPI_ERROR_NO_INTERADAPTER_GROUPS = 314,
1005 /** Streams on different DSPs cannot be grouped. */
1006 HPI_ERROR_NO_INTERDSP_GROUPS = 315,
1007
1008 /** Invalid mixer node for this adapter. */
1009 HPI_ERROR_INVALID_NODE = 400,
1010 /** Invalid control. */
1011 HPI_ERROR_INVALID_CONTROL = 401,
1012 /** Invalid control value was passed. */
1013 HPI_ERROR_INVALID_CONTROL_VALUE = 402,
1014 /** Control attribute not supported by this control. */
1015 HPI_ERROR_INVALID_CONTROL_ATTRIBUTE = 403,
1016 /** Control is disabled. */
1017 HPI_ERROR_CONTROL_DISABLED = 404,
1018 /** I2C transaction failed due to a missing ACK. */
1019 HPI_ERROR_CONTROL_I2C_MISSING_ACK = 405,
1020 /** Control is busy, or coming out of
1021 reset and cannot be accessed at this time. */
1022 HPI_ERROR_CONTROL_NOT_READY = 407,
1023
1024 /** Non volatile memory */
1025 HPI_ERROR_NVMEM_BUSY = 450,
1026 HPI_ERROR_NVMEM_FULL = 451,
1027 HPI_ERROR_NVMEM_FAIL = 452,
1028
1029 /** I2C */
1030 HPI_ERROR_I2C_MISSING_ACK = HPI_ERROR_CONTROL_I2C_MISSING_ACK,
1031 HPI_ERROR_I2C_BAD_ADR = 460,
1032
1033 /** Entity errors */
1034 HPI_ERROR_ENTITY_TYPE_MISMATCH = 470,
1035 HPI_ERROR_ENTITY_ITEM_COUNT = 471,
1036 HPI_ERROR_ENTITY_TYPE_INVALID = 472,
1037 HPI_ERROR_ENTITY_ROLE_INVALID = 473,
1038
1039 /* AES18 specific errors were 500..507 */
1040
1041 /** custom error to use for debugging */
1042 HPI_ERROR_CUSTOM = 600,
1043
1044 /** hpioct32.c can't obtain mutex */
1045 HPI_ERROR_MUTEX_TIMEOUT = 700,
1046
1047 /** errors from HPI backends have values >= this */
1048 HPI_ERROR_BACKEND_BASE = 900,
1049
1050 /** indicates a cached u16 value is invalid. */
1051 HPI_ERROR_ILLEGAL_CACHE_VALUE = 0xffff
1052 };
1053
1054 /** \defgroup maximums HPI maximum values
1055 \{
1056 */
1057 /** Maximum number of adapters per HPI sub-system
1058 WARNING: modifying this value changes the response structure size.*/
1059 #define HPI_MAX_ADAPTERS 20
1060 /** Maximum number of in or out streams per adapter */
1061 #define HPI_MAX_STREAMS 16
1062 #define HPI_MAX_CHANNELS 2 /* per stream */
1063 #define HPI_MAX_NODES 8 /* per mixer ? */
1064 #define HPI_MAX_CONTROLS 4 /* per node ? */
1065 /** maximum number of ancillary bytes per MPEG frame */
1066 #define HPI_MAX_ANC_BYTES_PER_FRAME (64)
1067 #define HPI_STRING_LEN 16
1068
1069 /** Velocity units */
1070 #define HPI_OSTREAM_VELOCITY_UNITS 4096
1071 /** OutStream timescale units */
1072 #define HPI_OSTREAM_TIMESCALE_UNITS 10000
1073 /** OutStream timescale passthrough - turns timescaling on in passthough mode */
1074 #define HPI_OSTREAM_TIMESCALE_PASSTHROUGH 99999
1075
1076 /**\}*/
1077
1078 /* ////////////////////////////////////////////////////////////////////// */
1079 /* STRUCTURES */
1080 #ifndef DISABLE_PRAGMA_PACK1
1081 #pragma pack(push, 1)
1082 #endif
1083
1084 /** Structure containing sample format information.
1085 See also HPI_FormatCreate().
1086 */
1087 struct hpi_format {
1088 u32 sample_rate;
1089 /**< 11025, 32000, 44100 ... */
1090 u32 bit_rate; /**< for MPEG */
1091 u32 attributes;
1092 /**< Stereo/JointStereo/Mono */
1093 u16 mode_legacy;
1094 /**< Legacy ancillary mode or idle bit */
1095 u16 unused; /**< unused */
1096 u16 channels; /**< 1,2..., (or ancillary mode or idle bit */
1097 u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see #HPI_FORMATS. */
1098 };
1099
1100 struct hpi_anc_frame {
1101 u32 valid_bits_in_this_frame;
1102 u8 b_data[HPI_MAX_ANC_BYTES_PER_FRAME];
1103 };
1104
1105 /** An object for containing a single async event.
1106 */
1107 struct hpi_async_event {
1108 u16 event_type; /**< type of event. \sa async_event */
1109 u16 sequence; /**< sequence number, allows lost event detection */
1110 u32 state; /**< new state */
1111 u32 h_object; /**< handle to the object returning the event. */
1112 union {
1113 struct {
1114 u16 index; /**< GPIO bit index. */
1115 } gpio;
1116 struct {
1117 u16 node_index; /**< what node is the control on ? */
1118 u16 node_type; /**< what type of node is the control on ? */
1119 } control;
1120 } u;
1121 };
1122
1123 /*/////////////////////////////////////////////////////////////////////////// */
1124 /* Public HPI Entity related definitions */
1125
1126 struct hpi_entity;
1127
1128 enum e_entity_type {
1129 entity_type_null,
1130 entity_type_sequence, /* sequence of potentially heterogeneous TLV entities */
1131
1132 entity_type_reference, /* refers to a TLV entity or NULL */
1133
1134 entity_type_int, /* 32 bit */
1135 entity_type_float, /* ieee754 binary 32 bit encoding */
1136 entity_type_double,
1137
1138 entity_type_cstring,
1139 entity_type_octet,
1140 entity_type_ip4_address,
1141 entity_type_ip6_address,
1142 entity_type_mac_address,
1143
1144 LAST_ENTITY_TYPE
1145 };
1146
1147 enum e_entity_role {
1148 entity_role_null,
1149 entity_role_value,
1150 entity_role_classname,
1151
1152 entity_role_units,
1153 entity_role_flags,
1154 entity_role_range,
1155
1156 entity_role_mapping,
1157 entity_role_enum,
1158
1159 entity_role_instance_of,
1160 entity_role_depends_on,
1161 entity_role_member_of_group,
1162 entity_role_value_constraint,
1163 entity_role_parameter_port,
1164
1165 entity_role_block,
1166 entity_role_node_group,
1167 entity_role_audio_port,
1168 entity_role_clock_port,
1169 LAST_ENTITY_ROLE
1170 };
1171
1172 /* skip host side function declarations for
1173 DSP compile and documentation extraction */
1174
1175 struct hpi_hsubsys {
1176 int not_really_used;
1177 };
1178
1179 #ifndef DISABLE_PRAGMA_PACK1
1180 #pragma pack(pop)
1181 #endif
1182
1183 /*////////////////////////////////////////////////////////////////////////// */
1184 /* HPI FUNCTIONS */
1185
1186 /*/////////////////////////// */
1187 /* DATA and FORMAT and STREAM */
1188
1189 u16 hpi_stream_estimate_buffer_size(struct hpi_format *pF,
1190 u32 host_polling_rate_in_milli_seconds, u32 *recommended_buffer_size);
1191
1192 /*/////////// */
1193 /* SUB SYSTEM */
1194 struct hpi_hsubsys *hpi_subsys_create(void
1195 );
1196
1197 void hpi_subsys_free(const struct hpi_hsubsys *ph_subsys);
1198
1199 u16 hpi_subsys_get_version(const struct hpi_hsubsys *ph_subsys,
1200 u32 *pversion);
1201
1202 u16 hpi_subsys_get_version_ex(const struct hpi_hsubsys *ph_subsys,
1203 u32 *pversion_ex);
1204
1205 u16 hpi_subsys_get_info(const struct hpi_hsubsys *ph_subsys, u32 *pversion,
1206 u16 *pw_num_adapters, u16 aw_adapter_list[], u16 list_length);
1207
1208 u16 hpi_subsys_find_adapters(const struct hpi_hsubsys *ph_subsys,
1209 u16 *pw_num_adapters, u16 aw_adapter_list[], u16 list_length);
1210
1211 u16 hpi_subsys_get_num_adapters(const struct hpi_hsubsys *ph_subsys,
1212 int *pn_num_adapters);
1213
1214 u16 hpi_subsys_get_adapter(const struct hpi_hsubsys *ph_subsys, int iterator,
1215 u32 *padapter_index, u16 *pw_adapter_type);
1216
1217 u16 hpi_subsys_ssx2_bypass(const struct hpi_hsubsys *ph_subsys, u16 bypass);
1218
1219 u16 hpi_subsys_set_host_network_interface(const struct hpi_hsubsys *ph_subsys,
1220 const char *sz_interface);
1221
1222 /*///////// */
1223 /* ADAPTER */
1224
1225 u16 hpi_adapter_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index);
1226
1227 u16 hpi_adapter_close(const struct hpi_hsubsys *ph_subsys, u16 adapter_index);
1228
1229 u16 hpi_adapter_get_info(const struct hpi_hsubsys *ph_subsys,
1230 u16 adapter_index, u16 *pw_num_outstreams, u16 *pw_num_instreams,
1231 u16 *pw_version, u32 *pserial_number, u16 *pw_adapter_type);
1232
1233 u16 hpi_adapter_get_module_by_index(const struct hpi_hsubsys *ph_subsys,
1234 u16 adapter_index, u16 module_index, u16 *pw_num_outputs,
1235 u16 *pw_num_inputs, u16 *pw_version, u32 *pserial_number,
1236 u16 *pw_module_type, u32 *ph_module);
1237
1238 u16 hpi_adapter_set_mode(const struct hpi_hsubsys *ph_subsys,
1239 u16 adapter_index, u32 adapter_mode);
1240
1241 u16 hpi_adapter_set_mode_ex(const struct hpi_hsubsys *ph_subsys,
1242 u16 adapter_index, u32 adapter_mode, u16 query_or_set);
1243
1244 u16 hpi_adapter_get_mode(const struct hpi_hsubsys *ph_subsys,
1245 u16 adapter_index, u32 *padapter_mode);
1246
1247 u16 hpi_adapter_get_assert(const struct hpi_hsubsys *ph_subsys,
1248 u16 adapter_index, u16 *assert_present, char *psz_assert,
1249 u16 *pw_line_number);
1250
1251 u16 hpi_adapter_get_assert_ex(const struct hpi_hsubsys *ph_subsys,
1252 u16 adapter_index, u16 *assert_present, char *psz_assert,
1253 u32 *pline_number, u16 *pw_assert_on_dsp);
1254
1255 u16 hpi_adapter_test_assert(const struct hpi_hsubsys *ph_subsys,
1256 u16 adapter_index, u16 assert_id);
1257
1258 u16 hpi_adapter_enable_capability(const struct hpi_hsubsys *ph_subsys,
1259 u16 adapter_index, u16 capability, u32 key);
1260
1261 u16 hpi_adapter_self_test(const struct hpi_hsubsys *ph_subsys,
1262 u16 adapter_index);
1263
1264 u16 hpi_adapter_debug_read(const struct hpi_hsubsys *ph_subsys,
1265 u16 adapter_index, u32 dsp_address, char *p_bytes, int *count_bytes);
1266
1267 u16 hpi_adapter_set_property(const struct hpi_hsubsys *ph_subsys,
1268 u16 adapter_index, u16 property, u16 paramter1, u16 paramter2);
1269
1270 u16 hpi_adapter_get_property(const struct hpi_hsubsys *ph_subsys,
1271 u16 adapter_index, u16 property, u16 *pw_paramter1,
1272 u16 *pw_paramter2);
1273
1274 u16 hpi_adapter_enumerate_property(const struct hpi_hsubsys *ph_subsys,
1275 u16 adapter_index, u16 index, u16 what_to_enumerate,
1276 u16 property_index, u32 *psetting);
1277
1278 /*////////////// */
1279 /* NonVol Memory */
1280 u16 hpi_nv_memory_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1281 u32 *ph_nv_memory, u16 *pw_size_in_bytes);
1282
1283 u16 hpi_nv_memory_read_byte(const struct hpi_hsubsys *ph_subsys,
1284 u32 h_nv_memory, u16 index, u16 *pw_data);
1285
1286 u16 hpi_nv_memory_write_byte(const struct hpi_hsubsys *ph_subsys,
1287 u32 h_nv_memory, u16 index, u16 data);
1288
1289 /*////////////// */
1290 /* Digital I/O */
1291 u16 hpi_gpio_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1292 u32 *ph_gpio, u16 *pw_number_input_bits, u16 *pw_number_output_bits);
1293
1294 u16 hpi_gpio_read_bit(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1295 u16 bit_index, u16 *pw_bit_data);
1296
1297 u16 hpi_gpio_read_all_bits(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1298 u16 aw_all_bit_data[4]
1299 );
1300
1301 u16 hpi_gpio_write_bit(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1302 u16 bit_index, u16 bit_data);
1303
1304 u16 hpi_gpio_write_status(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1305 u16 aw_all_bit_data[4]
1306 );
1307
1308 /**********************/
1309 /* Async Event Object */
1310 /**********************/
1311 u16 hpi_async_event_open(const struct hpi_hsubsys *ph_subsys,
1312 u16 adapter_index, u32 *ph_async);
1313
1314 u16 hpi_async_event_close(const struct hpi_hsubsys *ph_subsys, u32 h_async);
1315
1316 u16 hpi_async_event_wait(const struct hpi_hsubsys *ph_subsys, u32 h_async,
1317 u16 maximum_events, struct hpi_async_event *p_events,
1318 u16 *pw_number_returned);
1319
1320 u16 hpi_async_event_get_count(const struct hpi_hsubsys *ph_subsys,
1321 u32 h_async, u16 *pw_count);
1322
1323 u16 hpi_async_event_get(const struct hpi_hsubsys *ph_subsys, u32 h_async,
1324 u16 maximum_events, struct hpi_async_event *p_events,
1325 u16 *pw_number_returned);
1326
1327 /*/////////// */
1328 /* WATCH-DOG */
1329 u16 hpi_watchdog_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1330 u32 *ph_watchdog);
1331
1332 u16 hpi_watchdog_set_time(const struct hpi_hsubsys *ph_subsys, u32 h_watchdog,
1333 u32 time_millisec);
1334
1335 u16 hpi_watchdog_ping(const struct hpi_hsubsys *ph_subsys, u32 h_watchdog);
1336
1337 /**************/
1338 /* OUT STREAM */
1339 /**************/
1340 u16 hpi_outstream_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1341 u16 outstream_index, u32 *ph_outstream);
1342
1343 u16 hpi_outstream_close(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1344
1345 u16 hpi_outstream_get_info_ex(const struct hpi_hsubsys *ph_subsys,
1346 u32 h_outstream, u16 *pw_state, u32 *pbuffer_size, u32 *pdata_to_play,
1347 u32 *psamples_played, u32 *pauxiliary_data_to_play);
1348
1349 u16 hpi_outstream_write_buf(const struct hpi_hsubsys *ph_subsys,
1350 u32 h_outstream, const u8 *pb_write_buf, u32 bytes_to_write,
1351 const struct hpi_format *p_format);
1352
1353 u16 hpi_outstream_start(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1354
1355 u16 hpi_outstream_wait_start(const struct hpi_hsubsys *ph_subsys,
1356 u32 h_outstream);
1357
1358 u16 hpi_outstream_stop(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1359
1360 u16 hpi_outstream_sinegen(const struct hpi_hsubsys *ph_subsys,
1361 u32 h_outstream);
1362
1363 u16 hpi_outstream_reset(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1364
1365 u16 hpi_outstream_query_format(const struct hpi_hsubsys *ph_subsys,
1366 u32 h_outstream, struct hpi_format *p_format);
1367
1368 u16 hpi_outstream_set_format(const struct hpi_hsubsys *ph_subsys,
1369 u32 h_outstream, struct hpi_format *p_format);
1370
1371 u16 hpi_outstream_set_punch_in_out(const struct hpi_hsubsys *ph_subsys,
1372 u32 h_outstream, u32 punch_in_sample, u32 punch_out_sample);
1373
1374 u16 hpi_outstream_set_velocity(const struct hpi_hsubsys *ph_subsys,
1375 u32 h_outstream, short velocity);
1376
1377 u16 hpi_outstream_ancillary_reset(const struct hpi_hsubsys *ph_subsys,
1378 u32 h_outstream, u16 mode);
1379
1380 u16 hpi_outstream_ancillary_get_info(const struct hpi_hsubsys *ph_subsys,
1381 u32 h_outstream, u32 *pframes_available);
1382
1383 u16 hpi_outstream_ancillary_read(const struct hpi_hsubsys *ph_subsys,
1384 u32 h_outstream, struct hpi_anc_frame *p_anc_frame_buffer,
1385 u32 anc_frame_buffer_size_in_bytes,
1386 u32 number_of_ancillary_frames_to_read);
1387
1388 u16 hpi_outstream_set_time_scale(const struct hpi_hsubsys *ph_subsys,
1389 u32 h_outstream, u32 time_scaleX10000);
1390
1391 u16 hpi_outstream_host_buffer_allocate(const struct hpi_hsubsys *ph_subsys,
1392 u32 h_outstream, u32 size_in_bytes);
1393
1394 u16 hpi_outstream_host_buffer_free(const struct hpi_hsubsys *ph_subsys,
1395 u32 h_outstream);
1396
1397 u16 hpi_outstream_group_add(const struct hpi_hsubsys *ph_subsys,
1398 u32 h_outstream, u32 h_stream);
1399
1400 u16 hpi_outstream_group_get_map(const struct hpi_hsubsys *ph_subsys,
1401 u32 h_outstream, u32 *poutstream_map, u32 *pinstream_map);
1402
1403 u16 hpi_outstream_group_reset(const struct hpi_hsubsys *ph_subsys,
1404 u32 h_outstream);
1405
1406 /*////////// */
1407 /* IN_STREAM */
1408 u16 hpi_instream_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1409 u16 instream_index, u32 *ph_instream);
1410
1411 u16 hpi_instream_close(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1412
1413 u16 hpi_instream_query_format(const struct hpi_hsubsys *ph_subsys,
1414 u32 h_instream, const struct hpi_format *p_format);
1415
1416 u16 hpi_instream_set_format(const struct hpi_hsubsys *ph_subsys,
1417 u32 h_instream, const struct hpi_format *p_format);
1418
1419 u16 hpi_instream_read_buf(const struct hpi_hsubsys *ph_subsys, u32 h_instream,
1420 u8 *pb_read_buf, u32 bytes_to_read);
1421
1422 u16 hpi_instream_start(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1423
1424 u16 hpi_instream_wait_start(const struct hpi_hsubsys *ph_subsys,
1425 u32 h_instream);
1426
1427 u16 hpi_instream_stop(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1428
1429 u16 hpi_instream_reset(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1430
1431 u16 hpi_instream_get_info_ex(const struct hpi_hsubsys *ph_subsys,
1432 u32 h_instream, u16 *pw_state, u32 *pbuffer_size, u32 *pdata_recorded,
1433 u32 *psamples_recorded, u32 *pauxiliary_data_recorded);
1434
1435 u16 hpi_instream_ancillary_reset(const struct hpi_hsubsys *ph_subsys,
1436 u32 h_instream, u16 bytes_per_frame, u16 mode, u16 alignment,
1437 u16 idle_bit);
1438
1439 u16 hpi_instream_ancillary_get_info(const struct hpi_hsubsys *ph_subsys,
1440 u32 h_instream, u32 *pframe_space);
1441
1442 u16 hpi_instream_ancillary_write(const struct hpi_hsubsys *ph_subsys,
1443 u32 h_instream, const struct hpi_anc_frame *p_anc_frame_buffer,
1444 u32 anc_frame_buffer_size_in_bytes,
1445 u32 number_of_ancillary_frames_to_write);
1446
1447 u16 hpi_instream_host_buffer_allocate(const struct hpi_hsubsys *ph_subsys,
1448 u32 h_instream, u32 size_in_bytes);
1449
1450 u16 hpi_instream_host_buffer_free(const struct hpi_hsubsys *ph_subsys,
1451 u32 h_instream);
1452
1453 u16 hpi_instream_group_add(const struct hpi_hsubsys *ph_subsys,
1454 u32 h_instream, u32 h_stream);
1455
1456 u16 hpi_instream_group_get_map(const struct hpi_hsubsys *ph_subsys,
1457 u32 h_instream, u32 *poutstream_map, u32 *pinstream_map);
1458
1459 u16 hpi_instream_group_reset(const struct hpi_hsubsys *ph_subsys,
1460 u32 h_instream);
1461
1462 /*********/
1463 /* MIXER */
1464 /*********/
1465 u16 hpi_mixer_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1466 u32 *ph_mixer);
1467
1468 u16 hpi_mixer_close(const struct hpi_hsubsys *ph_subsys, u32 h_mixer);
1469
1470 u16 hpi_mixer_get_control(const struct hpi_hsubsys *ph_subsys, u32 h_mixer,
1471 u16 src_node_type, u16 src_node_type_index, u16 dst_node_type,
1472 u16 dst_node_type_index, u16 control_type, u32 *ph_control);
1473
1474 u16 hpi_mixer_get_control_by_index(const struct hpi_hsubsys *ph_subsys,
1475 u32 h_mixer, u16 control_index, u16 *pw_src_node_type,
1476 u16 *pw_src_node_index, u16 *pw_dst_node_type, u16 *pw_dst_node_index,
1477 u16 *pw_control_type, u32 *ph_control);
1478
1479 u16 hpi_mixer_store(const struct hpi_hsubsys *ph_subsys, u32 h_mixer,
1480 enum HPI_MIXER_STORE_COMMAND command, u16 index);
1481 /*************************/
1482 /* mixer CONTROLS */
1483 /*************************/
1484 /*************************/
1485 /* volume control */
1486 /*************************/
1487 u16 hpi_volume_set_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1488 short an_gain0_01dB[HPI_MAX_CHANNELS]
1489 );
1490
1491 u16 hpi_volume_get_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1492 short an_gain0_01dB_out[HPI_MAX_CHANNELS]
1493 );
1494
1495 #define hpi_volume_get_range hpi_volume_query_range
1496 u16 hpi_volume_query_range(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1497 short *min_gain_01dB, short *max_gain_01dB, short *step_gain_01dB);
1498
1499 u16 hpi_volume_query_channels(const struct hpi_hsubsys *ph_subsys,
1500 const u32 h_volume, u32 *p_channels);
1501
1502 u16 hpi_volume_auto_fade(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1503 short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms);
1504
1505 u16 hpi_volume_auto_fade_profile(const struct hpi_hsubsys *ph_subsys,
1506 u32 h_control, short an_stop_gain0_01dB[HPI_MAX_CHANNELS],
1507 u32 duration_ms, u16 profile);
1508
1509 /*************************/
1510 /* level control */
1511 /*************************/
1512 u16 hpi_level_query_range(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1513 short *min_gain_01dB, short *max_gain_01dB, short *step_gain_01dB);
1514
1515 u16 hpi_level_set_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1516 short an_gain0_01dB[HPI_MAX_CHANNELS]
1517 );
1518
1519 u16 hpi_level_get_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1520 short an_gain0_01dB_out[HPI_MAX_CHANNELS]
1521 );
1522
1523 /*************************/
1524 /* meter control */
1525 /*************************/
1526 u16 hpi_meter_query_channels(const struct hpi_hsubsys *ph_subsys,
1527 const u32 h_meter, u32 *p_channels);
1528
1529 u16 hpi_meter_get_peak(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1530 short an_peak0_01dB_out[HPI_MAX_CHANNELS]
1531 );
1532
1533 u16 hpi_meter_get_rms(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1534 short an_peak0_01dB_out[HPI_MAX_CHANNELS]
1535 );
1536
1537 u16 hpi_meter_set_peak_ballistics(const struct hpi_hsubsys *ph_subsys,
1538 u32 h_control, u16 attack, u16 decay);
1539
1540 u16 hpi_meter_set_rms_ballistics(const struct hpi_hsubsys *ph_subsys,
1541 u32 h_control, u16 attack, u16 decay);
1542
1543 u16 hpi_meter_get_peak_ballistics(const struct hpi_hsubsys *ph_subsys,
1544 u32 h_control, u16 *attack, u16 *decay);
1545
1546 u16 hpi_meter_get_rms_ballistics(const struct hpi_hsubsys *ph_subsys,
1547 u32 h_control, u16 *attack, u16 *decay);
1548
1549 /*************************/
1550 /* channel mode control */
1551 /*************************/
1552 u16 hpi_channel_mode_query_mode(const struct hpi_hsubsys *ph_subsys,
1553 const u32 h_mode, const u32 index, u16 *pw_mode);
1554
1555 u16 hpi_channel_mode_set(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1556 u16 mode);
1557
1558 u16 hpi_channel_mode_get(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1559 u16 *mode);
1560
1561 /*************************/
1562 /* Tuner control */
1563 /*************************/
1564 u16 hpi_tuner_query_band(const struct hpi_hsubsys *ph_subsys,
1565 const u32 h_tuner, const u32 index, u16 *pw_band);
1566
1567 u16 hpi_tuner_set_band(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1568 u16 band);
1569
1570 u16 hpi_tuner_get_band(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1571 u16 *pw_band);
1572
1573 u16 hpi_tuner_query_frequency(const struct hpi_hsubsys *ph_subsys,
1574 const u32 h_tuner, const u32 index, const u16 band, u32 *pfreq);
1575
1576 u16 hpi_tuner_set_frequency(const struct hpi_hsubsys *ph_subsys,
1577 u32 h_control, u32 freq_ink_hz);
1578
1579 u16 hpi_tuner_get_frequency(const struct hpi_hsubsys *ph_subsys,
1580 u32 h_control, u32 *pw_freq_ink_hz);
1581
1582 u16 hpi_tuner_getRF_level(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1583 short *pw_level);
1584
1585 u16 hpi_tuner_get_rawRF_level(const struct hpi_hsubsys *ph_subsys,
1586 u32 h_control, short *pw_level);
1587
1588 u16 hpi_tuner_query_gain(const struct hpi_hsubsys *ph_subsys,
1589 const u32 h_tuner, const u32 index, u16 *pw_gain);
1590
1591 u16 hpi_tuner_set_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1592 short gain);
1593
1594 u16 hpi_tuner_get_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1595 short *pn_gain);
1596
1597 u16 hpi_tuner_get_status(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1598 u16 *pw_status_mask, u16 *pw_status);
1599
1600 u16 hpi_tuner_set_mode(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1601 u32 mode, u32 value);
1602
1603 u16 hpi_tuner_get_mode(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1604 u32 mode, u32 *pn_value);
1605
1606 u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1607 char *p_rds_data);
1608
1609 u16 hpi_tuner_query_deemphasis(const struct hpi_hsubsys *ph_subsys,
1610 const u32 h_tuner, const u32 index, const u16 band, u32 *pdeemphasis);
1611
1612 u16 hpi_tuner_set_deemphasis(const struct hpi_hsubsys *ph_subsys,
1613 u32 h_control, u32 deemphasis);
1614 u16 hpi_tuner_get_deemphasis(const struct hpi_hsubsys *ph_subsys,
1615 u32 h_control, u32 *pdeemphasis);
1616
1617 u16 hpi_tuner_query_program(const struct hpi_hsubsys *ph_subsys,
1618 const u32 h_tuner, u32 *pbitmap_program);
1619
1620 u16 hpi_tuner_set_program(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1621 u32 program);
1622
1623 u16 hpi_tuner_get_program(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1624 u32 *pprogram);
1625
1626 u16 hpi_tuner_get_hd_radio_dsp_version(const struct hpi_hsubsys *ph_subsys,
1627 u32 h_control, char *psz_dsp_version, const u32 string_size);
1628
1629 u16 hpi_tuner_get_hd_radio_sdk_version(const struct hpi_hsubsys *ph_subsys,
1630 u32 h_control, char *psz_sdk_version, const u32 string_size);
1631
1632 u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
1633 u32 h_control, u32 *pquality);
1634
1635 u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1636 u32 h_control, u32 *pblend);
1637
1638 u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1639 u32 h_control, const u32 blend);
1640
1641 /****************************/
1642 /* PADs control */
1643 /****************************/
1644
1645 u16 HPI_PAD__get_channel_name(const struct hpi_hsubsys *ph_subsys,
1646 u32 h_control, char *psz_string, const u32 string_length);
1647
1648 u16 HPI_PAD__get_artist(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1649 char *psz_string, const u32 string_length);
1650
1651 u16 HPI_PAD__get_title(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1652 char *psz_string, const u32 string_length);
1653
1654 u16 HPI_PAD__get_comment(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1655 char *psz_string, const u32 string_length);
1656
1657 u16 HPI_PAD__get_program_type(const struct hpi_hsubsys *ph_subsys,
1658 u32 h_control, u32 *ppTY);
1659
1660 u16 HPI_PAD__get_rdsPI(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1661 u32 *ppI);
1662
1663 u16 HPI_PAD__get_program_type_string(const struct hpi_hsubsys *ph_subsys,
1664 u32 h_control, const u32 data_type, const u32 pTY, char *psz_string,
1665 const u32 string_length);
1666
1667 /****************************/
1668 /* AES/EBU Receiver control */
1669 /****************************/
1670 u16 HPI_AESEBU__receiver_query_format(const struct hpi_hsubsys *ph_subsys,
1671 const u32 h_aes_rx, const u32 index, u16 *pw_format);
1672
1673 u16 HPI_AESEBU__receiver_set_format(const struct hpi_hsubsys *ph_subsys,
1674 u32 h_control, u16 source);
1675
1676 u16 HPI_AESEBU__receiver_get_format(const struct hpi_hsubsys *ph_subsys,
1677 u32 h_control, u16 *pw_source);
1678
1679 u16 HPI_AESEBU__receiver_get_sample_rate(const struct hpi_hsubsys *ph_subsys,
1680 u32 h_control, u32 *psample_rate);
1681
1682 u16 HPI_AESEBU__receiver_get_user_data(const struct hpi_hsubsys *ph_subsys,
1683 u32 h_control, u16 index, u16 *pw_data);
1684
1685 u16 HPI_AESEBU__receiver_get_channel_status(const struct hpi_hsubsys
1686 *ph_subsys, u32 h_control, u16 index, u16 *pw_data);
1687
1688 u16 HPI_AESEBU__receiver_get_error_status(const struct hpi_hsubsys *ph_subsys,
1689 u32 h_control, u16 *pw_error_data);
1690
1691 /*******************************/
1692 /* AES/EBU Transmitter control */
1693 /*******************************/
1694 u16 HPI_AESEBU__transmitter_set_sample_rate(const struct hpi_hsubsys
1695 *ph_subsys, u32 h_control, u32 sample_rate);
1696
1697 u16 HPI_AESEBU__transmitter_set_user_data(const struct hpi_hsubsys *ph_subsys,
1698 u32 h_control, u16 index, u16 data);
1699
1700 u16 HPI_AESEBU__transmitter_set_channel_status(const struct hpi_hsubsys
1701 *ph_subsys, u32 h_control, u16 index, u16 data);
1702
1703 u16 HPI_AESEBU__transmitter_get_channel_status(const struct hpi_hsubsys
1704 *ph_subsys, u32 h_control, u16 index, u16 *pw_data);
1705
1706 u16 HPI_AESEBU__transmitter_query_format(const struct hpi_hsubsys *ph_subsys,
1707 const u32 h_aes_tx, const u32 index, u16 *pw_format);
1708
1709 u16 HPI_AESEBU__transmitter_set_format(const struct hpi_hsubsys *ph_subsys,
1710 u32 h_control, u16 output_format);
1711
1712 u16 HPI_AESEBU__transmitter_get_format(const struct hpi_hsubsys *ph_subsys,
1713 u32 h_control, u16 *pw_output_format);
1714
1715 /***********************/
1716 /* multiplexer control */
1717 /***********************/
1718 u16 hpi_multiplexer_set_source(const struct hpi_hsubsys *ph_subsys,
1719 u32 h_control, u16 source_node_type, u16 source_node_index);
1720
1721 u16 hpi_multiplexer_get_source(const struct hpi_hsubsys *ph_subsys,
1722 u32 h_control, u16 *source_node_type, u16 *source_node_index);
1723
1724 u16 hpi_multiplexer_query_source(const struct hpi_hsubsys *ph_subsys,
1725 u32 h_control, u16 index, u16 *source_node_type,
1726 u16 *source_node_index);
1727
1728 /***************/
1729 /* VOX control */
1730 /***************/
1731 u16 hpi_vox_set_threshold(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1732 short an_gain0_01dB);
1733
1734 u16 hpi_vox_get_threshold(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1735 short *an_gain0_01dB);
1736
1737 /*********************/
1738 /* Bitstream control */
1739 /*********************/
1740 u16 hpi_bitstream_set_clock_edge(const struct hpi_hsubsys *ph_subsys,
1741 u32 h_control, u16 edge_type);
1742
1743 u16 hpi_bitstream_set_data_polarity(const struct hpi_hsubsys *ph_subsys,
1744 u32 h_control, u16 polarity);
1745
1746 u16 hpi_bitstream_get_activity(const struct hpi_hsubsys *ph_subsys,
1747 u32 h_control, u16 *pw_clk_activity, u16 *pw_data_activity);
1748
1749 /***********************/
1750 /* SampleClock control */
1751 /***********************/
1752
1753 u16 hpi_sample_clock_query_source(const struct hpi_hsubsys *ph_subsys,
1754 const u32 h_clock, const u32 index, u16 *pw_source);
1755
1756 u16 hpi_sample_clock_set_source(const struct hpi_hsubsys *ph_subsys,
1757 u32 h_control, u16 source);
1758
1759 u16 hpi_sample_clock_get_source(const struct hpi_hsubsys *ph_subsys,
1760 u32 h_control, u16 *pw_source);
1761
1762 u16 hpi_sample_clock_query_source_index(const struct hpi_hsubsys *ph_subsys,
1763 const u32 h_clock, const u32 index, const u32 source,
1764 u16 *pw_source_index);
1765
1766 u16 hpi_sample_clock_set_source_index(const struct hpi_hsubsys *ph_subsys,
1767 u32 h_control, u16 source_index);
1768
1769 u16 hpi_sample_clock_get_source_index(const struct hpi_hsubsys *ph_subsys,
1770 u32 h_control, u16 *pw_source_index);
1771
1772 u16 hpi_sample_clock_get_sample_rate(const struct hpi_hsubsys *ph_subsys,
1773 u32 h_control, u32 *psample_rate);
1774
1775 u16 hpi_sample_clock_query_local_rate(const struct hpi_hsubsys *ph_subsys,
1776 const u32 h_clock, const u32 index, u32 *psource);
1777
1778 u16 hpi_sample_clock_set_local_rate(const struct hpi_hsubsys *ph_subsys,
1779 u32 h_control, u32 sample_rate);
1780
1781 u16 hpi_sample_clock_get_local_rate(const struct hpi_hsubsys *ph_subsys,
1782 u32 h_control, u32 *psample_rate);
1783
1784 u16 hpi_sample_clock_set_auto(const struct hpi_hsubsys *ph_subsys,
1785 u32 h_control, u32 enable);
1786
1787 u16 hpi_sample_clock_get_auto(const struct hpi_hsubsys *ph_subsys,
1788 u32 h_control, u32 *penable);
1789
1790 u16 hpi_sample_clock_set_local_rate_lock(const struct hpi_hsubsys *ph_subsys,
1791 u32 h_control, u32 lock);
1792
1793 u16 hpi_sample_clock_get_local_rate_lock(const struct hpi_hsubsys *ph_subsys,
1794 u32 h_control, u32 *plock);
1795
1796 /***********************/
1797 /* Microphone control */
1798 /***********************/
1799 u16 hpi_microphone_set_phantom_power(const struct hpi_hsubsys *ph_subsys,
1800 u32 h_control, u16 on_off);
1801
1802 u16 hpi_microphone_get_phantom_power(const struct hpi_hsubsys *ph_subsys,
1803 u32 h_control, u16 *pw_on_off);
1804
1805 /*******************************
1806 Parametric Equalizer control
1807 *******************************/
1808 u16 hpi_parametricEQ__get_info(const struct hpi_hsubsys *ph_subsys,
1809 u32 h_control, u16 *pw_number_of_bands, u16 *pw_enabled);
1810
1811 u16 hpi_parametricEQ__set_state(const struct hpi_hsubsys *ph_subsys,
1812 u32 h_control, u16 on_off);
1813
1814 u16 hpi_parametricEQ__set_band(const struct hpi_hsubsys *ph_subsys,
1815 u32 h_control, u16 index, u16 type, u32 frequency_hz, short q100,
1816 short gain0_01dB);
1817
1818 u16 hpi_parametricEQ__get_band(const struct hpi_hsubsys *ph_subsys,
1819 u32 h_control, u16 index, u16 *pn_type, u32 *pfrequency_hz,
1820 short *pnQ100, short *pn_gain0_01dB);
1821
1822 u16 hpi_parametricEQ__get_coeffs(const struct hpi_hsubsys *ph_subsys,
1823 u32 h_control, u16 index, short coeffs[5]
1824 );
1825
1826 /*******************************
1827 Compressor Expander control
1828 *******************************/
1829
1830 u16 hpi_compander_set_enable(const struct hpi_hsubsys *ph_subsys,
1831 u32 h_control, u32 on);
1832
1833 u16 hpi_compander_get_enable(const struct hpi_hsubsys *ph_subsys,
1834 u32 h_control, u32 *pon);
1835
1836 u16 hpi_compander_set_makeup_gain(const struct hpi_hsubsys *ph_subsys,
1837 u32 h_control, short makeup_gain0_01dB);
1838
1839 u16 hpi_compander_get_makeup_gain(const struct hpi_hsubsys *ph_subsys,
1840 u32 h_control, short *pn_makeup_gain0_01dB);
1841
1842 u16 hpi_compander_set_attack_time_constant(const struct hpi_hsubsys
1843 *ph_subsys, u32 h_control, u32 index, u32 attack);
1844
1845 u16 hpi_compander_get_attack_time_constant(const struct hpi_hsubsys
1846 *ph_subsys, u32 h_control, u32 index, u32 *pw_attack);
1847
1848 u16 hpi_compander_set_decay_time_constant(const struct hpi_hsubsys *ph_subsys,
1849 u32 h_control, u32 index, u32 decay);
1850
1851 u16 hpi_compander_get_decay_time_constant(const struct hpi_hsubsys *ph_subsys,
1852 u32 h_control, u32 index, u32 *pw_decay);
1853
1854 u16 hpi_compander_set_threshold(const struct hpi_hsubsys *ph_subsys,
1855 u32 h_control, u32 index, short threshold0_01dB);
1856
1857 u16 hpi_compander_get_threshold(const struct hpi_hsubsys *ph_subsys,
1858 u32 h_control, u32 index, short *pn_threshold0_01dB);
1859
1860 u16 hpi_compander_set_ratio(const struct hpi_hsubsys *ph_subsys,
1861 u32 h_control, u32 index, u32 ratio100);
1862
1863 u16 hpi_compander_get_ratio(const struct hpi_hsubsys *ph_subsys,
1864 u32 h_control, u32 index, u32 *pw_ratio100);
1865
1866 /*******************************
1867 Cobranet HMI control
1868 *******************************/
1869 u16 hpi_cobranet_hmi_write(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1870 u32 hmi_address, u32 byte_count, u8 *pb_data);
1871
1872 u16 hpi_cobranet_hmi_read(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1873 u32 hmi_address, u32 max_byte_count, u32 *pbyte_count, u8 *pb_data);
1874
1875 u16 hpi_cobranet_hmi_get_status(const struct hpi_hsubsys *ph_subsys,
1876 u32 h_control, u32 *pstatus, u32 *preadable_size,
1877 u32 *pwriteable_size);
1878
1879 /*Read the current IP address
1880 */
1881 u16 hpi_cobranet_getI_paddress(const struct hpi_hsubsys *ph_subsys,
1882 u32 h_control, u32 *pi_paddress);
1883
1884 /* Write the current IP address
1885 */
1886 u16 hpi_cobranet_setI_paddress(const struct hpi_hsubsys *ph_subsys,
1887 u32 h_control, u32 i_paddress);
1888
1889 /* Read the static IP address
1890 */
1891 u16 hpi_cobranet_get_staticI_paddress(const struct hpi_hsubsys *ph_subsys,
1892 u32 h_control, u32 *pi_paddress);
1893
1894 /* Write the static IP address
1895 */
1896 u16 hpi_cobranet_set_staticI_paddress(const struct hpi_hsubsys *ph_subsys,
1897 u32 h_control, u32 i_paddress);
1898
1899 /* Read the MAC address
1900 */
1901 u16 hpi_cobranet_getMA_caddress(const struct hpi_hsubsys *ph_subsys,
1902 u32 h_control, u32 *pmAC_MS_bs, u32 *pmAC_LS_bs);
1903
1904 /*******************************
1905 Tone Detector control
1906 *******************************/
1907 u16 hpi_tone_detector_get_state(const struct hpi_hsubsys *ph_subsys, u32 hC,
1908 u32 *state);
1909
1910 u16 hpi_tone_detector_set_enable(const struct hpi_hsubsys *ph_subsys, u32 hC,
1911 u32 enable);
1912
1913 u16 hpi_tone_detector_get_enable(const struct hpi_hsubsys *ph_subsys, u32 hC,
1914 u32 *enable);
1915
1916 u16 hpi_tone_detector_set_event_enable(const struct hpi_hsubsys *ph_subsys,
1917 u32 hC, u32 event_enable);
1918
1919 u16 hpi_tone_detector_get_event_enable(const struct hpi_hsubsys *ph_subsys,
1920 u32 hC, u32 *event_enable);
1921
1922 u16 hpi_tone_detector_set_threshold(const struct hpi_hsubsys *ph_subsys,
1923 u32 hC, int threshold);
1924
1925 u16 hpi_tone_detector_get_threshold(const struct hpi_hsubsys *ph_subsys,
1926 u32 hC, int *threshold);
1927
1928 u16 hpi_tone_detector_get_frequency(const struct hpi_hsubsys *ph_subsys,
1929 u32 hC, u32 index, u32 *frequency);
1930
1931 /*******************************
1932 Silence Detector control
1933 *******************************/
1934 u16 hpi_silence_detector_get_state(const struct hpi_hsubsys *ph_subsys,
1935 u32 hC, u32 *state);
1936
1937 u16 hpi_silence_detector_set_enable(const struct hpi_hsubsys *ph_subsys,
1938 u32 hC, u32 enable);
1939
1940 u16 hpi_silence_detector_get_enable(const struct hpi_hsubsys *ph_subsys,
1941 u32 hC, u32 *enable);
1942
1943 u16 hpi_silence_detector_set_event_enable(const struct hpi_hsubsys *ph_subsys,
1944 u32 hC, u32 event_enable);
1945
1946 u16 hpi_silence_detector_get_event_enable(const struct hpi_hsubsys *ph_subsys,
1947 u32 hC, u32 *event_enable);
1948
1949 u16 hpi_silence_detector_set_delay(const struct hpi_hsubsys *ph_subsys,
1950 u32 hC, u32 delay);
1951
1952 u16 hpi_silence_detector_get_delay(const struct hpi_hsubsys *ph_subsys,
1953 u32 hC, u32 *delay);
1954
1955 u16 hpi_silence_detector_set_threshold(const struct hpi_hsubsys *ph_subsys,
1956 u32 hC, int threshold);
1957
1958 u16 hpi_silence_detector_get_threshold(const struct hpi_hsubsys *ph_subsys,
1959 u32 hC, int *threshold);
1960
1961 /*******************************
1962 Universal control
1963 *******************************/
1964 u16 hpi_entity_find_next(struct hpi_entity *container_entity,
1965 enum e_entity_type type, enum e_entity_role role, int recursive_flag,
1966 struct hpi_entity **current_match);
1967
1968 u16 hpi_entity_copy_value_from(struct hpi_entity *entity,
1969 enum e_entity_type type, size_t item_count, void *value_dst_p);
1970
1971 u16 hpi_entity_unpack(struct hpi_entity *entity, enum e_entity_type *type,
1972 size_t *items, enum e_entity_role *role, void **value);
1973
1974 u16 hpi_entity_alloc_and_pack(const enum e_entity_type type,
1975 const size_t item_count, const enum e_entity_role role, void *value,
1976 struct hpi_entity **entity);
1977
1978 void hpi_entity_free(struct hpi_entity *entity);
1979
1980 u16 hpi_universal_info(const struct hpi_hsubsys *ph_subsys, u32 hC,
1981 struct hpi_entity **info);
1982
1983 u16 hpi_universal_get(const struct hpi_hsubsys *ph_subsys, u32 hC,
1984 struct hpi_entity **value);
1985
1986 u16 hpi_universal_set(const struct hpi_hsubsys *ph_subsys, u32 hC,
1987 struct hpi_entity *value);
1988
1989 /*/////////// */
1990 /* DSP CLOCK */
1991 /*/////////// */
1992 u16 hpi_clock_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1993 u32 *ph_dsp_clock);
1994
1995 u16 hpi_clock_set_time(const struct hpi_hsubsys *ph_subsys, u32 h_clock,
1996 u16 hour, u16 minute, u16 second, u16 milli_second);
1997
1998 u16 hpi_clock_get_time(const struct hpi_hsubsys *ph_subsys, u32 h_clock,
1999 u16 *pw_hour, u16 *pw_minute, u16 *pw_second, u16 *pw_milli_second);
2000
2001 /*/////////// */
2002 /* PROFILE */
2003 /*/////////// */
2004 u16 hpi_profile_open_all(const struct hpi_hsubsys *ph_subsys,
2005 u16 adapter_index, u16 profile_index, u32 *ph_profile,
2006 u16 *pw_max_profiles);
2007
2008 u16 hpi_profile_get(const struct hpi_hsubsys *ph_subsys, u32 h_profile,
2009 u16 index, u16 *pw_seconds, u32 *pmicro_seconds, u32 *pcall_count,
2010 u32 *pmax_micro_seconds, u32 *pmin_micro_seconds);
2011
2012 u16 hpi_profile_start_all(const struct hpi_hsubsys *ph_subsys, u32 h_profile);
2013
2014 u16 hpi_profile_stop_all(const struct hpi_hsubsys *ph_subsys, u32 h_profile);
2015
2016 u16 hpi_profile_get_name(const struct hpi_hsubsys *ph_subsys, u32 h_profile,
2017 u16 index, char *sz_profile_name, u16 profile_name_length);
2018
2019 u16 hpi_profile_get_utilization(const struct hpi_hsubsys *ph_subsys,
2020 u32 h_profile, u32 *putilization);
2021
2022 /*//////////////////// */
2023 /* UTILITY functions */
2024
2025 u16 hpi_format_create(struct hpi_format *p_format, u16 channels, u16 format,
2026 u32 sample_rate, u32 bit_rate, u32 attributes);
2027
2028 /* Until it's verified, this function is for Windows OSs only */
2029
2030 #endif /*_H_HPI_ */
2031 /*
2032 ///////////////////////////////////////////////////////////////////////////////
2033 // See CVS for history. Last complete set in rev 1.146
2034 ////////////////////////////////////////////////////////////////////////////////
2035 */