soundwire: sdca: parse function type and controls
SDCA devices are based on independent 'Functions', which are exposed in platform firmware using the DisCo 2.1 specification.
This patch adds a mechanism to parse the functions and extract basic information (adr and function type).
Example log on a MeteorLake device (which already shows problems with ACPI information...)
[ 13.069728] soundwire sdw:0:0:025d:0713:01: found invalid SDCA function type 4 ADR 1, skipped [ 13.069743] soundwire sdw:0:0:025d:0713:01: found SDCA function type 6 ADR 3 [ 13.070166] soundwire sdw:0:1:025d:1316:01: found SDCA function type 1 ADR 4 [ 13.070750] soundwire sdw:0:2:025d:1316:01: found SDCA function type 1 ADR 4
v2: all the SDCA information is moved to a sound/soc/sdca library, and the information is parsed before the driver probe (if present).
Thanks @plbossart Looks like a good start for SDCA driver.
@shumingfan would you happen to know what this Function 4 might be. I wonder if the function topology uses an older version of the SDCA/DisCo spec?
logs with the last version
[ 51.528012] rt1316-sdca sdw:0:1:025d:1316:01: found SDCA function AF04 type 1 ADR 4
[ 51.528023] rt1316-sdca sdw:0:1:025d:1316:01: AF04: SDCA function has topology-features mask 0xb00
[ 51.528033] acpi device:28: find_sdca_entities: AF04: found entity 0x1 type 0x2 label IT 21
[ 51.528038] acpi device:28: find_sdca_entities: AF04: found entity 0x2 type 0x21 label UDMPU 21
[ 51.528043] acpi device:28: find_sdca_entities: AF04: found entity 0x3 type 0x7 label FU 21
[ 51.528047] acpi device:28: find_sdca_entities: AF04: found entity 0x33 type 0x11 label PDE 22
[ 51.528052] acpi device:28: find_sdca_entities: AF04: found entity 0x22 type 0xa label XU 22
[ 51.528056] acpi device:28: find_sdca_entities: AF04: found entity 0x29 type 0x24 label SAPU 29
[ 51.528061] acpi device:28: find_sdca_entities: AF04: found entity 0x54 type 0x21 label UDMPU 23
[ 51.528065] acpi device:28: find_sdca_entities: AF04: found entity 0x55 type 0x7 label FU 23
[ 51.528070] acpi device:28: find_sdca_entities: AF04: found entity 0x31 type 0x11 label PDE 23
[ 51.528074] acpi device:28: find_sdca_entities: AF04: found entity 0x56 type 0x3 label OT 23
[ 51.528078] acpi device:28: find_sdca_entities: AF04: found entity 0x51 type 0x2 label IT 29
[ 51.528082] acpi device:28: find_sdca_entities: AF04: found entity 0x34 type 0x11 label PDE 24
[ 51.528086] acpi device:28: find_sdca_entities: AF04: found entity 0x24 type 0xa label XU 24
[ 51.528091] acpi device:28: find_sdca_entities: AF04: found entity 0x52 type 0x3 label OT 24
[ 51.528095] acpi device:28: find_sdca_entities: AF04: found entity 0x53 type 0xb label CS 24
[ 51.528100] acpi device:28: find_sdca_entities: AF04: found entity 0x21 type 0xb label CS 21
[ 51.528104] acpi device:28: find_sdca_entities: AF04: found entity 0x40 type 0x30 label TG 23
[ 51.528638] rt1316-sdca sdw:0:2:025d:1316:01: found SDCA function AF04 type 1 ADR 4
[ 51.528643] rt1316-sdca sdw:0:2:025d:1316:01: AF04: SDCA function has topology-features mask 0xb00
[ 51.528651] acpi device:2a: find_sdca_entities: AF04: found entity 0x1 type 0x2 label IT 21
[ 51.528655] acpi device:2a: find_sdca_entities: AF04: found entity 0x2 type 0x21 label UDMPU 21
[ 51.528659] acpi device:2a: find_sdca_entities: AF04: found entity 0x3 type 0x7 label FU 21
[ 51.528665] acpi device:2a: find_sdca_entities: AF04: found entity 0x33 type 0x11 label PDE 22
[ 51.528668] acpi device:2a: find_sdca_entities: AF04: found entity 0x22 type 0xa label XU 22
[ 51.528673] acpi device:2a: find_sdca_entities: AF04: found entity 0x29 type 0x24 label SAPU 29
[ 51.528677] acpi device:2a: find_sdca_entities: AF04: found entity 0x54 type 0x21 label UDMPU 23
[ 51.528681] acpi device:2a: find_sdca_entities: AF04: found entity 0x55 type 0x7 label FU 23
[ 51.528685] acpi device:2a: find_sdca_entities: AF04: found entity 0x31 type 0x11 label PDE 23
[ 51.528689] acpi device:2a: find_sdca_entities: AF04: found entity 0x56 type 0x3 label OT 23
[ 51.528693] acpi device:2a: find_sdca_entities: AF04: found entity 0x51 type 0x2 label IT 29
[ 51.528698] acpi device:2a: find_sdca_entities: AF04: found entity 0x34 type 0x11 label PDE 24
[ 51.528712] acpi device:2a: find_sdca_entities: AF04: found entity 0x24 type 0xa label XU 24
[ 51.528718] acpi device:2a: find_sdca_entities: AF04: found entity 0x52 type 0x3 label OT 24
[ 51.528722] acpi device:2a: find_sdca_entities: AF04: found entity 0x53 type 0xb label CS 24
[ 51.528726] acpi device:2a: find_sdca_entities: AF04: found entity 0x21 type 0xb label CS 21
[ 51.528730] acpi device:2a: find_sdca_entities: AF04: found entity 0x40 type 0x30 label TG 23
[ 51.529357] rt712-sdca sdw:0:0:025d:0713:01: found invalid SDCA function AF01 type 4 ADR 1, skipped
[ 51.529374] rt712-sdca sdw:0:0:025d:0713:01: found SDCA function AF03 type 6 ADR 3
[ 51.529383] acpi device:26: find_sdca_entities: AF03: found entity 0x1 type 0x31 label (null)
Now we need to figure out something useful with all this.
@shumingfan would you happen to know what this Function 4 might be. I wonder if the function topology uses an older version of the SDCA/DisCo spec?
I will try to ask the hardware team about this. If there are any results, I will give feedback.
Thanks @plbossart for pushing the SDCA driver patches. We will also try to validate sdca tables parsing on AMD platform.
I will try to ask the hardware team about this. If there are any results, I will give feedback.
The hardware engineer thinks reporting the function type 4 is a mistake. The rt713 only needs the function type 6 actually. The rt1713 should report the mic function.
The hardware engineer thinks reporting the function type 4 is a mistake. The rt713 only needs the function type 6 actually. The rt1713 should report the mic function.
Right, that's what I thought @shumingfan. In this device there's no RT1713 (local mic disabled), so I can't check further.
closing for now, will re-add the functionality when basic parsing is implemented with PR #4995