Skip to contentSkip to conversation

alsaloop: Adding openctl_elem debug log

PATCH Applied Pavel Hofman 2 participants 2 messages Oct 1, 2021 – Oct 4, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsaloop: Adding openctl_elem debug log

When debugging what ctl elem was found and opened (if any) a debug log is helpful.

---
 alsaloop/pcmjob.c | 5 +++++
 1 file changed, 5 insertions(+)
alsaloop/pcmjob.c +5 -0
index 8b72af4..845ab82 100644
@@ -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);
 		}
 	}
 }
Signature · 1 line
2.25.1
#1 lore raw
Quoted 15 lines · Pavel Hofman

When debugging what ctl elem was found and opened (if any) a debug log is helpful.

---
  alsaloop/pcmjob.c | 5 +++++
  1 file changed, 5 insertions(+)
alsaloop/pcmjob.c +0 -0
index 8b72af4..845ab82 100644
@@ -1191,6 +1191,11 @@ static void openctl_elem(struct loopback_handle *lhandle,
  		if (err < 0) {

alsaloop/pcmjob.c static void openctl_elem(struct loopback_handle *lhandle, · line 1201

Quoted 10 lines
alsaloop/pcmjob.c +5 -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

Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.