mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ASoC: SOF: amd: propagate pdm_sel to SDW machine driver via mach->pdata
When amd_sof_sdw_machine_select() returns a SoundWire machine, it did not carry the PDM controller selection to the machine driver. Without this, acp-sdw-sof-mach.c cannot configure the correct DMIC DAI link for ACP7.B/7.F platforms. Allocate amd_pdm_pdata and assign it to mach->pdata in the SDW machine select return path when acp_data->pdm_sel is non-zero, mirroring the existing handling in amd_sof_machine_select(). Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20261013154644.3788064-9-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0e4c408116
commit
439c43d962
|
|
@ -132,6 +132,7 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *
|
|||
struct snd_soc_acpi_mach *mach;
|
||||
const struct snd_soc_acpi_link_adr *link;
|
||||
struct acp_dev_data *acp_data = sdev->pdata->hw_pdata;
|
||||
struct amd_pdm_pdata *pdm_pdata;
|
||||
int ret, i;
|
||||
|
||||
if (acp_data->info.count) {
|
||||
|
|
@ -162,6 +163,16 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *
|
|||
mach->mach_params.link_mask = mach->link_mask;
|
||||
mach->mach_params.platform = dev_name(sdev->dev);
|
||||
|
||||
if (acp_data->pdm_sel) {
|
||||
pdm_pdata = devm_kzalloc(sdev->dev,
|
||||
sizeof(*pdm_pdata),
|
||||
GFP_KERNEL);
|
||||
if (!pdm_pdata)
|
||||
return NULL;
|
||||
pdm_pdata->pdm_sel = acp_data->pdm_sel;
|
||||
mach->pdata = pdm_pdata;
|
||||
}
|
||||
|
||||
dev_dbg(sdev->dev, "SSID %x%04x\n", mach->mach_params.subsystem_vendor,
|
||||
mach->mach_params.subsystem_device);
|
||||
return mach;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user