[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.19-530-g0525807

Colin Guthrie gitmailer-noreply at 0pointer.de
Thu Aug 26 07:42:54 PDT 2010


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  ef0c73cb9de92c1ea3c7c3e2fc2808dc87af5c7f (commit)

- Log -----------------------------------------------------------------
0525807 alsa-sink: Get rid of a compiler warning regarding rewind_safeguard type.
6e33845 module-udev-detect: When loading module-alsa-card, use namereg_fail=false.
c277dc6 module-alsa-card: New argument: namereg_fail.
-----------------------------------------------------------------------

Summary of changes:
 src/modules/alsa/alsa-sink.c        |    4 ++--
 src/modules/alsa/module-alsa-card.c |   15 +++++++++++++++
 src/modules/module-udev-detect.c    |    1 +
 3 files changed, 18 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------

commit c277dc65a331887c3e779eb733d4b35c53b6a45f
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Tue Aug 24 17:33:58 2010 +0300

    module-alsa-card: New argument: namereg_fail.
    
    This is added so that module-udev-detect can load multiple module-alsa-card
    instances with the same card name - forcing namereg_fail to false allows the
    name registry to mangle the card names to be unique.

diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index 6bea33d..37b5a17 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -53,6 +53,7 @@ PA_MODULE_USAGE(
         "sink_properties=<properties for the sink> "
         "source_name=<name for the source> "
         "source_properties=<properties for the source> "
+        "namereg_fail=<pa_namereg_register() fail parameter value> "
         "device_id=<ALSA card index> "
         "format=<sample format> "
         "rate=<sample rate> "
@@ -73,6 +74,7 @@ static const char* const valid_modargs[] = {
     "sink_properties",
     "source_name",
     "source_properties",
+    "namereg_fail",
     "device_id",
     "format",
     "rate",
@@ -286,6 +288,7 @@ int pa__init(pa_module *m) {
     pa_reserve_wrapper *reserve = NULL;
     const char *description;
     char *fn = NULL;
+    pa_bool_t namereg_fail = FALSE;
 
     pa_alsa_refcnt_inc();
 
@@ -341,6 +344,18 @@ int pa__init(pa_module *m) {
     pa_alsa_init_description(data.proplist);
     set_card_name(&data, ma, u->device_id);
 
+    /* We need to give pa_modargs_get_value_boolean() a pointer to a local
+     * variable instead of using &data.namereg_fail directly, because
+     * data.namereg_fail is a bitfield and taking the address of a bitfield
+     * variable is impossible. */
+    namereg_fail = data.namereg_fail;
+    if (pa_modargs_get_value_boolean(ma, "namereg_fail", &namereg_fail) < 0) {
+        pa_log("Failed to parse boolean argument namereg_fail.");
+        pa_card_new_data_done(&data);
+        goto fail;
+    }
+    data.namereg_fail = namereg_fail;
+
     if (reserve)
         if ((description = pa_proplist_gets(data.proplist, PA_PROP_DEVICE_DESCRIPTION)))
             pa_reserve_wrapper_set_application_device_name(reserve, description);

commit 6e33845783d87d1412e8a403b25c8922610905e1
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Tue Aug 24 18:17:19 2010 +0300

    module-udev-detect: When loading module-alsa-card, use namereg_fail=false.

diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
index 7695d3c..f143c28 100644
--- a/src/modules/module-udev-detect.c
+++ b/src/modules/module-udev-detect.c
@@ -383,6 +383,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) {
     d->args = pa_sprintf_malloc("device_id=\"%s\" "
                                 "name=\"%s\" "
                                 "card_name=\"%s\" "
+                                "namereg_fail=false "
                                 "tsched=%s "
                                 "ignore_dB=%s "
                                 "card_properties=\"module-udev-detect.discovered=1\"",

commit 0525807b63c11d3d71526cec553e8d80ad3f09cd
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Tue Aug 24 17:47:25 2010 +0300

    alsa-sink: Get rid of a compiler warning regarding rewind_safeguard type.
    
    GCC gave a warning, because the pointer given to pa_modargs_get_value_u32() had
    type size_t instead of uint32_t.

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 80fdcaa..05477dc 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1681,9 +1681,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
     const char *dev_id = NULL;
     pa_sample_spec ss, requested_ss;
     pa_channel_map map;
-    uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark;
+    uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark, rewind_safeguard;
     snd_pcm_uframes_t period_frames, buffer_frames, tsched_frames;
-    size_t frame_size, rewind_safeguard;
+    size_t frame_size;
     pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE;
     pa_sink_new_data data;
     pa_alsa_profile_set *profile_set = NULL;

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list