diff --git a/sound/soc/rockchip/Kconfig b/sound/soc/rockchip/Kconfig index 28a6c3c3b3a8..8d58beeb2eb9 100644 --- a/sound/soc/rockchip/Kconfig +++ b/sound/soc/rockchip/Kconfig @@ -6,6 +6,14 @@ config SND_SOC_ROCKCHIP the Rockchip SoCs' Audio interfaces. You will also need to select the audio interfaces to support below. +config SND_SOC_ROCKCHIP_PREALLOC_BUFFER_SIZE + int "Default prealloc buffer size (kbytes)" + depends on SND_SOC_ROCKCHIP + default "512" + help + The default value is 512 kilobytes. Only change this if you know + what you are doing. + config SND_SOC_ROCKCHIP_I2S tristate "Rockchip I2S Device Driver" depends on CLKDEV_LOOKUP && SND_SOC_ROCKCHIP diff --git a/sound/soc/rockchip/rockchip_pcm.c b/sound/soc/rockchip/rockchip_pcm.c index 4ac78d7a4b2d..2772f4b56328 100644 --- a/sound/soc/rockchip/rockchip_pcm.c +++ b/sound/soc/rockchip/rockchip_pcm.c @@ -24,17 +24,17 @@ static const struct snd_pcm_hardware snd_rockchip_hardware = { SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_INTERLEAVED, .period_bytes_min = 32, - .period_bytes_max = 8192, - .periods_min = 1, - .periods_max = 52, - .buffer_bytes_max = 64 * 1024, + .period_bytes_max = SIZE_MAX, + .periods_min = 2, + .periods_max = 4096, + .buffer_bytes_max = SIZE_MAX, .fifo_size = 32, }; static const struct snd_dmaengine_pcm_config rk_dmaengine_pcm_config = { .pcm_hardware = &snd_rockchip_hardware, .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config, - .prealloc_buffer_size = 32 * 1024, + .prealloc_buffer_size = CONFIG_SND_SOC_ROCKCHIP_PREALLOC_BUFFER_SIZE * 1024, }; int rockchip_pcm_platform_register(struct device *dev)