ASoC: sdw_utils: Add CS42L45 and CS35L57 codec table entries
Subsystems (3)
PATCH 1/2 ASoC: sdw_utils: Add CS42L45 and CS35L57 codec table entries
Add codec info table entries for two Cirrus Logic SoundWire devices found on the Dell XPS 14 DA14260 (Panther Lake):
CS35L57 (part ID 0x3557): A speaker amplifier that uses the same cs35l56 Linux driver as the CS35L56 and CS35L63. Add a matching entry identical in structure to the existing 0x3556 and 0x3563 entries so sof_sdw can look it up by part ID.
CS42L45 (part ID 0x4245): An SDCA headset codec closely related to the CS42L43. The CS42L45 exposes three SDCA endpoints -- UAJ (jack playback), SmartMic (DMIC capture), and UAJ (jack capture) -- but does NOT have an internal speaker amp function; speaker output is handled by the external CS35L57 amps on separate SoundWire links. Add a three-DAI entry using the existing cs42l43 codec driver and DAI names (dp5 for jack out, dp1 for DMIC, dp2 for jack in).
Tested on Dell XPS 14 DA14260 (Panther Lake, kernel 6.18.20).
--- sound/soc/sdw_utils/soc_sdw_utils.c | 75 ++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+)
sound/soc/sdw_utils/soc_sdw_utils.c +63 -0
@@ -559,6 +559,32 @@ .dai_num = 2, }, { + .part_id = 0x3557, + .dais = { + { + .direction = {true, false}, + .dai_name = "cs35l56-sdw1", + .component_name = "cs35l56", + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, + .init = asoc_sdw_cs_amp_init, + .rtd_init = asoc_sdw_cs_spk_rtd_init, + .controls = generic_spk_controls, + .num_controls = ARRAY_SIZE(generic_spk_controls), + .widgets = generic_spk_widgets, + .num_widgets = ARRAY_SIZE(generic_spk_widgets), + }, + { + .direction = {false, true}, + .dai_name = "cs35l56-sdw1c", + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, + .rtd_init = asoc_sdw_cs_spk_feedback_rtd_init, + }, + }, + .dai_num = 2, + }, + { .part_id =0x3563 , .dais = { {
@@ -652,6 +678,43 @@ .dai_num = 4, }, { + .part_id = 0x4245, + .codec_name = "cs42l43-codec", + .count_sidecar = asoc_sdw_bridge_cs35l56_count_sidecar, + .add_sidecar = asoc_sdw_bridge_cs35l56_add_sidecar, + .dais = { + { + .direction = {true, false}, + .dai_name = "cs42l43-dp5", + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, + .rtd_init = asoc_sdw_cs42l43_hs_rtd_init, + .controls = generic_jack_controls, + .num_controls = ARRAY_SIZE(generic_jack_controls), + .widgets = generic_jack_widgets, + .num_widgets = ARRAY_SIZE(generic_jack_widgets), + }, + { + .direction = {false, true}, + .dai_name = "cs42l43-dp1", + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, + .rtd_init = asoc_sdw_cs42l43_dmic_rtd_init, + .widgets = generic_dmic_widgets, + .num_widgets = ARRAY_SIZE(generic_dmic_widgets), + .quirk = SOC_SDW_CODEC_MIC, + .quirk_exclude = true, + }, + { + .direction = {false, true}, + .dai_name = "cs42l43-dp2", + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, + }, + }, + .dai_num = 3, + }, + { .part_id = 0xaaaa, /* generic codec mockup */ .version_id = 0, .dais = {
--
2.49.0
PATCH 2/2 ASoC: intel: ptl: Add machine driver entry for Dell XPS 14 DA14260
The Dell XPS 14 DA14260 (Panther Lake) uses the following SoundWire audio topology:
Link 0: CS42L45 (mfr 0x01FA, part 0x4245) -- SDCA headset codec
ADR 0x00003001FA424501
Endpoints: UAJ (jack playback), SmartMic (DMIC), UAJ (jack capture)
Link 2: Two CS35L57 speaker amps (mfr 0x01FA, part 0x3557)
ADR 0x00023201FA355701 (left/AMP1)
ADR 0x00023301FA355701 (AMP2)Link 3: Two CS35L57 speaker amps
ADR 0x00033001FA355701 (right/AMP3)
ADR 0x00033101FA355701 (AMP4)ADR values were obtained from the platform ACPI DSDT.
Add the necessary ADR device arrays, endpoint descriptors, link array, and machine table entry. The CS42L45 uses three non-aggregated endpoints (jack playback/capture and DMIC) matching the SDCA functions advertised by the hardware. The four CS35L57 amps use the existing aggregated speaker endpoint descriptors (spk_l, spk_2, spk_r, spk_3).
The topology file name follows the established PTL naming convention.
Note: a PTL-specific topology file does not yet exist; users can symlink sof-lnl-cs42l43-l0-cs35l56-l23.tplg as a workaround until a dedicated PTL topology is submitted to linux-firmware.
Tested on Dell XPS 14 DA14260 (Panther Lake, kernel 6.18.20).
--- sound/soc/intel/common/soc-acpi-intel-ptl-match.c | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+)
sound/soc/intel/common/soc-acpi-intel-ptl-match.c +85 -0
@@ -227,6 +227,66 @@ }, }; +static const struct snd_soc_acpi_endpoint cs42l43_endpoints[] = { + {/* Jack Playback Endpoint */ + .num =0 , + .aggregated =0 , + .group_position =0 , + .group_id =0 , + }, + {/* DMIC Capture Endpoint */ + .num =1 , + .aggregated =0 , + .group_position =0 , + .group_id =0 , + }, + {/* Jack Capture Endpoint */ + .num =2 , + .aggregated =0 , + .group_position =0 , + .group_id =0 , + }, +}; + +static const struct snd_soc_acpi_adr_device cs42l43_0_adr[] = { + { + .adr =0x00003001FA424501ull , + .num_endpoints =ARRAY_SIZE (cs42l43_endpoints), + .endpoints = cs42l43_endpoints, + .name_prefix ="cs42l43" + } +}; + +static const struct snd_soc_acpi_adr_device cs35l56_2_lr_adr[] = { + { + .adr =0x00023201FA355701ull , + .num_endpoints =1 , + .endpoints = &spk_l_endpoint, + .name_prefix ="AMP1" + }, + { + .adr =0x00023301FA355701ull , + .num_endpoints =1 , + .endpoints = &spk_2_endpoint, + .name_prefix ="AMP2" + } +}; + +static const struct snd_soc_acpi_adr_device cs35l56_3_lr_adr[] = { + { + .adr =0x00033001FA355701ull , + .num_endpoints =1 , + .endpoints = &spk_r_endpoint, + .name_prefix ="AMP3" + }, + { + .adr =0x00033101FA355701ull , + .num_endpoints =1 , + .endpoints = &spk_3_endpoint, + .name_prefix ="AMP4" + } +}; +static const struct snd_soc_acpi_adr_device cs42l43_2_adr[] = { { .adr =0x00023001fa424301ull ,
@@ -431,6 +491,25 @@ } }; +static const struct snd_soc_acpi_link_adr ptl_cs42l43_l0_cs35l56_l23[] = { + { + .mask =BIT (0 ), + .num_adr =ARRAY_SIZE (cs42l43_0_adr), + .adr_d = cs42l43_0_adr, + }, + { + .mask =BIT (2 ), + .num_adr =ARRAY_SIZE (cs35l56_2_lr_adr), + .adr_d = cs35l56_2_lr_adr, + }, + { + .mask =BIT (3 ), + .num_adr =ARRAY_SIZE (cs35l56_3_lr_adr), + .adr_d = cs35l56_3_lr_adr, + }, + {} +}; +static const struct snd_soc_acpi_link_adr ptl_cs42l43_l2_cs35l56x6_l13[] = { { .mask =BIT (2 ),
@@ -619,6 +698,12 @@ .get_function_tplg_files = sof_sdw_get_tplg_files, }, { + .link_mask = BIT(0) | BIT(2) | BIT(3), + .links = ptl_cs42l43_l0_cs35l56_l23, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-ptl-cs42l43-l0-cs35l56-l23.tplg", + }, + { .link_mask = BIT(1) | BIT(2) | BIT(3), .links = ptl_cs42l43_l2_cs35l56x6_l13, .drv_name = "sof_sdw",
--
2.49.0
Re: [PATCH 2/2] ASoC: intel: ptl: Add machine driver entry for Dell XPS 14 DA14260
Quoted 24 lines · John Meyer
The Dell XPS 14 DA14260 (Panther Lake) uses the following SoundWire audio topology:
Link 0: CS42L45 (mfr 0x01FA, part 0x4245) -- SDCA headset codec ADR 0x00003001FA424501 Endpoints: UAJ (jack playback), SmartMic (DMIC), UAJ (jack capture) Link 2: Two CS35L57 speaker amps (mfr 0x01FA, part 0x3557) ADR 0x00023201FA355701 (left/AMP1) ADR 0x00023301FA355701 (AMP2) Link 3: Two CS35L57 speaker amps ADR 0x00033001FA355701 (right/AMP3) ADR 0x00033101FA355701 (AMP4)ADR values were obtained from the platform ACPI DSDT.
Add the necessary ADR device arrays, endpoint descriptors, link array, and machine table entry. The CS42L45 uses three non-aggregated endpoints (jack playback/capture and DMIC) matching the SDCA functions advertised by the hardware. The four CS35L57 amps use the existing aggregated speaker endpoint descriptors (
spk_l,spk_2,spk_r,spk_3).
Quoted 5 lines
The topology file name follows the established PTL naming convention.
Note: a PTL-specific topology file does not yet exist; users can symlink sof-lnl-cs42l43-l0-cs35l56-l23.tplg as a workaround until a dedicated PTL topology is submitted to linux-firmware.
No. This is completely the wrong thing to do, and isn't even necessary because these parts are already supported and working.
PTL doesn't need match entries or hardcoded tplgs.
You seem to be sending random patches that
(a) are not necessary, (b) are wrong, (c) will break things
Quoted 1 line
Note: a PTL-specific topology file does not yet exist; users can
The PTL tplgs do exist. These are SDCA parts that use the function topologies.
Quoted 8 lines · John Meyer
Add codec info table entries for two Cirrus Logic SoundWire devices found on the Dell XPS 14 DA14260 (Panther Lake):
CS35L57 (part ID
0x3557): A speaker amplifier that uses the same cs35l56 Linux driver as the CS35L56 and CS35L63. Add a matching entry identical in structure to the existing0x3556and0x3563entries sosof_sdwcan look it up by part ID.
These entries already exist. They were added in 6.19. If you want them backported to an older kernel that your distro uses you should create a ticket on your distro's bugtracker.
You seem to be sending random patches that
(a) are not necessary, (b) are wrong, (c) will break things