Skip to content

ASoC: Intel: soc-acpi-intel-ptl-match: Add support for rt722_l0_rt132…#5501

Merged
bardliao merged 4 commits intothesofproject:topic/sof-devfrom
macchian:mac-dev-rt722-rt1320
Oct 2, 2025
Merged

ASoC: Intel: soc-acpi-intel-ptl-match: Add support for rt722_l0_rt132…#5501
bardliao merged 4 commits intothesofproject:topic/sof-devfrom
macchian:mac-dev-rt722-rt1320

Conversation

@macchian
Copy link

@macchian macchian commented Aug 1, 2025

…0_l23

This patch adds support for the RT722 codec on SoundWire link 0, and RT1320 left and right amplifiers on links 2 and 3, respectively.

The RT722 speaker function is excluded, as it is the aggregate configuration.

@macchian macchian force-pushed the mac-dev-rt722-rt1320 branch from 5dd7c36 to 5ccc838 Compare August 4, 2025 04:11
@macchian macchian marked this pull request as ready for review August 4, 2025 04:26
@bardliao
Copy link
Collaborator

@macchian My main concern is that no speaker endpoint is included in the rt722's .endpoints. It will not work if the rt722 speaker + 2 * rt1320 config is used in the future. In theory, we should add all endpoints to the .endpoints and the driver will skip the endpoint that is not present in the DisCo table. Or use a DMI quirk to disable the rt722's speaker. Note that you can't use the kernel with https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?id=4f8ef33dd44a3d1136d393 if the BIOS doesn't provide the proper DisCo table.

@macchian
Copy link
Author

@macchian My main concern is that no speaker endpoint is included in the rt722's .endpoints. It will not work if the rt722 speaker + 2 * rt1320 config is used in the future. In theory, we should add all endpoints to the .endpoints and the driver will skip the endpoint that is not present in the DisCo table. Or use a DMI quirk to disable the rt722's speaker. Note that you can't use the kernel with https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?id=4f8ef33dd44a3d1136d393 if the BIOS doesn't provide the proper DisCo table.

@bardliao , Understood. To be updated the PR.

@macchian macchian force-pushed the mac-dev-rt722-rt1320 branch from 5ccc838 to 139769f Compare August 29, 2025 11:04
#define SOF_BT_OFFLOAD_SSP(quirk) \
(((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(18)
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(21)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Not sure if it needs a fixup tag. Also, it will impact the devices that use module parameter to overwrite the quirk. @ujfalusi @kv2019i How should we handle it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kv2019i @ujfalusi , I added a PR to support bt_link_mask starting from ACE4+ based on @bardliao PR #5518, for your review.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is @bardliao ok as we have not upstreamed the BT offload quirk bits yet. All shipping devices (all chromebooks) have a hardcoded SSP port for BT, so I think this is ok change to make.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok update. So we have had the SOF_BT_OFFLOAD* defs in upstream for some time, and as all flags are exposed via the quirk module param, these have been available as module params as well.

So this is a bit iffy situation (created when common flags were moved to vendor neutral soc_sdw_utils.h).

There is a conflict, so we need to resolve this anyways. I think this PR is the right path. The BT_OFFLOAD bits have only been used in the DMI overrides and given this feature is not availble outside Chromebooks, there's no known usage of this by end-users (via module params). The SOC_SDW_CODEC_SPKR bit OTOH has seen a lot of use by actual users, so this we cannot change at this point.

So as a summary, I think the change in this PR is good. We do need to be very careful aligning soc_sdw_utils.h and this SOF specific file.

@macchian macchian force-pushed the mac-dev-rt722-rt1320 branch from 139769f to 4c38568 Compare September 3, 2025 08:35
The SSP BT mask bits overlapped with SOC_SDW_CODEC_SPKR,
SOC_SDW_SIDECAR_AMPS, and SOC_SDW_CODEC_MIC BIT[15–17] in
sdw_utils.h. Shift the SSP BT mask bits to a higher range to
eliminate the conflict.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
…0_l23

This patch adds support for the RT722 codec on SoundWire link 0,
and RT1320 left and right amplifiers on links 2 and 3, respectively.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
This SKU does not use the RT722 internal speaker. Add
SOC_SDW_CODEC_SPKR to prevent DAI being created via
codec_info_list.dais.quirk_exclude.

Other SKUs continue to check higher-priority sdca_functions
when the BIOS SDCA property is present.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
This patch adds support for selecting the SSP DAI for Bluetooth offload
based on the machine parameter `bt_link_mask` when provided and on ACE4
or newer Intel SoCs. This allows platform data to override which SSP
port is used for BT offload topologies, typically named:

    sof_tplg_filename"-%dch"-ssp%d-bt.tplg

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
@macchian macchian force-pushed the mac-dev-rt722-rt1320 branch from 4c38568 to 00acb4a Compare September 24, 2025 09:01
@macchian macchian requested a review from bardliao September 26, 2025 01:19
* and if the SoC hardware IP version is ACE4 or newer.
* This allows platform data to override which SSP is used
* for Bluetooth offload.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sof_sdw_quirk could also from module parameter. Not sure which one should have higher priority.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even when the sof_sdw_quirk override is used alone or together with bt_link_mask, it is the bt_link_mask that ultimately determines which topology with the BT prefix is loaded.

#define SOF_BT_OFFLOAD_SSP(quirk) \
(((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK)
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(18)
#define SOF_SSP_BT_OFFLOAD_PRESENT BIT(21)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is @bardliao ok as we have not upstreamed the BT offload quirk bits yet. All shipping devices (all chromebooks) have a hardcoded SSP port for BT, so I think this is ok change to make.

@bardliao bardliao merged commit af0aefc into thesofproject:topic/sof-dev Oct 2, 2025
10 of 16 checks passed
hubot pushed a commit to aosp-mirror/kernel_common that referenced this pull request Oct 31, 2025
The SSP BT mask bits overlapped with SOC_SDW_CODEC_SPKR,
SOC_SDW_SIDECAR_AMPS, and SOC_SDW_CODEC_MIC BIT[15–17] in
sdw_utils.h. Shift the SSP BT mask bits to a higher range to
eliminate the conflict.

Bug: 444302600
Test: run #cat /proc/asoc/cards, to check sound card is registered.
Link: thesofproject/linux#5501
(The PR has been merged into the Linux GitHub, it will
be picked up by kernel.org in the next timing window)
Upstream-Task: 455997202

Change-Id: Ic4f9e8af8a2a9ad4f4a7f0f883402fba0afcb501
Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants