]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
a52: implement dump callback to dump the output parameters
authorJaroslav Kysela <perex@perex.cz>
Wed, 16 Jun 2021 07:41:34 +0000 (09:41 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 16 Jun 2021 07:43:54 +0000 (09:43 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
a52/pcm_a52.c

index 9b5d13584ca28b62847ad027c8da537c4a0bae87..a6b04a1acddcadd515ea366f6638a848422fee31 100644 (file)
@@ -542,6 +542,21 @@ static int a52_hw_free(snd_pcm_ioplug_t *io)
        return snd_pcm_hw_free(rec->slave);
 }
 
+/*
+ * dump callback
+ */
+static int a52_dump(snd_pcm_ioplug_t *io, snd_output_t *out)
+{
+       struct a52_ctx *rec = io->private_data;
+       snd_pcm_t *pcm = io->pcm;
+
+       snd_output_printf(out, "%s\n", io->name);
+       snd_output_printf(out, "Its setup is:\n");
+       snd_pcm_dump_setup(pcm, out);
+       snd_output_printf(out, "Slave: ");
+       snd_pcm_dump(rec->slave, out);
+}
+
 /*
  * sw_params callback
  *
@@ -836,6 +851,7 @@ static snd_pcm_ioplug_callback_t a52_ops = {
        .close = a52_close,
        .hw_params = a52_hw_params,
        .hw_free = a52_hw_free,
+       .dump = a52_dump,
        .sw_params = a52_sw_params,
        .prepare = a52_prepare,
        .drain = a52_drain,