aop.ipc: Fill in more known audio config fields

Signed-off-by: Eileen Yoon <eyn@gmx.com>
This commit is contained in:
Eileen Yoon 2024-01-30 09:28:04 +09:00 committed by Hector Martin
parent a4fb7af657
commit 9202652908

View file

@ -148,45 +148,41 @@ class AttachDevice(WrappedCall):
"unk" / HexDump(GreedyBytes), "unk" / HexDump(GreedyBytes),
) )
@WrappedCall.reg_subclass @reg_calltype
class ProbeDevice(WrappedCall): class AudioAttachDevice(EPICCall):
CALLTYPE = 0xc3_00_00_01 TYPE = 0x20
SUBTYPE = 0xc3_00_00_02
ARGS = Struct( ARGS = Struct(
"blank" / Const(0x0, Int32ul), "pad" / Const(0x0, Int32ul),
"unk1" / Hex(Const(0xffffffff, Int32ul)), "unk1" / Hex(Const(0xffffffff, Int32ul)),
"calltype" / Hex(Const(0xc3000001, Int32ul)), "subtype" / Hex(Const(0xc3000002, Int32ul)),
"blank2" / ZPadding(16), "pad2" / ZPadding(16),
"pad" / Padding(4), "cookie" / Default(Hex(Int32ul), 0),
"len" / Hex(Const(0x28, Int64ul)), "len" / Hex(Const(0x2c, Int64ul)),
"devno" / Int32ul, "devid" / FourCC,
"dev2" / Default(Hex(Int32ul), 0),
) )
RETS = Struct( RETS = Struct(
"retcode" / Default(Hex(Int32ul), 0), "retcode" / Default(Hex(Int32ul), 0),
"devid" / FourCC, "unk" / HexDump(GreedyBytes),
"blank2" / Const(0x0, Int32ul),
"unk1" / Const(8, Int32ul),
"blank3" / Const(0x0, Int32ul),
"unk2" / Hex(Const(0x01_0d_1c_20, Int32ul)),
"blank4" / Const(0x0, Int32ul),
"remainder" / HexDump(GreedyBytes),
) )
PDMConfig = Struct( PDMConfig = Struct(
"unk1" / Int32ul, "bytesPerSample" / Int32ul,
"clockSource" / FourCC, "clockSource" / FourCC,
"pdmFrequency" / Int32ul, "pdmFrequency" / Int32ul,
"unk3_clk" / Int32ul, "pdmcFrequency" / Int32ul,
"unk4_clk" / Int32ul, "slowClockSpeed" / Int32ul,
"unk5_clk" / Int32ul, "fastClockSpeed" / Int32ul,
"channelPolaritySelect" / Hex(Int32ul), "channelPolaritySelect" / Int32ul,
"unk7" / Hex(Int32ul), "channelPhaseSelect" / Int32ul,
"unk8" / Hex(Int32ul), "unk8" / Hex(Int32ul),
"unk9" / Hex(Int16ul), "unk9" / Hex(Int16ul),
"ratios" / Struct( "ratios" / Struct(
"r1" / Int8ul, "r1" / Int8ul,
"r2" / Int8ul, "r2" / Int8ul,
"r3" / Int8ul, "r3" / Int8ul,
"pad" / Default(Int8ul, 0), "pad" / Const(0, Int8ul),
), ),
"filterLengths" / Hex(Int32ul), "filterLengths" / Hex(Int32ul),
"coeff_bulk" / Int32ul, "coeff_bulk" / Int32ul,
@ -240,7 +236,7 @@ DecimatorConfig = Struct(
PowerSetting = Struct( PowerSetting = Struct(
"devid" / FourCC, "devid" / FourCC,
"cookie" / Int32ul, "cookie" / Int32ul,
"pad" / Padding(4), "unk" / Default(Hex(Int32ul), 0),
"blank" / ZPadding(8), "blank" / ZPadding(8),
"target_pstate" / FourCC, "target_pstate" / FourCC,
"unk2" / Int32ul, "unk2" / Int32ul,