]> code.delx.au - pulseaudio/commitdiff
alsa: Handle the "profile" modarg in module-alsa-card
authorTanu Kaskinen <tanu.kaskinen@digia.com>
Mon, 3 Oct 2011 15:11:47 +0000 (18:11 +0300)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 20 Oct 2011 03:58:44 +0000 (09:28 +0530)
src/modules/alsa/module-alsa-card.c

index c3e8824f4215dc7cd6f2479f87305118bc7a0169..5bf64807ddc1e8b4a35a5178e04483865f1e3a34 100644 (file)
@@ -294,6 +294,7 @@ int pa__init(pa_module *m) {
     struct userdata *u;
     pa_reserve_wrapper *reserve = NULL;
     const char *description;
+    const char *profile = NULL;
     char *fn = NULL;
     pa_bool_t namereg_fail = FALSE;
 
@@ -390,6 +391,9 @@ int pa__init(pa_module *m) {
         goto fail;
     }
 
+    if ((profile = pa_modargs_get_value(ma, "profile", NULL)))
+        pa_card_new_data_set_profile(&data, profile);
+
     u->card = pa_card_new(m->core, &data);
     pa_card_new_data_done(&data);