alsa-card: Add a new modarg "profile_set" for giving the card a custom profile set configuration file.

This commit is contained in:
Tanu Kaskinen 2011-02-25 16:28:10 +02:00 committed by Colin Guthrie
parent 46359043c4
commit 624152dac3

View file

@ -65,7 +65,8 @@ PA_MODULE_USAGE(
"tsched_buffer_watermark=<lower fill watermark> "
"profile=<profile name> "
"ignore_dB=<ignore dB information from the device?> "
"sync_volume=<syncronize sw and hw voluchanges in IO-thread?>");
"sync_volume=<syncronize sw and hw voluchanges in IO-thread?> "
"profile_set=<profile set configuration file> ");
static const char* const valid_modargs[] = {
"name",
@ -88,6 +89,7 @@ static const char* const valid_modargs[] = {
"profile",
"ignore_dB",
"sync_volume",
"profile_set",
NULL
};
@ -328,6 +330,11 @@ int pa__init(pa_module *m) {
fn = pa_udev_get_property(alsa_card_index, "PULSE_PROFILE_SET");
#endif
if (pa_modargs_get_value(ma, "profile_set", NULL)) {
pa_xfree(fn);
fn = pa_xstrdup(pa_modargs_get_value(ma, "profile_set", NULL));
}
u->profile_set = pa_alsa_profile_set_new(fn, &u->core->default_channel_map);
pa_xfree(fn);