diff mbox series

alsaloop: Adding openctl_elem debug log

Message ID 20211001080028.6423-1-pavel.hofman@ivitera.com (mailing list archive)
State New, archived
Headers show
Series alsaloop: Adding openctl_elem debug log | expand

Commit Message

Pavel Hofman Oct. 1, 2021, 8 a.m. UTC
When debugging what ctl elem was found and opened (if any) a debug log is
helpful.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
---
 alsaloop/pcmjob.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Jaroslav Kysela Oct. 4, 2021, 8:45 a.m. UTC | #1
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@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
diff mbox series

Patch

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);
 		}
 	}
 }