Skip to content

Commit b7cdb4a

Browse files
vijendarmukundabroonie
authored andcommitted
ASoC: SOF: amd: update mach params subsystem_rev variable
Add pci_rev variable in acp sof driver private data structure and assign this value to mach_params structure subsystem_rev variable. Link: thesofproject#5068 Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://patch.msgid.link/20240801111821.18076-10-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 15049b6 commit b7cdb4a

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

sound/soc/sof/amd/acp-common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *
153153
break;
154154
}
155155
if (mach && mach->link_mask) {
156+
mach->mach_params.subsystem_rev = acp_data->pci_rev;
156157
mach->mach_params.links = mach->links;
157158
mach->mach_params.link_mask = mach->link_mask;
158159
mach->mach_params.platform = dev_name(sdev->dev);
@@ -173,6 +174,7 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *
173174
struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev)
174175
{
175176
struct snd_sof_pdata *sof_pdata = sdev->pdata;
177+
struct acp_dev_data *acp_data = sdev->pdata->hw_pdata;
176178
const struct sof_dev_desc *desc = sof_pdata->desc;
177179
struct snd_soc_acpi_mach *mach = NULL;
178180

@@ -186,6 +188,7 @@ struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev)
186188
}
187189
}
188190

191+
mach->mach_params.subsystem_rev = acp_data->pci_rev;
189192
sof_pdata->tplg_filename = mach->sof_tplg_filename;
190193
sof_pdata->fw_filename = mach->fw_filename;
191194

sound/soc/sof/amd/acp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
695695
pci_set_master(pci);
696696
adata->addr = addr;
697697
adata->reg_range = chip->reg_end_addr - chip->reg_start_addr;
698+
adata->pci_rev = pci->revision;
698699
mutex_init(&adata->acp_lock);
699700
sdev->pdata->hw_pdata = adata;
700701
adata->smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, chip->host_bridge_id, NULL);

sound/soc/sof/amd/acp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ struct acp_dev_data {
251251
bool is_dram_in_use;
252252
bool is_sram_in_use;
253253
bool sdw_en_stat;
254+
unsigned int pci_rev;
254255
};
255256

256257
void memcpy_to_scratch(struct snd_sof_dev *sdev, u32 offset, unsigned int *src, size_t bytes);

0 commit comments

Comments
 (0)