summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2022-12-19 01:14:36 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2022-12-19 01:14:36 -0800
commitde1d02fd082e15590c7ed494c163fefc02f8e2ab (patch)
treee923b3f39666495e4ddd545bdfb4cace3a976fa3
parent48933394e52365df33dfb9e5466ca5ff67afeb27 (diff)
parent03eda4c9e768e7954de73d87012c2f7edde5b9b8 (diff)
downloadaoc-de1d02fd082e15590c7ed494c163fefc02f8e2ab.tar.gz
SBMerger: 478053055 Change-Id: I897852e71fc30effda5489e2000ab9e60cdbddb2 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--[-rwxr-xr-x]alsa/aoc_alsa_ctl.c6
-rw-r--r--aoc-interface-gs101.h41
-rw-r--r--aoc-interface-gs201.h41
-rw-r--r--aoc.c18
4 files changed, 99 insertions, 7 deletions
diff --git a/alsa/aoc_alsa_ctl.c b/alsa/aoc_alsa_ctl.c
index d081ce0..570b607 100755..100644
--- a/alsa/aoc_alsa_ctl.c
+++ b/alsa/aoc_alsa_ctl.c
@@ -866,9 +866,9 @@ static int compr_offload_volume_set(struct snd_kcontrol *kcontrol,
chip->compr_offload_volume = ucontrol->value.integer.value[0];
/* temporary solution */
- aoc_audio_volume_set(chip, chip->compr_offload_volume, OFF_LOAD, SINK_SPEAKER);
- aoc_audio_volume_set(chip, chip->compr_offload_volume, OFF_LOAD, SINK_USB);
- aoc_audio_volume_set(chip, chip->compr_offload_volume, OFF_LOAD, SINK_BT);
+ aoc_audio_volume_set(chip, chip->compr_offload_volume, OFF_LOAD, ASNK_SPEAKER);
+ aoc_audio_volume_set(chip, chip->compr_offload_volume, OFF_LOAD, ASNK_USB);
+ aoc_audio_volume_set(chip, chip->compr_offload_volume, OFF_LOAD, ASNK_BT);
mutex_unlock(&chip->audio_mutex);
return 0;
diff --git a/aoc-interface-gs101.h b/aoc-interface-gs101.h
index 9451a13..ce8b848 100644
--- a/aoc-interface-gs101.h
+++ b/aoc-interface-gs101.h
@@ -18,7 +18,7 @@
* Autogenerated AoC interface matching AoC source code
* associated with the following source code:
*
- * hash: 00149812a12a2a9a0d68907fa09e657e5878b77c
+ * hash: f1e613fbaf00185d16793b5d37c79b57ca3d6d75
*
* DO NOT MODIFY THIS FILE
*
@@ -81,6 +81,8 @@ enum AOC_COMMAND {
CMD_DBG_MEM_SET_ID = 37, /* [0x0025] -> struct CMD_DBG_MEM_SET */
CMD_DBG_MEM_DUMP_ID = 38, /* [0x0026] -> struct CMD_DBG_MEM_DUMP */
CMD_DBG_MEM_INVAL_ACCESS_ID = 45, /* [0x002d] -> struct CMD_CORE_GENERIC */
+ CMD_DBG_MCPS_ID = 47, /* [0x002f] -> struct CMD_DBG_MCPS */
+ CMD_DBG_SCRIB_ID = 48, /* [0x0030] -> struct CMD_DBG_SCRIB */
CMD_IPC_NOTIF_ENABLE_ID = 100, /* [0x0064] -> struct CMD_IPC_NOTIF_ENABLE */
CMD_AUDIO_OUTPUT_SINK_ID = 200, /* [0x00c8] -> struct CMD_AUDIO_OUTPUT_SINK */
CMD_DIAG_CORE_POWER_ID = 200, /* [0x00c8] -> struct CMD_DIAG_CORE_POWER */
@@ -292,6 +294,8 @@ enum AOC_COMMAND {
CMD_AUDIO_INPUT_HOTWORD_SET_AP_OFFLOAD_ID = 339, /* [0x0153] -> struct CMD_AUDIO_INPUT_HOTWORD_SET_AP_OFFLOAD */
CMD_AUDIO_INPUT_CAPTURE_INJECTION_START_ID = 340, /* [0x0154] -> struct CMD_HDR */
CMD_AUDIO_INPUT_CAPTURE_INJECTION_STOP_ID = 341, /* [0x0155] -> struct CMD_HDR */
+ CMD_AUDIO_INPUT_HOTWORD_ENABLE_PRIMARY_MIC_SWAP_ID = 342, /* [0x0156] -> struct CMD_HDR */
+ CMD_AUDIO_INPUT_HOTWORD_DISABLE_PRIMARY_MIC_SWAP_ID = 343, /* [0x0157] -> struct CMD_HDR */
};
/**
@@ -386,6 +390,8 @@ struct CONTAINER_HDR {
* CMD_AUDIO_INPUT_MEDIA_COMMANDS_UNLOAD_MODEL_ID, UUID: 3c720d5f387a33a62552d630638dbdd1
* CMD_AUDIO_INPUT_CAPTURE_INJECTION_START_ID, UUID: d1129af39a0c1baa17e7a318dab310ad
* CMD_AUDIO_INPUT_CAPTURE_INJECTION_STOP_ID, UUID: a08b4b576785aeaa5765bd6ed5331c6b
+ * CMD_AUDIO_INPUT_HOTWORD_ENABLE_PRIMARY_MIC_SWAP_ID, UUID: 38f04da68e0fe087e57ff0de4217d98a
+ * CMD_AUDIO_INPUT_HOTWORD_DISABLE_PRIMARY_MIC_SWAP_ID, UUID: 11d5f33c7409277a3538ad7576af7f3c
*/
struct CMD_HDR {
struct CONTAINER_HDR parent;
@@ -1547,6 +1553,8 @@ enum AUDIO_OUTPUT_BT_A2DP_ENC_CODEC {
AUDIO_OUTPUT_BT_A2DP_ENC_CODEC_LDAC,
AUDIO_OUTPUT_BT_BLE_ENC_CODEC_LC3,
AUDIO_OUTPUT_BT_A2DP_ENC_CODEC_OPUS,
+ AUDIO_OUTPUT_BT_BLE_DEC_CODEC_LC3,
+ AUDIO_OUTPUT_BT_BLE_ENC_CODEC_LC3_DYN_CHG,
};
struct AUDIO_OUTPUT_BT_A2DP_ENC_CFG {
@@ -2353,6 +2361,31 @@ struct CMD_AUDIO_INPUT_HOTWORD_SET_AP_OFFLOAD {
uint8_t num_mics;
} __attribute__((packed));
+/**
+ * Structure associated with the following commands:
+ *
+ * CMD_DBG_MCPS_ID, UUID: 7fe3c28026295dad807ddd3e69cd4422
+ */
+struct CMD_DBG_MCPS {
+ struct CMD_CORE_GENERIC parent;
+ int32_t is_enabled;
+ int32_t is_cumulative;
+ int32_t print_now;
+} __attribute__((packed));
+
+/**
+ * Structure associated with the following commands:
+ *
+ * CMD_DBG_SCRIB_ID, UUID: 019729a3296037ff5d6da2362eec6789
+ */
+struct CMD_DBG_SCRIB {
+ struct CMD_CORE_GENERIC parent;
+ int32_t override_enable;
+ int32_t prescrib;
+ int32_t postscrib;
+ int32_t free_after_free;
+} __attribute__((packed));
+
struct NOTIF_HDR {
struct CONTAINER_HDR parent;
uint32_t id;
@@ -2393,7 +2426,7 @@ static inline void AocCmdHdrSet(struct CMD_HDR * cmd, uint16_t id, uint16_t leng
/**
* Total number of UUID strings to check against the FW image.
*/
-#define AOC_UUID_ENTRIES (253)
+#define AOC_UUID_ENTRIES (257)
/**
* UUID entry size.
@@ -2412,6 +2445,7 @@ static inline void AocCmdHdrSet(struct CMD_HDR * cmd, uint16_t id, uint16_t leng
static inline int AocInterfaceCheck(const void * addr, int size) {
static const uint8_t uuid_array[AOC_UUID_ENTRIES][AOC_UUID_SIZE] = {
{ 0x00, 0x88, 0xd9, 0x9e, 0x35, 0x72, 0x9a, 0x48, 0xdd, 0x6c, 0x5a, 0xa2, 0xaa, 0xed, 0xdc, 0x9f},
+ { 0x01, 0x97, 0x29, 0xa3, 0x29, 0x60, 0x37, 0xff, 0x5d, 0x6d, 0xa2, 0x36, 0x2e, 0xec, 0x67, 0x89},
{ 0x02, 0x60, 0xf2, 0xf4, 0x2a, 0x5d, 0xcc, 0xfb, 0x50, 0x1c, 0x26, 0x69, 0x03, 0x4b, 0xbc, 0xdc},
{ 0x04, 0x5a, 0x7d, 0x63, 0xe2, 0x39, 0x87, 0x26, 0x8f, 0x2c, 0xf9, 0xe7, 0x98, 0x96, 0x42, 0x8c},
{ 0x04, 0xac, 0x83, 0x0a, 0xb6, 0x5f, 0x08, 0x08, 0x5b, 0x25, 0xe6, 0x4d, 0x45, 0x3b, 0xa9, 0xd0},
@@ -2428,6 +2462,7 @@ static inline int AocInterfaceCheck(const void * addr, int size) {
{ 0x0f, 0x2d, 0xeb, 0xf1, 0x2d, 0xf3, 0xba, 0x43, 0xf6, 0x21, 0x84, 0x62, 0x50, 0x33, 0x57, 0x63},
{ 0x10, 0xe5, 0x07, 0xdc, 0x9a, 0x26, 0x71, 0x19, 0xa9, 0xb6, 0xe4, 0x12, 0x01, 0x7d, 0xe0, 0x80},
{ 0x11, 0x0b, 0x9f, 0x59, 0x08, 0x39, 0x05, 0xa5, 0xc3, 0x74, 0x9e, 0x78, 0x8d, 0xff, 0x15, 0xcd},
+ { 0x11, 0xd5, 0xf3, 0x3c, 0x74, 0x09, 0x27, 0x7a, 0x35, 0x38, 0xad, 0x75, 0x76, 0xaf, 0x7f, 0x3c},
{ 0x12, 0x9b, 0x8b, 0xe8, 0xcf, 0x44, 0xf2, 0x7c, 0x8d, 0xc7, 0xc9, 0xc0, 0x8b, 0xca, 0x34, 0x55},
{ 0x12, 0xf4, 0xcb, 0x01, 0x22, 0xb8, 0x18, 0x9e, 0xde, 0xe6, 0xa8, 0x49, 0xdf, 0x5a, 0xf6, 0x6f},
{ 0x13, 0x01, 0xe8, 0xb4, 0x7b, 0x56, 0x58, 0xaf, 0xe0, 0xac, 0x39, 0x67, 0xa8, 0x34, 0x72, 0x5c},
@@ -2466,6 +2501,7 @@ static inline int AocInterfaceCheck(const void * addr, int size) {
{ 0x34, 0xd2, 0x49, 0xfd, 0xff, 0x0e, 0x51, 0x22, 0xc2, 0xec, 0x9d, 0xd2, 0xb9, 0x52, 0xc8, 0xa9},
{ 0x35, 0xbe, 0xc2, 0xbc, 0xb5, 0x79, 0xfc, 0x92, 0x1a, 0x33, 0xc2, 0x0c, 0xc8, 0x9c, 0x1f, 0x1e},
{ 0x38, 0xed, 0x63, 0x44, 0x98, 0x5d, 0x21, 0x03, 0x6d, 0xd3, 0x76, 0xcd, 0xdb, 0x5a, 0xc5, 0x4c},
+ { 0x38, 0xf0, 0x4d, 0xa6, 0x8e, 0x0f, 0xe0, 0x87, 0xe5, 0x7f, 0xf0, 0xde, 0x42, 0x17, 0xd9, 0x8a},
{ 0x39, 0xd7, 0xce, 0x4e, 0x20, 0x8d, 0xdc, 0x8e, 0x94, 0x21, 0xed, 0x86, 0xe8, 0x5d, 0xeb, 0xb9},
{ 0x3c, 0x62, 0xed, 0x13, 0xcc, 0xb6, 0x3d, 0xbc, 0x34, 0x97, 0x97, 0x9f, 0xe2, 0x67, 0x57, 0x41},
{ 0x3c, 0x72, 0x0d, 0x5f, 0x38, 0x7a, 0x33, 0xa6, 0x25, 0x52, 0xd6, 0x30, 0x63, 0x8d, 0xbd, 0xd1},
@@ -2545,6 +2581,7 @@ static inline int AocInterfaceCheck(const void * addr, int size) {
{ 0x7f, 0x57, 0xd7, 0xe1, 0x21, 0xe0, 0xa7, 0x2e, 0xf2, 0x3d, 0x8b, 0x87, 0x90, 0xb9, 0x01, 0x94},
{ 0x7f, 0x65, 0xb2, 0x21, 0x15, 0xbe, 0x36, 0x03, 0x89, 0xad, 0x1b, 0x84, 0xca, 0xbb, 0x6a, 0xb2},
{ 0x7f, 0x98, 0xe8, 0x0d, 0x90, 0xd0, 0x63, 0x91, 0xc8, 0x5a, 0xd2, 0x36, 0x34, 0xc1, 0x95, 0x43},
+ { 0x7f, 0xe3, 0xc2, 0x80, 0x26, 0x29, 0x5d, 0xad, 0x80, 0x7d, 0xdd, 0x3e, 0x69, 0xcd, 0x44, 0x22},
{ 0x80, 0x82, 0x20, 0x72, 0xda, 0x64, 0x58, 0xb0, 0x80, 0xf4, 0x88, 0xc1, 0xb1, 0x6a, 0xb0, 0x08},
{ 0x81, 0x80, 0xc6, 0x21, 0xa6, 0x8e, 0x9c, 0x87, 0x85, 0x3a, 0xf3, 0x16, 0x99, 0x43, 0x71, 0xc9},
{ 0x81, 0x81, 0x84, 0x27, 0x25, 0xec, 0xcd, 0xc3, 0x51, 0x29, 0x61, 0x7f, 0x18, 0x62, 0xa9, 0x9b},
diff --git a/aoc-interface-gs201.h b/aoc-interface-gs201.h
index 170c748..0c434a2 100644
--- a/aoc-interface-gs201.h
+++ b/aoc-interface-gs201.h
@@ -18,7 +18,7 @@
* Autogenerated AoC interface matching AoC source code
* associated with the following source code:
*
- * hash: 00149812a12a2a9a0d68907fa09e657e5878b77c
+ * hash: f1e613fbaf00185d16793b5d37c79b57ca3d6d75
*
* DO NOT MODIFY THIS FILE
*
@@ -81,6 +81,8 @@ enum AOC_COMMAND {
CMD_DBG_MEM_SET_ID = 37, /* [0x0025] -> struct CMD_DBG_MEM_SET */
CMD_DBG_MEM_DUMP_ID = 38, /* [0x0026] -> struct CMD_DBG_MEM_DUMP */
CMD_DBG_MEM_INVAL_ACCESS_ID = 45, /* [0x002d] -> struct CMD_CORE_GENERIC */
+ CMD_DBG_MCPS_ID = 47, /* [0x002f] -> struct CMD_DBG_MCPS */
+ CMD_DBG_SCRIB_ID = 48, /* [0x0030] -> struct CMD_DBG_SCRIB */
CMD_IPC_NOTIF_ENABLE_ID = 100, /* [0x0064] -> struct CMD_IPC_NOTIF_ENABLE */
CMD_AUDIO_OUTPUT_SINK_ID = 200, /* [0x00c8] -> struct CMD_AUDIO_OUTPUT_SINK */
CMD_DIAG_CORE_POWER_ID = 200, /* [0x00c8] -> struct CMD_DIAG_CORE_POWER */
@@ -292,6 +294,8 @@ enum AOC_COMMAND {
CMD_AUDIO_INPUT_HOTWORD_SET_AP_OFFLOAD_ID = 339, /* [0x0153] -> struct CMD_AUDIO_INPUT_HOTWORD_SET_AP_OFFLOAD */
CMD_AUDIO_INPUT_CAPTURE_INJECTION_START_ID = 340, /* [0x0154] -> struct CMD_HDR */
CMD_AUDIO_INPUT_CAPTURE_INJECTION_STOP_ID = 341, /* [0x0155] -> struct CMD_HDR */
+ CMD_AUDIO_INPUT_HOTWORD_ENABLE_PRIMARY_MIC_SWAP_ID = 342, /* [0x0156] -> struct CMD_HDR */
+ CMD_AUDIO_INPUT_HOTWORD_DISABLE_PRIMARY_MIC_SWAP_ID = 343, /* [0x0157] -> struct CMD_HDR */
};
/**
@@ -386,6 +390,8 @@ struct CONTAINER_HDR {
* CMD_AUDIO_INPUT_MEDIA_COMMANDS_UNLOAD_MODEL_ID, UUID: 3c720d5f387a33a62552d630638dbdd1
* CMD_AUDIO_INPUT_CAPTURE_INJECTION_START_ID, UUID: d1129af39a0c1baa17e7a318dab310ad
* CMD_AUDIO_INPUT_CAPTURE_INJECTION_STOP_ID, UUID: a08b4b576785aeaa5765bd6ed5331c6b
+ * CMD_AUDIO_INPUT_HOTWORD_ENABLE_PRIMARY_MIC_SWAP_ID, UUID: 38f04da68e0fe087e57ff0de4217d98a
+ * CMD_AUDIO_INPUT_HOTWORD_DISABLE_PRIMARY_MIC_SWAP_ID, UUID: 11d5f33c7409277a3538ad7576af7f3c
*/
struct CMD_HDR {
struct CONTAINER_HDR parent;
@@ -1547,6 +1553,8 @@ enum AUDIO_OUTPUT_BT_A2DP_ENC_CODEC {
AUDIO_OUTPUT_BT_A2DP_ENC_CODEC_LDAC,
AUDIO_OUTPUT_BT_BLE_ENC_CODEC_LC3,
AUDIO_OUTPUT_BT_A2DP_ENC_CODEC_OPUS,
+ AUDIO_OUTPUT_BT_BLE_DEC_CODEC_LC3,
+ AUDIO_OUTPUT_BT_BLE_ENC_CODEC_LC3_DYN_CHG,
};
struct AUDIO_OUTPUT_BT_A2DP_ENC_CFG {
@@ -2353,6 +2361,31 @@ struct CMD_AUDIO_INPUT_HOTWORD_SET_AP_OFFLOAD {
uint8_t num_mics;
} __attribute__((packed));
+/**
+ * Structure associated with the following commands:
+ *
+ * CMD_DBG_MCPS_ID, UUID: 7fe3c28026295dad807ddd3e69cd4422
+ */
+struct CMD_DBG_MCPS {
+ struct CMD_CORE_GENERIC parent;
+ int32_t is_enabled;
+ int32_t is_cumulative;
+ int32_t print_now;
+} __attribute__((packed));
+
+/**
+ * Structure associated with the following commands:
+ *
+ * CMD_DBG_SCRIB_ID, UUID: 019729a3296037ff5d6da2362eec6789
+ */
+struct CMD_DBG_SCRIB {
+ struct CMD_CORE_GENERIC parent;
+ int32_t override_enable;
+ int32_t prescrib;
+ int32_t postscrib;
+ int32_t free_after_free;
+} __attribute__((packed));
+
struct NOTIF_HDR {
struct CONTAINER_HDR parent;
uint32_t id;
@@ -2393,7 +2426,7 @@ static inline void AocCmdHdrSet(struct CMD_HDR * cmd, uint16_t id, uint16_t leng
/**
* Total number of UUID strings to check against the FW image.
*/
-#define AOC_UUID_ENTRIES (253)
+#define AOC_UUID_ENTRIES (257)
/**
* UUID entry size.
@@ -2412,6 +2445,7 @@ static inline void AocCmdHdrSet(struct CMD_HDR * cmd, uint16_t id, uint16_t leng
static inline int AocInterfaceCheck(const void * addr, int size) {
static const uint8_t uuid_array[AOC_UUID_ENTRIES][AOC_UUID_SIZE] = {
{ 0x00, 0x88, 0xd9, 0x9e, 0x35, 0x72, 0x9a, 0x48, 0xdd, 0x6c, 0x5a, 0xa2, 0xaa, 0xed, 0xdc, 0x9f},
+ { 0x01, 0x97, 0x29, 0xa3, 0x29, 0x60, 0x37, 0xff, 0x5d, 0x6d, 0xa2, 0x36, 0x2e, 0xec, 0x67, 0x89},
{ 0x02, 0x60, 0xf2, 0xf4, 0x2a, 0x5d, 0xcc, 0xfb, 0x50, 0x1c, 0x26, 0x69, 0x03, 0x4b, 0xbc, 0xdc},
{ 0x04, 0x5a, 0x7d, 0x63, 0xe2, 0x39, 0x87, 0x26, 0x8f, 0x2c, 0xf9, 0xe7, 0x98, 0x96, 0x42, 0x8c},
{ 0x04, 0xac, 0x83, 0x0a, 0xb6, 0x5f, 0x08, 0x08, 0x5b, 0x25, 0xe6, 0x4d, 0x45, 0x3b, 0xa9, 0xd0},
@@ -2428,6 +2462,7 @@ static inline int AocInterfaceCheck(const void * addr, int size) {
{ 0x0f, 0x2d, 0xeb, 0xf1, 0x2d, 0xf3, 0xba, 0x43, 0xf6, 0x21, 0x84, 0x62, 0x50, 0x33, 0x57, 0x63},
{ 0x10, 0xe5, 0x07, 0xdc, 0x9a, 0x26, 0x71, 0x19, 0xa9, 0xb6, 0xe4, 0x12, 0x01, 0x7d, 0xe0, 0x80},
{ 0x11, 0x0b, 0x9f, 0x59, 0x08, 0x39, 0x05, 0xa5, 0xc3, 0x74, 0x9e, 0x78, 0x8d, 0xff, 0x15, 0xcd},
+ { 0x11, 0xd5, 0xf3, 0x3c, 0x74, 0x09, 0x27, 0x7a, 0x35, 0x38, 0xad, 0x75, 0x76, 0xaf, 0x7f, 0x3c},
{ 0x12, 0x9b, 0x8b, 0xe8, 0xcf, 0x44, 0xf2, 0x7c, 0x8d, 0xc7, 0xc9, 0xc0, 0x8b, 0xca, 0x34, 0x55},
{ 0x12, 0xf4, 0xcb, 0x01, 0x22, 0xb8, 0x18, 0x9e, 0xde, 0xe6, 0xa8, 0x49, 0xdf, 0x5a, 0xf6, 0x6f},
{ 0x13, 0x01, 0xe8, 0xb4, 0x7b, 0x56, 0x58, 0xaf, 0xe0, 0xac, 0x39, 0x67, 0xa8, 0x34, 0x72, 0x5c},
@@ -2466,6 +2501,7 @@ static inline int AocInterfaceCheck(const void * addr, int size) {
{ 0x34, 0xd2, 0x49, 0xfd, 0xff, 0x0e, 0x51, 0x22, 0xc2, 0xec, 0x9d, 0xd2, 0xb9, 0x52, 0xc8, 0xa9},
{ 0x35, 0xbe, 0xc2, 0xbc, 0xb5, 0x79, 0xfc, 0x92, 0x1a, 0x33, 0xc2, 0x0c, 0xc8, 0x9c, 0x1f, 0x1e},
{ 0x38, 0xed, 0x63, 0x44, 0x98, 0x5d, 0x21, 0x03, 0x6d, 0xd3, 0x76, 0xcd, 0xdb, 0x5a, 0xc5, 0x4c},
+ { 0x38, 0xf0, 0x4d, 0xa6, 0x8e, 0x0f, 0xe0, 0x87, 0xe5, 0x7f, 0xf0, 0xde, 0x42, 0x17, 0xd9, 0x8a},
{ 0x39, 0xd7, 0xce, 0x4e, 0x20, 0x8d, 0xdc, 0x8e, 0x94, 0x21, 0xed, 0x86, 0xe8, 0x5d, 0xeb, 0xb9},
{ 0x3c, 0x62, 0xed, 0x13, 0xcc, 0xb6, 0x3d, 0xbc, 0x34, 0x97, 0x97, 0x9f, 0xe2, 0x67, 0x57, 0x41},
{ 0x3c, 0x72, 0x0d, 0x5f, 0x38, 0x7a, 0x33, 0xa6, 0x25, 0x52, 0xd6, 0x30, 0x63, 0x8d, 0xbd, 0xd1},
@@ -2546,6 +2582,7 @@ static inline int AocInterfaceCheck(const void * addr, int size) {
{ 0x7f, 0x57, 0xd7, 0xe1, 0x21, 0xe0, 0xa7, 0x2e, 0xf2, 0x3d, 0x8b, 0x87, 0x90, 0xb9, 0x01, 0x94},
{ 0x7f, 0x65, 0xb2, 0x21, 0x15, 0xbe, 0x36, 0x03, 0x89, 0xad, 0x1b, 0x84, 0xca, 0xbb, 0x6a, 0xb2},
{ 0x7f, 0x98, 0xe8, 0x0d, 0x90, 0xd0, 0x63, 0x91, 0xc8, 0x5a, 0xd2, 0x36, 0x34, 0xc1, 0x95, 0x43},
+ { 0x7f, 0xe3, 0xc2, 0x80, 0x26, 0x29, 0x5d, 0xad, 0x80, 0x7d, 0xdd, 0x3e, 0x69, 0xcd, 0x44, 0x22},
{ 0x80, 0x82, 0x20, 0x72, 0xda, 0x64, 0x58, 0xb0, 0x80, 0xf4, 0x88, 0xc1, 0xb1, 0x6a, 0xb0, 0x08},
{ 0x81, 0x80, 0xc6, 0x21, 0xa6, 0x8e, 0x9c, 0x87, 0x85, 0x3a, 0xf3, 0x16, 0x99, 0x43, 0x71, 0xc9},
{ 0x81, 0x81, 0x84, 0x27, 0x25, 0xec, 0xcd, 0xc3, 0x51, 0x29, 0x61, 0x7f, 0x18, 0x62, 0xa9, 0x9b},
diff --git a/aoc.c b/aoc.c
index f7bd890..4a4f5a5 100644
--- a/aoc.c
+++ b/aoc.c
@@ -268,6 +268,7 @@ static unsigned long write_blocked_mask;
static bool aoc_fpga_reset(struct aoc_prvdata *prvdata);
static bool write_reset_trampoline(u32 addr);
static bool aoc_a32_reset(void);
+static bool configure_sensor_regulator(struct aoc_prvdata *prvdata, bool enable);
static int aoc_watchdog_restart(struct aoc_prvdata *prvdata);
static void acpm_aoc_reset_callback(unsigned int *cmd, unsigned int size);
@@ -1758,6 +1759,22 @@ static ssize_t reset_store(struct device *dev, struct device_attribute *attr,
static DEVICE_ATTR_WO(reset);
+static ssize_t sensor_power_enable_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct aoc_prvdata *prvdata = dev_get_drvdata(dev);
+ int val;
+
+ if (kstrtoint(buf, 10, &val) == 0) {
+ dev_info(prvdata->dev,"sensor_power_enable %d", val);
+ configure_sensor_regulator(prvdata, !!val);
+ }
+ return count;
+}
+
+static DEVICE_ATTR_WO(sensor_power_enable);
+
static struct attribute *aoc_attrs[] = {
&dev_attr_firmware.attr,
&dev_attr_revision.attr,
@@ -1768,6 +1785,7 @@ static struct attribute *aoc_attrs[] = {
&dev_attr_aoc_clock.attr,
&dev_attr_aoc_clock_and_kernel_boottime.attr,
&dev_attr_reset.attr,
+ &dev_attr_sensor_power_enable.attr,
NULL
};