summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-source.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-23 22:56:09 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-23 22:56:09 +0100
commit33601afbb11b6caba8c2f057839bd234e094175a (patch)
treedd8a82236a73fc0d77aa14981085de268d064112 /src/modules/alsa/alsa-source.c
parent557a90c487a5b681af6c01309fee89bd203b09c6 (diff)
print driver name when we encounter driver bugs
Diffstat (limited to 'src/modules/alsa/alsa-source.c')
-rw-r--r--src/modules/alsa/alsa-source.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index fbc21f74..b0b9d9f2 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -289,9 +289,12 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled
if (polled)
PA_ONCE_BEGIN {
- pa_log(_("ALSA woke us up to read new data from the device, but there was actually nothing to read! "
- "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. "
- "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0."));
+ char *dn = pa_alsa_get_driver_name_by_pcm(u->pcm_handle);
+ pa_log(_("ALSA woke us up to read new data from the device, but there was actually nothing to read!\n"
+ "Most likely this is a bug in the ALSA driver '%s'. Please report this issue to the ALSA developers.\n"
+ "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail."),
+ pa_strnull(dn));
+ pa_xfree(dn);
} PA_ONCE_END;
#ifdef DEBUG_TIMING
@@ -410,9 +413,12 @@ static int unix_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled
if (polled)
PA_ONCE_BEGIN {
- pa_log(_("ALSA woke us up to read new data from the device, but there was actually nothing to read! "
- "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers. "
- "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail_update() returned 0."));
+ char *dn = pa_alsa_get_driver_name_by_pcm(u->pcm_handle);
+ pa_log(_("ALSA woke us up to read new data from the device, but there was actually nothing to read!\n"
+ "Most likely this is a bug in the ALSA driver '%s'. Please report this issue to the ALSA developers.\n"
+ "We were woken up with POLLIN set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail."),
+ pa_strnull(dn));
+ pa_xfree(dn);
} PA_ONCE_END;
break;