linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ACPICA: Add SoundWire File Table (SWFT) signature
@ 2025-07-16 10:03 Maciej Strozek
  2025-07-16 10:18 ` Charles Keepax
  2025-07-16 12:29 ` Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Maciej Strozek @ 2025-07-16 10:03 UTC (permalink / raw)
  To: Rafael J . Wysocki, Len Brown, Robert Moore
  Cc: linux-acpi, linux-kernel, acpica-devel, patches, Maciej Strozek

The File Download (FDL) process of SoundWire Class Audio (SDCA) driver,
which provides code/data which may be required by an SDCA device,
utilizes SWFT to obtain that code/data. There is a single SWFT for the
system, and SWFT can contain multiple files (information about the file
as well as its binary contents). The SWFT has a standard ACPI Descriptor
Table Header, followed by SoundWire File definitions as described in
Discovery and Configuration (DisCo) Specification for SoundWire®

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
---
v2: Removed Change-Id line
---
 drivers/acpi/tables.c |  2 +-
 include/acpi/actbl2.h | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 9e1b01c35070..beaef9a8fc02 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -408,7 +408,7 @@ static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = {
 	ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
 	ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
 	ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI,
-	ACPI_SIG_NBFT };
+	ACPI_SIG_NBFT, ACPI_SIG_SWFT};

 #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 2e917a8f8bca..267ffabf3b7f 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -54,6 +54,7 @@
 #define ACPI_SIG_SDEI           "SDEI"	/* Software Delegated Exception Interface Table */
 #define ACPI_SIG_SDEV           "SDEV"	/* Secure Devices table */
 #define ACPI_SIG_SVKL           "SVKL"	/* Storage Volume Key Location Table */
+#define ACPI_SIG_SWFT           "SWFT"	/* SoundWire File Table */
 #define ACPI_SIG_TDEL           "TDEL"	/* TD Event Log Table */

 /*
@@ -3163,6 +3164,26 @@ enum acpi_svkl_format {
 	ACPI_SVKL_FORMAT_RESERVED = 1	/* 1 and greater are reserved */
 };

