diff options
Diffstat (limited to 'sound/soc/codecs')
-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 |
4 files changed, 42 insertions, 42 deletions
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 |