diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/au1x/dma.c | 2 | ||||
-rw-r--r-- | sound/soc/cirrus/Kconfig | 14 | ||||
-rw-r--r-- | sound/soc/codecs/Kconfig | 30 | ||||
-rw-r--r-- | sound/soc/codecs/cros_ec_codec.c | 16 | ||||
-rw-r--r-- | sound/soc/codecs/rt5514-spi.c | 21 | ||||
-rw-r--r-- | sound/soc/codecs/rt5677-spi.c | 17 | ||||
-rw-r--r-- | sound/soc/dwc/dwc-pcm.c | 2 | ||||
-rw-r--r-- | sound/soc/intel/Kconfig | 4 | ||||
-rw-r--r-- | sound/soc/intel/boards/Kconfig | 48 | ||||
-rw-r--r-- | sound/soc/intel/haswell/sst-haswell-pcm.c | 12 | ||||
-rw-r--r-- | sound/soc/intel/skylake/skl-pcm.c | 14 | ||||
-rw-r--r-- | sound/soc/intel/skylake/skl.c | 19 | ||||
-rw-r--r-- | sound/soc/pxa/Kconfig | 16 | ||||
-rw-r--r-- | sound/soc/qcom/Kconfig | 20 | ||||
-rw-r--r-- | sound/soc/sh/dma-sh7760.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-component.c | 19 | ||||
-rw-r--r-- | sound/soc/soc-pcm.c | 6 | ||||
-rw-r--r-- | sound/soc/sof/imx/Kconfig | 12 | ||||
-rw-r--r-- | sound/soc/sof/intel/Kconfig | 24 | ||||
-rw-r--r-- | sound/soc/sof/pcm.c | 12 | ||||
-rw-r--r-- | sound/soc/sof/sof-pci-dev.c | 6 | ||||
-rw-r--r-- | sound/soc/xilinx/Kconfig | 20 | ||||
-rw-r--r-- | sound/soc/zte/Kconfig | 12 |
23 files changed, 164 insertions, 184 deletions
diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c index 49556eb409cd..054dfda89d3e 100644 --- a/sound/soc/au1x/dma.c +++ b/sound/soc/au1x/dma.c @@ -293,7 +293,7 @@ static int alchemy_pcm_new(struct snd_soc_component *component, struct snd_pcm *pcm = rtd->pcm; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_KERNEL), 65536, (4096 * 1024) - 1); + NULL, 65536, (4096 * 1024) - 1); return 0; } diff --git a/sound/soc/cirrus/Kconfig b/sound/soc/cirrus/Kconfig index 2333efac758a..8039a8febefa 100644 --- a/sound/soc/cirrus/Kconfig +++ b/sound/soc/cirrus/Kconfig @@ -33,13 +33,13 @@ config SND_EP93XX_SOC_AC97 select SND_SOC_AC97_BUS config SND_EP93XX_SOC_SNAPPERCL15 - tristate "SoC Audio support for Bluewater Systems Snapper CL15 module" - depends on SND_EP93XX_SOC && MACH_SNAPPER_CL15 && I2C - select SND_EP93XX_SOC_I2S - select SND_SOC_TLV320AIC23_I2C - help - Say Y or M here if you want to add support for I2S audio on the - Bluewater Systems Snapper CL15 module. + tristate "SoC Audio support for Bluewater Systems Snapper CL15 module" + depends on SND_EP93XX_SOC && MACH_SNAPPER_CL15 && I2C + select SND_EP93XX_SOC_I2S + select SND_SOC_TLV320AIC23_I2C + help + Say Y or M here if you want to add support for I2S audio on the + Bluewater Systems Snapper CL15 module. config SND_EP93XX_SOC_SIMONE tristate "SoC Audio support for Simplemachines Sim.One board" diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index ec01e4f12a78..4abf37b5083f 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -261,16 +261,16 @@ config SND_SOC_ALL_CODECS select SND_SOC_WM9705 if (SND_SOC_AC97_BUS || SND_SOC_AC97_BUS_NEW) select SND_SOC_WM9712 if (SND_SOC_AC97_BUS || SND_SOC_AC97_BUS_NEW) select SND_SOC_WM9713 if (SND_SOC_AC97_BUS || SND_SOC_AC97_BUS_NEW) - help - Normally ASoC codec drivers are only built if a machine driver which - uses them is also built since they are only usable with a machine - driver. Selecting this option will allow these drivers to be built - without an explicit machine driver for test and development purposes. + help + Normally ASoC codec drivers are only built if a machine driver which + uses them is also built since they are only usable with a machine + driver. Selecting this option will allow these drivers to be built + without an explicit machine driver for test and development purposes. Support for the bus types used to access the codecs to be built must be selected separately. - If unsure select "N". + If unsure select "N". config SND_SOC_88PM860X tristate @@ -603,8 +603,8 @@ config SND_SOC_CS42XX8_I2C # Cirrus Logic CS43130 HiFi DAC config SND_SOC_CS43130 - tristate "Cirrus Logic CS43130 CODEC" - depends on I2C + tristate "Cirrus Logic CS43130 CODEC" + depends on I2C config SND_SOC_CS4341 tristate "Cirrus Logic CS4341 CODEC" @@ -676,7 +676,7 @@ config SND_SOC_L3 tristate config SND_SOC_DA7210 - tristate + tristate config SND_SOC_DA7213 tristate "Dialog DA7213 CODEC" @@ -686,10 +686,10 @@ config SND_SOC_DA7218 tristate config SND_SOC_DA7219 - tristate + tristate config SND_SOC_DA732X - tristate + tristate config SND_SOC_DA9055 tristate @@ -751,7 +751,7 @@ config SND_SOC_INNO_RK3036 select REGMAP_MMIO config SND_SOC_ISABELLE - tristate + tristate config SND_SOC_LM49453 tristate @@ -1022,7 +1022,7 @@ config SND_SOC_RT5640 tristate config SND_SOC_RT5645 - tristate + tristate config SND_SOC_RT5651 tristate @@ -1262,7 +1262,7 @@ config SND_SOC_UDA134X tristate config SND_SOC_UDA1380 - tristate + tristate depends on I2C config SND_SOC_WCD9335 @@ -1390,7 +1390,7 @@ config SND_SOC_WM8904 depends on I2C config SND_SOC_WM8940 - tristate + tristate config SND_SOC_WM8955 tristate diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_codec.c index dd14caf9091a..7b17f39a6a10 100644 --- a/sound/soc/codecs/cros_ec_codec.c +++ b/sound/soc/codecs/cros_ec_codec.c @@ -918,8 +918,7 @@ static int wov_pcm_hw_params(struct snd_soc_component *component, priv->wov_burst_read = true; mutex_unlock(&priv->wov_dma_lock); - return snd_pcm_lib_alloc_vmalloc_buffer(substream, - params_buffer_bytes(hw_params)); + return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); } static int wov_pcm_hw_free(struct snd_soc_component *component, @@ -935,7 +934,7 @@ static int wov_pcm_hw_free(struct snd_soc_component *component, cancel_delayed_work_sync(&priv->wov_copy_work); - return snd_pcm_lib_free_vmalloc_buffer(substream); + return snd_pcm_lib_free_pages(substream); } static snd_pcm_uframes_t wov_pcm_pointer(struct snd_soc_component *component, @@ -948,11 +947,12 @@ static snd_pcm_uframes_t wov_pcm_pointer(struct snd_soc_component *component, return bytes_to_frames(runtime, priv->wov_dma_offset); } -static struct page *wov_pcm_page(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - unsigned long offset) +static int wov_pcm_new(struct snd_soc_component *component, + struct snd_soc_pcm_runtime *rtd) { - return snd_pcm_lib_get_vmalloc_page(substream, offset); + snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_VMALLOC, + NULL, 0, 0); + return 0; } static const struct snd_soc_component_driver wov_component_driver = { @@ -964,7 +964,7 @@ static const struct snd_soc_component_driver wov_component_driver = { .hw_params = wov_pcm_hw_params, .hw_free = wov_pcm_hw_free, .pointer = wov_pcm_pointer, - .page = wov_pcm_page, + .pcm_construct = wov_pcm_new, }; static int cros_ec_codec_platform_probe(struct platform_device *pdev) diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c index 57ff5aee452d..f1b7b947ecbd 100644 --- a/sound/soc/codecs/rt5514-spi.c +++ b/sound/soc/codecs/rt5514-spi.c @@ -219,8 +219,7 @@ static int rt5514_spi_hw_params(struct snd_soc_component *component, u8 buf[8]; mutex_lock(&rt5514_dsp->dma_lock); - ret = snd_pcm_lib_alloc_vmalloc_buffer(substream, - params_buffer_bytes(hw_params)); + ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); rt5514_dsp->substream = substream; rt5514_dsp->dma_offset = 0; @@ -246,7 +245,7 @@ static int rt5514_spi_hw_free(struct snd_soc_component *component, cancel_delayed_work_sync(&rt5514_dsp->copy_work); - return snd_pcm_lib_free_vmalloc_buffer(substream); + return snd_pcm_lib_free_pages(substream); } static snd_pcm_uframes_t rt5514_spi_pcm_pointer( @@ -260,12 +259,6 @@ static snd_pcm_uframes_t rt5514_spi_pcm_pointer( return bytes_to_frames(runtime, rt5514_dsp->dma_offset); } -static struct page *rt5514_spi_pcm_page(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - unsigned long offset) -{ - return snd_pcm_lib_get_vmalloc_page(substream, offset); -} static int rt5514_spi_pcm_probe(struct snd_soc_component *component) { @@ -298,6 +291,14 @@ static int rt5514_spi_pcm_probe(struct snd_soc_component *component) return 0; } +static int rt5514_spi_pcm_new(struct snd_soc_component *component, + struct snd_soc_pcm_runtime *rtd) +{ + snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_VMALLOC, + NULL, 0, 0); + return 0; +} + static const struct snd_soc_component_driver rt5514_spi_component = { .name = DRV_NAME, .probe = rt5514_spi_pcm_probe, @@ -305,7 +306,7 @@ static const struct snd_soc_component_driver rt5514_spi_component = { .hw_params = rt5514_spi_hw_params, .hw_free = rt5514_spi_hw_free, .pointer = rt5514_spi_pcm_pointer, - .page = rt5514_spi_pcm_page, + .pcm_construct = rt5514_spi_pcm_new, }; /** diff --git a/sound/soc/codecs/rt5677-spi.c b/sound/soc/codecs/rt5677-spi.c index 25e28be3722e..7810b1d7de32 100644 --- a/sound/soc/codecs/rt5677-spi.c +++ b/sound/soc/codecs/rt5677-spi.c @@ -135,8 +135,7 @@ static int rt5677_spi_hw_params( int ret; mutex_lock(&rt5677_dsp->dma_lock); - ret = snd_pcm_lib_alloc_vmalloc_buffer(substream, - params_buffer_bytes(hw_params)); + ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); rt5677_dsp->substream = substream; mutex_unlock(&rt5677_dsp->dma_lock); @@ -154,7 +153,7 @@ static int rt5677_spi_hw_free( rt5677_dsp->substream = NULL; mutex_unlock(&rt5677_dsp->dma_lock); - return snd_pcm_lib_free_vmalloc_buffer(substream); + return snd_pcm_lib_free_pages(substream); } static int rt5677_spi_prepare( @@ -374,12 +373,12 @@ done: mutex_unlock(&rt5677_dsp->dma_lock); } -static struct page *rt5677_spi_pcm_page( - struct snd_soc_component *component, - struct snd_pcm_substream *substream, - unsigned long offset) +static int rt5677_spi_pcm_new(struct snd_soc_component *component, + struct snd_soc_pcm_runtime *rtd) { - return snd_pcm_lib_get_vmalloc_page(substream, offset); + snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_VMALLOC, + NULL, 0, 0); + return 0; } static int rt5677_spi_pcm_probe(struct snd_soc_component *component) @@ -407,7 +406,7 @@ static const struct snd_soc_component_driver rt5677_spi_dai_component = { .hw_free = rt5677_spi_hw_free, .prepare = rt5677_spi_prepare, .pointer = rt5677_spi_pcm_pointer, - .page = rt5677_spi_pcm_page, + .pcm_construct = rt5677_spi_pcm_new, }; /* Select a suitable transfer command for the next transfer to ensure diff --git a/sound/soc/dwc/dwc-pcm.c b/sound/soc/dwc/dwc-pcm.c index de6fcc808832..4771eb5fbe2a 100644 --- a/sound/soc/dwc/dwc-pcm.c +++ b/sound/soc/dwc/dwc-pcm.c @@ -258,7 +258,7 @@ static int dw_pcm_new(struct snd_soc_component *component, snd_pcm_lib_preallocate_pages_for_all(rtd->pcm, SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_KERNEL), size, size); + NULL, size, size); return 0; } diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig index 79b227613108..c8de0bb5bed9 100644 --- a/sound/soc/intel/Kconfig +++ b/sound/soc/intel/Kconfig @@ -119,7 +119,7 @@ config SND_SOC_INTEL_SKYLAKE select SND_SOC_INTEL_CNL select SND_SOC_INTEL_CFL help - This is a backwards-compatible option to select all devices + This is a backwards-compatible option to select all devices supported by the Intel SST/Skylake driver. This option is no longer recommended and will be deprecated when the SOF driver is introduced. Distributions should explicitly @@ -224,7 +224,7 @@ config SND_SOC_INTEL_SKYLAKE_COMMON select SND_SOC_INTEL_SST select SND_SOC_HDAC_HDA if SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC select SND_SOC_ACPI_INTEL_MATCH - select SND_INTEL_NHLT if ACPI + select SND_INTEL_DSP_CONFIG help If you have a Intel Skylake/Broxton/ApolloLake/KabyLake/ GeminiLake or CannonLake platform with the DSP enabled in the BIOS diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig index 6c9fd9ad566e..ef20316e83d1 100644 --- a/sound/soc/intel/boards/Kconfig +++ b/sound/soc/intel/boards/Kconfig @@ -3,13 +3,13 @@ menuconfig SND_SOC_INTEL_MACH bool "Intel Machine drivers" depends on SND_SOC_INTEL_SST_TOPLEVEL || SND_SOC_SOF_INTEL_TOPLEVEL help - Intel ASoC Machine Drivers. If you have a Intel machine that - has an audio controller with a DSP and I2S or DMIC port, then - enable this option by saying Y + Intel ASoC Machine Drivers. If you have a Intel machine that + has an audio controller with a DSP and I2S or DMIC port, then + enable this option by saying Y - Note that the answer to this question doesn't directly affect the - kernel: saying N will just cause the configurator to skip all - the questions about Intel ASoC machine drivers. + Note that the answer to this question doesn't directly affect the + kernel: saying N will just cause the configurator to skip all + the questions about Intel ASoC machine drivers. if SND_SOC_INTEL_MACH @@ -114,11 +114,11 @@ config SND_SOC_INTEL_CHT_BSW_RT5672_MACH depends on X86_INTEL_LPSS || COMPILE_TEST select SND_SOC_ACPI select SND_SOC_RT5670 - help - This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell - platforms with RT5672 audio codec. - Say Y or m if you have such a device. This is a recommended option. - If unsure select "N". + help + This adds support for ASoC machine driver for Intel(R) Cherrytrail & Braswell + platforms with RT5672 audio codec. + Say Y or m if you have such a device. This is a recommended option. + If unsure select "N". config SND_SOC_INTEL_CHT_BSW_RT5645_MACH tristate "Cherrytrail & Braswell with RT5645/5650 codec" @@ -313,21 +313,21 @@ config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH If unsure select "N". config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH - tristate "KBL with RT5663, RT5514 and MAX98927 in I2S Mode" + tristate "KBL with RT5663, RT5514 and MAX98927 in I2S Mode" depends on I2C && ACPI depends on MFD_INTEL_LPSS || COMPILE_TEST - depends on SPI - select SND_SOC_RT5663 - select SND_SOC_RT5514 - select SND_SOC_RT5514_SPI - select SND_SOC_MAX98927 - select SND_SOC_HDAC_HDMI + depends on SPI + select SND_SOC_RT5663 + select SND_SOC_RT5514 + select SND_SOC_RT5514_SPI + select SND_SOC_MAX98927 + select SND_SOC_HDAC_HDMI select SND_SOC_INTEL_SKYLAKE_SSP_CLK - help - This adds support for ASoC Onboard Codec I2S machine driver. This will - create an alsa sound card for RT5663 + RT5514 + MAX98927. - Say Y or m if you have such a device. This is a recommended option. - If unsure select "N". + help + This adds support for ASoC Onboard Codec I2S machine driver. This will + create an alsa sound card for RT5663 + RT5514 + MAX98927. + Say Y or m if you have such a device. This is a recommended option. + If unsure select "N". config SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH tristate "KBL with DA7219 and MAX98357A in I2S Mode" @@ -406,7 +406,7 @@ config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH help This adds support for ASoC machine driver for Intel platforms SKL/KBL/BXT/APL with iDisp, HDA audio codecs. - Say Y or m if you have such a device. This is a recommended option. + Say Y or m if you have such a device. This is a recommended option. If unsure select "N". endif ## SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || SND_SOC_SOF_HDA_AUDIO_CODEC diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c index 6e498a581d20..a3a5bba2fbd9 100644 --- a/sound/soc/intel/haswell/sst-haswell-pcm.c +++ b/sound/soc/intel/haswell/sst-haswell-pcm.c @@ -796,17 +796,6 @@ static snd_pcm_uframes_t hsw_pcm_pointer(struct snd_soc_component *component, return offset; } -#ifdef CONFIG_SND_DMA_SGBUF -static struct page *hsw_pcm_page(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - unsigned long offset) -{ - return snd_pcm_sgbuf_ops_page(substream, offset); -} -#else -#define hsw_pcm_page NULL -#endif /* CONFIG_SND_DMA_SGBUF */ - static int hsw_pcm_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { @@ -1128,7 +1117,6 @@ static const struct snd_soc_component_driver hsw_dai_component = { .hw_free = hsw_pcm_hw_free, .trigger = hsw_pcm_trigger, .pointer = hsw_pcm_pointer, - .page = hsw_pcm_page, .ioctl = snd_soc_pcm_lib_ioctl, .pcm_construct = hsw_pcm_new, .controls = hsw_volume_controls, diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 0850141c7d47..8b9abb79a69e 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -1235,17 +1235,6 @@ static int skl_platform_soc_mmap(struct snd_soc_component *component, return snd_pcm_lib_default_mmap(substream, area); } -#ifdef CONFIG_SND_DMA_SGBUF -static struct page *skl_platform_soc_page(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - unsigned long offset) -{ - return snd_pcm_sgbuf_ops_page(substream, offset); -} -#else -#define skl_platform_soc_page NULL -#endif /* CONFIG_SND_DMA_SGBUF */ - static u64 skl_adjust_codec_delay(struct snd_pcm_substream *substream, u64 nsec) { @@ -1325,7 +1314,7 @@ static int skl_platform_soc_new(struct snd_soc_component *component, size = MAX_PREALLOC_SIZE; snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, - snd_dma_pci_data(skl->pci), + &skl->pci->dev, size, MAX_PREALLOC_SIZE); } @@ -1493,7 +1482,6 @@ static const struct snd_soc_component_driver skl_component = { .pointer = skl_platform_soc_pointer, .get_time_info = skl_platform_soc_get_time_info, .mmap = skl_platform_soc_mmap, - .page = skl_platform_soc_page, .pcm_construct = skl_platform_soc_new, .pcm_destruct = skl_platform_soc_free, .module_get_upon_open = 1, /* increment refcount when a pcm is opened */ diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 141dbbf975ac..58ba3e9469ba 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -27,6 +27,7 @@ #include <sound/hda_i915.h> #include <sound/hda_codec.h> #include <sound/intel-nhlt.h> +#include <sound/intel-dsp-config.h> #include "skl.h" #include "skl-sst-dsp.h" #include "skl-sst-ipc.h" @@ -987,22 +988,10 @@ static int skl_probe(struct pci_dev *pci, switch (skl_pci_binding) { case SND_SKL_PCI_BIND_AUTO: - /* - * detect DSP by checking class/subclass/prog-id information - * class=04 subclass 03 prog-if 00: no DSP, use legacy driver - * class=04 subclass 01 prog-if 00: DSP is present - * (and may be required e.g. for DMIC or SSP support) - * class=04 subclass 03 prog-if 80: use DSP or legacy mode - */ - if (pci->class == 0x040300) { - dev_info(&pci->dev, "The DSP is not enabled on this platform, aborting probe\n"); + err = snd_intel_dsp_driver_probe(pci); + if (err != SND_INTEL_DSP_DRIVER_ANY && + err != SND_INTEL_DSP_DRIVER_SST) return -ENODEV; - } - if (pci->class != 0x040100 && pci->class != 0x040380) { - dev_err(&pci->dev, "Unknown PCI class/subclass/prog-if information (0x%06x) found, aborting probe\n", pci->class); - return -ENODEV; - } - dev_info(&pci->dev, "DSP detected with PCI class/subclass/prog-if info 0x%06x\n", pci->class); break; case SND_SKL_PCI_BIND_LEGACY: dev_info(&pci->dev, "Module parameter forced binding with HDaudio legacy, aborting probe\n"); diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig index 213d4dab0346..295cfffa4646 100644 --- a/sound/soc/pxa/Kconfig +++ b/sound/soc/pxa/Kconfig @@ -190,14 +190,14 @@ config SND_PXA2XX_SOC_MAGICIAN HTC Magician. config SND_PXA2XX_SOC_MIOA701 - tristate "SoC Audio support for MIO A701" - depends on SND_PXA2XX_SOC && MACH_MIOA701 + tristate "SoC Audio support for MIO A701" + depends on SND_PXA2XX_SOC && MACH_MIOA701 depends on AC97_BUS=n - select SND_PXA2XX_SOC_AC97 - select SND_SOC_WM9713 - help - Say Y if you want to add support for SoC audio on the - MIO A701. + select SND_PXA2XX_SOC_AC97 + select SND_SOC_WM9713 + help + Say Y if you want to add support for SoC audio on the + MIO A701. config SND_PXA2XX_SOC_IMOTE2 tristate "SoC Audio support for IMote 2" @@ -205,7 +205,7 @@ config SND_PXA2XX_SOC_IMOTE2 select SND_PXA2XX_SOC_I2S select SND_SOC_WM8940 help - Say Y if you want to add support for SoC audio on the + Say Y if you want to add support for SoC audio on the IMote 2. config SND_MMP_SOC_BROWNSTONE diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig index 60086858e920..6530d2462a9e 100644 --- a/sound/soc/qcom/Kconfig +++ b/sound/soc/qcom/Kconfig @@ -3,8 +3,8 @@ config SND_SOC_QCOM tristate "ASoC support for QCOM platforms" depends on ARCH_QCOM || COMPILE_TEST help - Say Y or M if you want to add support to use audio devices - in Qualcomm Technologies SOC-based platforms. + Say Y or M if you want to add support to use audio devices + in Qualcomm Technologies SOC-based platforms. config SND_SOC_LPASS_CPU tristate @@ -30,17 +30,17 @@ config SND_SOC_STORM select SND_SOC_LPASS_IPQ806X select SND_SOC_MAX98357A help - Say Y or M if you want add support for SoC audio on the - Qualcomm Technologies IPQ806X-based Storm board. + Say Y or M if you want add support for SoC audio on the + Qualcomm Technologies IPQ806X-based Storm board. config SND_SOC_APQ8016_SBC tristate "SoC Audio support for APQ8016 SBC platforms" depends on SND_SOC_QCOM select SND_SOC_LPASS_APQ8016 help - Support for Qualcomm Technologies LPASS audio block in - APQ8016 SOC-based systems. - Say Y if you want to use audio devices on MI2S. + Support for Qualcomm Technologies LPASS audio block in + APQ8016 SOC-based systems. + Say Y if you want to use audio devices on MI2S. config SND_SOC_QCOM_COMMON tristate @@ -93,9 +93,9 @@ config SND_SOC_MSM8996 select SND_SOC_QDSP6 select SND_SOC_QCOM_COMMON help - Support for Qualcomm Technologies LPASS audio block in - APQ8096 SoC-based systems. - Say Y if you want to use audio device on this SoCs + Support for Qualcomm Technologies LPASS audio block in + APQ8096 SoC-based systems. + Say Y if you want to use audio device on this SoCs config SND_SOC_SDM845 tristate "SoC Machine driver for SDM845 boards" diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 93bb80d089be..2b0eca02a8b9 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c @@ -309,7 +309,7 @@ static int camelot_pcm_new(struct snd_soc_component *component, */ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_KERNEL), + NULL, DMABRG_PREALLOC_BUFFER, DMABRG_PREALLOC_BUFFER_MAX); return 0; diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 1590e805d016..9054558ce386 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -444,6 +444,25 @@ int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, return snd_pcm_lib_ioctl(substream, cmd, arg); } +int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream) +{ + struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_component *component; + struct snd_soc_rtdcom_list *rtdcom; + int ret; + + for_each_rtd_components(rtd, rtdcom, component) { + if (component->driver->ioctl) { + ret = component->driver->sync_stop(component, + substream); + if (ret < 0) + return ret; + } + } + + return 0; +} + int snd_soc_pcm_component_copy_user(struct snd_pcm_substream *substream, int channel, unsigned long pos, void __user *buf, unsigned long bytes) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 01eb8700c3de..76b7ee637e86 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -3000,7 +3000,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) rtd->ops.hw_free = dpcm_fe_dai_hw_free; rtd->ops.close = dpcm_fe_dai_close; rtd->ops.pointer = soc_pcm_pointer; - rtd->ops.ioctl = snd_soc_pcm_component_ioctl; } else { rtd->ops.open = soc_pcm_open; rtd->ops.hw_params = soc_pcm_hw_params; @@ -3009,12 +3008,15 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) rtd->ops.hw_free = soc_pcm_hw_free; rtd->ops.close = soc_pcm_close; rtd->ops.pointer = soc_pcm_pointer; - rtd->ops.ioctl = snd_soc_pcm_component_ioctl; } for_each_rtd_components(rtd, rtdcom, component) { const struct snd_soc_component_driver *drv = component->driver; + if (drv->ioctl) + rtd->ops.ioctl = snd_soc_pcm_component_ioctl; + if (drv->sync_stop) + rtd->ops.sync_stop = snd_soc_pcm_component_sync_stop; if (drv->copy_user) rtd->ops.copy_user = snd_soc_pcm_component_copy_user; if (drv->page) diff --git a/sound/soc/sof/imx/Kconfig b/sound/soc/sof/imx/Kconfig index 71f318bc2c74..bae4f7bf5f75 100644 --- a/sound/soc/sof/imx/Kconfig +++ b/sound/soc/sof/imx/Kconfig @@ -5,9 +5,9 @@ config SND_SOC_SOF_IMX_TOPLEVEL depends on ARM64|| COMPILE_TEST depends on SND_SOC_SOF_OF help - This adds support for Sound Open Firmware for NXP i.MX platforms. - Say Y if you have such a device. - If unsure select "N". + This adds support for Sound Open Firmware for NXP i.MX platforms. + Say Y if you have such a device. + If unsure select "N". if SND_SOC_SOF_IMX_TOPLEVEL @@ -16,9 +16,9 @@ config SND_SOC_SOF_IMX8_SUPPORT depends on IMX_SCU depends on IMX_DSP help - This adds support for Sound Open Firmware for NXP i.MX8 platforms - Say Y if you have such a device. - If unsure select "N". + This adds support for Sound Open Firmware for NXP i.MX8 platforms + Say Y if you have such a device. + If unsure select "N". config SND_SOC_SOF_IMX8 def_tristate SND_SOC_SOF_OF diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index 92f7485b6994..cc09bb606f7d 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -37,7 +37,7 @@ config SND_SOC_SOF_INTEL_PCI config SND_SOC_SOF_INTEL_HIFI_EP_IPC tristate help - This option is not user-selectable but automagically handled by + This option is not user-selectable but automagically handled by 'select' statements at a higher level config SND_SOC_SOF_INTEL_ATOM_HIFI_EP @@ -234,31 +234,31 @@ config SND_SOC_SOF_COMETLAKE_H_SUPPORT config SND_SOC_SOF_TIGERLAKE_SUPPORT bool "SOF support for Tigerlake" help - This adds support for Sound Open Firmware for Intel(R) platforms - using the Tigerlake processors. - Say Y if you have such a device. - If unsure select "N". + This adds support for Sound Open Firmware for Intel(R) platforms + using the Tigerlake processors. + Say Y if you have such a device. + If unsure select "N". config SND_SOC_SOF_TIGERLAKE tristate select SND_SOC_SOF_HDA_COMMON help - This option is not user-selectable but automagically handled by + This option is not user-selectable but automagically handled by 'select' statements at a higher level config SND_SOC_SOF_ELKHARTLAKE_SUPPORT bool "SOF support for ElkhartLake" help - This adds support for Sound Open Firmware for Intel(R) platforms - using the ElkhartLake processors. - Say Y if you have such a device. - If unsure select "N". + This adds support for Sound Open Firmware for Intel(R) platforms + using the ElkhartLake processors. + Say Y if you have such a device. + If unsure select "N". config SND_SOC_SOF_ELKHARTLAKE tristate select SND_SOC_SOF_HDA_COMMON help - This option is not user-selectable but automagically handled by + This option is not user-selectable but automagically handled by 'select' statements at a higher level config SND_SOC_SOF_JASPERLAKE_SUPPORT @@ -338,7 +338,7 @@ config SND_SOC_SOF_HDA tristate select SND_HDA_EXT_CORE if SND_SOC_SOF_HDA_LINK select SND_SOC_HDAC_HDA if SND_SOC_SOF_HDA_AUDIO_CODEC - select SND_INTEL_NHLT if ACPI + select SND_INTEL_DSP_CONFIG help This option is not user-selectable but automagically handled by 'select' statements at a higher level diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 3d5cd1b445ba..549238a98b2a 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -454,17 +454,6 @@ static snd_pcm_uframes_t sof_pcm_pointer(struct snd_soc_component *component, return host; } -#ifdef CONFIG_SND_DMA_SGBUF -static struct page *sof_pcm_page(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - unsigned long offset) -{ - return snd_pcm_sgbuf_ops_page(substream, offset); -} -#else -#define sof_pcm_page NULL -#endif /* CONFIG_SND_DMA_SGBUF */ - static int sof_pcm_open(struct snd_soc_component *component, struct snd_pcm_substream *substream) { @@ -788,7 +777,6 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev) pd->hw_free = sof_pcm_hw_free; pd->trigger = sof_pcm_trigger; pd->pointer = sof_pcm_pointer; - pd->page = sof_pcm_page; #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS) pd->compr_ops = &sof_compressed_ops; diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 3252dbe277c8..bbeffd932de7 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/pci.h> #include <linux/pm_runtime.h> +#include <sound/intel-dsp-config.h> #include <sound/soc-acpi.h> #include <sound/soc-acpi-intel-match.h> #include <sound/sof.h> @@ -270,6 +271,11 @@ static int sof_pci_probe(struct pci_dev *pci, const struct snd_sof_dsp_ops *ops; int ret; + ret = snd_intel_dsp_driver_probe(pci); + if (ret != SND_INTEL_DSP_DRIVER_ANY && + ret != SND_INTEL_DSP_DRIVER_SOF) + return -ENODEV; + dev_dbg(&pci->dev, "PCI DSP detected"); /* get ops for platform */ diff --git a/sound/soc/xilinx/Kconfig b/sound/soc/xilinx/Kconfig index 69973179ef15..1d3586b68db7 100644 --- a/sound/soc/xilinx/Kconfig +++ b/sound/soc/xilinx/Kconfig @@ -9,15 +9,15 @@ config SND_SOC_XILINX_I2S encapsulates PCM in AES format and sends AES data. config SND_SOC_XILINX_AUDIO_FORMATTER - tristate "Audio support for the the Xilinx audio formatter" - help - Select this option to enable Xilinx audio formatter - support. This provides DMA platform device support for - audio functionality. + tristate "Audio support for the the Xilinx audio formatter" + help + Select this option to enable Xilinx audio formatter + support. This provides DMA platform device support for + audio functionality. config SND_SOC_XILINX_SPDIF - tristate "Audio support for the the Xilinx SPDIF" - help - Select this option to enable Xilinx SPDIF Audio. - This provides playback and capture of SPDIF audio in - AES format. + tristate "Audio support for the the Xilinx SPDIF" + help + Select this option to enable Xilinx SPDIF Audio. + This provides playback and capture of SPDIF audio in + AES format. diff --git a/sound/soc/zte/Kconfig b/sound/soc/zte/Kconfig index a7842e4b791c..a23d4f13ca19 100644 --- a/sound/soc/zte/Kconfig +++ b/sound/soc/zte/Kconfig @@ -18,9 +18,9 @@ config ZX_I2S ZTE ZX I2S interface config ZX_TDM - tristate "ZTE ZX TDM Driver Support" - depends on COMMON_CLK - select SND_SOC_GENERIC_DMAENGINE_PCM - help - Say Y or M if you want to add support for codecs attached to the - ZTE ZX TDM interface + tristate "ZTE ZX TDM Driver Support" + depends on COMMON_CLK + select SND_SOC_GENERIC_DMAENGINE_PCM + help + Say Y or M if you want to add support for codecs attached to the + ZTE ZX TDM interface |