From a7df132236468417df1b6dfdd86371c6804ff7da Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 14 Dec 2018 18:30:51 -0600 Subject: [PATCH 1/4] ASoC: SOF: Intel: Baytrail: prepare Edison cleanup Move code around so that the probe code is more local Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/byt.c | 98 +++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index 1442c47840024d..0380dc44019f70 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -455,6 +455,55 @@ static int byt_reset(struct snd_sof_dev *sdev) return 0; } +#define BYT_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | \ + SNDRV_PCM_FMTBIT_S32_LE) + +/* Baytrail DAIs */ +static struct snd_soc_dai_driver byt_dai[] = { +{ + .name = "ssp0-port", + .playback = SOF_DAI_STREAM("ssp0 Tx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), + .capture = SOF_DAI_STREAM("ssp0 Rx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), +}, +{ + .name = "ssp1-port", + .playback = SOF_DAI_STREAM("ssp1 Tx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), + .capture = SOF_DAI_STREAM("ssp1 Rx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), +}, +{ + .name = "ssp2-port", + .playback = SOF_DAI_STREAM("ssp2 Tx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), + .capture = SOF_DAI_STREAM("ssp2 Rx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), +}, +{ + .name = "ssp3-port", + .playback = SOF_DAI_STREAM("ssp3 Tx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), + .capture = SOF_DAI_STREAM("ssp3 Rx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), +}, +{ + .name = "ssp4-port", + .playback = SOF_DAI_STREAM("ssp4 Tx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), + .capture = SOF_DAI_STREAM("ssp4 Rx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), +}, +{ + .name = "ssp5-port", + .playback = SOF_DAI_STREAM("ssp5 Tx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), + .capture = SOF_DAI_STREAM("ssp5 Rx", 1, 8, + SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), +}, +}; + /* * Probe and remove. */ @@ -650,55 +699,6 @@ static int byt_probe(struct snd_sof_dev *sdev) return byt_acpi_probe(sdev); } -#define BYT_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | \ - SNDRV_PCM_FMTBIT_S32_LE) - -/* Baytrail DAIs */ -static struct snd_soc_dai_driver byt_dai[] = { -{ - .name = "ssp0-port", - .playback = SOF_DAI_STREAM("ssp0 Tx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), - .capture = SOF_DAI_STREAM("ssp0 Rx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), -}, -{ - .name = "ssp1-port", - .playback = SOF_DAI_STREAM("ssp1 Tx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), - .capture = SOF_DAI_STREAM("ssp1 Rx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), -}, -{ - .name = "ssp2-port", - .playback = SOF_DAI_STREAM("ssp2 Tx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), - .capture = SOF_DAI_STREAM("ssp2 Rx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), -}, -{ - .name = "ssp3-port", - .playback = SOF_DAI_STREAM("ssp3 Tx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), - .capture = SOF_DAI_STREAM("ssp3 Rx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), -}, -{ - .name = "ssp4-port", - .playback = SOF_DAI_STREAM("ssp4 Tx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), - .capture = SOF_DAI_STREAM("ssp4 Rx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), -}, -{ - .name = "ssp5-port", - .playback = SOF_DAI_STREAM("ssp5 Tx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), - .capture = SOF_DAI_STREAM("ssp5 Rx", 1, 8, - SNDRV_PCM_RATE_8000_192000, BYT_FORMATS), -}, -}; - /* baytrail ops */ const struct snd_sof_dsp_ops sof_byt_ops = { /* device init */ From 6abe01e3dc6600db8956abb527f6c33f932e5083 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 14 Dec 2018 18:32:38 -0600 Subject: [PATCH 2/4] ASoC: SOF: Intel: add Edison support Edison is based on PCI, need to split Baytrail in two No code change, only new Kconfig added Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/Kconfig | 25 ++++++++++++++++++++++++- sound/soc/sof/intel/Makefile | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index cf751377e4e76c..4738dd91aa1c2a 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -19,6 +19,7 @@ config SND_SOC_SOF_INTEL_ACPI config SND_SOC_SOF_INTEL_PCI tristate + select SND_SOC_SOF_EDISON if SND_SOC_SOF_EDISON_SUPPORT select SND_SOC_SOF_APOLLOLAKE if SND_SOC_SOF_APOLLOLAKE_SUPPORT select SND_SOC_SOF_GEMINILAKE if SND_SOC_SOF_GEMINILAKE_SUPPORT select SND_SOC_SOF_CANNONLAKE if SND_SOC_SOF_CANNONLAKE_SUPPORT @@ -29,6 +30,13 @@ config SND_SOC_SOF_INTEL_PCI This option is not user-selectable but automagically handled by 'select' statements at a higher level +config SND_SOC_SOF_INTEL_ATOM_HIFI_EP + tristate + select SND_SOC_INTEL_COMMON + help + This option is not user-selectable but automagically handled by + 'select' statements at a higher level + config SND_SOC_SOF_INTEL_COMMON tristate select SND_SOC_ACPI_INTEL_MATCH @@ -51,7 +59,7 @@ config SND_SOC_SOF_BAYTRAIL_SUPPORT config SND_SOC_SOF_BAYTRAIL tristate - select SND_SOC_INTEL_COMMON + select SND_SOC_SOF_INTEL_ATOM_HIFI_EP help This option is not user-selectable but automagically handled by 'select' statements at a higher level @@ -90,6 +98,21 @@ endif ## SND_SOC_SOF_INTEL_ACPI if SND_SOC_SOF_INTEL_PCI +config SND_SOC_SOF_EDISON_SUPPORT + bool "SOF support for Tangier/Edison" + help + This adds support for Sound Open Firmware for Intel(R) platforms + using the Baytrail, Braswell or Cherrytrail processors. + Say Y if you have such a device. + If unsure select "N". + +config SND_SOC_SOF_EDISON + tristate + select SND_SOC_SOF_INTEL_ATOM_HIFI_EP + help + This option is not user-selectable but automagically handled by + 'select' statements at a higher level + config SND_SOC_SOF_APOLLOLAKE_SUPPORT bool "SOF support for Apollolake" help diff --git a/sound/soc/sof/intel/Makefile b/sound/soc/sof/intel/Makefile index a7a7c0cf7663aa..7a52b89eea863a 100644 --- a/sound/soc/sof/intel/Makefile +++ b/sound/soc/sof/intel/Makefile @@ -12,7 +12,7 @@ snd-sof-intel-hda-common-objs := hda.o hda-loader.o hda-stream.o hda-trace.o \ snd-sof-intel-hda-objs := hda-codec.o -obj-$(CONFIG_SND_SOC_SOF_BAYTRAIL) += snd-sof-intel-byt.o +obj-$(CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP) += snd-sof-intel-byt.o obj-$(CONFIG_SND_SOC_SOF_HASWELL) += snd-sof-intel-hsw.o obj-$(CONFIG_SND_SOC_SOF_BROADWELL) += snd-sof-intel-bdw.o obj-$(CONFIG_SND_SOC_SOF_HDA_COMMON) += snd-sof-intel-hda-common.o From ea8d88f93e979b6418e93a6be46cc0c0a1f735b2 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 14 Dec 2018 18:42:15 -0600 Subject: [PATCH 3/4] ASoC: SOF: Intel: prepare Edison support without BAYTRAIL move code around to reduce diffs in future patches Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/byt.c | 160 +++++++++++++++++++++++------------- sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/sof-pci-dev.c | 23 +++--- 3 files changed, 113 insertions(+), 71 deletions(-) diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index 0380dc44019f70..2af7f0ac098b75 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -508,37 +508,24 @@ static struct snd_soc_dai_driver byt_dai[] = { * Probe and remove. */ -static int byt_acpi_probe(struct snd_sof_dev *sdev) +static int byt_pci_probe(struct snd_sof_dev *sdev) { struct snd_sof_pdata *pdata = sdev->pdata; const struct sof_dev_desc *desc = pdata->desc; - struct platform_device *pdev = - container_of(sdev->parent, struct platform_device, dev); - struct resource *mmio; + struct pci_dev *pci = sdev->pci; u32 base, size; int ret = 0; - /* set DSP arch ops */ - sdev->arch_ops = &sof_xtensa_arch_ops; - /* DSP DMA can only access low 31 bits of host memory */ - ret = dma_coerce_mask_and_coherent(sdev->dev, DMA_BIT_MASK(31)); + ret = dma_coerce_mask_and_coherent(&pci->dev, DMA_BIT_MASK(31)); if (ret < 0) { dev_err(sdev->dev, "error: failed to set DMA mask %d\n", ret); return ret; } /* LPE base */ - mmio = platform_get_resource(pdev, IORESOURCE_MEM, - desc->resindex_lpe_base); - if (mmio) { - base = mmio->start; - size = resource_size(mmio); - } else { - dev_err(sdev->dev, "error: failed to get LPE base at idx %d\n", - desc->resindex_lpe_base); - return -EINVAL; - } + base = pci_resource_start(pci, desc->resindex_lpe_base) - IRAM_OFFSET; + size = BYT_PCI_BAR_SIZE; dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size); sdev->bar[BYT_DSP_BAR] = devm_ioremap(sdev->dev, base, size); @@ -549,24 +536,12 @@ static int byt_acpi_probe(struct snd_sof_dev *sdev) } dev_dbg(sdev->dev, "LPE VADDR %p\n", sdev->bar[BYT_DSP_BAR]); - /* TODO: add offsets */ - sdev->mmio_bar = BYT_DSP_BAR; - sdev->mailbox_bar = BYT_DSP_BAR; - /* IMR base - optional */ if (desc->resindex_imr_base == -1) goto irq; - mmio = platform_get_resource(pdev, IORESOURCE_MEM, - desc->resindex_imr_base); - if (mmio) { - base = mmio->start; - size = resource_size(mmio); - } else { - dev_err(sdev->dev, "error: failed to get IMR base at idx %d\n", - desc->resindex_imr_base); - return -ENODEV; - } + base = pci_resource_start(pci, desc->resindex_imr_base); + size = pci_resource_len(pci, desc->resindex_imr_base); /* some BIOSes don't map IMR */ if (base == 0x55aa55aa || base == 0x0) { @@ -585,17 +560,11 @@ static int byt_acpi_probe(struct snd_sof_dev *sdev) irq: /* register our IRQ */ - sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc); - if (sdev->ipc_irq < 0) { - dev_err(sdev->dev, "error: failed to get IRQ at index %d\n", - desc->irqindex_host_ipc); - return sdev->ipc_irq; - } - + sdev->ipc_irq = pci->irq; dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq); ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq, byt_irq_handler, byt_irq_thread, - IRQF_SHARED, "AudioDSP", sdev); + 0, "AudioDSP", sdev); if (ret < 0) { dev_err(sdev->dev, "error: failed to register IRQ %d\n", sdev->ipc_irq); @@ -615,24 +584,87 @@ static int byt_acpi_probe(struct snd_sof_dev *sdev) return ret; } -static int byt_pci_probe(struct snd_sof_dev *sdev) +const struct snd_sof_dsp_ops sof_tng_ops = { + /* device init */ + .probe = byt_pci_probe, + + /* DSP core boot / reset */ + .run = byt_run, + .reset = byt_reset, + + /* Register IO */ + .write = sof_io_write, + .read = sof_io_read, + .write64 = sof_io_write64, + .read64 = sof_io_read64, + + /* Block IO */ + .block_read = sof_block_read, + .block_write = sof_block_write, + + /* doorbell */ + .irq_handler = byt_irq_handler, + .irq_thread = byt_irq_thread, + + /* mailbox */ + .mailbox_read = sof_mailbox_read, + .mailbox_write = sof_mailbox_write, + + /* ipc */ + .send_msg = byt_send_msg, + .get_reply = byt_get_reply, + .fw_ready = byt_fw_ready, + .is_ready = byt_is_ready, + .cmd_done = byt_cmd_done, + + /* debug */ + .debug_map = byt_debugfs, + .debug_map_count = ARRAY_SIZE(byt_debugfs), + .dbg_dump = byt_dump, + + /* module loading */ + .load_module = snd_sof_parse_module_memcpy, + + /*Firmware loading */ + .load_firmware = snd_sof_load_firmware_memcpy, + + /* DAI drivers */ + .drv = byt_dai, + .num_drv = 3, /* we have only 3 SSPs on byt*/ +}; +EXPORT_SYMBOL(sof_tng_ops); + +static int byt_acpi_probe(struct snd_sof_dev *sdev) { struct snd_sof_pdata *pdata = sdev->pdata; const struct sof_dev_desc *desc = pdata->desc; - struct pci_dev *pci = sdev->pci; + struct platform_device *pdev = + container_of(sdev->parent, struct platform_device, dev); + struct resource *mmio; u32 base, size; int ret = 0; + /* set DSP arch ops */ + sdev->arch_ops = &sof_xtensa_arch_ops; + /* DSP DMA can only access low 31 bits of host memory */ - ret = dma_coerce_mask_and_coherent(&pci->dev, DMA_BIT_MASK(31)); + ret = dma_coerce_mask_and_coherent(sdev->dev, DMA_BIT_MASK(31)); if (ret < 0) { dev_err(sdev->dev, "error: failed to set DMA mask %d\n", ret); return ret; } /* LPE base */ - base = pci_resource_start(pci, desc->resindex_lpe_base) - IRAM_OFFSET; - size = BYT_PCI_BAR_SIZE; + mmio = platform_get_resource(pdev, IORESOURCE_MEM, + desc->resindex_lpe_base); + if (mmio) { + base = mmio->start; + size = resource_size(mmio); + } else { + dev_err(sdev->dev, "error: failed to get LPE base at idx %d\n", + desc->resindex_lpe_base); + return -EINVAL; + } dev_dbg(sdev->dev, "LPE PHY base at 0x%x size 0x%x", base, size); sdev->bar[BYT_DSP_BAR] = devm_ioremap(sdev->dev, base, size); @@ -643,12 +675,24 @@ static int byt_pci_probe(struct snd_sof_dev *sdev) } dev_dbg(sdev->dev, "LPE VADDR %p\n", sdev->bar[BYT_DSP_BAR]); + /* TODO: add offsets */ + sdev->mmio_bar = BYT_DSP_BAR; + sdev->mailbox_bar = BYT_DSP_BAR; + /* IMR base - optional */ if (desc->resindex_imr_base == -1) goto irq; - base = pci_resource_start(pci, desc->resindex_imr_base); - size = pci_resource_len(pci, desc->resindex_imr_base); + mmio = platform_get_resource(pdev, IORESOURCE_MEM, + desc->resindex_imr_base); + if (mmio) { + base = mmio->start; + size = resource_size(mmio); + } else { + dev_err(sdev->dev, "error: failed to get IMR base at idx %d\n", + desc->resindex_imr_base); + return -ENODEV; + } /* some BIOSes don't map IMR */ if (base == 0x55aa55aa || base == 0x0) { @@ -667,11 +711,17 @@ static int byt_pci_probe(struct snd_sof_dev *sdev) irq: /* register our IRQ */ - sdev->ipc_irq = pci->irq; + sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc); + if (sdev->ipc_irq < 0) { + dev_err(sdev->dev, "error: failed to get IRQ at index %d\n", + desc->irqindex_host_ipc); + return sdev->ipc_irq; + } + dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq); ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq, byt_irq_handler, byt_irq_thread, - 0, "AudioDSP", sdev); + IRQF_SHARED, "AudioDSP", sdev); if (ret < 0) { dev_err(sdev->dev, "error: failed to register IRQ %d\n", sdev->ipc_irq); @@ -691,18 +741,10 @@ static int byt_pci_probe(struct snd_sof_dev *sdev) return ret; } -static int byt_probe(struct snd_sof_dev *sdev) -{ - if (sdev->pci) - return byt_pci_probe(sdev); - - return byt_acpi_probe(sdev); -} - /* baytrail ops */ const struct snd_sof_dsp_ops sof_byt_ops = { /* device init */ - .probe = byt_probe, + .probe = byt_acpi_probe, /* DSP core boot / reset */ .run = byt_run, @@ -753,7 +795,7 @@ EXPORT_SYMBOL(sof_byt_ops); /* cherrytrail and braswell ops */ const struct snd_sof_dsp_ops sof_cht_ops = { /* device init */ - .probe = byt_probe, + .probe = byt_acpi_probe, /* DSP core boot / reset */ .run = byt_run, diff --git a/sound/soc/sof/intel/shim.h b/sound/soc/sof/intel/shim.h index 06fc3df26c50ad..5d85fd579bfa8b 100644 --- a/sound/soc/sof/intel/shim.h +++ b/sound/soc/sof/intel/shim.h @@ -151,6 +151,7 @@ #define PCI_PMCS 0x84 #define PCI_PMCS_PS_MASK 0x3 +extern const struct snd_sof_dsp_ops sof_tng_ops; extern const struct snd_sof_dsp_ops sof_byt_ops; extern const struct snd_sof_dsp_ops sof_cht_ops; extern const struct snd_sof_dsp_ops sof_hsw_ops; diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index c288c49e34b6e9..df57f7855336db 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -47,8 +47,8 @@ static struct sof_dev_desc glk_desc = { }; #endif -#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) -static struct snd_soc_acpi_mach sof_byt_machines[] = { +#if IS_ENABLED(CONFIG_SND_SOC_SOF_EDISON) +static struct snd_soc_acpi_mach sof_tng_machines[] = { { .id = "INT343A", .drv_name = "edison", @@ -59,8 +59,8 @@ static struct snd_soc_acpi_mach sof_byt_machines[] = { {} }; -static const struct sof_dev_desc byt_desc = { - .machines = sof_byt_machines, +static const struct sof_dev_desc tng_desc = { + .machines = sof_tng_machines, .resindex_lpe_base = 3, /* IRAM, but subtract IRAM offset */ .resindex_pcicfg_base = -1, .resindex_imr_base = 0, @@ -133,15 +133,15 @@ static const struct dev_pm_ops sof_pci_pm = { }; static const struct sof_ops_table pci_mach_ops[] = { +#if IS_ENABLED(CONFIG_SND_SOC_SOF_EDISON) + {&tng_desc, &sof_tng_ops}, +#endif #if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) {&bxt_desc, &sof_apl_ops}, #endif #if IS_ENABLED(CONFIG_SND_SOC_SOF_GEMINILAKE) {&glk_desc, &sof_apl_ops}, #endif -#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) - {&byt_desc, &sof_byt_ops}, -#endif #if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE) {&cnl_desc, &sof_cnl_ops}, #endif @@ -310,6 +310,10 @@ static void sof_pci_remove(struct pci_dev *pci) /* PCI IDs */ static const struct pci_device_id sof_pci_ids[] = { +#if IS_ENABLED(CONFIG_SND_SOC_SOF_EDISON) + { PCI_DEVICE(0x8086, 0x119a), + .driver_data = (unsigned long)&tng_desc}, +#endif #if IS_ENABLED(CONFIG_SND_SOC_SOF_APOLLOLAKE) /* BXT-P & Apollolake */ { PCI_DEVICE(0x8086, 0x5a98), @@ -321,11 +325,6 @@ static const struct pci_device_id sof_pci_ids[] = { { PCI_DEVICE(0x8086, 0x3198), .driver_data = (unsigned long)&glk_desc}, #endif - -#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) - { PCI_DEVICE(0x8086, 0x119a), - .driver_data = (unsigned long)&byt_desc}, -#endif #if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE) { PCI_DEVICE(0x8086, 0x9dc8), .driver_data = (unsigned long)&cnl_desc}, From 5031018083c4e776bbd21db4a55c1569b93a662f Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 14 Dec 2018 19:39:43 -0600 Subject: [PATCH 4/4] ASoC: SOF: Intel: compile out EDISON or BAYTRAIL if needed Only compile what is selected Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/byt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index 2af7f0ac098b75..cef099406006e6 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -508,6 +508,8 @@ static struct snd_soc_dai_driver byt_dai[] = { * Probe and remove. */ +#if IS_ENABLED(CONFIG_SND_SOC_SOF_EDISON) + static int byt_pci_probe(struct snd_sof_dev *sdev) { struct snd_sof_pdata *pdata = sdev->pdata; @@ -634,6 +636,10 @@ const struct snd_sof_dsp_ops sof_tng_ops = { }; EXPORT_SYMBOL(sof_tng_ops); +#endif /* CONFIG_SND_SOC_SOF_EDISON */ + +#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) + static int byt_acpi_probe(struct snd_sof_dev *sdev) { struct snd_sof_pdata *pdata = sdev->pdata; @@ -844,4 +850,6 @@ const struct snd_sof_dsp_ops sof_cht_ops = { }; EXPORT_SYMBOL(sof_cht_ops); +#endif /* CONFIG_SND_SOC_SOF_BAYTRAIL */ + MODULE_LICENSE("Dual BSD/GPL");