From 0b54d1d60675ca5ef64bc43a2958e4e1b70dfb15 Mon Sep 17 00:00:00 2001 From: "Wan, Xinxin" Date: Tue, 23 Apr 2024 10:49:59 +0000 Subject: [PATCH] ALSA:dummy:Enable dummy driver for multiple formats Enable dummy driver for 16 channel. Enable dummy driver with 24 bit and 32 bit. Test done with tinyalsa: - Recording and playback 16-channel 24bit and 32bit audio on the Dummy card works fine. Change-Id: I685639fb714b4ad95990f8bd29840d5688bc8955 Signed-off-by: pmandri Signed-off-by: Wan, Xinxin Signed-off-by: Martin, Chen --- sound/drivers/dummy.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 9c17b49a2ae1..8470e4950bdf 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -31,15 +31,16 @@ MODULE_LICENSE("GPL"); #define MAX_MIDI_DEVICES 2 /* defaults */ -#define MAX_BUFFER_SIZE (64*1024) +#define MAX_BUFFER_SIZE (16*64*1024) #define MIN_PERIOD_SIZE 64 #define MAX_PERIOD_SIZE MAX_BUFFER_SIZE -#define USE_FORMATS (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE) +#define USE_FORMATS (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE \ + | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) #define USE_RATE SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000 #define USE_RATE_MIN 5500 #define USE_RATE_MAX 48000 #define USE_CHANNELS_MIN 1 -#define USE_CHANNELS_MAX 2 +#define USE_CHANNELS_MAX 16 #define USE_PERIODS_MIN 1 #define USE_PERIODS_MAX 1024 #define USE_MIXER_VOLUME_LEVEL_MIN -50