diff options
| author | Lennart Poettering <lennart@poettering.net> | 2009-02-24 11:29:11 +0100 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2009-02-24 11:29:11 +0100 | 
| commit | 03ac71bcad97f013f1fc7b5ec65f642be437d65b (patch) | |
| tree | a0b26180e15f09e2c19796487df1dbc56d34278b | |
| parent | ba3c7668a472672bd86eb06dbbbffcef17722134 (diff) | |
don't put both the card and the pcm name in the description of a device if one contains the other
| -rw-r--r-- | src/modules/alsa/alsa-util.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c index ec20d1dd..6740c069 100644 --- a/src/modules/alsa/alsa-util.c +++ b/src/modules/alsa/alsa-util.c @@ -1448,9 +1448,9 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *          cn = pa_proplist_gets(p, "alsa.card_name");      } -    if (cn && n) -        pa_proplist_setf(p, PA_PROP_DEVICE_DESCRIPTION, "%s - %s", cn, n); -    else if (cn) +    if (cn && n && !strstr(cn, n) && !strstr(n, cn)) +        pa_proplist_setf(p, PA_PROP_DEVICE_DESCRIPTION, "%s, %s", cn, n); +    else if (cn && (!n || strstr(cn, n)))          pa_proplist_sets(p, PA_PROP_DEVICE_DESCRIPTION, cn);      else if (n)          pa_proplist_sets(p, PA_PROP_DEVICE_DESCRIPTION, n); | 
