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