[pulseaudio-discuss] [PATCH] alsa-card: Handle the "profile" modarg.

David Henningsson david.henningsson at canonical.com
Mon Oct 3 12:18:04 PDT 2011


On 10/03/2011 05:11 PM, Tanu Kaskinen wrote:
> ---
>   src/modules/alsa/module-alsa-card.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
> index 6d1a5e1..a8d9c59 100644
> --- a/src/modules/alsa/module-alsa-card.c
> +++ b/src/modules/alsa/module-alsa-card.c
> @@ -291,6 +291,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;
>
> @@ -387,6 +388,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);
>

Seems simple enough. What are your thoughts about this module argument 
vs module-card-restore setting the profile, which one will take 
precedence and why?

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list