summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-util.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-util.c
parent557a90c487a5b681af6c01309fee89bd203b09c6 (diff)
print driver name when we encounter driver bugs
Diffstat (limited to 'src/modules/alsa/alsa-util.c')
-rw-r--r--src/modules/alsa/alsa-util.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 9be8153b..8eedeeb5 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -1578,9 +1578,13 @@ snd_pcm_sframes_t pa_alsa_safe_avail(snd_pcm_t *pcm, size_t hwbuf_size, const pa
k >= pa_bytes_per_second(ss)*10)
PA_ONCE_BEGIN {
- pa_log(_("snd_pcm_avail_update() returned a value that is exceptionally large: %lu bytes (%lu ms). "
- "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers."),
- (unsigned long) k, (unsigned long) (pa_bytes_to_usec(k, ss) / PA_USEC_PER_MSEC));
+ char *dn = pa_alsa_get_driver_name_by_pcm(pcm);
+ pa_log(_("snd_pcm_avail() returned a value that is exceptionally large: %lu bytes (%lu ms).\n"
+ "Most likely this is a bug in the ALSA driver '%s'. Please report this issue to the ALSA developers."),
+ (unsigned long) k,
+ (unsigned long) (pa_bytes_to_usec(k, ss) / PA_USEC_PER_MSEC),
+ pa_strnull(dn));
+ pa_xfree(dn);
} PA_ONCE_END;
return n;
@@ -1649,9 +1653,13 @@ int pa_alsa_safe_mmap_begin(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas
k >= pa_bytes_per_second(ss)*10)
PA_ONCE_BEGIN {
- pa_log(_("snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes (%lu ms). "
- "Most likely this is an ALSA driver bug. Please report this issue to the ALSA developers."),
- (unsigned long) k, (unsigned long) (pa_bytes_to_usec(k, ss) / PA_USEC_PER_MSEC));
+ char *dn = pa_alsa_get_driver_name_by_pcm(pcm);
+ pa_log(_("snd_pcm_mmap_begin() returned a value that is exceptionally large: %lu bytes (%lu ms).\n"
+ "Most likely this is a bug in the ALSA driver '%s'. Please report this issue to the ALSA developers."),
+ (unsigned long) k,
+ (unsigned long) (pa_bytes_to_usec(k, ss) / PA_USEC_PER_MSEC),
+ pa_strnull(dn));
+ pa_xfree(dn);
} PA_ONCE_END;
return r;