2023-03-09 14:03:56

by Lucas Tanure

[permalink] [raw]
Subject: [PATCH v5] ASoC: cs35l41: Steam Deck Shared boost properties quirk

Add support for Steam Deck bios old properties. If a Steam deck didn't
upgrade the BIOS, the driver should be able to handle the previous
properties for shared boost types.

Signed-off-by: Lucas Tanure <[email protected]>
Acked-by: Charles Keepax <[email protected]>
---
Changes since V4:
- Add documentation about this quirk

Changes since V3:
- Fixed missing space in if statement
- Fix the build issue, as dependency patches are already merged

Changes since V2:
- sent the wrong patch with missing fixed lines
Changes since V1:
- else in same line as {
---
sound/soc/codecs/cs35l41.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c
index 1624510d09c0..9ec01a5f09ca 100644
--- a/sound/soc/codecs/cs35l41.c
+++ b/sound/soc/codecs/cs35l41.c
@@ -1022,9 +1022,21 @@ static int cs35l41_handle_pdata(struct device *dev, struct cs35l41_hw_cfg *hw_cf
unsigned int val;
int ret;

- ret = device_property_read_u32(dev, "cirrus,boost-type", &val);
- if (ret >= 0)
- hw_cfg->bst_type = val;
+ /* Some ACPI systems received the Shared Boost feature before the upstream driver,
+ * leaving those systems with deprecated _DSD properties.
+ * To correctly configure those systems add shared-boost-active and shared-boost-passive
+ * properties mapped to the correct value in boost-type.
+ * These two are not DT properties and should not be used in new systems designs.
+ */
+ if (device_property_read_bool(dev, "cirrus,shared-boost-active")) {
+ hw_cfg->bst_type = CS35L41_SHD_BOOST_ACTV;
+ } else if (device_property_read_bool(dev, "cirrus,shared-boost-passive")) {
+ hw_cfg->bst_type = CS35L41_SHD_BOOST_PASS;
+ } else {
+ ret = device_property_read_u32(dev, "cirrus,boost-type", &val);
+ if (ret >= 0)
+ hw_cfg->bst_type = val;
+ }

ret = device_property_read_u32(dev, "cirrus,boost-peak-milliamp", &val);
if (ret >= 0)
--
2.39.2



2023-03-09 16:29:06

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v5] ASoC: cs35l41: Steam Deck Shared boost properties quirk

On 09/03/2023 15:00, Lucas Tanure wrote:
> Add support for Steam Deck bios old properties. If a Steam deck didn't
> upgrade the BIOS, the driver should be able to handle the previous
> properties for shared boost types.
>
> Signed-off-by: Lucas Tanure <[email protected]>
> Acked-by: Charles Keepax <[email protected]>
> ---
> Changes since V4:
> - Add documentation about this quirk
>

Good for me, thanks.

Best regards,
Krzysztof


2023-03-09 16:30:18

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v5] ASoC: cs35l41: Steam Deck Shared boost properties quirk

On Thu, 09 Mar 2023 14:00:51 +0000, Lucas Tanure wrote:
> Add support for Steam Deck bios old properties. If a Steam deck didn't
> upgrade the BIOS, the driver should be able to handle the previous
> properties for shared boost types.
>
>

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: cs35l41: Steam Deck Shared boost properties quirk
commit: 8987986b07f5dded3f81b159f5bb146f2d1a21ed

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark