Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
sound
pci
asihpi
hpi.h
Go to the documentation of this file.
1
/******************************************************************************
2
3
AudioScience HPI driver
4
Copyright (C) 1997-2011 AudioScience Inc. <
[email protected]
>
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
*/
31
#ifndef _HPI_H_
32
#define _HPI_H_
33
34
#include <linux/types.h>
35
#define HPI_BUILD_KERNEL_MODE
36
37
/******************************************************************************/
38
/******** HPI API DEFINITIONS *****/
39
/******************************************************************************/
40
41
/*******************************************/
45
enum
HPI_FORMATS
{
47
HPI_FORMAT_MIXER_NATIVE
= 0,
49
HPI_FORMAT_PCM8_UNSIGNED
= 1,
51
HPI_FORMAT_PCM16_SIGNED
= 2,
53
HPI_FORMAT_MPEG_L1
= 3,
83
HPI_FORMAT_MPEG_L2
= 4,
116
HPI_FORMAT_MPEG_L3
= 5,
118
HPI_FORMAT_DOLBY_AC2
= 6,
120
HPI_FORMAT_DOLBY_AC3
= 7,
122
HPI_FORMAT_PCM16_BIGENDIAN
= 8,
124
HPI_FORMAT_AA_TAGIT1_HITS
= 9,
126
HPI_FORMAT_AA_TAGIT1_INSERTS
= 10,
131
HPI_FORMAT_PCM32_SIGNED
= 11,
133
HPI_FORMAT_RAW_BITSTREAM
= 12,
135
HPI_FORMAT_AA_TAGIT1_HITS_EX1
= 13,
140
HPI_FORMAT_PCM32_FLOAT
= 14,
142
HPI_FORMAT_PCM24_SIGNED
= 15,
144
HPI_FORMAT_OEM1
= 16,
146
HPI_FORMAT_OEM2
= 17,
148
HPI_FORMAT_UNDEFINED
= 0xffff
149
};
150
151
/*******************************************/
155
enum
HPI_STREAM_STATES
{
157
HPI_STATE_STOPPED
= 1,
159
HPI_STATE_PLAYING
= 2,
161
HPI_STATE_RECORDING
= 3,
163
HPI_STATE_DRAINED
= 4,
165
HPI_STATE_SINEGEN
= 5,
168
HPI_STATE_WAIT
= 6
169
};
170
/*******************************************/
174
enum
HPI_SOURCENODES
{
179
HPI_SOURCENODE_NONE
= 100,
181
HPI_SOURCENODE_OSTREAM
= 101,
183
HPI_SOURCENODE_LINEIN
= 102,
184
HPI_SOURCENODE_AESEBU_IN
= 103,
185
HPI_SOURCENODE_TUNER
= 104,
186
HPI_SOURCENODE_RF
= 105,
187
HPI_SOURCENODE_CLOCK_SOURCE
= 106,
188
HPI_SOURCENODE_RAW_BITSTREAM
= 107,
189
HPI_SOURCENODE_MICROPHONE
= 108,
192
HPI_SOURCENODE_COBRANET
= 109,
193
HPI_SOURCENODE_ANALOG
= 110,
194
HPI_SOURCENODE_ADAPTER
= 111,
197
HPI_SOURCENODE_RTP_DESTINATION
= 112,
198
HPI_SOURCENODE_INTERNAL
= 113,
199
/* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */
200
HPI_SOURCENODE_LAST_INDEX
= 113
201
/* AX6 max sourcenode types = 15 */
202
};
203
204
/*******************************************/
208
enum
HPI_DESTNODES
{
213
HPI_DESTNODE_NONE
= 200,
215
HPI_DESTNODE_ISTREAM
= 201,
216
HPI_DESTNODE_LINEOUT
= 202,
217
HPI_DESTNODE_AESEBU_OUT
= 203,
218
HPI_DESTNODE_RF
= 204,
219
HPI_DESTNODE_SPEAKER
= 205,
222
HPI_DESTNODE_COBRANET
= 206,
223
HPI_DESTNODE_ANALOG
= 207,
226
HPI_DESTNODE_RTP_SOURCE
= 208,
227
/* !!!Update this AND hpidebug.h if you add a new destnode type!!! */
228
HPI_DESTNODE_LAST_INDEX
= 208
229
/* AX6 max destnode types = 15 */
230
};
231
232
/*******************************************/
236
enum
HPI_CONTROLS
{
237
HPI_CONTROL_GENERIC
= 0,
238
HPI_CONTROL_CONNECTION
= 1,
239
HPI_CONTROL_VOLUME
= 2,
240
HPI_CONTROL_METER
= 3,
241
HPI_CONTROL_MUTE
= 4,
/*mute control - not used at present. */
242
HPI_CONTROL_MULTIPLEXER
= 5,
244
HPI_CONTROL_AESEBU_TRANSMITTER
= 6,
245
HPI_CONTROL_AESEBUTX
= 6,
/* HPI_CONTROL_AESEBU_TRANSMITTER */
246
247
HPI_CONTROL_AESEBU_RECEIVER
= 7,
248
HPI_CONTROL_AESEBURX
= 7,
/* HPI_CONTROL_AESEBU_RECEIVER */
249
250
HPI_CONTROL_LEVEL
= 8,
251
HPI_CONTROL_TUNER
= 9,
252
/* HPI_CONTROL_ONOFFSWITCH = 10 */
253
HPI_CONTROL_VOX
= 11,
254
/* HPI_CONTROL_AES18_TRANSMITTER = 12 */
255
/* HPI_CONTROL_AES18_RECEIVER = 13 */
256
/* HPI_CONTROL_AES18_BLOCKGENERATOR = 14 */
257
HPI_CONTROL_CHANNEL_MODE
= 15,
259
HPI_CONTROL_BITSTREAM
= 16,
260
HPI_CONTROL_SAMPLECLOCK
= 17,
261
HPI_CONTROL_MICROPHONE
= 18,
262
HPI_CONTROL_PARAMETRIC_EQ
= 19,
263
HPI_CONTROL_EQUALIZER
= 19,
/*HPI_CONTROL_PARAMETRIC_EQ */
264
265
HPI_CONTROL_COMPANDER
= 20,
266
HPI_CONTROL_COBRANET
= 21,
267
HPI_CONTROL_TONEDETECTOR
= 22,
268
HPI_CONTROL_SILENCEDETECTOR
= 23,
269
HPI_CONTROL_PAD
= 24,
270
HPI_CONTROL_SRC
= 25,
271
HPI_CONTROL_UNIVERSAL
= 26,
273
/* !!! Update this AND hpidebug.h if you add a new control type!!!*/
274
HPI_CONTROL_LAST_INDEX
= 26
275
/* WARNING types 256 or greater impact bit packing in all AX6 DSP code */
276
};
277
278
/*******************************************/
283
enum
HPI_ADAPTER_PROPERTIES
{
291
HPI_ADAPTER_PROPERTY_ERRATA_1
= 1,
292
296
HPI_ADAPTER_PROPERTY_GROUPING
= 2,
297
303
HPI_ADAPTER_PROPERTY_ENABLE_SSX2
= 3,
304
313
HPI_ADAPTER_PROPERTY_SSX2_SETTING
= 4,
314
322
HPI_ADAPTER_PROPERTY_IRQ_RATE
= 5,
323
325
HPI_ADAPTER_PROPERTY_READONLYBASE
= 256,
326
332
HPI_ADAPTER_PROPERTY_LATENCY
= 256,
333
340
HPI_ADAPTER_PROPERTY_GRANULARITY
= 257,
341
345
HPI_ADAPTER_PROPERTY_CURCHANNELS
= 258,
346
352
HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION
= 259,
353
359
HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB
= 260,
360
365
HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB
= 261,
366
375
HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE
= 262,
376
378
HPI_ADAPTER_PROPERTY_LOGTABLEN
= 263,
379
HPI_ADAPTER_PROPERTY_LOGTABBEG
= 264,
380
386
HPI_ADAPTER_PROPERTY_IP_ADDRESS
= 265,
387
393
HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT
= 266,
394
407
HPI_ADAPTER_PROPERTY_INTERVAL
= 267,
412
HPI_ADAPTER_PROPERTY_CAPS1
= 268,
417
HPI_ADAPTER_PROPERTY_CAPS2
= 269,
418
421
HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS
= 270,
428
HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2
= 271,
434
HPI_ADAPTER_PROPERTY_SUPPORTS_IRQ
= 272,
439
HPI_ADAPTER_PROPERTY_SUPPORTS_FW_UPDATE
= 273,
446
HPI_ADAPTER_PROPERTY_FIRMWARE_ID
= 274
447
};
448
454
enum
HPI_ADAPTER_MODE_CMDS
{
456
HPI_ADAPTER_MODE_SET
= 0,
459
HPI_ADAPTER_MODE_QUERY
= 1
460
};
461
469
enum
HPI_ADAPTER_MODES
{
480
HPI_ADAPTER_MODE_4OSTREAM
= 1,
481
487
HPI_ADAPTER_MODE_6OSTREAM
= 2,
488
494
HPI_ADAPTER_MODE_8OSTREAM
= 3,
495
501
HPI_ADAPTER_MODE_16OSTREAM
= 4,
502
506
HPI_ADAPTER_MODE_1OSTREAM
= 5,
507
511
HPI_ADAPTER_MODE_1
= 6,
512
516
HPI_ADAPTER_MODE_2
= 7,
517
521
HPI_ADAPTER_MODE_3
= 8,
522
528
HPI_ADAPTER_MODE_MULTICHANNEL
= 9,
529
535
HPI_ADAPTER_MODE_12OSTREAM
= 10,
536
540
HPI_ADAPTER_MODE_9OSTREAM
= 11,
541
546
HPI_ADAPTER_MODE_MONO
= 12,
547
551
HPI_ADAPTER_MODE_LOW_LATENCY
= 13
552
};
553
554
/* Note, adapters can have more than one capability -
555
encoding as bitfield is recommended. */
556
#define HPI_CAPABILITY_NONE (0)
557
#define HPI_CAPABILITY_MPEG_LAYER3 (1)
558
559
/* Set this equal to maximum capability index,
560
Must not be greater than 32 - see axnvdef.h */
561
#define HPI_CAPABILITY_MAX 1
562
/* #define HPI_CAPABILITY_AAC 2 */
563
564
/******************************************* STREAM ATTRIBUTES ****/
565
571
enum
HPI_MPEG_ANC_MODES
{
573
HPI_MPEG_ANC_HASENERGY
= 0,
578
HPI_MPEG_ANC_RAW
= 1
579
};
580
584
enum
HPI_ISTREAM_MPEG_ANC_ALIGNS
{
586
HPI_MPEG_ANC_ALIGN_LEFT
= 0,
588
HPI_MPEG_ANC_ALIGN_RIGHT
= 1
589
};
590
599
enum
HPI_MPEG_MODES
{
603
HPI_MPEG_MODE_DEFAULT
= 0,
605
HPI_MPEG_MODE_STEREO
= 1,
607
HPI_MPEG_MODE_JOINTSTEREO
= 2,
609
HPI_MPEG_MODE_DUALCHANNEL
= 3
610
};
611
/******************************************* MIXER ATTRIBUTES ****/
612
613
/* \defgroup mixer_flags Mixer flags for HPI_MIXER_GET_CONTROL_MULTIPLE_VALUES
614
{
615
*/
616
#define HPI_MIXER_GET_CONTROL_MULTIPLE_CHANGED (0)
617
#define HPI_MIXER_GET_CONTROL_MULTIPLE_RESET (1)
618
/*}*/
619
623
enum
HPI_MIXER_STORE_COMMAND
{
625
HPI_MIXER_STORE_SAVE
= 1,
627
HPI_MIXER_STORE_RESTORE
= 2,
629
HPI_MIXER_STORE_DELETE
= 3,
631
HPI_MIXER_STORE_ENABLE
= 4,
633
HPI_MIXER_STORE_DISABLE
= 5,
635
HPI_MIXER_STORE_SAVE_SINGLE
= 6
636
};
637
638
/****************************/
639
/* CONTROL ATTRIBUTE VALUES */
640
/****************************/
641
647
enum
HPI_SWITCH_STATES
{
648
HPI_SWITCH_OFF
= 0,
649
HPI_SWITCH_ON
= 1
650
};
651
652
/* Volume control special gain values */
653
657
#define HPI_UNITS_PER_dB 100
658
661
#define HPI_GAIN_OFF (-100 * HPI_UNITS_PER_dB)
662
666
#define HPI_BITMASK_ALL_CHANNELS (0xFFFFFFFF)
667
671
#define HPI_METER_MINIMUM (-150 * HPI_UNITS_PER_dB)
672
676
enum
HPI_VOLUME_AUTOFADES
{
678
HPI_VOLUME_AUTOFADE_LOG
= 2,
680
HPI_VOLUME_AUTOFADE_LINEAR
= 3
681
};
682
689
enum
HPI_AESEBU_FORMATS
{
691
HPI_AESEBU_FORMAT_AESEBU
= 1,
693
HPI_AESEBU_FORMAT_SPDIF
= 2
694
};
695
701
enum
HPI_AESEBU_ERRORS
{
703
HPI_AESEBU_ERROR_NOT_LOCKED
= 0x01,
705
HPI_AESEBU_ERROR_POOR_QUALITY
= 0x02,
707
HPI_AESEBU_ERROR_PARITY_ERROR
= 0x04,
709
HPI_AESEBU_ERROR_BIPHASE_VIOLATION
= 0x08,
711
HPI_AESEBU_ERROR_VALIDITY
= 0x10,
713
HPI_AESEBU_ERROR_CRC
= 0x20
714
};
715
720
#define HPI_PAD_CHANNEL_NAME_LEN 16
721
722
#define HPI_PAD_ARTIST_LEN 64
723
724
#define HPI_PAD_TITLE_LEN 64
725
726
#define HPI_PAD_COMMENT_LEN 256
727
728
#define HPI_PAD_PROGRAM_TYPE_INVALID 0xffff
729
734
enum
eHPI_RDS_type
{
735
HPI_RDS_DATATYPE_RDS
= 0,
736
HPI_RDS_DATATYPE_RBDS
= 1
737
};
738
744
enum
HPI_TUNER_BAND
{
745
HPI_TUNER_BAND_AM
= 1,
746
HPI_TUNER_BAND_FM
= 2,
747
HPI_TUNER_BAND_TV_NTSC_M
= 3,
748
HPI_TUNER_BAND_TV
= 3,
/* use TV_NTSC_M */
749
HPI_TUNER_BAND_FM_STEREO
= 4,
750
HPI_TUNER_BAND_AUX
= 5,
751
HPI_TUNER_BAND_TV_PAL_BG
= 6,
752
HPI_TUNER_BAND_TV_PAL_I
= 7,
753
HPI_TUNER_BAND_TV_PAL_DK
= 8,
754
HPI_TUNER_BAND_TV_SECAM_L
= 9,
755
HPI_TUNER_BAND_LAST
= 9
756
};
757
764
enum
HPI_TUNER_MODES
{
765
HPI_TUNER_MODE_RSS
= 1,
766
HPI_TUNER_MODE_RDS
= 2
767
};
768
774
enum
HPI_TUNER_MODE_VALUES
{
775
/* RSS attribute values */
776
HPI_TUNER_MODE_RSS_DISABLE
= 0,
777
HPI_TUNER_MODE_RSS_ENABLE
= 1,
779
/* RDS mode attributes */
780
HPI_TUNER_MODE_RDS_DISABLE
= 0,
781
HPI_TUNER_MODE_RDS_RDS
= 1,
782
HPI_TUNER_MODE_RDS_RBDS
= 2
783
};
784
791
enum
HPI_TUNER_STATUS_BITS
{
792
HPI_TUNER_VIDEO_COLOR_PRESENT
= 0x0001,
793
HPI_TUNER_VIDEO_IS_60HZ
= 0x0020,
794
HPI_TUNER_VIDEO_HORZ_SYNC_MISSING
= 0x0040,
795
HPI_TUNER_VIDEO_STATUS_VALID
= 0x0100,
796
HPI_TUNER_DIGITAL
= 0x0200,
797
HPI_TUNER_MULTIPROGRAM
= 0x0400,
798
HPI_TUNER_PLL_LOCKED
= 0x1000,
799
HPI_TUNER_FM_STEREO
= 0x2000
800
};
801
806
enum
HPI_CHANNEL_MODES
{
808
HPI_CHANNEL_MODE_NORMAL
= 1,
810
HPI_CHANNEL_MODE_SWAP
= 2,
812
HPI_CHANNEL_MODE_LEFT_TO_STEREO
= 3,
814
HPI_CHANNEL_MODE_RIGHT_TO_STEREO
= 4,
817
HPI_CHANNEL_MODE_STEREO_TO_LEFT
= 5,
820
HPI_CHANNEL_MODE_STEREO_TO_RIGHT
= 6,
821
HPI_CHANNEL_MODE_LAST
= 6
822
};
823
827
enum
HPI_SAMPLECLOCK_SOURCES
{
830
HPI_SAMPLECLOCK_SOURCE_LOCAL
= 1,
832
HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC
= 2,
834
HPI_SAMPLECLOCK_SOURCE_WORD
= 3,
836
HPI_SAMPLECLOCK_SOURCE_WORD_HEADER
= 4,
838
HPI_SAMPLECLOCK_SOURCE_SMPTE
= 5,
840
HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT
= 6,
842
HPI_SAMPLECLOCK_SOURCE_NETWORK
= 8,
844
HPI_SAMPLECLOCK_SOURCE_PREV_MODULE
= 10,
846
HPI_SAMPLECLOCK_SOURCE_LAST
= 10
847
};
848
852
enum
HPI_FILTER_TYPE
{
853
HPI_FILTER_TYPE_BYPASS
= 0,
855
HPI_FILTER_TYPE_LOWSHELF
= 1,
856
HPI_FILTER_TYPE_HIGHSHELF
= 2,
857
HPI_FILTER_TYPE_EQ_BAND
= 3,
859
HPI_FILTER_TYPE_LOWPASS
= 4,
860
HPI_FILTER_TYPE_HIGHPASS
= 5,
861
HPI_FILTER_TYPE_BANDPASS
= 6,
862
HPI_FILTER_TYPE_BANDSTOP
= 7
863
};
864
868
enum
ASYNC_EVENT_SOURCES
{
869
HPI_ASYNC_EVENT_GPIO
= 1,
870
HPI_ASYNC_EVENT_SILENCE
= 2,
871
HPI_ASYNC_EVENT_TONE
= 3
872
};
873
/*******************************************/
885
enum
HPI_ERROR_CODES
{
887
HPI_ERROR_INVALID_TYPE
= 100,
889
HPI_ERROR_INVALID_OBJ
= 101,
891
HPI_ERROR_INVALID_FUNC
= 102,
893
HPI_ERROR_INVALID_OBJ_INDEX
= 103,
895
HPI_ERROR_OBJ_NOT_OPEN
= 104,
897
HPI_ERROR_OBJ_ALREADY_OPEN
= 105,
899
HPI_ERROR_INVALID_RESOURCE
= 106,
900
/* HPI_ERROR_SUBSYSFINDADAPTERS_GETINFO= 107 */
902
HPI_ERROR_INVALID_RESPONSE
= 108,
905
HPI_ERROR_PROCESSING_MESSAGE
= 109,
907
HPI_ERROR_NETWORK_TIMEOUT
= 110,
908
/* An HPI handle is invalid (uninitialised?). */
909
HPI_ERROR_INVALID_HANDLE
= 111,
911
HPI_ERROR_UNIMPLEMENTED
= 112,
914
HPI_ERROR_NETWORK_TOO_MANY_CLIENTS
= 113,
919
HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL
= 114,
921
HPI_ERROR_RESPONSE_MISMATCH
= 115,
923
HPI_ERROR_CONTROL_CACHING
= 116,
928
HPI_ERROR_MESSAGE_BUFFER_TOO_SMALL
= 117,
929
930
/* HPI_ERROR_TOO_MANY_ADAPTERS= 200 */
932
HPI_ERROR_BAD_ADAPTER
= 201,
934
HPI_ERROR_BAD_ADAPTER_NUMBER
= 202,
936
HPI_ERROR_DUPLICATE_ADAPTER_NUMBER
= 203,
938
HPI_ERROR_DSP_BOOTLOAD
= 204,
940
HPI_ERROR_DSP_FILE_NOT_FOUND
= 206,
942
HPI_ERROR_DSP_HARDWARE
= 207,
944
HPI_ERROR_MEMORY_ALLOC
= 208,
946
HPI_ERROR_PLD_LOAD
= 209,
948
HPI_ERROR_DSP_FILE_FORMAT
= 210,
949
951
HPI_ERROR_DSP_FILE_ACCESS_DENIED
= 211,
953
HPI_ERROR_DSP_FILE_NO_HEADER
= 212,
954
/* HPI_ERROR_DSP_FILE_READ_ERROR= 213, */
956
HPI_ERROR_DSP_SECTION_NOT_FOUND
= 214,
958
HPI_ERROR_DSP_FILE_OTHER_ERROR
= 215,
960
HPI_ERROR_DSP_FILE_SHARING_VIOLATION
= 216,
962
HPI_ERROR_DSP_FILE_NULL_HEADER
= 217,
963
964
/* HPI_ERROR_FLASH = 220, */
965
967
HPI_ERROR_BAD_CHECKSUM
= 221,
968
HPI_ERROR_BAD_SEQUENCE
= 222,
969
HPI_ERROR_FLASH_ERASE
= 223,
970
HPI_ERROR_FLASH_PROGRAM
= 224,
971
HPI_ERROR_FLASH_VERIFY
= 225,
972
HPI_ERROR_FLASH_TYPE
= 226,
973
HPI_ERROR_FLASH_START
= 227,
974
HPI_ERROR_FLASH_READ
= 228,
975
HPI_ERROR_FLASH_READ_NO_FILE
= 229,
976
HPI_ERROR_FLASH_SIZE
= 230,
977
979
HPI_ERROR_RESERVED_1
= 290,
980
981
/* HPI_ERROR_INVALID_STREAM = 300 use HPI_ERROR_INVALID_OBJ_INDEX */
983
HPI_ERROR_INVALID_FORMAT
= 301,
985
HPI_ERROR_INVALID_SAMPLERATE
= 302,
987
HPI_ERROR_INVALID_CHANNELS
= 303,
989
HPI_ERROR_INVALID_BITRATE
= 304,
991
HPI_ERROR_INVALID_DATASIZE
= 305,
992
/* HPI_ERROR_BUFFER_FULL = 306 use HPI_ERROR_INVALID_DATASIZE */
993
/* HPI_ERROR_BUFFER_EMPTY = 307 use HPI_ERROR_INVALID_DATASIZE */
995
HPI_ERROR_INVALID_DATA_POINTER
= 308,
997
HPI_ERROR_INVALID_PACKET_ORDER
= 309,
998
1001
HPI_ERROR_INVALID_OPERATION
= 310,
1002
1005
HPI_ERROR_INCOMPATIBLE_SAMPLERATE
= 311,
1007
HPI_ERROR_BAD_ADAPTER_MODE
= 312,
1008
1012
HPI_ERROR_TOO_MANY_CAPABILITY_CHANGE_ATTEMPTS
= 313,
1014
HPI_ERROR_NO_INTERADAPTER_GROUPS
= 314,
1016
HPI_ERROR_NO_INTERDSP_GROUPS
= 315,
1018
HPI_ERROR_WAIT_CANCELLED
= 316,
1020
HPI_ERROR_INVALID_STRING
= 317,
1021
1023
HPI_ERROR_INVALID_NODE
= 400,
1025
HPI_ERROR_INVALID_CONTROL
= 401,
1027
HPI_ERROR_INVALID_CONTROL_VALUE
= 402,
1029
HPI_ERROR_INVALID_CONTROL_ATTRIBUTE
= 403,
1031
HPI_ERROR_CONTROL_DISABLED
= 404,
1033
HPI_ERROR_CONTROL_I2C_MISSING_ACK
= 405,
1034
HPI_ERROR_I2C_MISSING_ACK
= 405,
1037
HPI_ERROR_CONTROL_NOT_READY
= 407,
1038
1040
HPI_ERROR_NVMEM_BUSY
= 450,
1041
HPI_ERROR_NVMEM_FULL
= 451,
1042
HPI_ERROR_NVMEM_FAIL
= 452,
1043
1045
HPI_ERROR_I2C_BAD_ADR
= 460,
1046
1048
HPI_ERROR_ENTITY_TYPE_MISMATCH
= 470,
1050
HPI_ERROR_ENTITY_ITEM_COUNT
= 471,
1052
HPI_ERROR_ENTITY_TYPE_INVALID
= 472,
1054
HPI_ERROR_ENTITY_ROLE_INVALID
= 473,
1056
HPI_ERROR_ENTITY_SIZE_MISMATCH
= 474,
1057
1058
/* AES18 specific errors were 500..507 */
1059
1061
HPI_ERROR_CUSTOM
= 600,
1062
1064
HPI_ERROR_MUTEX_TIMEOUT
= 700,
1065
1069
HPI_ERROR_BACKEND_BASE
= 900,
1070
1072
HPI_ERROR_DSP_COMMUNICATION
= 900
1073
/* Note that the dsp communication error is set to this value so that
1074
it remains compatible with any software that expects such errors
1075
to be backend errors i.e. >= 900.
1076
Do not define any new error codes with values > 900.
1077
*/
1078
};
1079
1084
#define HPI_MAX_ADAPTERS 20
1085
1086
#define HPI_MAX_STREAMS 16
1087
#define HPI_MAX_CHANNELS 2
/* per stream */
1088
#define HPI_MAX_NODES 8
/* per mixer ? */
1089
#define HPI_MAX_CONTROLS 4
/* per node ? */
1090
1091
#define HPI_MAX_ANC_BYTES_PER_FRAME (64)
1092
#define HPI_STRING_LEN 16
1093
1095
#define HPI_MIN_NETWORK_ADAPTER_IDX 100
1096
1098
#define HPI_OSTREAM_VELOCITY_UNITS 4096
1099
1100
#define HPI_OSTREAM_TIMESCALE_UNITS 10000
1101
1102
#define HPI_OSTREAM_TIMESCALE_PASSTHROUGH 99999
1103
1106
/**************/
1107
/* STRUCTURES */
1108
#ifndef DISABLE_PRAGMA_PACK1
1109
#pragma pack(push, 1)
1110
#endif
1111
1115
struct
hpi_format
{
1116
u32
sample_rate
;
1118
u32
bit_rate
;
1119
u32
attributes
;
1121
u16
mode_legacy
;
1123
u16
unused
;
1124
u16
channels
;
1125
u16
format
;
1126
};
1127
1128
struct
hpi_anc_frame
{
1129
u32
valid_bits_in_this_frame
;
1130
u8
b_data
[
HPI_MAX_ANC_BYTES_PER_FRAME
];
1131
};
1132
1135
struct
hpi_async_event
{
1136
u16
event_type
;
1137
u16
sequence
;
1138
u32
state
;
1139
u32
h_object
;
1140
union
{
1141
struct
{
1142
u16
index
;
1143
}
gpio
;
1144
struct
{
1145
u16
node_index
;
1146
u16
node_type
;
1147
}
control
;
1148
}
u
;
1149
};
1150
1151
#ifndef DISABLE_PRAGMA_PACK1
1152
#pragma pack(pop)
1153
#endif
1154
1155
/*****************/
1156
/* HPI FUNCTIONS */
1157
/*****************/
1158
1159
/* Stream */
1160
u16
hpi_stream_estimate_buffer_size
(
struct
hpi_format
*pF,
1161
u32
host_polling_rate_in_milli_seconds,
u32
*recommended_buffer_size);
1162
1163
/*************/
1164
/* SubSystem */
1165
/*************/
1166
1167
u16
hpi_subsys_get_version_ex
(
u32
*pversion_ex);
1168
1169
u16
hpi_subsys_get_num_adapters
(
int
*pn_num_adapters);
1170
1171
u16
hpi_subsys_get_adapter
(
int
iterator,
u32
*padapter_index,
1172
u16
*pw_adapter_type);
1173
1174
/***********/
1175
/* Adapter */
1176
/***********/
1177
1178
u16
hpi_adapter_open
(
u16
adapter_index);
1179
1180
u16
hpi_adapter_close
(
u16
adapter_index);
1181
1182
u16
hpi_adapter_get_info
(
u16
adapter_index,
u16
*pw_num_outstreams,
1183
u16
*pw_num_instreams,
u16
*pw_version,
u32
*pserial_number,
1184
u16
*pw_adapter_type);
1185
1186
u16
hpi_adapter_get_module_by_index
(
u16
adapter_index,
u16
module_index,
1187
u16
*pw_num_outputs,
u16
*pw_num_inputs,
u16
*pw_version,
1188
u32
*pserial_number,
u16
*pw_module_type,
u32
*ph_module);
1189
1190
u16
hpi_adapter_set_mode
(
u16
adapter_index,
u32
adapter_mode);
1191
1192
u16
hpi_adapter_set_mode_ex
(
u16
adapter_index,
u32
adapter_mode,
1193
u16
query_or_set);
1194
1195
u16
hpi_adapter_get_mode
(
u16
adapter_index,
u32
*padapter_mode);
1196
1197
u16
hpi_adapter_get_assert2
(
u16
adapter_index,
u16
*p_assert_count,
1198
char
*psz_assert,
u32
*p_param1,
u32
*p_param2,
1199
u32
*p_dsp_string_addr,
u16
*p_processor_id);
1200
1201
u16
hpi_adapter_test_assert
(
u16
adapter_index,
u16
assert_id);
1202
1203
u16
hpi_adapter_enable_capability
(
u16
adapter_index,
u16
capability
,
u32
key
);
1204
1205
u16
hpi_adapter_self_test
(
u16
adapter_index);
1206
1207
u16
hpi_adapter_debug_read
(
u16
adapter_index,
u32
dsp_address,
char
*p_bytes,
1208
int
*count_bytes);
1209
1210
u16
hpi_adapter_set_property
(
u16
adapter_index,
u16
property
,
u16
paramter1,
1211
u16
paramter2);
1212
1213
u16
hpi_adapter_get_property
(
u16
adapter_index,
u16
property
,
1214
u16
*pw_paramter1,
u16
*pw_paramter2);
1215
1216
u16
hpi_adapter_enumerate_property
(
u16
adapter_index,
u16
index
,
1217
u16
what_to_enumerate,
u16
property_index,
u32
*psetting);
1218
/*************/
1219
/* OutStream */
1220
/*************/
1221
u16
hpi_outstream_open
(
u16
adapter_index,
u16
outstream_index,
1222
u32
*ph_outstream);
1223
1224
u16
hpi_outstream_close
(
u32
h_outstream);
1225
1226
u16
hpi_outstream_get_info_ex
(
u32
h_outstream,
u16
*pw_state,
1227
u32
*pbuffer_size,
u32
*pdata_to_play,
u32
*psamples_played,
1228
u32
*pauxiliary_data_to_play);
1229
1230
u16
hpi_outstream_write_buf
(
u32
h_outstream,
const
u8
*pb_write_buf,
1231
u32
bytes_to_write,
const
struct
hpi_format
*p_format);
1232
1233
u16
hpi_outstream_start
(
u32
h_outstream);
1234
1235
u16
hpi_outstream_wait_start
(
u32
h_outstream);
1236
1237
u16
hpi_outstream_stop
(
u32
h_outstream);
1238
1239
u16
hpi_outstream_sinegen
(
u32
h_outstream);
1240
1241
u16
hpi_outstream_reset
(
u32
h_outstream);
1242
1243
u16
hpi_outstream_query_format
(
u32
h_outstream,
struct
hpi_format
*p_format);
1244
1245
u16
hpi_outstream_set_format
(
u32
h_outstream,
struct
hpi_format
*p_format);
1246
1247
u16
hpi_outstream_set_punch_in_out
(
u32
h_outstream,
u32
punch_in_sample,
1248
u32
punch_out_sample);
1249
1250
u16
hpi_outstream_set_velocity
(
u32
h_outstream,
short
velocity);
1251
1252
u16
hpi_outstream_ancillary_reset
(
u32
h_outstream,
u16
mode
);
1253
1254
u16
hpi_outstream_ancillary_get_info
(
u32
h_outstream,
u32
*pframes_available);
1255
1256
u16
hpi_outstream_ancillary_read
(
u32
h_outstream,
1257
struct
hpi_anc_frame
*p_anc_frame_buffer,
1258
u32
anc_frame_buffer_size_in_bytes,
1259
u32
number_of_ancillary_frames_to_read);
1260
1261
u16
hpi_outstream_set_time_scale
(
u32
h_outstream,
u32
time_scaleX10000);
1262
1263
u16
hpi_outstream_host_buffer_allocate
(
u32
h_outstream,
u32
size_in_bytes);
1264
1265
u16
hpi_outstream_host_buffer_free
(
u32
h_outstream);
1266
1267
u16
hpi_outstream_group_add
(
u32
h_outstream,
u32
h_stream);
1268
1269
u16
hpi_outstream_group_get_map
(
u32
h_outstream,
u32
*poutstream_map,
1270
u32
*pinstream_map);
1271
1272
u16
hpi_outstream_group_reset
(
u32
h_outstream);
1273
1274
/************/
1275
/* InStream */
1276
/************/
1277
u16
hpi_instream_open
(
u16
adapter_index,
u16
instream_index,
1278
u32
*ph_instream);
1279
1280
u16
hpi_instream_close
(
u32
h_instream);
1281
1282
u16
hpi_instream_query_format
(
u32
h_instream,
1283
const
struct
hpi_format
*p_format);
1284
1285
u16
hpi_instream_set_format
(
u32
h_instream,
1286
const
struct
hpi_format
*p_format);
1287
1288
u16
hpi_instream_read_buf
(
u32
h_instream,
u8
*pb_read_buf,
u32
bytes_to_read);
1289
1290
u16
hpi_instream_start
(
u32
h_instream);
1291
1292
u16
hpi_instream_wait_start
(
u32
h_instream);
1293
1294
u16
hpi_instream_stop
(
u32
h_instream);
1295
1296
u16
hpi_instream_reset
(
u32
h_instream);
1297
1298
u16
hpi_instream_get_info_ex
(
u32
h_instream,
u16
*pw_state,
u32
*pbuffer_size,
1299
u32
*pdata_recorded,
u32
*psamples_recorded,
1300
u32
*pauxiliary_data_recorded);
1301
1302
u16
hpi_instream_ancillary_reset
(
u32
h_instream,
u16
bytes_per_frame
,
1303
u16
mode
,
u16
alignment
,
u16
idle_bit);
1304
1305
u16
hpi_instream_ancillary_get_info
(
u32
h_instream,
u32
*pframe_space);
1306
1307
u16
hpi_instream_ancillary_write
(
u32
h_instream,
1308
const
struct
hpi_anc_frame
*p_anc_frame_buffer,
1309
u32
anc_frame_buffer_size_in_bytes,
1310
u32
number_of_ancillary_frames_to_write);
1311
1312
u16
hpi_instream_host_buffer_allocate
(
u32
h_instream,
u32
size_in_bytes);
1313
1314
u16
hpi_instream_host_buffer_free
(
u32
h_instream);
1315
1316
u16
hpi_instream_group_add
(
u32
h_instream,
u32
h_stream);
1317
1318
u16
hpi_instream_group_get_map
(
u32
h_instream,
u32
*poutstream_map,
1319
u32
*pinstream_map);
1320
1321
u16
hpi_instream_group_reset
(
u32
h_instream);
1322
1323
/*********/
1324
/* Mixer */
1325
/*********/
1326
u16
hpi_mixer_open
(
u16
adapter_index,
u32
*ph_mixer);
1327
1328
u16
hpi_mixer_close
(
u32
h_mixer);
1329
1330
u16
hpi_mixer_get_control
(
u32
h_mixer,
u16
src_node_type,
1331
u16
src_node_type_index,
u16
dst_node_type,
u16
dst_node_type_index,
1332
u16
control_type,
u32
*ph_control);
1333
1334
u16
hpi_mixer_get_control_by_index
(
u32
h_mixer,
u16
control_index,
1335
u16
*pw_src_node_type,
u16
*pw_src_node_index,
u16
*pw_dst_node_type,
1336
u16
*pw_dst_node_index,
u16
*pw_control_type,
u32
*ph_control);
1337
1338
u16
hpi_mixer_store
(
u32
h_mixer,
enum
HPI_MIXER_STORE_COMMAND
command
,
1339
u16
index
);
1340
/************/
1341
/* Controls */
1342
/************/
1343
/******************/
1344
/* Volume control */
1345
/******************/
1346
u16
hpi_volume_set_gain
(
u32
h_control,
short
an_gain0_01dB[
HPI_MAX_CHANNELS
]
1347
);
1348
1349
u16
hpi_volume_get_gain
(
u32
h_control,
1350
short
an_gain0_01dB_out[
HPI_MAX_CHANNELS
]
1351
);
1352
1353
u16
hpi_volume_set_mute
(
u32
h_control,
u32
mute
);
1354
1355
u16
hpi_volume_get_mute
(
u32
h_control,
u32
*
mute
);
1356
1357
#define hpi_volume_get_range hpi_volume_query_range
1358
u16
hpi_volume_query_range
(
u32
h_control,
short
*min_gain_01dB,
1359
short
*max_gain_01dB,
short
*step_gain_01dB);
1360
1361
u16
hpi_volume_query_channels
(
const
u32
h_control,
u32
*p_channels);
1362
1363
u16
hpi_volume_auto_fade
(
u32
h_control,
1364
short
an_stop_gain0_01dB[
HPI_MAX_CHANNELS
],
u32
duration_ms
);
1365
1366
u16
hpi_volume_auto_fade_profile
(
u32
h_control,
1367
short
an_stop_gain0_01dB[
HPI_MAX_CHANNELS
],
u32
duration_ms
,
1368
u16
profile
);
1369
1370
u16
hpi_volume_query_auto_fade_profile
(
const
u32
h_control,
const
u32
i
,
1371
u16
*
profile
);
1372
1373
/*****************/
1374
/* Level control */
1375
/*****************/
1376
u16
hpi_level_query_range
(
u32
h_control,
short
*min_gain_01dB,
1377
short
*max_gain_01dB,
short
*step_gain_01dB);
1378
1379
u16
hpi_level_set_gain
(
u32
h_control,
short
an_gain0_01dB[
HPI_MAX_CHANNELS
]
1380
);
1381
1382
u16
hpi_level_get_gain
(
u32
h_control,
1383
short
an_gain0_01dB_out[
HPI_MAX_CHANNELS
]
1384
);
1385
1386
/*****************/
1387
/* Meter control */
1388
/*****************/
1389
u16
hpi_meter_query_channels
(
const
u32
h_meter,
u32
*p_channels);
1390
1391
u16
hpi_meter_get_peak
(
u32
h_control,
1392
short
an_peak0_01dB_out[
HPI_MAX_CHANNELS
]
1393
);
1394
1395
u16
hpi_meter_get_rms
(
u32
h_control,
short
an_peak0_01dB_out[
HPI_MAX_CHANNELS
]
1396
);
1397
1398
u16
hpi_meter_set_peak_ballistics
(
u32
h_control,
u16
attack,
u16
decay);
1399
1400
u16
hpi_meter_set_rms_ballistics
(
u32
h_control,
u16
attack,
u16
decay);
1401
1402
u16
hpi_meter_get_peak_ballistics
(
u32
h_control,
u16
*attack,
u16
*decay);
1403
1404
u16
hpi_meter_get_rms_ballistics
(
u32
h_control,
u16
*attack,
u16
*decay);
1405
1406
/************************/
1407
/* ChannelMode control */
1408
/************************/
1409
u16
hpi_channel_mode_query_mode
(
const
u32
h_mode,
const
u32
index
,
1410
u16
*pw_mode);
1411
1412
u16
hpi_channel_mode_set
(
u32
h_control,
u16
mode
);
1413
1414
u16
hpi_channel_mode_get
(
u32
h_control,
u16
*
mode
);
1415
1416
/*****************/
1417
/* Tuner control */
1418
/*****************/
1419
u16
hpi_tuner_query_band
(
const
u32
h_tuner,
const
u32
index
,
u16
*pw_band);
1420
1421
u16
hpi_tuner_set_band
(
u32
h_control,
u16
band);
1422
1423
u16
hpi_tuner_get_band
(
u32
h_control,
u16
*pw_band);
1424
1425
u16
hpi_tuner_query_frequency
(
const
u32
h_tuner,
const
u32
index
,
1426
const
u16
band,
u32
*pfreq);
1427
1428
u16
hpi_tuner_set_frequency
(
u32
h_control,
u32
freq_ink_hz);
1429
1430
u16
hpi_tuner_get_frequency
(
u32
h_control,
u32
*pw_freq_ink_hz);
1431
1432
u16
hpi_tuner_get_rf_level
(
u32
h_control,
short
*pw_level);
1433
1434
u16
hpi_tuner_get_raw_rf_level
(
u32
h_control,
short
*pw_level);
1435
1436
u16
hpi_tuner_query_gain
(
const
u32
h_tuner,
const
u32
index
,
u16
*pw_gain);
1437
1438
u16
hpi_tuner_set_gain
(
u32
h_control,
short
gain
);
1439
1440
u16
hpi_tuner_get_gain
(
u32
h_control,
short
*pn_gain);
1441
1442
u16
hpi_tuner_get_status
(
u32
h_control,
u16
*pw_status_mask,
u16
*pw_status);
1443
1444
u16
hpi_tuner_set_mode
(
u32
h_control,
u32
mode
,
u32
value
);
1445
1446
u16
hpi_tuner_get_mode
(
u32
h_control,
u32
mode
,
u32
*pn_value);
1447
1448
u16
hpi_tuner_get_rds
(
u32
h_control,
char
*p_rds_data);
1449
1450
u16
hpi_tuner_query_deemphasis
(
const
u32
h_tuner,
const
u32
index
,
1451
const
u16
band,
u32
*pdeemphasis);
1452
1453
u16
hpi_tuner_set_deemphasis
(
u32
h_control,
u32
deemphasis);
1454
u16
hpi_tuner_get_deemphasis
(
u32
h_control,
u32
*pdeemphasis);
1455
1456
u16
hpi_tuner_query_program
(
const
u32
h_tuner,
u32
*pbitmap_program);
1457
1458
u16
hpi_tuner_set_program
(
u32
h_control,
u32
program);
1459
1460
u16
hpi_tuner_get_program
(
u32
h_control,
u32
*pprogram);
1461
1462
u16
hpi_tuner_get_hd_radio_dsp_version
(
u32
h_control,
char
*psz_dsp_version,
1463
const
u32
string_size
);
1464
1465
u16
hpi_tuner_get_hd_radio_sdk_version
(
u32
h_control,
char
*psz_sdk_version,
1466
const
u32
string_size
);
1467
1468
u16
hpi_tuner_get_hd_radio_signal_quality
(
u32
h_control,
u32
*pquality);
1469
1470
u16
hpi_tuner_get_hd_radio_signal_blend
(
u32
h_control,
u32
*pblend);
1471
1472
u16
hpi_tuner_set_hd_radio_signal_blend
(
u32
h_control,
const
u32
blend);
1473
1474
/***************/
1475
/* PAD control */
1476
/***************/
1477
1478
u16
hpi_pad_get_channel_name
(
u32
h_control,
char
*psz_string,
1479
const
u32
string_length);
1480
1481
u16
hpi_pad_get_artist
(
u32
h_control,
char
*psz_string,
1482
const
u32
string_length);
1483
1484
u16
hpi_pad_get_title
(
u32
h_control,
char
*psz_string,
1485
const
u32
string_length);
1486
1487
u16
hpi_pad_get_comment
(
u32
h_control,
char
*psz_string,
1488
const
u32
string_length);
1489
1490
u16
hpi_pad_get_program_type
(
u32
h_control,
u32
*ppTY);
1491
1492
u16
hpi_pad_get_rdsPI
(
u32
h_control,
u32
*ppI);
1493
1494
u16
hpi_pad_get_program_type_string
(
u32
h_control,
const
u32
data_type
,
1495
const
u32
pTY,
char
*psz_string,
const
u32
string_length);
1496
1497
/****************************/
1498
/* AES/EBU Receiver control */
1499
/****************************/
1500
u16
hpi_aesebu_receiver_query_format
(
const
u32
h_aes_rx,
const
u32
index
,
1501
u16
*pw_format);
1502
1503
u16
hpi_aesebu_receiver_set_format
(
u32
h_control,
u16
source
);
1504
1505
u16
hpi_aesebu_receiver_get_format
(
u32
h_control,
u16
*pw_source);
1506
1507
u16
hpi_aesebu_receiver_get_sample_rate
(
u32
h_control,
u32
*psample_rate);
1508
1509
u16
hpi_aesebu_receiver_get_user_data
(
u32
h_control,
u16
index
,
u16
*pw_data);
1510
1511
u16
hpi_aesebu_receiver_get_channel_status
(
u32
h_control,
u16
index
,
1512
u16
*pw_data);
1513
1514
u16
hpi_aesebu_receiver_get_error_status
(
u32
h_control,
u16
*pw_error_data);
1515
1516
/*******************************/
1517
/* AES/EBU Transmitter control */
1518
/*******************************/
1519
u16
hpi_aesebu_transmitter_set_sample_rate
(
u32
h_control,
u32
sample_rate);
1520
1521
u16
hpi_aesebu_transmitter_set_user_data
(
u32
h_control,
u16
index
,
u16
data
);
1522
1523
u16
hpi_aesebu_transmitter_set_channel_status
(
u32
h_control,
u16
index
,
1524
u16
data
);
1525
1526
u16
hpi_aesebu_transmitter_get_channel_status
(
u32
h_control,
u16
index
,
1527
u16
*pw_data);
1528
1529
u16
hpi_aesebu_transmitter_query_format
(
const
u32
h_aes_tx,
const
u32
index
,
1530
u16
*pw_format);
1531
1532
u16
hpi_aesebu_transmitter_set_format
(
u32
h_control,
u16
output_format);
1533
1534
u16
hpi_aesebu_transmitter_get_format
(
u32
h_control,
u16
*pw_output_format);
1535
1536
/***********************/
1537
/* Multiplexer control */
1538
/***********************/
1539
u16
hpi_multiplexer_set_source
(
u32
h_control,
u16
source_node_type,
1540
u16
source_node_index);
1541
1542
u16
hpi_multiplexer_get_source
(
u32
h_control,
u16
*source_node_type,
1543
u16
*source_node_index);
1544
1545
u16
hpi_multiplexer_query_source
(
u32
h_control,
u16
index
,
1546
u16
*source_node_type,
u16
*source_node_index);
1547
1548
/***************/
1549
/* Vox control */
1550
/***************/
1551
u16
hpi_vox_set_threshold
(
u32
h_control,
short
an_gain0_01dB);
1552
1553
u16
hpi_vox_get_threshold
(
u32
h_control,
short
*an_gain0_01dB);
1554
1555
/*********************/
1556
/* Bitstream control */
1557
/*********************/
1558
u16
hpi_bitstream_set_clock_edge
(
u32
h_control,
u16
edge_type);
1559
1560
u16
hpi_bitstream_set_data_polarity
(
u32
h_control,
u16
polarity
);
1561
1562
u16
hpi_bitstream_get_activity
(
u32
h_control,
u16
*pw_clk_activity,
1563
u16
*pw_data_activity);
1564
1565
/***********************/
1566
/* SampleClock control */
1567
/***********************/
1568
1569
u16
hpi_sample_clock_query_source
(
const
u32
h_clock,
const
u32
index
,
1570
u16
*pw_source);
1571
1572
u16
hpi_sample_clock_set_source
(
u32
h_control,
u16
source
);
1573
1574
u16
hpi_sample_clock_get_source
(
u32
h_control,
u16
*pw_source);
1575
1576
u16
hpi_sample_clock_query_source_index
(
const
u32
h_clock,
const
u32
index
,
1577
const
u32
source
,
u16
*pw_source_index);
1578
1579
u16
hpi_sample_clock_set_source_index
(
u32
h_control,
u16
source_index);
1580
1581
u16
hpi_sample_clock_get_source_index
(
u32
h_control,
u16
*pw_source_index);
1582
1583
u16
hpi_sample_clock_get_sample_rate
(
u32
h_control,
u32
*psample_rate);
1584
1585
u16
hpi_sample_clock_query_local_rate
(
const
u32
h_clock,
const
u32
index
,
1586
u32
*psource);
1587
1588
u16
hpi_sample_clock_set_local_rate
(
u32
h_control,
u32
sample_rate);
1589
1590
u16
hpi_sample_clock_get_local_rate
(
u32
h_control,
u32
*psample_rate);
1591
1592
u16
hpi_sample_clock_set_auto
(
u32
h_control,
u32
enable
);
1593
1594
u16
hpi_sample_clock_get_auto
(
u32
h_control,
u32
*penable);
1595
1596
u16
hpi_sample_clock_set_local_rate_lock
(
u32
h_control,
u32
lock);
1597
1598
u16
hpi_sample_clock_get_local_rate_lock
(
u32
h_control,
u32
*plock);
1599
1600
/***********************/
1601
/* Microphone control */
1602
/***********************/
1603
u16
hpi_microphone_set_phantom_power
(
u32
h_control,
u16
on_off);
1604
1605
u16
hpi_microphone_get_phantom_power
(
u32
h_control,
u16
*pw_on_off);
1606
1607
/********************************/
1608
/* Parametric Equalizer control */
1609
/********************************/
1610
u16
hpi_parametric_eq_get_info
(
u32
h_control,
u16
*pw_number_of_bands,
1611
u16
*pw_enabled);
1612
1613
u16
hpi_parametric_eq_set_state
(
u32
h_control,
u16
on_off);
1614
1615
u16
hpi_parametric_eq_set_band
(
u32
h_control,
u16
index
,
u16
type
,
1616
u32
frequency_hz,
short
q100,
short
gain0_01dB);
1617
1618
u16
hpi_parametric_eq_get_band
(
u32
h_control,
u16
index
,
u16
*pn_type,
1619
u32
*pfrequency_hz,
short
*pnQ100,
short
*pn_gain0_01dB);
1620
1621
u16
hpi_parametric_eq_get_coeffs
(
u32
h_control,
u16
index
,
short
coeffs[5]
1622
);
1623
1624
/*******************************/
1625
/* Compressor Expander control */
1626
/*******************************/
1627
1628
u16
hpi_compander_set_enable
(
u32
h_control,
u32
on);
1629
1630
u16
hpi_compander_get_enable
(
u32
h_control,
u32
*pon);
1631
1632
u16
hpi_compander_set_makeup_gain
(
u32
h_control,
short
makeup_gain0_01dB);
1633
1634
u16
hpi_compander_get_makeup_gain
(
u32
h_control,
short
*pn_makeup_gain0_01dB);
1635
1636
u16
hpi_compander_set_attack_time_constant
(
u32
h_control,
u32
index
,
1637
u32
attack);
1638
1639
u16
hpi_compander_get_attack_time_constant
(
u32
h_control,
u32
index
,
1640
u32
*pw_attack);
1641
1642
u16
hpi_compander_set_decay_time_constant
(
u32
h_control,
u32
index
,
1643
u32
decay);
1644
1645
u16
hpi_compander_get_decay_time_constant
(
u32
h_control,
u32
index
,
1646
u32
*pw_decay);
1647
1648
u16
hpi_compander_set_threshold
(
u32
h_control,
u32
index
,
1649
short
threshold0_01dB);
1650
1651
u16
hpi_compander_get_threshold
(
u32
h_control,
u32
index
,
1652
short
*pn_threshold0_01dB);
1653
1654
u16
hpi_compander_set_ratio
(
u32
h_control,
u32
index
,
u32
ratio100);
1655
1656
u16
hpi_compander_get_ratio
(
u32
h_control,
u32
index
,
u32
*pw_ratio100);
1657
1658
/********************/
1659
/* Cobranet control */
1660
/********************/
1661
u16
hpi_cobranet_hmi_write
(
u32
h_control,
u32
hmi_address,
u32
byte_count,
1662
u8
*pb_data);
1663
1664
u16
hpi_cobranet_hmi_read
(
u32
h_control,
u32
hmi_address,
u32
max_byte_count,
1665
u32
*pbyte_count,
u8
*pb_data);
1666
1667
u16
hpi_cobranet_hmi_get_status
(
u32
h_control,
u32
*pstatus,
1668
u32
*preadable_size,
u32
*pwriteable_size);
1669
1670
u16
hpi_cobranet_get_ip_address
(
u32
h_control,
u32
*pdw_ip_address);
1671
1672
u16
hpi_cobranet_set_ip_address
(
u32
h_control,
u32
dw_ip_address);
1673
1674
u16
hpi_cobranet_get_static_ip_address
(
u32
h_control,
u32
*pdw_ip_address);
1675
1676
u16
hpi_cobranet_set_static_ip_address
(
u32
h_control,
u32
dw_ip_address);
1677
1678
u16
hpi_cobranet_get_macaddress
(
u32
h_control,
u32
*p_mac_msbs,
1679
u32
*p_mac_lsbs);
1680
1681
/*************************/
1682
/* Tone Detector control */
1683
/*************************/
1684
u16
hpi_tone_detector_get_state
(
u32
hC,
u32
*
state
);
1685
1686
u16
hpi_tone_detector_set_enable
(
u32
hC,
u32
enable
);
1687
1688
u16
hpi_tone_detector_get_enable
(
u32
hC,
u32
*
enable
);
1689
1690
u16
hpi_tone_detector_set_event_enable
(
u32
hC,
u32
event_enable);
1691
1692
u16
hpi_tone_detector_get_event_enable
(
u32
hC,
u32
*event_enable);
1693
1694
u16
hpi_tone_detector_set_threshold
(
u32
hC,
int
threshold
);
1695
1696
u16
hpi_tone_detector_get_threshold
(
u32
hC,
int
*
threshold
);
1697
1698
u16
hpi_tone_detector_get_frequency
(
u32
hC,
u32
index
,
u32
*
frequency
);
1699
1700
/****************************/
1701
/* Silence Detector control */
1702
/****************************/
1703
u16
hpi_silence_detector_get_state
(
u32
hC,
u32
*
state
);
1704
1705
u16
hpi_silence_detector_set_enable
(
u32
hC,
u32
enable
);
1706
1707
u16
hpi_silence_detector_get_enable
(
u32
hC,
u32
*
enable
);
1708
1709
u16
hpi_silence_detector_set_event_enable
(
u32
hC,
u32
event_enable);
1710
1711
u16
hpi_silence_detector_get_event_enable
(
u32
hC,
u32
*event_enable);
1712
1713
u16
hpi_silence_detector_set_delay
(
u32
hC,
u32
delay
);
1714
1715
u16
hpi_silence_detector_get_delay
(
u32
hC,
u32
*
delay
);
1716
1717
u16
hpi_silence_detector_set_threshold
(
u32
hC,
int
threshold
);
1718
1719
u16
hpi_silence_detector_get_threshold
(
u32
hC,
int
*
threshold
);
1720
/*********************/
1721
/* Utility functions */
1722
/*********************/
1723
1724
u16
hpi_format_create
(
struct
hpi_format
*p_format,
u16
channels
,
u16
format
,
1725
u32
sample_rate,
u32
bit_rate,
u32
attributes
);
1726
1727
#endif
/*_HPI_H_ */
Generated on Thu Jan 10 2013 15:05:40 for Linux Kernel by
1.8.2