From 80cb260f654d8c47474687431dc5a78b1610d90c Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Tue, 31 Mar 2026 00:20:49 +0300 Subject: [PATCH] utils: sofprobeclient: set SOF probe defaults Change default parameters to match typical SOF probe usage: card 3, device 0, buffer 8192, 4 fragments, S32_LE format, 48000 Hz sample rate, and 4 channels. All parameters remain overridable via command line options. Closes: https://github.com/alsa-project/tinycompress/pull/35 Signed-off-by: Jyri Sarha Signed-off-by: Jaroslav Kysela --- src/utils/sofprobeclient.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/sofprobeclient.c b/src/utils/sofprobeclient.c index a417321..754084d 100644 --- a/src/utils/sofprobeclient.c +++ b/src/utils/sofprobeclient.c @@ -84,9 +84,9 @@ static int file; static FILE *finfo; static bool streamed; -static const unsigned int DEFAULT_CHANNELS = 1; -static const unsigned int DEFAULT_RATE = 44100; -static const unsigned int DEFAULT_FORMAT = SNDRV_PCM_FORMAT_S16_LE; +static const unsigned int DEFAULT_CHANNELS = 4; +static const unsigned int DEFAULT_RATE = 48000; +static const unsigned int DEFAULT_FORMAT = SNDRV_PCM_FORMAT_S32_LE; static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM; static const struct { @@ -397,9 +397,9 @@ static void sig_handler(int signum __attribute__ ((unused))) int main(int argc, char **argv) { char *file; - unsigned long buffer_size = 0; + unsigned long buffer_size = 8192; int c, i; - unsigned int card = 0, device = 0, frag = 0, length = 0; + unsigned int card = 3, device = 0, frag = 4, length = 0; unsigned int rate = DEFAULT_RATE, channels = DEFAULT_CHANNELS; unsigned int format = DEFAULT_FORMAT; unsigned int codec_id = DEFAULT_CODEC_ID; -- 2.52.0