]> code.delx.au - pulseaudio/commitdiff
alsa-card: Add a new modarg "profile_set" for giving the card a custom profile set...
authorTanu Kaskinen <tanu.kaskinen@digia.com>
Fri, 25 Feb 2011 14:28:10 +0000 (16:28 +0200)
committerColin Guthrie <cguthrie@mandriva.org>
Fri, 25 Feb 2011 15:44:57 +0000 (15:44 +0000)
src/modules/alsa/module-alsa-card.c

index ebd2f8ae150d1220f256a84b68ef6dc690c1589c..3f8576d7faa0d58db11e94aa5f96bb6efc8c6ce4 100644 (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);