+/*******************************************************************************
+ * SWFT - SoundWire File Table
+ *
+ * Conforms to "Discovery and Configuration (DisCo) Specification for SoundWire"
+ * Version 2.1, 2 October 2023
+ *
+ ******************************************************************************/
+struct acpi_sw_file {
+	u16 vendor_id;
+	u32 file_id;
+	u16 file_version;
+	u32 file_length;
+	u8 data[];
+};
+
+struct acpi_table_swft {
+	struct acpi_table_header header;
+	struct acpi_sw_file files[];
+};
+
 /*******************************************************************************
  *
  * TDEL - TD-Event Log
--
2.39.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ACPICA: Add SoundWire File Table (SWFT) signature
  2025-07-16 10:03 [PATCH v2] ACPICA: Add SoundWire File Table (SWFT) signature Maciej Strozek
@ 2025-07-16 10:18 ` Charles Keepax
  2025-07-16 12:29 ` Rafael J. Wysocki
  1 sibling, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2025-07-16 10:18 UTC (permalink / raw)
  To: Maciej Strozek
  Cc: Rafael J . Wysocki, Len Brown, Robert Moore, linux-acpi,
	linux-kernel, acpica-devel, patches

On Wed, Jul 16, 2025 at 11:03:37AM +0100, Maciej Strozek wrote:
> The File Download (FDL) process of SoundWire Class Audio (SDCA) driver,
> which provides code/data which may be required by an SDCA device,
> utilizes SWFT to obtain that code/data. There is a single SWFT for the
> system, and SWFT can contain multiple files (information about the file
> as well as its binary contents). The SWFT has a standard ACPI Descriptor
> Table Header, followed by SoundWire File definitions as described in
> Discovery and Configuration (DisCo) Specification for SoundWire®
> 
> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ACPICA: Add SoundWire File Table (SWFT) signature
  2025-07-16 10:03 [PATCH v2] ACPICA: Add SoundWire File Table (SWFT) signature Maciej Strozek
  2025-07-16 10:18 ` Charles Keepax
@ 2025-07-16 12:29 ` Rafael J. Wysocki
  2025-07-16 12:53   ` Maciej Strozek
  1 sibling, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2025-07-16 12:29 UTC (permalink / raw)
  To: Maciej Strozek
  Cc: Rafael J . Wysocki, Len Brown, Robert Moore, linux-acpi,
	linux-kernel, acpica-devel, patches

On Wed, Jul 16, 2025 at 12:04 PM Maciej Strozek
<mstrozek@opensource.cirrus.com> wrote:
>
> The File Download (FDL) process of SoundWire Class Audio (SDCA) driver,
> which provides code/data which may be required by an SDCA device,
> utilizes SWFT to obtain that code/data. There is a single SWFT for the
> system, and SWFT can contain multiple files (information about the file
> as well as its binary contents). The SWFT has a standard ACPI Descriptor
> Table Header, followed by SoundWire File definitions as described in
> Discovery and Configuration (DisCo) Specification for SoundWire®
>
> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>

The canonical way to change ACPICA is to submit a PR to the upstream
ACPICA project on GitHub, wait until it is merged and then
(optionally) submit a Linux kernel patch based on it and pointing back
to the original upstream ACPICA commit.

Thanks!

> ---
> v2: Removed Change-Id line
> ---
>  drivers/acpi/tables.c |  2 +-
>  include/acpi/actbl2.h | 21 +++++++++++++++++++++
>  2 files changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
> index 9e1b01c35070..beaef9a8fc02 100644
> --- a/drivers/acpi/tables.c
> +++ b/drivers/acpi/tables.c
> @@ -408,7 +408,7 @@ static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = {
>         ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
>         ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
>         ACPI_SIG_NHLT, ACPI_SIG_AEST, ACPI_SIG_CEDT, ACPI_SIG_AGDI,
> -       ACPI_SIG_NBFT };
> +       ACPI_SIG_NBFT, ACPI_SIG_SWFT};
>
>  #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
>
> diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
> index 2e917a8f8bca..267ffabf3b7f 100644
> --- a/include/acpi/actbl2.h
> +++ b/include/acpi/actbl2.h
> @@ -54,6 +54,7 @@
>  #define ACPI_SIG_SDEI           "SDEI" /* Software Delegated Exception Interface Table */
>  #define ACPI_SIG_SDEV           "SDEV" /* Secure Devices table */
>  #define ACPI_SIG_SVKL           "SVKL" /* Storage Volume Key Location Table */
> +#define ACPI_SIG_SWFT           "SWFT" /* SoundWire File Table */
>  #define ACPI_SIG_TDEL           "TDEL" /* TD Event Log Table */
>
>  /*
> @@ -3163,6 +3164,26 @@ enum acpi_svkl_format {
>         ACPI_SVKL_FORMAT_RESERVED = 1   /* 1 and greater are reserved */
>  };
>
> +/*******************************************************************************
> + * SWFT - SoundWire File Table
> + *
> + * Conforms to "Discovery and Configuration (DisCo) Specification for SoundWire"
> + * Version 2.1, 2 October 2023
> + *
> + ******************************************************************************/
> +struct acpi_sw_file {
> +       u16 vendor_id;
> +       u32 file_id;
> +       u16 file_version;
> +       u32 file_length;
> +       u8 data[];
> +};
> +
> +struct acpi_table_swft {
> +       struct acpi_table_header header;
> +       struct acpi_sw_file files[];
> +};
> +
>  /*******************************************************************************
>   *
>   * TDEL - TD-Event Log
> --
> 2.39.5
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] ACPICA: Add SoundWire File Table (SWFT) signature
  2025-07-16 12:29 ` Rafael J. Wysocki
@ 2025-07-16 12:53   ` Maciej Strozek
  0 siblings, 0 replies; 4+ messages in thread
From: Maciej Strozek @ 2025-07-16 12:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, Robert Moore, linux-acpi, linux-kernel, acpica-devel,
	patches

W dniu śro, 16.07.2025 o godzinie 14∶29 +0200, użytkownik Rafael J.
Wysocki napisał:
> On Wed, Jul 16, 2025 at 12:04 PM Maciej Strozek
> <mstrozek@opensource.cirrus.com> wrote:
> > 
> > The File Download (FDL) process of SoundWire Class Audio (SDCA)
> > driver,
> > which provides code/data which may be required by an SDCA device,
> > utilizes SWFT to obtain that code/data. There is a single SWFT for
> > the
> > system, and SWFT can contain multiple files (information about the
> > file
> > as well as its binary contents). The SWFT has a standard ACPI
> > Descriptor
> > Table Header, followed by SoundWire File definitions as described
> > in
> > Discovery and Configuration (DisCo) Specification for SoundWire®
> > 
> > Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
> 
> The canonical way to change ACPICA is to submit a PR to the upstream
> ACPICA project on GitHub, wait until it is merged and then
> (optionally) submit a Linux kernel patch based on it and pointing
> back
> to the original upstream ACPICA commit.
> 
> Thanks!
I was unaware of this, going to submit the PR then, sorry for the
noise!
-- 
Regards,
Maciej

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-16 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 10:03 [PATCH v2] ACPICA: Add SoundWire File Table (SWFT) signature Maciej Strozek
2025-07-16 10:18 ` Charles Keepax
2025-07-16 12:29 ` Rafael J. Wysocki
2025-07-16 12:53   ` Maciej Strozek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).