Skip to content

Commit bbfe903

Browse files
ASoC: SOF: amd: Propagate PCI subsystem Vendor and Device IDs
Extend the AMD SOF machine driver to propagate the PCI subsystem Vendor and Device IDs so that they may be subsequently used as an SSID. Store the subsystem IDs in acp_dev_data during probe (both amd_sof_acp_probe and amd_sof_acp7x_probe), and propagate them to mach_params in the SoundWire machine select path. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
1 parent 22d9a14 commit bbfe903

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,15 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *
155155
}
156156
if (mach && mach->link_mask) {
157157
mach->mach_params.subsystem_rev = acp_data->pci_rev;
158+
mach->mach_params.subsystem_vendor = acp_data->subsystem_vendor;
159+
mach->mach_params.subsystem_device = acp_data->subsystem_device;
160+
mach->mach_params.subsystem_id_set = true;
158161
mach->mach_params.links = mach->links;
159162
mach->mach_params.link_mask = mach->link_mask;
160163
mach->mach_params.platform = dev_name(sdev->dev);
164+
165+
dev_dbg(sdev->dev, "SSID %x%04x\n", mach->mach_params.subsystem_vendor,
166+
mach->mach_params.subsystem_device);
161167
return mach;
162168
}
163169
}

‎sound/soc/sof/amd/acp.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,8 @@ int amd_sof_acp_probe(struct snd_sof_dev *sdev)
11971197
adata->addr = addr;
11981198
adata->reg_range = chip->reg_end_addr - chip->reg_start_addr;
11991199
adata->pci_rev = pci->revision;
1200+
adata->subsystem_vendor = pci->subsystem_vendor;
1201+
adata->subsystem_device = pci->subsystem_device;
12001202
mutex_init(&adata->acp_lock);
12011203
sdev->pdata->hw_pdata = adata;
12021204

@@ -1334,6 +1336,8 @@ int amd_sof_acp7x_probe(struct snd_sof_dev *sdev)
13341336
adata->addr = addr;
13351337
adata->reg_range = chip->reg_end_addr - chip->reg_start_addr;
13361338
adata->pci_rev = pci->revision;
1339+
adata->subsystem_vendor = pci->subsystem_vendor;
1340+
adata->subsystem_device = pci->subsystem_device;
13371341
mutex_init(&adata->acp_lock);
13381342
sdev->pdata->hw_pdata = adata;
13391343

‎sound/soc/sof/amd/acp.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,8 @@ struct acp_dev_data {
296296
unsigned int pdm_sel;
297297
bool is_sdw_dev;
298298
unsigned int pci_rev;
299+
u32 subsystem_vendor;
300+
u32 subsystem_device;
299301
int acp_sof_signed_firmware_image;
300302
};
301303

0 commit comments

Comments
 (0)