From 6d0979e71e83f47c5da5fdb8c5e21eb1268d54e8 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Mon, 21 Aug 2023 23:16:08 +0900 Subject: [PATCH] m1n1.adt: Decode apcie tunables Signed-off-by: Hector Martin --- proxyclient/m1n1/adt.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/proxyclient/m1n1/adt.py b/proxyclient/m1n1/adt.py index a88ce2aa1..d37b4b44a 100644 --- a/proxyclient/m1n1/adt.py +++ b/proxyclient/m1n1/adt.py @@ -191,6 +191,20 @@ "checksum" / Hex(Int16ul), ) +TunableGlobal = Struct( + "reg_idx" / Hex(Int32ul), + "offset" / Hex(Int32ul), + "mask" / Hex(Int32ul), + "value" / Hex(Int32ul), +) + +TunableLocal = Struct( + "offset" / Hex(Int32ul), + "size" / Hex(Int32ul), + "mask" / Hex(Int64ul), + "value" / Hex(Int64ul), +) + DEV_PROPERTIES = { "pmgr": { "*": { @@ -283,6 +297,11 @@ "speaker-thiele-small": SpeakerThieleSmall, }, }, + "apcie*": { + "*": { + "apcie-*-tunables": GreedyRange(TunableLocal), + } + } } def parse_prop(node, path, node_name, name, v, is_template=False):