From 43a737b6081d8308a9b058cdae03adcf9f2fe811 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Mon, 6 Feb 2023 18:37:45 +0900 Subject: [PATCH] m1n1.adt: Add speaker calibration parsing Signed-off-by: Hector Martin --- proxyclient/m1n1/adt.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/proxyclient/m1n1/adt.py b/proxyclient/m1n1/adt.py index 8cc7ebeb..ec7e61ae 100644 --- a/proxyclient/m1n1/adt.py +++ b/proxyclient/m1n1/adt.py @@ -164,6 +164,21 @@ MTRPolynomFuseAGX = GreedyRange(Struct( "data" / Prefixed(Int32ul, GreedyRange(Coef)), )) +SpeakerThieleSmall = Struct( + "unk0" / Int16ul, + "unk1" / Int16ul, + "speakers" / GreedyRange(Struct( + "pad0" / Hex(Int32ul), + "r_mohm" / Int16ul, + "temp" / Int16ul, + "pad1" / Hex(Int32ul), + "pad2" / Hex(Int32ul), + "pad3" / Hex(Int16ul), + "name" / FourCC, + )), + "checksum" / Hex(Int16ul), +) + DEV_PROPERTIES = { "pmgr": { "*": { @@ -247,7 +262,12 @@ DEV_PROPERTIES = { "*": { "audio-stream-formatter": FourCC, } - } + }, + "audio": { + "*": { + "speaker-thiele-small": SpeakerThieleSmall, + }, + }, } def parse_prop(node, path, node_name, name, v, is_template=False):