alsa: Use card description in default sink/source prefix when available

When given an explicit device.description in card_properties, prefer
this information over other default prefixes (e.g. 'Built-in Audio')
when constructing sink/source descriptions.

For example, if I manually configure the card description to be
"FooBar", I then expect that the sinks and created by the card also
have "FooBar" in their description instead of generic "Built-in
Audio".
This commit is contained in:
Pete Beardmore 2014-03-13 10:14:40 +00:00 committed by Tanu Kaskinen
parent efec98280f
commit fe6e41d7d2
9 changed files with 19 additions and 14 deletions

View file

@ -2278,7 +2278,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
}
pa_alsa_init_description(data.proplist);
pa_alsa_init_description(data.proplist, card);
if (u->control_device)
pa_alsa_init_proplist_ctl(data.proplist, u->control_device);