1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38#ifndef _HPI_H_
39#define _HPI_H_
40
41
42
43
44
45#define HPI_VERSION_CONSTRUCTOR(maj, min, rel) \
46 ((maj << 16) + (min << 8) + rel)
47
48#define HPI_VER_MAJOR(v) ((int)(v >> 16))
49#define HPI_VER_MINOR(v) ((int)((v >> 8) & 0xFF))
50#define HPI_VER_RELEASE(v) ((int)(v & 0xFF))
51
52
53#define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 4, 1)
54#define HPI_VER_STRING "4.04.01"
55
56
57#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(9, 0, 0)
58
59#include <linux/types.h>
60#define HPI_EXCLUDE_DEPRECATED
61
62
63
64
65
66
67
68
69
70
71enum HPI_FORMATS {
72
73 HPI_FORMAT_MIXER_NATIVE = 0,
74
75 HPI_FORMAT_PCM8_UNSIGNED = 1,
76
77 HPI_FORMAT_PCM16_SIGNED = 2,
78
79 HPI_FORMAT_MPEG_L1 = 3,
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109 HPI_FORMAT_MPEG_L2 = 4,
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142 HPI_FORMAT_MPEG_L3 = 5,
143
144 HPI_FORMAT_DOLBY_AC2 = 6,
145
146 HPI_FORMAT_DOLBY_AC3 = 7,
147
148 HPI_FORMAT_PCM16_BIGENDIAN = 8,
149
150 HPI_FORMAT_AA_TAGIT1_HITS = 9,
151
152 HPI_FORMAT_AA_TAGIT1_INSERTS = 10,
153
154
155
156
157 HPI_FORMAT_PCM32_SIGNED = 11,
158
159 HPI_FORMAT_RAW_BITSTREAM = 12,
160
161 HPI_FORMAT_AA_TAGIT1_HITS_EX1 = 13,
162
163
164
165
166 HPI_FORMAT_PCM32_FLOAT = 14,
167
168 HPI_FORMAT_PCM24_SIGNED = 15,
169
170 HPI_FORMAT_OEM1 = 16,
171
172 HPI_FORMAT_OEM2 = 17,
173
174 HPI_FORMAT_UNDEFINED = 0xffff
175};
176
177
178
179
180
181
182enum HPI_STREAM_STATES {
183
184 HPI_STATE_STOPPED = 1,
185
186 HPI_STATE_PLAYING = 2,
187
188 HPI_STATE_RECORDING = 3,
189
190 HPI_STATE_DRAINED = 4,
191
192 HPI_STATE_SINEGEN = 5,
193
194
195 HPI_STATE_WAIT = 6
196};
197
198
199
200
201enum HPI_SOURCENODES {
202
203
204
205
206 HPI_SOURCENODE_NONE = 100,
207
208 HPI_SOURCENODE_OSTREAM = 101,
209
210 HPI_SOURCENODE_LINEIN = 102,
211 HPI_SOURCENODE_AESEBU_IN = 103,
212 HPI_SOURCENODE_TUNER = 104,
213 HPI_SOURCENODE_RF = 105,
214 HPI_SOURCENODE_CLOCK_SOURCE = 106,
215 HPI_SOURCENODE_RAW_BITSTREAM = 107,
216 HPI_SOURCENODE_MICROPHONE = 108,
217
218
219 HPI_SOURCENODE_COBRANET = 109,
220 HPI_SOURCENODE_ANALOG = 110,
221 HPI_SOURCENODE_ADAPTER = 111,
222
223 HPI_SOURCENODE_LAST_INDEX = 111
224
225};
226
227
228
229
230
231enum HPI_DESTNODES {
232
233
234
235
236 HPI_DESTNODE_NONE = 200,
237
238 HPI_DESTNODE_ISTREAM = 201,
239 HPI_DESTNODE_LINEOUT = 202,
240 HPI_DESTNODE_AESEBU_OUT = 203,
241 HPI_DESTNODE_RF = 204,
242 HPI_DESTNODE_SPEAKER = 205,
243
244
245 HPI_DESTNODE_COBRANET = 206,
246 HPI_DESTNODE_ANALOG = 207,
247
248
249 HPI_DESTNODE_LAST_INDEX = 207
250
251};
252
253
254
255
256
257enum HPI_CONTROLS {
258 HPI_CONTROL_GENERIC = 0,
259 HPI_CONTROL_CONNECTION = 1,
260 HPI_CONTROL_VOLUME = 2,
261 HPI_CONTROL_METER = 3,
262 HPI_CONTROL_MUTE = 4,
263 HPI_CONTROL_MULTIPLEXER = 5,
264
265 HPI_CONTROL_AESEBU_TRANSMITTER = 6,
266 HPI_CONTROL_AESEBUTX = HPI_CONTROL_AESEBU_TRANSMITTER,
267
268 HPI_CONTROL_AESEBU_RECEIVER = 7,
269 HPI_CONTROL_AESEBURX = HPI_CONTROL_AESEBU_RECEIVER,
270
271 HPI_CONTROL_LEVEL = 8,
272 HPI_CONTROL_TUNER = 9,
273
274 HPI_CONTROL_VOX = 11,
275
276
277
278 HPI_CONTROL_CHANNEL_MODE = 15,
279
280 HPI_CONTROL_BITSTREAM = 16,
281 HPI_CONTROL_SAMPLECLOCK = 17,
282 HPI_CONTROL_MICROPHONE = 18,
283 HPI_CONTROL_PARAMETRIC_EQ = 19,
284 HPI_CONTROL_EQUALIZER = HPI_CONTROL_PARAMETRIC_EQ,
285
286 HPI_CONTROL_COMPANDER = 20,
287 HPI_CONTROL_COBRANET = 21,
288 HPI_CONTROL_TONEDETECTOR = 22,
289 HPI_CONTROL_SILENCEDETECTOR = 23,
290 HPI_CONTROL_PAD = 24,
291 HPI_CONTROL_SRC = 25,
292 HPI_CONTROL_UNIVERSAL = 26,
293
294
295 HPI_CONTROL_LAST_INDEX = 26
296
297};
298
299
300
301
302
303
304
305
306
307enum HPI_ADAPTER_PROPERTIES {
308
309
310
311
312
313
314
315 HPI_ADAPTER_PROPERTY_ERRATA_1 = 1,
316
317
318
319
320 HPI_ADAPTER_PROPERTY_GROUPING = 2,
321
322
323
324
325
326
327 HPI_ADAPTER_PROPERTY_ENABLE_SSX2 = 3,
328
329
330
331
332
333
334
335
336
337 HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4,
338
339
340 HPI_ADAPTER_PROPERTY_READONLYBASE = 256,
341
342
343
344
345
346
347 HPI_ADAPTER_PROPERTY_LATENCY = 256,
348
349
350
351
352
353
354
355 HPI_ADAPTER_PROPERTY_GRANULARITY = 257,
356
357
358
359
360 HPI_ADAPTER_PROPERTY_CURCHANNELS = 258,
361
362
363
364
365
366
367 HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION = 259,
368
369
370
371
372
373
374 HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB = 260,
375
376
377
378
379
380 HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB = 261,
381
382
383
384
385
386
387
388
389
390 HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE = 262,
391
392
393 HPI_ADAPTER_PROPERTY_LOGTABLEN = 263,
394 HPI_ADAPTER_PROPERTY_LOGTABBEG = 264,
395
396
397
398
399
400
401 HPI_ADAPTER_PROPERTY_IP_ADDRESS = 265,
402
403
404
405
406
407
408 HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT = 266,
409
410
411
412
413
414
415
416
417
418
419
420
421
422 HPI_ADAPTER_PROPERTY_INTERVAL = 267,
423
424
425
426
427 HPI_ADAPTER_PROPERTY_CAPS1 = 268,
428
429
430
431
432 HPI_ADAPTER_PROPERTY_CAPS2 = 269,
433
434
435
436 HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS = 270,
437
438
439
440
441
442
443 HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271
444};
445
446
447
448
449
450
451enum HPI_ADAPTER_MODE_CMDS {
452 HPI_ADAPTER_MODE_SET = 0,
453 HPI_ADAPTER_MODE_QUERY = 1
454};
455
456
457
458
459
460
461
462
463enum HPI_ADAPTER_MODES {
464
465
466
467
468
469
470
471
472
473
474 HPI_ADAPTER_MODE_4OSTREAM = 1,
475
476
477
478
479
480
481 HPI_ADAPTER_MODE_6OSTREAM = 2,
482
483
484
485
486
487
488 HPI_ADAPTER_MODE_8OSTREAM = 3,
489
490
491
492
493
494
495 HPI_ADAPTER_MODE_16OSTREAM = 4,
496
497
498
499
500 HPI_ADAPTER_MODE_1OSTREAM = 5,
501
502
503
504
505 HPI_ADAPTER_MODE_1 = 6,
506
507
508
509
510 HPI_ADAPTER_MODE_2 = 7,
511
512
513
514
515 HPI_ADAPTER_MODE_3 = 8,
516
517
518
519
520
521
522 HPI_ADAPTER_MODE_MULTICHANNEL = 9,
523
524
525
526
527
528
529 HPI_ADAPTER_MODE_12OSTREAM = 10,
530
531
532
533
534 HPI_ADAPTER_MODE_9OSTREAM = 11,
535
536
537
538
539
540 HPI_ADAPTER_MODE_MONO = 12,
541
542
543
544
545 HPI_ADAPTER_MODE_LOW_LATENCY = 13
546};
547
548
549
550#define HPI_CAPABILITY_NONE (0)
551#define HPI_CAPABILITY_MPEG_LAYER3 (1)
552
553
554
555#define HPI_CAPABILITY_MAX 1
556
557
558
559
560
561
562
563
564
565enum HPI_MPEG_ANC_MODES {
566
567 HPI_MPEG_ANC_HASENERGY = 0,
568
569
570
571
572 HPI_MPEG_ANC_RAW = 1
573};
574
575
576
577
578enum HPI_ISTREAM_MPEG_ANC_ALIGNS {
579
580 HPI_MPEG_ANC_ALIGN_LEFT = 0,
581
582 HPI_MPEG_ANC_ALIGN_RIGHT = 1
583};
584
585
586
587
588
589
590
591
592
593enum HPI_MPEG_MODES {
594
595
596
597 HPI_MPEG_MODE_DEFAULT = 0,
598
599 HPI_MPEG_MODE_STEREO = 1,
600
601 HPI_MPEG_MODE_JOINTSTEREO = 2,
602
603 HPI_MPEG_MODE_DUALCHANNEL = 3
604};
605
606
607
608
609
610#define HPI_MIXER_GET_CONTROL_MULTIPLE_CHANGED (0)
611#define HPI_MIXER_GET_CONTROL_MULTIPLE_RESET (1)
612
613
614
615
616
617enum HPI_MIXER_STORE_COMMAND {
618
619 HPI_MIXER_STORE_SAVE = 1,
620
621 HPI_MIXER_STORE_RESTORE = 2,
622
623 HPI_MIXER_STORE_DELETE = 3,
624
625 HPI_MIXER_STORE_ENABLE = 4,
626
627 HPI_MIXER_STORE_DISABLE = 5,
628
629 HPI_MIXER_STORE_SAVE_SINGLE = 6
630};
631
632
633
634
635
636
637
638enum HPI_SWITCH_STATES {
639 HPI_SWITCH_OFF = 0,
640 HPI_SWITCH_ON = 1
641};
642
643
644
645
646
647#define HPI_UNITS_PER_dB 100
648
649
650
651#define HPI_GAIN_OFF (-100 * HPI_UNITS_PER_dB)
652
653
654
655
656#define HPI_METER_MINIMUM (-150 * HPI_UNITS_PER_dB)
657
658
659
660
661enum HPI_VOLUME_AUTOFADES {
662
663 HPI_VOLUME_AUTOFADE_LOG = 2,
664
665 HPI_VOLUME_AUTOFADE_LINEAR = 3
666};
667
668
669
670
671
672
673
674enum HPI_AESEBU_FORMATS {
675
676 HPI_AESEBU_FORMAT_AESEBU = 1,
677
678 HPI_AESEBU_FORMAT_SPDIF = 2
679};
680
681
682
683
684
685
686enum HPI_AESEBU_ERRORS {
687
688 HPI_AESEBU_ERROR_NOT_LOCKED = 0x01,
689
690 HPI_AESEBU_ERROR_POOR_QUALITY = 0x02,
691
692 HPI_AESEBU_ERROR_PARITY_ERROR = 0x04,
693
694 HPI_AESEBU_ERROR_BIPHASE_VIOLATION = 0x08,
695
696 HPI_AESEBU_ERROR_VALIDITY = 0x10,
697
698 HPI_AESEBU_ERROR_CRC = 0x20
699};
700
701
702
703
704
705#define HPI_PAD_CHANNEL_NAME_LEN 16
706
707#define HPI_PAD_ARTIST_LEN 64
708
709#define HPI_PAD_TITLE_LEN 64
710
711#define HPI_PAD_COMMENT_LEN 256
712
713#define HPI_PAD_PROGRAM_TYPE_INVALID 0xffff
714
715
716
717
718
719enum eHPI_RDS_type {
720 HPI_RDS_DATATYPE_RDS = 0,
721 HPI_RDS_DATATYPE_RBDS = 1
722};
723
724
725
726
727
728
729enum HPI_TUNER_BAND {
730 HPI_TUNER_BAND_AM = 1,
731 HPI_TUNER_BAND_FM = 2,
732 HPI_TUNER_BAND_TV_NTSC_M = 3,
733 HPI_TUNER_BAND_TV = 3,
734 HPI_TUNER_BAND_FM_STEREO = 4,
735 HPI_TUNER_BAND_AUX = 5,
736 HPI_TUNER_BAND_TV_PAL_BG = 6,
737 HPI_TUNER_BAND_TV_PAL_I = 7,
738 HPI_TUNER_BAND_TV_PAL_DK = 8,
739 HPI_TUNER_BAND_TV_SECAM_L = 9,
740 HPI_TUNER_BAND_LAST = 9
741};
742
743
744
745
746
747
748
749enum HPI_TUNER_MODES {
750 HPI_TUNER_MODE_RSS = 1,
751 HPI_TUNER_MODE_RDS = 2
752};
753
754
755
756
757
758
759enum HPI_TUNER_MODE_VALUES {
760
761 HPI_TUNER_MODE_RSS_DISABLE = 0,
762 HPI_TUNER_MODE_RSS_ENABLE = 1,
763
764
765 HPI_TUNER_MODE_RDS_DISABLE = 0,
766 HPI_TUNER_MODE_RDS_RDS = 1,
767 HPI_TUNER_MODE_RDS_RBDS = 2
768};
769
770
771
772
773enum HPI_TUNER_LEVEL {
774 HPI_TUNER_LEVEL_AVERAGE = 0,
775 HPI_TUNER_LEVEL_RAW = 1
776};
777
778
779
780
781
782
783
784enum HPI_TUNER_STATUS_BITS {
785 HPI_TUNER_VIDEO_COLOR_PRESENT = 0x0001,
786 HPI_TUNER_VIDEO_IS_60HZ = 0x0020,
787 HPI_TUNER_VIDEO_HORZ_SYNC_MISSING = 0x0040,
788 HPI_TUNER_VIDEO_STATUS_VALID = 0x0100,
789 HPI_TUNER_PLL_LOCKED = 0x1000,
790 HPI_TUNER_FM_STEREO = 0x2000,
791 HPI_TUNER_DIGITAL = 0x0200,
792 HPI_TUNER_MULTIPROGRAM = 0x0400
793};
794
795
796
797
798
799enum HPI_CHANNEL_MODES {
800
801 HPI_CHANNEL_MODE_NORMAL = 1,
802
803 HPI_CHANNEL_MODE_SWAP = 2,
804
805 HPI_CHANNEL_MODE_LEFT_TO_STEREO = 3,
806
807 HPI_CHANNEL_MODE_RIGHT_TO_STEREO = 4,
808
809
810 HPI_CHANNEL_MODE_STEREO_TO_LEFT = 5,
811
812
813 HPI_CHANNEL_MODE_STEREO_TO_RIGHT = 6,
814 HPI_CHANNEL_MODE_LAST = 6
815};
816
817
818
819
820enum HPI_SAMPLECLOCK_SOURCES {
821
822
823 HPI_SAMPLECLOCK_SOURCE_LOCAL = 1,
824
825 HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC = 2,
826
827 HPI_SAMPLECLOCK_SOURCE_WORD = 3,
828
829 HPI_SAMPLECLOCK_SOURCE_WORD_HEADER = 4,
830
831 HPI_SAMPLECLOCK_SOURCE_SMPTE = 5,
832
833 HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT = 6,
834
835 HPI_SAMPLECLOCK_SOURCE_NETWORK = 8,
836
837 HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10,
838
839 HPI_SAMPLECLOCK_SOURCE_LAST = 10
840};
841
842
843
844
845enum HPI_FILTER_TYPE {
846 HPI_FILTER_TYPE_BYPASS = 0,
847
848 HPI_FILTER_TYPE_LOWSHELF = 1,
849 HPI_FILTER_TYPE_HIGHSHELF = 2,
850 HPI_FILTER_TYPE_EQ_BAND = 3,
851
852 HPI_FILTER_TYPE_LOWPASS = 4,
853 HPI_FILTER_TYPE_HIGHPASS = 5,
854 HPI_FILTER_TYPE_BANDPASS = 6,
855 HPI_FILTER_TYPE_BANDSTOP = 7
856};
857
858
859
860
861enum ASYNC_EVENT_SOURCES {
862 HPI_ASYNC_EVENT_GPIO = 1,
863 HPI_ASYNC_EVENT_SILENCE = 2,
864 HPI_ASYNC_EVENT_TONE = 3
865};
866
867
868
869
870
871
872
873
874
875
876
877
878enum HPI_ERROR_CODES {
879
880 HPI_ERROR_INVALID_TYPE = 100,
881
882 HPI_ERROR_INVALID_OBJ = 101,
883
884 HPI_ERROR_INVALID_FUNC = 102,
885
886 HPI_ERROR_INVALID_OBJ_INDEX = 103,
887
888 HPI_ERROR_OBJ_NOT_OPEN = 104,
889
890 HPI_ERROR_OBJ_ALREADY_OPEN = 105,
891
892 HPI_ERROR_INVALID_RESOURCE = 106,
893
894 HPI_ERROR_SUBSYSFINDADAPTERS_GETINFO = 107,
895
896 HPI_ERROR_INVALID_RESPONSE = 108,
897
898
899 HPI_ERROR_PROCESSING_MESSAGE = 109,
900
901 HPI_ERROR_NETWORK_TIMEOUT = 110,
902
903 HPI_ERROR_INVALID_HANDLE = 111,
904
905 HPI_ERROR_UNIMPLEMENTED = 112,
906
907 HPI_ERROR_NETWORK_TOO_MANY_CLIENTS = 113,
908
909 HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL = 114,
910
911 HPI_ERROR_RESPONSE_MISMATCH = 115,
912
913
914 HPI_ERROR_TOO_MANY_ADAPTERS = 200,
915
916 HPI_ERROR_BAD_ADAPTER = 201,
917
918 HPI_ERROR_BAD_ADAPTER_NUMBER = 202,
919
920 HPI_DUPLICATE_ADAPTER_NUMBER = 203,
921
922 HPI_ERROR_DSP_BOOTLOAD = 204,
923
924 HPI_ERROR_DSP_SELFTEST = 205,
925
926 HPI_ERROR_DSP_FILE_NOT_FOUND = 206,
927
928 HPI_ERROR_DSP_HARDWARE = 207,
929
930 HPI_ERROR_DOS_MEMORY_ALLOC = 208,
931
932 HPI_ERROR_MEMORY_ALLOC = 208,
933
934 HPI_ERROR_PLD_LOAD = 209,
935
936 HPI_ERROR_DSP_FILE_FORMAT = 210,
937
938
939 HPI_ERROR_DSP_FILE_ACCESS_DENIED = 211,
940
941 HPI_ERROR_DSP_FILE_NO_HEADER = 212,
942
943 HPI_ERROR_DSP_FILE_READ_ERROR = 213,
944
945 HPI_ERROR_DSP_SECTION_NOT_FOUND = 214,
946
947 HPI_ERROR_DSP_FILE_OTHER_ERROR = 215,
948
949 HPI_ERROR_DSP_FILE_SHARING_VIOLATION = 216,
950
951 HPI_ERROR_DSP_FILE_NULL_HEADER = 217,
952
953
954 HPI_ERROR_FLASH = 220,
955
956
957 HPI_ERROR_BAD_CHECKSUM = (HPI_ERROR_FLASH + 1),
958 HPI_ERROR_BAD_SEQUENCE = (HPI_ERROR_FLASH + 2),
959 HPI_ERROR_FLASH_ERASE = (HPI_ERROR_FLASH + 3),
960 HPI_ERROR_FLASH_PROGRAM = (HPI_ERROR_FLASH + 4),
961 HPI_ERROR_FLASH_VERIFY = (HPI_ERROR_FLASH + 5),
962 HPI_ERROR_FLASH_TYPE = (HPI_ERROR_FLASH + 6),
963 HPI_ERROR_FLASH_START = (HPI_ERROR_FLASH + 7),
964
965
966 HPI_ERROR_RESERVED_1 = 290,
967
968
969 HPI_ERROR_INVALID_STREAM = 300,
970
971 HPI_ERROR_INVALID_FORMAT = 301,
972
973 HPI_ERROR_INVALID_SAMPLERATE = 302,
974
975 HPI_ERROR_INVALID_CHANNELS = 303,
976
977 HPI_ERROR_INVALID_BITRATE = 304,
978
979 HPI_ERROR_INVALID_DATASIZE = 305,
980
981 HPI_ERROR_BUFFER_FULL = 306,
982
983 HPI_ERROR_BUFFER_EMPTY = 307,
984
985 HPI_ERROR_INVALID_DATA_TRANSFER = 308,
986
987 HPI_ERROR_INVALID_PACKET_ORDER = 309,
988
989
990
991 HPI_ERROR_INVALID_OPERATION = 310,
992
993
994
995 HPI_ERROR_INCOMPATIBLE_SAMPLERATE = 311,
996
997 HPI_ERROR_BAD_ADAPTER_MODE = 312,
998
999
1000
1001
1002 HPI_ERROR_TOO_MANY_CAPABILITY_CHANGE_ATTEMPTS = 313,
1003
1004 HPI_ERROR_NO_INTERADAPTER_GROUPS = 314,
1005
1006 HPI_ERROR_NO_INTERDSP_GROUPS = 315,
1007
1008
1009 HPI_ERROR_INVALID_NODE = 400,
1010
1011 HPI_ERROR_INVALID_CONTROL = 401,
1012
1013 HPI_ERROR_INVALID_CONTROL_VALUE = 402,
1014
1015 HPI_ERROR_INVALID_CONTROL_ATTRIBUTE = 403,
1016
1017 HPI_ERROR_CONTROL_DISABLED = 404,
1018
1019 HPI_ERROR_CONTROL_I2C_MISSING_ACK = 405,
1020
1021
1022 HPI_ERROR_CONTROL_NOT_READY = 407,
1023
1024
1025 HPI_ERROR_NVMEM_BUSY = 450,
1026 HPI_ERROR_NVMEM_FULL = 451,
1027 HPI_ERROR_NVMEM_FAIL = 452,
1028
1029
1030 HPI_ERROR_I2C_MISSING_ACK = HPI_ERROR_CONTROL_I2C_MISSING_ACK,
1031 HPI_ERROR_I2C_BAD_ADR = 460,
1032
1033
1034 HPI_ERROR_ENTITY_TYPE_MISMATCH = 470,
1035 HPI_ERROR_ENTITY_ITEM_COUNT = 471,
1036 HPI_ERROR_ENTITY_TYPE_INVALID = 472,
1037 HPI_ERROR_ENTITY_ROLE_INVALID = 473,
1038
1039
1040
1041
1042 HPI_ERROR_CUSTOM = 600,
1043
1044
1045 HPI_ERROR_MUTEX_TIMEOUT = 700,
1046
1047
1048 HPI_ERROR_BACKEND_BASE = 900,
1049
1050
1051 HPI_ERROR_ILLEGAL_CACHE_VALUE = 0xffff
1052};
1053
1054
1055
1056
1057
1058
1059#define HPI_MAX_ADAPTERS 20
1060
1061#define HPI_MAX_STREAMS 16
1062#define HPI_MAX_CHANNELS 2
1063#define HPI_MAX_NODES 8
1064#define HPI_MAX_CONTROLS 4
1065
1066#define HPI_MAX_ANC_BYTES_PER_FRAME (64)
1067#define HPI_STRING_LEN 16
1068
1069
1070#define HPI_OSTREAM_VELOCITY_UNITS 4096
1071
1072#define HPI_OSTREAM_TIMESCALE_UNITS 10000
1073
1074#define HPI_OSTREAM_TIMESCALE_PASSTHROUGH 99999
1075
1076
1077
1078
1079
1080#ifndef DISABLE_PRAGMA_PACK1
1081#pragma pack(push, 1)
1082#endif
1083
1084
1085
1086
1087struct hpi_format {
1088 u32 sample_rate;
1089
1090 u32 bit_rate;
1091 u32 attributes;
1092
1093 u16 mode_legacy;
1094
1095 u16 unused;
1096 u16 channels;
1097 u16 format;
1098};
1099
1100struct hpi_anc_frame {
1101 u32 valid_bits_in_this_frame;
1102 u8 b_data[HPI_MAX_ANC_BYTES_PER_FRAME];
1103};
1104
1105
1106
1107struct hpi_async_event {
1108 u16 event_type;
1109 u16 sequence;
1110 u32 state;
1111 u32 h_object;
1112 union {
1113 struct {
1114 u16 index;
1115 } gpio;
1116 struct {
1117 u16 node_index;
1118 u16 node_type;
1119 } control;
1120 } u;
1121};
1122
1123
1124
1125
1126struct hpi_entity;
1127
1128enum e_entity_type {
1129 entity_type_null,
1130 entity_type_sequence,
1131
1132 entity_type_reference,
1133
1134 entity_type_int,
1135 entity_type_float,
1136 entity_type_double,
1137
1138 entity_type_cstring,
1139 entity_type_octet,
1140 entity_type_ip4_address,
1141 entity_type_ip6_address,
1142 entity_type_mac_address,
1143
1144 LAST_ENTITY_TYPE
1145};
1146
1147enum e_entity_role {
1148 entity_role_null,
1149 entity_role_value,
1150 entity_role_classname,
1151
1152 entity_role_units,
1153 entity_role_flags,
1154 entity_role_range,
1155
1156 entity_role_mapping,
1157 entity_role_enum,
1158
1159 entity_role_instance_of,
1160 entity_role_depends_on,
1161 entity_role_member_of_group,
1162 entity_role_value_constraint,
1163 entity_role_parameter_port,
1164
1165 entity_role_block,
1166 entity_role_node_group,
1167 entity_role_audio_port,
1168 entity_role_clock_port,
1169 LAST_ENTITY_ROLE
1170};
1171
1172
1173
1174
1175struct hpi_hsubsys {
1176 int not_really_used;
1177};
1178
1179#ifndef DISABLE_PRAGMA_PACK1
1180#pragma pack(pop)
1181#endif
1182
1183
1184
1185
1186
1187
1188
1189u16 hpi_stream_estimate_buffer_size(struct hpi_format *pF,
1190 u32 host_polling_rate_in_milli_seconds, u32 *recommended_buffer_size);
1191
1192
1193
1194struct hpi_hsubsys *hpi_subsys_create(void
1195 );
1196
1197void hpi_subsys_free(const struct hpi_hsubsys *ph_subsys);
1198
1199u16 hpi_subsys_get_version(const struct hpi_hsubsys *ph_subsys,
1200 u32 *pversion);
1201
1202u16 hpi_subsys_get_version_ex(const struct hpi_hsubsys *ph_subsys,
1203 u32 *pversion_ex);
1204
1205u16 hpi_subsys_get_info(const struct hpi_hsubsys *ph_subsys, u32 *pversion,
1206 u16 *pw_num_adapters, u16 aw_adapter_list[], u16 list_length);
1207
1208u16 hpi_subsys_find_adapters(const struct hpi_hsubsys *ph_subsys,
1209 u16 *pw_num_adapters, u16 aw_adapter_list[], u16 list_length);
1210
1211u16 hpi_subsys_get_num_adapters(const struct hpi_hsubsys *ph_subsys,
1212 int *pn_num_adapters);
1213
1214u16 hpi_subsys_get_adapter(const struct hpi_hsubsys *ph_subsys, int iterator,
1215 u32 *padapter_index, u16 *pw_adapter_type);
1216
1217u16 hpi_subsys_ssx2_bypass(const struct hpi_hsubsys *ph_subsys, u16 bypass);
1218
1219u16 hpi_subsys_set_host_network_interface(const struct hpi_hsubsys *ph_subsys,
1220 const char *sz_interface);
1221
1222
1223
1224
1225u16 hpi_adapter_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index);
1226
1227u16 hpi_adapter_close(const struct hpi_hsubsys *ph_subsys, u16 adapter_index);
1228
1229u16 hpi_adapter_get_info(const struct hpi_hsubsys *ph_subsys,
1230 u16 adapter_index, u16 *pw_num_outstreams, u16 *pw_num_instreams,
1231 u16 *pw_version, u32 *pserial_number, u16 *pw_adapter_type);
1232
1233u16 hpi_adapter_get_module_by_index(const struct hpi_hsubsys *ph_subsys,
1234 u16 adapter_index, u16 module_index, u16 *pw_num_outputs,
1235 u16 *pw_num_inputs, u16 *pw_version, u32 *pserial_number,
1236 u16 *pw_module_type, u32 *ph_module);
1237
1238u16 hpi_adapter_set_mode(const struct hpi_hsubsys *ph_subsys,
1239 u16 adapter_index, u32 adapter_mode);
1240
1241u16 hpi_adapter_set_mode_ex(const struct hpi_hsubsys *ph_subsys,
1242 u16 adapter_index, u32 adapter_mode, u16 query_or_set);
1243
1244u16 hpi_adapter_get_mode(const struct hpi_hsubsys *ph_subsys,
1245 u16 adapter_index, u32 *padapter_mode);
1246
1247u16 hpi_adapter_get_assert(const struct hpi_hsubsys *ph_subsys,
1248 u16 adapter_index, u16 *assert_present, char *psz_assert,
1249 u16 *pw_line_number);
1250
1251u16 hpi_adapter_get_assert_ex(const struct hpi_hsubsys *ph_subsys,
1252 u16 adapter_index, u16 *assert_present, char *psz_assert,
1253 u32 *pline_number, u16 *pw_assert_on_dsp);
1254
1255u16 hpi_adapter_test_assert(const struct hpi_hsubsys *ph_subsys,
1256 u16 adapter_index, u16 assert_id);
1257
1258u16 hpi_adapter_enable_capability(const struct hpi_hsubsys *ph_subsys,
1259 u16 adapter_index, u16 capability, u32 key);
1260
1261u16 hpi_adapter_self_test(const struct hpi_hsubsys *ph_subsys,
1262 u16 adapter_index);
1263
1264u16 hpi_adapter_debug_read(const struct hpi_hsubsys *ph_subsys,
1265 u16 adapter_index, u32 dsp_address, char *p_bytes, int *count_bytes);
1266
1267u16 hpi_adapter_set_property(const struct hpi_hsubsys *ph_subsys,
1268 u16 adapter_index, u16 property, u16 paramter1, u16 paramter2);
1269
1270u16 hpi_adapter_get_property(const struct hpi_hsubsys *ph_subsys,
1271 u16 adapter_index, u16 property, u16 *pw_paramter1,
1272 u16 *pw_paramter2);
1273
1274u16 hpi_adapter_enumerate_property(const struct hpi_hsubsys *ph_subsys,
1275 u16 adapter_index, u16 index, u16 what_to_enumerate,
1276 u16 property_index, u32 *psetting);
1277
1278
1279
1280u16 hpi_nv_memory_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1281 u32 *ph_nv_memory, u16 *pw_size_in_bytes);
1282
1283u16 hpi_nv_memory_read_byte(const struct hpi_hsubsys *ph_subsys,
1284 u32 h_nv_memory, u16 index, u16 *pw_data);
1285
1286u16 hpi_nv_memory_write_byte(const struct hpi_hsubsys *ph_subsys,
1287 u32 h_nv_memory, u16 index, u16 data);
1288
1289
1290
1291u16 hpi_gpio_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1292 u32 *ph_gpio, u16 *pw_number_input_bits, u16 *pw_number_output_bits);
1293
1294u16 hpi_gpio_read_bit(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1295 u16 bit_index, u16 *pw_bit_data);
1296
1297u16 hpi_gpio_read_all_bits(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1298 u16 aw_all_bit_data[4]
1299 );
1300
1301u16 hpi_gpio_write_bit(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1302 u16 bit_index, u16 bit_data);
1303
1304u16 hpi_gpio_write_status(const struct hpi_hsubsys *ph_subsys, u32 h_gpio,
1305 u16 aw_all_bit_data[4]
1306 );
1307
1308
1309
1310
1311u16 hpi_async_event_open(const struct hpi_hsubsys *ph_subsys,
1312 u16 adapter_index, u32 *ph_async);
1313
1314u16 hpi_async_event_close(const struct hpi_hsubsys *ph_subsys, u32 h_async);
1315
1316u16 hpi_async_event_wait(const struct hpi_hsubsys *ph_subsys, u32 h_async,
1317 u16 maximum_events, struct hpi_async_event *p_events,
1318 u16 *pw_number_returned);
1319
1320u16 hpi_async_event_get_count(const struct hpi_hsubsys *ph_subsys,
1321 u32 h_async, u16 *pw_count);
1322
1323u16 hpi_async_event_get(const struct hpi_hsubsys *ph_subsys, u32 h_async,
1324 u16 maximum_events, struct hpi_async_event *p_events,
1325 u16 *pw_number_returned);
1326
1327
1328
1329u16 hpi_watchdog_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1330 u32 *ph_watchdog);
1331
1332u16 hpi_watchdog_set_time(const struct hpi_hsubsys *ph_subsys, u32 h_watchdog,
1333 u32 time_millisec);
1334
1335u16 hpi_watchdog_ping(const struct hpi_hsubsys *ph_subsys, u32 h_watchdog);
1336
1337
1338
1339
1340u16 hpi_outstream_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1341 u16 outstream_index, u32 *ph_outstream);
1342
1343u16 hpi_outstream_close(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1344
1345u16 hpi_outstream_get_info_ex(const struct hpi_hsubsys *ph_subsys,
1346 u32 h_outstream, u16 *pw_state, u32 *pbuffer_size, u32 *pdata_to_play,
1347 u32 *psamples_played, u32 *pauxiliary_data_to_play);
1348
1349u16 hpi_outstream_write_buf(const struct hpi_hsubsys *ph_subsys,
1350 u32 h_outstream, const u8 *pb_write_buf, u32 bytes_to_write,
1351 const struct hpi_format *p_format);
1352
1353u16 hpi_outstream_start(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1354
1355u16 hpi_outstream_wait_start(const struct hpi_hsubsys *ph_subsys,
1356 u32 h_outstream);
1357
1358u16 hpi_outstream_stop(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1359
1360u16 hpi_outstream_sinegen(const struct hpi_hsubsys *ph_subsys,
1361 u32 h_outstream);
1362
1363u16 hpi_outstream_reset(const struct hpi_hsubsys *ph_subsys, u32 h_outstream);
1364
1365u16 hpi_outstream_query_format(const struct hpi_hsubsys *ph_subsys,
1366 u32 h_outstream, struct hpi_format *p_format);
1367
1368u16 hpi_outstream_set_format(const struct hpi_hsubsys *ph_subsys,
1369 u32 h_outstream, struct hpi_format *p_format);
1370
1371u16 hpi_outstream_set_punch_in_out(const struct hpi_hsubsys *ph_subsys,
1372 u32 h_outstream, u32 punch_in_sample, u32 punch_out_sample);
1373
1374u16 hpi_outstream_set_velocity(const struct hpi_hsubsys *ph_subsys,
1375 u32 h_outstream, short velocity);
1376
1377u16 hpi_outstream_ancillary_reset(const struct hpi_hsubsys *ph_subsys,
1378 u32 h_outstream, u16 mode);
1379
1380u16 hpi_outstream_ancillary_get_info(const struct hpi_hsubsys *ph_subsys,
1381 u32 h_outstream, u32 *pframes_available);
1382
1383u16 hpi_outstream_ancillary_read(const struct hpi_hsubsys *ph_subsys,
1384 u32 h_outstream, struct hpi_anc_frame *p_anc_frame_buffer,
1385 u32 anc_frame_buffer_size_in_bytes,
1386 u32 number_of_ancillary_frames_to_read);
1387
1388u16 hpi_outstream_set_time_scale(const struct hpi_hsubsys *ph_subsys,
1389 u32 h_outstream, u32 time_scaleX10000);
1390
1391u16 hpi_outstream_host_buffer_allocate(const struct hpi_hsubsys *ph_subsys,
1392 u32 h_outstream, u32 size_in_bytes);
1393
1394u16 hpi_outstream_host_buffer_free(const struct hpi_hsubsys *ph_subsys,
1395 u32 h_outstream);
1396
1397u16 hpi_outstream_group_add(const struct hpi_hsubsys *ph_subsys,
1398 u32 h_outstream, u32 h_stream);
1399
1400u16 hpi_outstream_group_get_map(const struct hpi_hsubsys *ph_subsys,
1401 u32 h_outstream, u32 *poutstream_map, u32 *pinstream_map);
1402
1403u16 hpi_outstream_group_reset(const struct hpi_hsubsys *ph_subsys,
1404 u32 h_outstream);
1405
1406
1407
1408u16 hpi_instream_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1409 u16 instream_index, u32 *ph_instream);
1410
1411u16 hpi_instream_close(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1412
1413u16 hpi_instream_query_format(const struct hpi_hsubsys *ph_subsys,
1414 u32 h_instream, const struct hpi_format *p_format);
1415
1416u16 hpi_instream_set_format(const struct hpi_hsubsys *ph_subsys,
1417 u32 h_instream, const struct hpi_format *p_format);
1418
1419u16 hpi_instream_read_buf(const struct hpi_hsubsys *ph_subsys, u32 h_instream,
1420 u8 *pb_read_buf, u32 bytes_to_read);
1421
1422u16 hpi_instream_start(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1423
1424u16 hpi_instream_wait_start(const struct hpi_hsubsys *ph_subsys,
1425 u32 h_instream);
1426
1427u16 hpi_instream_stop(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1428
1429u16 hpi_instream_reset(const struct hpi_hsubsys *ph_subsys, u32 h_instream);
1430
1431u16 hpi_instream_get_info_ex(const struct hpi_hsubsys *ph_subsys,
1432 u32 h_instream, u16 *pw_state, u32 *pbuffer_size, u32 *pdata_recorded,
1433 u32 *psamples_recorded, u32 *pauxiliary_data_recorded);
1434
1435u16 hpi_instream_ancillary_reset(const struct hpi_hsubsys *ph_subsys,
1436 u32 h_instream, u16 bytes_per_frame, u16 mode, u16 alignment,
1437 u16 idle_bit);
1438
1439u16 hpi_instream_ancillary_get_info(const struct hpi_hsubsys *ph_subsys,
1440 u32 h_instream, u32 *pframe_space);
1441
1442u16 hpi_instream_ancillary_write(const struct hpi_hsubsys *ph_subsys,
1443 u32 h_instream, const struct hpi_anc_frame *p_anc_frame_buffer,
1444 u32 anc_frame_buffer_size_in_bytes,
1445 u32 number_of_ancillary_frames_to_write);
1446
1447u16 hpi_instream_host_buffer_allocate(const struct hpi_hsubsys *ph_subsys,
1448 u32 h_instream, u32 size_in_bytes);
1449
1450u16 hpi_instream_host_buffer_free(const struct hpi_hsubsys *ph_subsys,
1451 u32 h_instream);
1452
1453u16 hpi_instream_group_add(const struct hpi_hsubsys *ph_subsys,
1454 u32 h_instream, u32 h_stream);
1455
1456u16 hpi_instream_group_get_map(const struct hpi_hsubsys *ph_subsys,
1457 u32 h_instream, u32 *poutstream_map, u32 *pinstream_map);
1458
1459u16 hpi_instream_group_reset(const struct hpi_hsubsys *ph_subsys,
1460 u32 h_instream);
1461
1462
1463
1464
1465u16 hpi_mixer_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1466 u32 *ph_mixer);
1467
1468u16 hpi_mixer_close(const struct hpi_hsubsys *ph_subsys, u32 h_mixer);
1469
1470u16 hpi_mixer_get_control(const struct hpi_hsubsys *ph_subsys, u32 h_mixer,
1471 u16 src_node_type, u16 src_node_type_index, u16 dst_node_type,
1472 u16 dst_node_type_index, u16 control_type, u32 *ph_control);
1473
1474u16 hpi_mixer_get_control_by_index(const struct hpi_hsubsys *ph_subsys,
1475 u32 h_mixer, u16 control_index, u16 *pw_src_node_type,
1476 u16 *pw_src_node_index, u16 *pw_dst_node_type, u16 *pw_dst_node_index,
1477 u16 *pw_control_type, u32 *ph_control);
1478
1479u16 hpi_mixer_store(const struct hpi_hsubsys *ph_subsys, u32 h_mixer,
1480 enum HPI_MIXER_STORE_COMMAND command, u16 index);
1481
1482
1483
1484
1485
1486
1487u16 hpi_volume_set_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1488 short an_gain0_01dB[HPI_MAX_CHANNELS]
1489 );
1490
1491u16 hpi_volume_get_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1492 short an_gain0_01dB_out[HPI_MAX_CHANNELS]
1493 );
1494
1495#define hpi_volume_get_range hpi_volume_query_range
1496u16 hpi_volume_query_range(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1497 short *min_gain_01dB, short *max_gain_01dB, short *step_gain_01dB);
1498
1499u16 hpi_volume_query_channels(const struct hpi_hsubsys *ph_subsys,
1500 const u32 h_volume, u32 *p_channels);
1501
1502u16 hpi_volume_auto_fade(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1503 short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms);
1504
1505u16 hpi_volume_auto_fade_profile(const struct hpi_hsubsys *ph_subsys,
1506 u32 h_control, short an_stop_gain0_01dB[HPI_MAX_CHANNELS],
1507 u32 duration_ms, u16 profile);
1508
1509
1510
1511
1512u16 hpi_level_query_range(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1513 short *min_gain_01dB, short *max_gain_01dB, short *step_gain_01dB);
1514
1515u16 hpi_level_set_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1516 short an_gain0_01dB[HPI_MAX_CHANNELS]
1517 );
1518
1519u16 hpi_level_get_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1520 short an_gain0_01dB_out[HPI_MAX_CHANNELS]
1521 );
1522
1523
1524
1525
1526u16 hpi_meter_query_channels(const struct hpi_hsubsys *ph_subsys,
1527 const u32 h_meter, u32 *p_channels);
1528
1529u16 hpi_meter_get_peak(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1530 short an_peak0_01dB_out[HPI_MAX_CHANNELS]
1531 );
1532
1533u16 hpi_meter_get_rms(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1534 short an_peak0_01dB_out[HPI_MAX_CHANNELS]
1535 );
1536
1537u16 hpi_meter_set_peak_ballistics(const struct hpi_hsubsys *ph_subsys,
1538 u32 h_control, u16 attack, u16 decay);
1539
1540u16 hpi_meter_set_rms_ballistics(const struct hpi_hsubsys *ph_subsys,
1541 u32 h_control, u16 attack, u16 decay);
1542
1543u16 hpi_meter_get_peak_ballistics(const struct hpi_hsubsys *ph_subsys,
1544 u32 h_control, u16 *attack, u16 *decay);
1545
1546u16 hpi_meter_get_rms_ballistics(const struct hpi_hsubsys *ph_subsys,
1547 u32 h_control, u16 *attack, u16 *decay);
1548
1549
1550
1551
1552u16 hpi_channel_mode_query_mode(const struct hpi_hsubsys *ph_subsys,
1553 const u32 h_mode, const u32 index, u16 *pw_mode);
1554
1555u16 hpi_channel_mode_set(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1556 u16 mode);
1557
1558u16 hpi_channel_mode_get(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1559 u16 *mode);
1560
1561
1562
1563
1564u16 hpi_tuner_query_band(const struct hpi_hsubsys *ph_subsys,
1565 const u32 h_tuner, const u32 index, u16 *pw_band);
1566
1567u16 hpi_tuner_set_band(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1568 u16 band);
1569
1570u16 hpi_tuner_get_band(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1571 u16 *pw_band);
1572
1573u16 hpi_tuner_query_frequency(const struct hpi_hsubsys *ph_subsys,
1574 const u32 h_tuner, const u32 index, const u16 band, u32 *pfreq);
1575
1576u16 hpi_tuner_set_frequency(const struct hpi_hsubsys *ph_subsys,
1577 u32 h_control, u32 freq_ink_hz);
1578
1579u16 hpi_tuner_get_frequency(const struct hpi_hsubsys *ph_subsys,
1580 u32 h_control, u32 *pw_freq_ink_hz);
1581
1582u16 hpi_tuner_getRF_level(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1583 short *pw_level);
1584
1585u16 hpi_tuner_get_rawRF_level(const struct hpi_hsubsys *ph_subsys,
1586 u32 h_control, short *pw_level);
1587
1588u16 hpi_tuner_query_gain(const struct hpi_hsubsys *ph_subsys,
1589 const u32 h_tuner, const u32 index, u16 *pw_gain);
1590
1591u16 hpi_tuner_set_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1592 short gain);
1593
1594u16 hpi_tuner_get_gain(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1595 short *pn_gain);
1596
1597u16 hpi_tuner_get_status(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1598 u16 *pw_status_mask, u16 *pw_status);
1599
1600u16 hpi_tuner_set_mode(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1601 u32 mode, u32 value);
1602
1603u16 hpi_tuner_get_mode(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1604 u32 mode, u32 *pn_value);
1605
1606u16 hpi_tuner_getRDS(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1607 char *p_rds_data);
1608
1609u16 hpi_tuner_query_deemphasis(const struct hpi_hsubsys *ph_subsys,
1610 const u32 h_tuner, const u32 index, const u16 band, u32 *pdeemphasis);
1611
1612u16 hpi_tuner_set_deemphasis(const struct hpi_hsubsys *ph_subsys,
1613 u32 h_control, u32 deemphasis);
1614u16 hpi_tuner_get_deemphasis(const struct hpi_hsubsys *ph_subsys,
1615 u32 h_control, u32 *pdeemphasis);
1616
1617u16 hpi_tuner_query_program(const struct hpi_hsubsys *ph_subsys,
1618 const u32 h_tuner, u32 *pbitmap_program);
1619
1620u16 hpi_tuner_set_program(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1621 u32 program);
1622
1623u16 hpi_tuner_get_program(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1624 u32 *pprogram);
1625
1626u16 hpi_tuner_get_hd_radio_dsp_version(const struct hpi_hsubsys *ph_subsys,
1627 u32 h_control, char *psz_dsp_version, const u32 string_size);
1628
1629u16 hpi_tuner_get_hd_radio_sdk_version(const struct hpi_hsubsys *ph_subsys,
1630 u32 h_control, char *psz_sdk_version, const u32 string_size);
1631
1632u16 hpi_tuner_get_hd_radio_signal_quality(const struct hpi_hsubsys *ph_subsys,
1633 u32 h_control, u32 *pquality);
1634
1635u16 hpi_tuner_get_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1636 u32 h_control, u32 *pblend);
1637
1638u16 hpi_tuner_set_hd_radio_signal_blend(const struct hpi_hsubsys *ph_subsys,
1639 u32 h_control, const u32 blend);
1640
1641
1642
1643
1644
1645u16 HPI_PAD__get_channel_name(const struct hpi_hsubsys *ph_subsys,
1646 u32 h_control, char *psz_string, const u32 string_length);
1647
1648u16 HPI_PAD__get_artist(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1649 char *psz_string, const u32 string_length);
1650
1651u16 HPI_PAD__get_title(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1652 char *psz_string, const u32 string_length);
1653
1654u16 HPI_PAD__get_comment(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1655 char *psz_string, const u32 string_length);
1656
1657u16 HPI_PAD__get_program_type(const struct hpi_hsubsys *ph_subsys,
1658 u32 h_control, u32 *ppTY);
1659
1660u16 HPI_PAD__get_rdsPI(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1661 u32 *ppI);
1662
1663u16 HPI_PAD__get_program_type_string(const struct hpi_hsubsys *ph_subsys,
1664 u32 h_control, const u32 data_type, const u32 pTY, char *psz_string,
1665 const u32 string_length);
1666
1667
1668
1669
1670u16 HPI_AESEBU__receiver_query_format(const struct hpi_hsubsys *ph_subsys,
1671 const u32 h_aes_rx, const u32 index, u16 *pw_format);
1672
1673u16 HPI_AESEBU__receiver_set_format(const struct hpi_hsubsys *ph_subsys,
1674 u32 h_control, u16 source);
1675
1676u16 HPI_AESEBU__receiver_get_format(const struct hpi_hsubsys *ph_subsys,
1677 u32 h_control, u16 *pw_source);
1678
1679u16 HPI_AESEBU__receiver_get_sample_rate(const struct hpi_hsubsys *ph_subsys,
1680 u32 h_control, u32 *psample_rate);
1681
1682u16 HPI_AESEBU__receiver_get_user_data(const struct hpi_hsubsys *ph_subsys,
1683 u32 h_control, u16 index, u16 *pw_data);
1684
1685u16 HPI_AESEBU__receiver_get_channel_status(const struct hpi_hsubsys
1686 *ph_subsys, u32 h_control, u16 index, u16 *pw_data);
1687
1688u16 HPI_AESEBU__receiver_get_error_status(const struct hpi_hsubsys *ph_subsys,
1689 u32 h_control, u16 *pw_error_data);
1690
1691
1692
1693
1694u16 HPI_AESEBU__transmitter_set_sample_rate(const struct hpi_hsubsys
1695 *ph_subsys, u32 h_control, u32 sample_rate);
1696
1697u16 HPI_AESEBU__transmitter_set_user_data(const struct hpi_hsubsys *ph_subsys,
1698 u32 h_control, u16 index, u16 data);
1699
1700u16 HPI_AESEBU__transmitter_set_channel_status(const struct hpi_hsubsys
1701 *ph_subsys, u32 h_control, u16 index, u16 data);
1702
1703u16 HPI_AESEBU__transmitter_get_channel_status(const struct hpi_hsubsys
1704 *ph_subsys, u32 h_control, u16 index, u16 *pw_data);
1705
1706u16 HPI_AESEBU__transmitter_query_format(const struct hpi_hsubsys *ph_subsys,
1707 const u32 h_aes_tx, const u32 index, u16 *pw_format);
1708
1709u16 HPI_AESEBU__transmitter_set_format(const struct hpi_hsubsys *ph_subsys,
1710 u32 h_control, u16 output_format);
1711
1712u16 HPI_AESEBU__transmitter_get_format(const struct hpi_hsubsys *ph_subsys,
1713 u32 h_control, u16 *pw_output_format);
1714
1715
1716
1717
1718u16 hpi_multiplexer_set_source(const struct hpi_hsubsys *ph_subsys,
1719 u32 h_control, u16 source_node_type, u16 source_node_index);
1720
1721u16 hpi_multiplexer_get_source(const struct hpi_hsubsys *ph_subsys,
1722 u32 h_control, u16 *source_node_type, u16 *source_node_index);
1723
1724u16 hpi_multiplexer_query_source(const struct hpi_hsubsys *ph_subsys,
1725 u32 h_control, u16 index, u16 *source_node_type,
1726 u16 *source_node_index);
1727
1728
1729
1730
1731u16 hpi_vox_set_threshold(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1732 short an_gain0_01dB);
1733
1734u16 hpi_vox_get_threshold(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1735 short *an_gain0_01dB);
1736
1737
1738
1739
1740u16 hpi_bitstream_set_clock_edge(const struct hpi_hsubsys *ph_subsys,
1741 u32 h_control, u16 edge_type);
1742
1743u16 hpi_bitstream_set_data_polarity(const struct hpi_hsubsys *ph_subsys,
1744 u32 h_control, u16 polarity);
1745
1746u16 hpi_bitstream_get_activity(const struct hpi_hsubsys *ph_subsys,
1747 u32 h_control, u16 *pw_clk_activity, u16 *pw_data_activity);
1748
1749
1750
1751
1752
1753u16 hpi_sample_clock_query_source(const struct hpi_hsubsys *ph_subsys,
1754 const u32 h_clock, const u32 index, u16 *pw_source);
1755
1756u16 hpi_sample_clock_set_source(const struct hpi_hsubsys *ph_subsys,
1757 u32 h_control, u16 source);
1758
1759u16 hpi_sample_clock_get_source(const struct hpi_hsubsys *ph_subsys,
1760 u32 h_control, u16 *pw_source);
1761
1762u16 hpi_sample_clock_query_source_index(const struct hpi_hsubsys *ph_subsys,
1763 const u32 h_clock, const u32 index, const u32 source,
1764 u16 *pw_source_index);
1765
1766u16 hpi_sample_clock_set_source_index(const struct hpi_hsubsys *ph_subsys,
1767 u32 h_control, u16 source_index);
1768
1769u16 hpi_sample_clock_get_source_index(const struct hpi_hsubsys *ph_subsys,
1770 u32 h_control, u16 *pw_source_index);
1771
1772u16 hpi_sample_clock_get_sample_rate(const struct hpi_hsubsys *ph_subsys,
1773 u32 h_control, u32 *psample_rate);
1774
1775u16 hpi_sample_clock_query_local_rate(const struct hpi_hsubsys *ph_subsys,
1776 const u32 h_clock, const u32 index, u32 *psource);
1777
1778u16 hpi_sample_clock_set_local_rate(const struct hpi_hsubsys *ph_subsys,
1779 u32 h_control, u32 sample_rate);
1780
1781u16 hpi_sample_clock_get_local_rate(const struct hpi_hsubsys *ph_subsys,
1782 u32 h_control, u32 *psample_rate);
1783
1784u16 hpi_sample_clock_set_auto(const struct hpi_hsubsys *ph_subsys,
1785 u32 h_control, u32 enable);
1786
1787u16 hpi_sample_clock_get_auto(const struct hpi_hsubsys *ph_subsys,
1788 u32 h_control, u32 *penable);
1789
1790u16 hpi_sample_clock_set_local_rate_lock(const struct hpi_hsubsys *ph_subsys,
1791 u32 h_control, u32 lock);
1792
1793u16 hpi_sample_clock_get_local_rate_lock(const struct hpi_hsubsys *ph_subsys,
1794 u32 h_control, u32 *plock);
1795
1796
1797
1798
1799u16 hpi_microphone_set_phantom_power(const struct hpi_hsubsys *ph_subsys,
1800 u32 h_control, u16 on_off);
1801
1802u16 hpi_microphone_get_phantom_power(const struct hpi_hsubsys *ph_subsys,
1803 u32 h_control, u16 *pw_on_off);
1804
1805
1806
1807
1808u16 hpi_parametricEQ__get_info(const struct hpi_hsubsys *ph_subsys,
1809 u32 h_control, u16 *pw_number_of_bands, u16 *pw_enabled);
1810
1811u16 hpi_parametricEQ__set_state(const struct hpi_hsubsys *ph_subsys,
1812 u32 h_control, u16 on_off);
1813
1814u16 hpi_parametricEQ__set_band(const struct hpi_hsubsys *ph_subsys,
1815 u32 h_control, u16 index, u16 type, u32 frequency_hz, short q100,
1816 short gain0_01dB);
1817
1818u16 hpi_parametricEQ__get_band(const struct hpi_hsubsys *ph_subsys,
1819 u32 h_control, u16 index, u16 *pn_type, u32 *pfrequency_hz,
1820 short *pnQ100, short *pn_gain0_01dB);
1821
1822u16 hpi_parametricEQ__get_coeffs(const struct hpi_hsubsys *ph_subsys,
1823 u32 h_control, u16 index, short coeffs[5]
1824 );
1825
1826
1827
1828
1829
1830u16 hpi_compander_set_enable(const struct hpi_hsubsys *ph_subsys,
1831 u32 h_control, u32 on);
1832
1833u16 hpi_compander_get_enable(const struct hpi_hsubsys *ph_subsys,
1834 u32 h_control, u32 *pon);
1835
1836u16 hpi_compander_set_makeup_gain(const struct hpi_hsubsys *ph_subsys,
1837 u32 h_control, short makeup_gain0_01dB);
1838
1839u16 hpi_compander_get_makeup_gain(const struct hpi_hsubsys *ph_subsys,
1840 u32 h_control, short *pn_makeup_gain0_01dB);
1841
1842u16 hpi_compander_set_attack_time_constant(const struct hpi_hsubsys
1843 *ph_subsys, u32 h_control, u32 index, u32 attack);
1844
1845u16 hpi_compander_get_attack_time_constant(const struct hpi_hsubsys
1846 *ph_subsys, u32 h_control, u32 index, u32 *pw_attack);
1847
1848u16 hpi_compander_set_decay_time_constant(const struct hpi_hsubsys *ph_subsys,
1849 u32 h_control, u32 index, u32 decay);
1850
1851u16 hpi_compander_get_decay_time_constant(const struct hpi_hsubsys *ph_subsys,
1852 u32 h_control, u32 index, u32 *pw_decay);
1853
1854u16 hpi_compander_set_threshold(const struct hpi_hsubsys *ph_subsys,
1855 u32 h_control, u32 index, short threshold0_01dB);
1856
1857u16 hpi_compander_get_threshold(const struct hpi_hsubsys *ph_subsys,
1858 u32 h_control, u32 index, short *pn_threshold0_01dB);
1859
1860u16 hpi_compander_set_ratio(const struct hpi_hsubsys *ph_subsys,
1861 u32 h_control, u32 index, u32 ratio100);
1862
1863u16 hpi_compander_get_ratio(const struct hpi_hsubsys *ph_subsys,
1864 u32 h_control, u32 index, u32 *pw_ratio100);
1865
1866
1867
1868
1869u16 hpi_cobranet_hmi_write(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1870 u32 hmi_address, u32 byte_count, u8 *pb_data);
1871
1872u16 hpi_cobranet_hmi_read(const struct hpi_hsubsys *ph_subsys, u32 h_control,
1873 u32 hmi_address, u32 max_byte_count, u32 *pbyte_count, u8 *pb_data);
1874
1875u16 hpi_cobranet_hmi_get_status(const struct hpi_hsubsys *ph_subsys,
1876 u32 h_control, u32 *pstatus, u32 *preadable_size,
1877 u32 *pwriteable_size);
1878
1879
1880
1881u16 hpi_cobranet_getI_paddress(const struct hpi_hsubsys *ph_subsys,
1882 u32 h_control, u32 *pi_paddress);
1883
1884
1885
1886u16 hpi_cobranet_setI_paddress(const struct hpi_hsubsys *ph_subsys,
1887 u32 h_control, u32 i_paddress);
1888
1889
1890
1891u16 hpi_cobranet_get_staticI_paddress(const struct hpi_hsubsys *ph_subsys,
1892 u32 h_control, u32 *pi_paddress);
1893
1894
1895
1896u16 hpi_cobranet_set_staticI_paddress(const struct hpi_hsubsys *ph_subsys,
1897 u32 h_control, u32 i_paddress);
1898
1899
1900
1901u16 hpi_cobranet_getMA_caddress(const struct hpi_hsubsys *ph_subsys,
1902 u32 h_control, u32 *pmAC_MS_bs, u32 *pmAC_LS_bs);
1903
1904
1905
1906
1907u16 hpi_tone_detector_get_state(const struct hpi_hsubsys *ph_subsys, u32 hC,
1908 u32 *state);
1909
1910u16 hpi_tone_detector_set_enable(const struct hpi_hsubsys *ph_subsys, u32 hC,
1911 u32 enable);
1912
1913u16 hpi_tone_detector_get_enable(const struct hpi_hsubsys *ph_subsys, u32 hC,
1914 u32 *enable);
1915
1916u16 hpi_tone_detector_set_event_enable(const struct hpi_hsubsys *ph_subsys,
1917 u32 hC, u32 event_enable);
1918
1919u16 hpi_tone_detector_get_event_enable(const struct hpi_hsubsys *ph_subsys,
1920 u32 hC, u32 *event_enable);
1921
1922u16 hpi_tone_detector_set_threshold(const struct hpi_hsubsys *ph_subsys,
1923 u32 hC, int threshold);
1924
1925u16 hpi_tone_detector_get_threshold(const struct hpi_hsubsys *ph_subsys,
1926 u32 hC, int *threshold);
1927
1928u16 hpi_tone_detector_get_frequency(const struct hpi_hsubsys *ph_subsys,
1929 u32 hC, u32 index, u32 *frequency);
1930
1931
1932
1933
1934u16 hpi_silence_detector_get_state(const struct hpi_hsubsys *ph_subsys,
1935 u32 hC, u32 *state);
1936
1937u16 hpi_silence_detector_set_enable(const struct hpi_hsubsys *ph_subsys,
1938 u32 hC, u32 enable);
1939
1940u16 hpi_silence_detector_get_enable(const struct hpi_hsubsys *ph_subsys,
1941 u32 hC, u32 *enable);
1942
1943u16 hpi_silence_detector_set_event_enable(const struct hpi_hsubsys *ph_subsys,
1944 u32 hC, u32 event_enable);
1945
1946u16 hpi_silence_detector_get_event_enable(const struct hpi_hsubsys *ph_subsys,
1947 u32 hC, u32 *event_enable);
1948
1949u16 hpi_silence_detector_set_delay(const struct hpi_hsubsys *ph_subsys,
1950 u32 hC, u32 delay);
1951
1952u16 hpi_silence_detector_get_delay(const struct hpi_hsubsys *ph_subsys,
1953 u32 hC, u32 *delay);
1954
1955u16 hpi_silence_detector_set_threshold(const struct hpi_hsubsys *ph_subsys,
1956 u32 hC, int threshold);
1957
1958u16 hpi_silence_detector_get_threshold(const struct hpi_hsubsys *ph_subsys,
1959 u32 hC, int *threshold);
1960
1961
1962
1963
1964u16 hpi_entity_find_next(struct hpi_entity *container_entity,
1965 enum e_entity_type type, enum e_entity_role role, int recursive_flag,
1966 struct hpi_entity **current_match);
1967
1968u16 hpi_entity_copy_value_from(struct hpi_entity *entity,
1969 enum e_entity_type type, size_t item_count, void *value_dst_p);
1970
1971u16 hpi_entity_unpack(struct hpi_entity *entity, enum e_entity_type *type,
1972 size_t *items, enum e_entity_role *role, void **value);
1973
1974u16 hpi_entity_alloc_and_pack(const enum e_entity_type type,
1975 const size_t item_count, const enum e_entity_role role, void *value,
1976 struct hpi_entity **entity);
1977
1978void hpi_entity_free(struct hpi_entity *entity);
1979
1980u16 hpi_universal_info(const struct hpi_hsubsys *ph_subsys, u32 hC,
1981 struct hpi_entity **info);
1982
1983u16 hpi_universal_get(const struct hpi_hsubsys *ph_subsys, u32 hC,
1984 struct hpi_entity **value);
1985
1986u16 hpi_universal_set(const struct hpi_hsubsys *ph_subsys, u32 hC,
1987 struct hpi_entity *value);
1988
1989
1990
1991
1992u16 hpi_clock_open(const struct hpi_hsubsys *ph_subsys, u16 adapter_index,
1993 u32 *ph_dsp_clock);
1994
1995u16 hpi_clock_set_time(const struct hpi_hsubsys *ph_subsys, u32 h_clock,
1996 u16 hour, u16 minute, u16 second, u16 milli_second);
1997
1998u16 hpi_clock_get_time(const struct hpi_hsubsys *ph_subsys, u32 h_clock,
1999 u16 *pw_hour, u16 *pw_minute, u16 *pw_second, u16 *pw_milli_second);
2000
2001
2002
2003
2004u16 hpi_profile_open_all(const struct hpi_hsubsys *ph_subsys,
2005 u16 adapter_index, u16 profile_index, u32 *ph_profile,
2006 u16 *pw_max_profiles);
2007
2008u16 hpi_profile_get(const struct hpi_hsubsys *ph_subsys, u32 h_profile,
2009 u16 index, u16 *pw_seconds, u32 *pmicro_seconds, u32 *pcall_count,
2010 u32 *pmax_micro_seconds, u32 *pmin_micro_seconds);
2011
2012u16 hpi_profile_start_all(const struct hpi_hsubsys *ph_subsys, u32 h_profile);
2013
2014u16 hpi_profile_stop_all(const struct hpi_hsubsys *ph_subsys, u32 h_profile);
2015
2016u16 hpi_profile_get_name(const struct hpi_hsubsys *ph_subsys, u32 h_profile,
2017 u16 index, char *sz_profile_name, u16 profile_name_length);
2018
2019u16 hpi_profile_get_utilization(const struct hpi_hsubsys *ph_subsys,
2020 u32 h_profile, u32 *putilization);
2021
2022
2023
2024
2025u16 hpi_format_create(struct hpi_format *p_format, u16 channels, u16 format,
2026 u32 sample_rate, u32 bit_rate, u32 attributes);
2027
2028
2029
2030#endif
2031
2032
2033
2034
2035
2036