From: Stefan Binding <sbinding@opensource.cirrus.com> To: "Rafael J . Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com> Cc: <linux-acpi@vger.kernel.org>, <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>, "Stefan Binding" <sbinding@opensource.cirrus.com> Subject: [PATCH v6 0/2] Read _SUB from ACPI to be able to identify firmware Date: Thu, 7 Jul 2022 16:10:35 +0100 [thread overview] Message-ID: <20220707151037.3901050-1-sbinding@opensource.cirrus.com> (raw) CS35L41 has a DSP which is able to run firmware, as well as a tuning file. Different systems may want to use different firmwares and tuning files, and some firmwares/tunings may not be compatible with other systems. To allow a system to select the correct fimware/tuning, we can read an _SUB from the ACPI. This _SUB can then be used to uniquely identify the system in the firmware/tuning file name. Add a helper function which reads the _SUB, so this can be used by other parts in the future. Add support inside the CS35L41 ASoC driver to read this _SUB, and save it appropriately. Changes since v5: - Clean up return codes - Refactor length calculation - Allow fallback to existing behaviour when bad ACPI is detected Changes since v4: - Rename function Changes since v3: - Fix 32 bit format string warning Changes since v2: - Fix error in function prototype Changes since v1: - Add length validation for SSID String - Rename API - Allocate memory inside API - Use ACPI_HANDLE macro instead of ACPI_COMPANION - Improve error handling Stefan Binding (2): ACPI: utils: Add api to read _SUB from ACPI ASoC: cs35l41: Read System Name from ACPI _SUB to identify firmware drivers/acpi/utils.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 6 ++++++ sound/soc/codecs/cs35l41.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Binding <sbinding@opensource.cirrus.com> To: "Rafael J . Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com> Cc: linux-acpi@vger.kernel.org, alsa-devel@alsa-project.org, Stefan Binding <sbinding@opensource.cirrus.com>, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH v6 0/2] Read _SUB from ACPI to be able to identify firmware Date: Thu, 7 Jul 2022 16:10:35 +0100 [thread overview] Message-ID: <20220707151037.3901050-1-sbinding@opensource.cirrus.com> (raw) CS35L41 has a DSP which is able to run firmware, as well as a tuning file. Different systems may want to use different firmwares and tuning files, and some firmwares/tunings may not be compatible with other systems. To allow a system to select the correct fimware/tuning, we can read an _SUB from the ACPI. This _SUB can then be used to uniquely identify the system in the firmware/tuning file name. Add a helper function which reads the _SUB, so this can be used by other parts in the future. Add support inside the CS35L41 ASoC driver to read this _SUB, and save it appropriately. Changes since v5: - Clean up return codes - Refactor length calculation - Allow fallback to existing behaviour when bad ACPI is detected Changes since v4: - Rename function Changes since v3: - Fix 32 bit format string warning Changes since v2: - Fix error in function prototype Changes since v1: - Add length validation for SSID String - Rename API - Allocate memory inside API - Use ACPI_HANDLE macro instead of ACPI_COMPANION - Improve error handling Stefan Binding (2): ACPI: utils: Add api to read _SUB from ACPI ASoC: cs35l41: Read System Name from ACPI _SUB to identify firmware drivers/acpi/utils.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/acpi.h | 6 ++++++ sound/soc/codecs/cs35l41.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) -- 2.25.1
next reply other threads:[~2022-07-07 15:11 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-07 15:10 Stefan Binding [this message] 2022-07-07 15:10 ` [PATCH v6 0/2] Read _SUB from ACPI to be able to identify firmware Stefan Binding 2022-07-07 15:10 ` [PATCH v6 1/2] ACPI: utils: Add api to read _SUB from ACPI Stefan Binding 2022-07-07 15:10 ` Stefan Binding 2022-07-14 18:24 ` Rafael J. Wysocki 2022-07-14 18:24 ` Rafael J. Wysocki 2022-07-07 15:10 ` [PATCH v6 2/2] ASoC: cs35l41: Read System Name from ACPI _SUB to identify firmware Stefan Binding 2022-07-07 15:10 ` Stefan Binding 2022-07-15 17:22 ` [PATCH v6 0/2] Read _SUB from ACPI to be able " Mark Brown 2022-07-15 17:22 ` Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220707151037.3901050-1-sbinding@opensource.cirrus.com \ --to=sbinding@opensource.cirrus.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=lenb@kernel.org \ --cc=lgirdwood@gmail.com \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=patches@opensource.cirrus.com \ --cc=rafael@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.