]> git.alsa-project.org Git - tinycompress.git/commitdiff
utils: sofprobeclient: set SOF probe defaults
authorJyri Sarha <jyri.sarha@linux.intel.com>
Mon, 30 Mar 2026 21:20:49 +0000 (00:20 +0300)
committerJaroslav Kysela <perex@perex.cz>
Fri, 29 May 2026 12:04:53 +0000 (14:04 +0200)
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 <jyri.sarha@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/utils/sofprobeclient.c

index a4173211ee428e1ba40bd8173842c86edb46c1ba..754084d5511d939063ba41cbae470b66948228f2 100644 (file)
@@ -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;