Alternative kernel package based on Arch Linux 6.19.9 with 12 upstream SDCA backport patches that enable audio on Intel Panther Lake systems (Dell XPS 2026 and similar hardware with CS35L57 SoundWire amps). The stock 6.19.9 kernel lacks the SDCA class/function topology driver code needed for PTL audio. These patches backport the SDCA support from mainline v7.0 to the stable 6.19.x series. Tested on Dell XPS 16 (Panther Lake): all 4 CS35L57 amps probe with calibration, SDCA jack detection works, sof-soundwire sound card registers successfully. CONFIG_RUST is disabled to avoid build failures with newer Rust toolchain versions. Rust is not required for audio functionality.
66 lines
2.5 KiB
Diff
66 lines
2.5 KiB
Diff
From 657e4d51de49864710a8b804c50e94e0e14ac63b Mon Sep 17 00:00:00 2001
|
|
From: Charles Keepax <ckeepax@opensource.cirrus.com>
|
|
Date: Thu, 15 Jan 2026 11:46:07 +0000
|
|
Subject: [PATCH 08/17] ASoC: SDCA: Tidy up some memory allocations
|
|
|
|
It is slightly better to deference the type being allocate for a sizeof
|
|
rather than manually using the type. Saves effort if types change in the
|
|
future. This results in no functional changes, just tidies up the style
|
|
of the code a little.
|
|
|
|
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
|
Link: https://patch.msgid.link/20260115114607.271990-1-ckeepax@opensource.cirrus.com
|
|
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
---
|
|
sound/soc/sdca/sdca_fdl.c | 2 +-
|
|
sound/soc/sdca/sdca_functions.c | 6 +++---
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/sound/soc/sdca/sdca_fdl.c b/sound/soc/sdca/sdca_fdl.c
|
|
index 3180ebd07c40..8bee9f23c473 100644
|
|
--- a/sound/soc/sdca/sdca_fdl.c
|
|
+++ b/sound/soc/sdca/sdca_fdl.c
|
|
@@ -487,7 +487,7 @@ int sdca_fdl_alloc_state(struct sdca_interrupt *interrupt)
|
|
struct device *dev = interrupt->dev;
|
|
struct fdl_state *fdl_state;
|
|
|
|
- fdl_state = devm_kzalloc(dev, sizeof(struct fdl_state), GFP_KERNEL);
|
|
+ fdl_state = devm_kzalloc(dev, sizeof(*fdl_state), GFP_KERNEL);
|
|
if (!fdl_state)
|
|
return -ENOMEM;
|
|
|
|
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
|
|
index b26884fc2a98..f97dde912d59 100644
|
|
--- a/sound/soc/sdca/sdca_functions.c
|
|
+++ b/sound/soc/sdca/sdca_functions.c
|
|
@@ -948,7 +948,7 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
|
|
}
|
|
|
|
control->values = devm_kcalloc(dev, hweight64(control->cn_list),
|
|
- sizeof(int), GFP_KERNEL);
|
|
+ sizeof(*control->values), GFP_KERNEL);
|
|
if (!control->values)
|
|
return -ENOMEM;
|
|
|
|
@@ -2044,7 +2044,7 @@ static int find_sdca_filesets(struct device *dev, struct sdw_slave *sdw,
|
|
fwnode_property_read_u32_array(function_node, "mipi-sdca-file-set-id-list",
|
|
filesets_list, num_sets);
|
|
|
|
- sets = devm_kcalloc(dev, num_sets, sizeof(struct sdca_fdl_set), GFP_KERNEL);
|
|
+ sets = devm_kcalloc(dev, num_sets, sizeof(*sets), GFP_KERNEL);
|
|
if (!sets)
|
|
return -ENOMEM;
|
|
|
|
@@ -2070,7 +2070,7 @@ static int find_sdca_filesets(struct device *dev, struct sdw_slave *sdw,
|
|
dev_dbg(dev, "fileset: %#x\n", filesets_list[i]);
|
|
|
|
files = devm_kcalloc(dev, num_entries / mult_fileset,
|
|
- sizeof(struct sdca_fdl_file), GFP_KERNEL);
|
|
+ sizeof(*files), GFP_KERNEL);
|
|
if (!files)
|
|
return -ENOMEM;
|
|
|
|
--
|
|
2.43.0
|
|
|