[PATCH] alsaloop: Adding openctl_elem debug log

Jaroslav Kysela perex at perex.cz
Mon Oct 4 10:45:26 CEST 2021


On 01. 10. 21 10:00, Pavel Hofman wrote:
> When debugging what ctl elem was found and opened (if any) a debug log is
> helpful.
> 
> Signed-off-by: Pavel Hofman <pavel.hofman at ivitera.com>
> ---
>   alsaloop/pcmjob.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c
> index 8b72af4..845ab82 100644
> --- a/alsaloop/pcmjob.c
> +++ b/alsaloop/pcmjob.c
> @@ -1191,6 +1191,11 @@ static void openctl_elem(struct loopback_handle *lhandle,
>   		if (err < 0) {
>   			snd_ctl_elem_value_free(*elem);
>   			*elem = NULL;
> +		} else {
> +			if (verbose)
> +				snd_output_printf(lhandle->loopback->output,
> +						"Opened PCM element %s of %s, device %d, subdevice %d\n",
> +						name, snd_ctl_name(lhandle->ctl), device, subdevice);
>   		}
>   	}
>   }
> 

Applied. Thank you.

				Jaroslav

-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Alsa-devel mailing list