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);
}
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);
return FALSE;
}
-
return TRUE;
}