Skip to content

Commit 66f8c66

Browse files
committed
ASoC: SOF: add Icelake support in SOF
Icelake shares the setting of cannonlake because no difference between them in host Signed-off-by: Rander Wang <[email protected]>
1 parent 54f6f54 commit 66f8c66

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

sound/soc/sof/intel/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ config SND_SOC_SOF_SKYLAKE
8787
Say Y if you have such a device.
8888
If unsure select "N".
8989

90+
config SND_SOC_SOF_ICELAKE
91+
tristate "SOF support for Icelake"
92+
select SND_SOC_SOF_HDA_COMMON
93+
help
94+
This adds support for Sound Open Firmware for Intel(R) platforms
95+
using the Icelake processors.
96+
Say Y if you have such a device.
97+
If unsure select "N".
98+
9099
config SND_SOC_SOF_HDA_COMMON
91100
tristate
92101
select SND_SOC_SOF_PCI

sound/soc/sof/intel/hda.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,21 @@ static const struct sof_intel_dsp_desc chip_info[] = {
292292
.ipc_ctl = CNL_DSP_REG_HIPCCTL,
293293
.ops = &sof_cnl_ops,
294294
},
295+
{
296+
/* Icelake */
297+
.id = 0x34c8,
298+
.cores_num = 4,
299+
.cores_mask = HDA_DSP_CORE_MASK(0) |
300+
HDA_DSP_CORE_MASK(1) |
301+
HDA_DSP_CORE_MASK(2) |
302+
HDA_DSP_CORE_MASK(3),
303+
.ipc_req = CNL_DSP_REG_HIPCIDR,
304+
.ipc_req_mask = CNL_DSP_REG_HIPCIDR_BUSY,
305+
.ipc_ack = CNL_DSP_REG_HIPCIDA,
306+
.ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE,
307+
.ipc_ctl = CNL_DSP_REG_HIPCCTL,
308+
.ops = &sof_cnl_ops,
309+
},
295310
};
296311

297312
static const struct sof_intel_dsp_desc *get_chip_info(int pci_id)

sound/soc/sof/sof-pci-dev.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,19 @@ static struct sof_dev_desc kbl_desc = {
114114
};
115115
#endif
116116

117+
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE)
118+
static const struct sof_dev_desc icl_desc = {
119+
.machines = snd_soc_acpi_intel_icl_machines,
120+
.resindex_lpe_base = 0,
121+
.resindex_pcicfg_base = -1,
122+
.resindex_imr_base = -1,
123+
.irqindex_host_ipc = -1,
124+
.resindex_dma_base = -1,
125+
.nocodec_fw_filename = "intel/sof-icl.ri",
126+
.nocodec_tplg_filename = "intel/sof-icl-nocodec.tplg"
127+
};
128+
#endif
129+
117130
static void sof_pci_fw_cb(const struct firmware *fw, void *context)
118131
{
119132
struct sof_platform_priv *priv = context;
@@ -164,6 +177,9 @@ static const struct sof_ops_table mach_ops[] = {
164177
#if IS_ENABLED(CONFIG_SND_SOC_SOF_KABYLAKE)
165178
{&kbl_desc, &sof_apl_ops},
166179
#endif
180+
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE)
181+
{&icl_desc, &sof_cnl_ops},
182+
#endif
167183
};
168184

169185
static struct snd_sof_dsp_ops *sof_pci_get_ops(const struct sof_dev_desc *d)
@@ -336,6 +352,10 @@ static const struct pci_device_id sof_pci_ids[] = {
336352
#if IS_ENABLED(CONFIG_SND_SOC_SOF_SKYLAKE)
337353
{ PCI_DEVICE(0x8086, 0x9d70),
338354
.driver_data = (unsigned long)&skl_desc},
355+
#endif
356+
#if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE)
357+
{ PCI_DEVICE(0x8086, 0x34C8),
358+
.driver_data = (unsigned long)&icl_desc},
339359
#endif
340360
{ 0, }
341361
};

0 commit comments

Comments
 (0)