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