aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi
diff options
context:
space:
mode:
authorEliot Blennerhassett <eblennerhassett@audioscience.com>2011-12-21 19:38:46 -0500
committerTakashi Iwai <tiwai@suse.de>2011-12-22 02:13:07 -0500
commit812550e9efd149062fdc6cc8bf00b5f15d0734b7 (patch)
treed36498f9526590cae72de6824909477891ef9d5c /sound/pci/asihpi
parent862e14185b46e1d65d560c7dbaa0f2c842b71d20 (diff)
ALSA: asihpi - New defs and comments.
Add new error codes, and adapter properties. Clean up some comments. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/asihpi')
-rw-r--r--sound/pci/asihpi/hpi.h48
1 files changed, 34 insertions, 14 deletions
diff --git a/sound/pci/asihpi/hpi.h b/sound/pci/asihpi/hpi.h
index f2f1d980102b..20887241a3ae 100644
--- a/sound/pci/asihpi/hpi.h
+++ b/sound/pci/asihpi/hpi.h
@@ -431,7 +431,19 @@ Indicates that the adapter in it's current mode supports interrupts
431across the host bus. Note, this does not imply that interrupts are 431across the host bus. Note, this does not imply that interrupts are
432enabled. Instead it indicates that they can be enabled. 432enabled. Instead it indicates that they can be enabled.
433*/ 433*/
434 HPI_ADAPTER_PROPERTY_SUPPORTS_IRQ = 272 434 HPI_ADAPTER_PROPERTY_SUPPORTS_IRQ = 272,
435/** Readonly supports firmware updating.
436Indicates that the adapter implements an interface to update firmware
437on the adapter.
438*/
439 HPI_ADAPTER_PROPERTY_SUPPORTS_FW_UPDATE = 273,
440/** Readonly Firmware IDs
441Identifiy firmware independent of individual adapter type.
442May be used as a filter for firmware update images.
443Property 1 = Bootloader ID
444Property 2 = Main program ID
445*/
446 HPI_ADAPTER_PROPERTY_FIRMWARE_ID = 274
435}; 447};
436 448
437/** Adapter mode commands 449/** Adapter mode commands
@@ -619,7 +631,7 @@ enum HPI_MIXER_STORE_COMMAND {
619 HPI_MIXER_STORE_ENABLE = 4, 631 HPI_MIXER_STORE_ENABLE = 4,
620/** Disable auto storage of some control settings. */ 632/** Disable auto storage of some control settings. */
621 HPI_MIXER_STORE_DISABLE = 5, 633 HPI_MIXER_STORE_DISABLE = 5,
622/** Save the attributes of a single control. */ 634/** Unimplemented - save the attributes of a single control. */
623 HPI_MIXER_STORE_SAVE_SINGLE = 6 635 HPI_MIXER_STORE_SAVE_SINGLE = 6
624}; 636};
625 637
@@ -922,7 +934,7 @@ enum HPI_ERROR_CODES {
922 HPI_ERROR_BAD_ADAPTER_NUMBER = 202, 934 HPI_ERROR_BAD_ADAPTER_NUMBER = 202,
923 /** 2 adapters with the same adapter number. */ 935 /** 2 adapters with the same adapter number. */
924 HPI_ERROR_DUPLICATE_ADAPTER_NUMBER = 203, 936 HPI_ERROR_DUPLICATE_ADAPTER_NUMBER = 203,
925 /** DSP code failed to bootload. (unused?) */ 937 /** DSP code failed to bootload. Usually a DSP memory test failure. */
926 HPI_ERROR_DSP_BOOTLOAD = 204, 938 HPI_ERROR_DSP_BOOTLOAD = 204,
927 /** Couldn't find or open the DSP code file. */ 939 /** Couldn't find or open the DSP code file. */
928 HPI_ERROR_DSP_FILE_NOT_FOUND = 206, 940 HPI_ERROR_DSP_FILE_NOT_FOUND = 206,
@@ -959,6 +971,9 @@ enum HPI_ERROR_CODES {
959 HPI_ERROR_FLASH_VERIFY = 225, 971 HPI_ERROR_FLASH_VERIFY = 225,
960 HPI_ERROR_FLASH_TYPE = 226, 972 HPI_ERROR_FLASH_TYPE = 226,
961 HPI_ERROR_FLASH_START = 227, 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,
962 977
963 /** Reserved for OEMs. */ 978 /** Reserved for OEMs. */
964 HPI_ERROR_RESERVED_1 = 290, 979 HPI_ERROR_RESERVED_1 = 290,
@@ -1001,6 +1016,8 @@ enum HPI_ERROR_CODES {
1001 HPI_ERROR_NO_INTERDSP_GROUPS = 315, 1016 HPI_ERROR_NO_INTERDSP_GROUPS = 315,
1002 /** Stream wait cancelled before threshold reached. */ 1017 /** Stream wait cancelled before threshold reached. */
1003 HPI_ERROR_WAIT_CANCELLED = 316, 1018 HPI_ERROR_WAIT_CANCELLED = 316,
1019 /** A character string is invalid. */
1020 HPI_ERROR_INVALID_STRING = 317,
1004 1021
1005 /** Invalid mixer node for this adapter. */ 1022 /** Invalid mixer node for this adapter. */
1006 HPI_ERROR_INVALID_NODE = 400, 1023 HPI_ERROR_INVALID_NODE = 400,
@@ -1027,11 +1044,15 @@ enum HPI_ERROR_CODES {
1027 /** I2C */ 1044 /** I2C */
1028 HPI_ERROR_I2C_BAD_ADR = 460, 1045 HPI_ERROR_I2C_BAD_ADR = 460,
1029 1046
1030 /** Entity errors */ 1047 /** Entity type did not match requested type */
1031 HPI_ERROR_ENTITY_TYPE_MISMATCH = 470, 1048 HPI_ERROR_ENTITY_TYPE_MISMATCH = 470,
1049 /** Entity item count did not match requested count */
1032 HPI_ERROR_ENTITY_ITEM_COUNT = 471, 1050 HPI_ERROR_ENTITY_ITEM_COUNT = 471,
1051 /** Entity type is not one of the valid types */
1033 HPI_ERROR_ENTITY_TYPE_INVALID = 472, 1052 HPI_ERROR_ENTITY_TYPE_INVALID = 472,
1053 /** Entity role is not one of the valid roles */
1034 HPI_ERROR_ENTITY_ROLE_INVALID = 473, 1054 HPI_ERROR_ENTITY_ROLE_INVALID = 473,
1055 /** Entity size doesn't match target size */
1035 HPI_ERROR_ENTITY_SIZE_MISMATCH = 474, 1056 HPI_ERROR_ENTITY_SIZE_MISMATCH = 474,
1036 1057
1037 /* AES18 specific errors were 500..507 */ 1058 /* AES18 specific errors were 500..507 */
@@ -1059,8 +1080,7 @@ enum HPI_ERROR_CODES {
1059/** \defgroup maximums HPI maximum values 1080/** \defgroup maximums HPI maximum values
1060\{ 1081\{
1061*/ 1082*/
1062/** Maximum number of adapters per HPI sub-system 1083/** Maximum number of PCI HPI adapters */
1063 WARNING: modifying this value changes the response structure size.*/
1064#define HPI_MAX_ADAPTERS 20 1084#define HPI_MAX_ADAPTERS 20
1065/** Maximum number of in or out streams per adapter */ 1085/** Maximum number of in or out streams per adapter */
1066#define HPI_MAX_STREAMS 16 1086#define HPI_MAX_STREAMS 16
@@ -1071,6 +1091,9 @@ enum HPI_ERROR_CODES {
1071#define HPI_MAX_ANC_BYTES_PER_FRAME (64) 1091#define HPI_MAX_ANC_BYTES_PER_FRAME (64)
1072#define HPI_STRING_LEN 16 1092#define HPI_STRING_LEN 16
1073 1093
1094/** Networked adapters have index >= 100 */
1095#define HPI_MIN_NETWORK_ADAPTER_IDX 100
1096
1074/** Velocity units */ 1097/** Velocity units */
1075#define HPI_OSTREAM_VELOCITY_UNITS 4096 1098#define HPI_OSTREAM_VELOCITY_UNITS 4096
1076/** OutStream timescale units */ 1099/** OutStream timescale units */
@@ -1092,14 +1115,14 @@ enum HPI_ERROR_CODES {
1092struct hpi_format { 1115struct hpi_format {
1093 u32 sample_rate; 1116 u32 sample_rate;
1094 /**< 11025, 32000, 44100 ... */ 1117 /**< 11025, 32000, 44100 ... */
1095 u32 bit_rate; /**< for MPEG */ 1118 u32 bit_rate; /**< for MPEG */
1096 u32 attributes; 1119 u32 attributes;
1097 /**< Stereo/JointStereo/Mono */ 1120 /**< Stereo/JointStereo/Mono */
1098 u16 mode_legacy; 1121 u16 mode_legacy;
1099 /**< Legacy ancillary mode or idle bit */ 1122 /**< Legacy ancillary mode or idle bit */
1100 u16 unused; /**< Unused */ 1123 u16 unused; /**< Unused */
1101 u16 channels; /**< 1,2..., (or ancillary mode or idle bit */ 1124 u16 channels; /**< 1,2..., (or ancillary mode or idle bit */
1102 u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see #HPI_FORMATS. */ 1125 u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see #HPI_FORMATS. */
1103}; 1126};
1104 1127
1105struct hpi_anc_frame { 1128struct hpi_anc_frame {
@@ -1125,9 +1148,6 @@ struct hpi_async_event {
1125 } u; 1148 } u;
1126}; 1149};
1127 1150
1128/* skip host side function declarations for
1129 DSP compile and documentation extraction */
1130
1131#ifndef DISABLE_PRAGMA_PACK1 1151#ifndef DISABLE_PRAGMA_PACK1
1132#pragma pack(pop) 1152#pragma pack(pop)
1133#endif 1153#endif
@@ -1338,7 +1358,7 @@ u16 hpi_volume_get_mute(u32 h_control, u32 *mute);
1338u16 hpi_volume_query_range(u32 h_control, short *min_gain_01dB, 1358u16 hpi_volume_query_range(u32 h_control, short *min_gain_01dB,
1339 short *max_gain_01dB, short *step_gain_01dB); 1359 short *max_gain_01dB, short *step_gain_01dB);
1340 1360
1341u16 hpi_volume_query_channels(const u32 h_volume, u32 *p_channels); 1361u16 hpi_volume_query_channels(const u32 h_control, u32 *p_channels);
1342 1362
1343u16 hpi_volume_auto_fade(u32 h_control, 1363u16 hpi_volume_auto_fade(u32 h_control,
1344 short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms); 1364 short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms);