[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.13-435-gdbb8951
Lennart Poettering
gitmailer-noreply at 0pointer.de
Thu Jan 29 17:26:18 PST 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 1c94cfe29f552c22fb5807ca048c255710a6b487 (commit)
- Log -----------------------------------------------------------------
dbb8951... dump properties when we create a new sink or source
2557017... suppress lines made up only of whitespace
e6f4586... include ALSA driver in properties for cards/sink
4bd6545... add new function pa_alsa_get_driver_name()
-----------------------------------------------------------------------
Summary of changes:
src/modules/alsa/alsa-util.c | 26 +++++++++++++++++++++++++-
src/modules/alsa/alsa-util.h | 2 ++
src/pulsecore/log.c | 3 ++-
src/pulsecore/sink.c | 8 ++++++--
src/pulsecore/source.c | 8 ++++++--
5 files changed, 41 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
commit 4bd654542e43e61bd0422fd1191a6570e9875c4d
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jan 30 02:24:40 2009 +0100
add new function pa_alsa_get_driver_name()
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 7e5a350..f23056a 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -31,6 +31,7 @@
#include <pulse/sample.h>
#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
+#include <pulse/util.h>
#include <pulsecore/log.h>
#include <pulsecore/macro.h>
@@ -1477,3 +1478,21 @@ int pa_alsa_safe_mmap_begin(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas
return r;
}
+
+char *pa_alsa_get_driver_name(int card) {
+ char *t, *m, *n;
+
+ pa_assert(card >= 0);
+
+ t = pa_sprintf_malloc("/sys/class/sound/card%i/device/driver/module", card);
+ m = pa_readlink(t);
+ pa_xfree(t);
+
+ if (!m)
+ return NULL;
+
+ n = pa_xstrdup(pa_path_get_filename(m));
+ pa_xfree(m);
+
+ return n;
+}
diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
index f2d3278..8a20934 100644
--- a/src/modules/alsa/alsa-util.h
+++ b/src/modules/alsa/alsa-util.h
@@ -129,4 +129,6 @@ pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll);
snd_pcm_sframes_t pa_alsa_safe_avail_update(snd_pcm_t *pcm, size_t hwbuf_size, const pa_sample_spec *ss);
int pa_alsa_safe_mmap_begin(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas, snd_pcm_uframes_t *offset, snd_pcm_uframes_t *frames, size_t hwbuf_size, const pa_sample_spec *ss);
+char *pa_alsa_get_driver_name(int card);
+
#endif
commit e6f4586f7b9ab3c64d3ebe80f4da21b3865d056e
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jan 30 02:24:58 2009 +0100
include ALSA driver in properties for cards/sink
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index f23056a..5236d02 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -1254,7 +1254,7 @@ void pa_alsa_redirect_errors_dec(void) {
}
void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card) {
- char *cn, *lcn;
+ char *cn, *lcn, *dn;
pa_assert(p);
pa_assert(card >= 0);
@@ -1271,6 +1271,11 @@ void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card) {
free(lcn);
}
+ if ((dn = pa_alsa_get_driver_name(card))) {
+ pa_proplist_sets(p, "alsa.driver_name", dn);
+ pa_xfree(dn);
+ }
+
#ifdef HAVE_HAL
pa_hal_get_info(c, p, card);
#endif
commit 2557017178b2f745d3473f3a9bb2e1782e4d11da
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jan 30 02:25:22 2009 +0100
suppress lines made up only of whitespace
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index 9a7f7ca..1ae4383 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
@@ -278,7 +278,8 @@ void pa_log_levelv_meta(
n++;
}
- if (!*t)
+ /* We ignore strings only made out of whitespace */
+ if (t[strspn(t, "\t ")] == 0)
continue;
switch (log_target) {
commit dbb8951a41b184da065b4966f4ae4d7afbf915e6
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jan 30 02:25:49 2009 +0100
dump properties when we create a new sink or source
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 3afeadb..61be86a 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -128,6 +128,7 @@ pa_sink* pa_sink_new(
char st[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
pa_source_new_data source_data;
const char *dn;
+ char *pt;
pa_assert(core);
pa_assert(data);
@@ -233,11 +234,14 @@ pa_sink* pa_sink_new(
if (s->card)
pa_assert_se(pa_idxset_put(s->card->sinks, s, NULL) >= 0);
- pa_log_info("Created sink %u \"%s\" with sample spec %s and channel map %s",
+ pt = pa_proplist_to_string_sep(s->proplist, "\n ");
+ pa_log_info("Created sink %u \"%s\" with sample spec %s and channel map %s\n %s",
s->index,
s->name,
pa_sample_spec_snprint(st, sizeof(st), &s->sample_spec),
- pa_channel_map_snprint(cm, sizeof(cm), &s->channel_map));
+ pa_channel_map_snprint(cm, sizeof(cm), &s->channel_map),
+ pt);
+ pa_xfree(pt);
pa_source_new_data_init(&source_data);
pa_source_new_data_set_sample_spec(&source_data, &s->sample_spec);
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 0152b08..38f8e53 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -119,6 +119,7 @@ pa_source* pa_source_new(
pa_source *s;
const char *name;
char st[PA_SAMPLE_SPEC_SNPRINT_MAX], cm[PA_CHANNEL_MAP_SNPRINT_MAX];
+ char *pt;
pa_assert(core);
pa_assert(data);
@@ -222,11 +223,14 @@ pa_source* pa_source_new(
if (s->card)
pa_assert_se(pa_idxset_put(s->card->sources, s, NULL) >= 0);
- pa_log_info("Created source %u \"%s\" with sample spec %s and channel map %s",
+ pt = pa_proplist_to_string_sep(s->proplist, "\n ");
+ pa_log_info("Created source %u \"%s\" with sample spec %s and channel map %s\n %s",
s->index,
s->name,
pa_sample_spec_snprint(st, sizeof(st), &s->sample_spec),
- pa_channel_map_snprint(cm, sizeof(cm), &s->channel_map));
+ pa_channel_map_snprint(cm, sizeof(cm), &s->channel_map),
+ pt);
+ pa_xfree(pt);
return s;
}
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list