From 5345ee803c531e2ef38357886c721a7cefda07f6 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 16 Jun 2021 09:41:34 +0200 Subject: [PATCH] a52: implement dump callback to dump the output parameters Signed-off-by: Jaroslav Kysela --- a52/pcm_a52.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c index 9b5d135..a6b04a1 100644 --- a/a52/pcm_a52.c +++ b/a52/pcm_a52.c @@ -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, -- 2.47.1