[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, stable-queue, updated. v0.9.21-58-g522c446

Lennart Poettering gitmailer-noreply at 0pointer.de
Sun Feb 21 19:55:04 PST 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 stable-queue branch has been updated
      from  4a32103d84102ee91368eed1f30613de6da12f6a (commit)

- Log -----------------------------------------------------------------
522c446 alsa-util: strip spaces from ALSA card/pcm names
-----------------------------------------------------------------------

Summary of changes:
 src/modules/alsa/alsa-util.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

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

commit 522c446ddc2bf2f4467f9de16f8618fc544a94fe
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Feb 21 22:00:49 2010 +0100

    alsa-util: strip spaces from ALSA card/pcm names
    
    http://pulseaudio.org/ticket/778

diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 52f1259..1cbb3f3 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -874,12 +874,12 @@ void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card) {
     pa_proplist_setf(p, "alsa.card", "%i", card);
 
     if (snd_card_get_name(card, &cn) >= 0) {
-        pa_proplist_sets(p, "alsa.card_name", cn);
+        pa_proplist_sets(p, "alsa.card_name", pa_strip(cn));
         free(cn);
     }
 
     if (snd_card_get_longname(card, &lcn) >= 0) {
-        pa_proplist_sets(p, "alsa.long_card_name", lcn);
+        pa_proplist_sets(p, "alsa.long_card_name", pa_strip(lcn));
         free(lcn);
     }
 
@@ -937,8 +937,11 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *
         if (alsa_subclass_table[subclass])
             pa_proplist_sets(p, "alsa.subclass", alsa_subclass_table[subclass]);
 
-    if ((n = snd_pcm_info_get_name(pcm_info)))
-        pa_proplist_sets(p, "alsa.name", n);
+    if ((n = snd_pcm_info_get_name(pcm_info))) {
+        char *t = pa_xstrdup(n);
+        pa_proplist_sets(p, "alsa.name", pa_strip(t));
+        pa_xfree(t);
+    }
 
     if ((id = snd_pcm_info_get_id(pcm_info)))
         pa_proplist_sets(p, "alsa.id", id);
@@ -1331,6 +1334,5 @@ pa_bool_t pa_alsa_may_tsched(pa_bool_t want) {
         return FALSE;
     }
 
-
     return TRUE;
 }

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list