mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ASoC: rockchip: pcm: Adjust min/max value for pcm config
- the original config is too strict to satisfy general usage. - adds CONFIG_SND_SOC_ROCKCHIP_PREALLOC_BUFFER_SIZE for flexible buffer size. Change-Id: I1f060269cb1887c17a2cd83701f0263993be8ec7 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user