On Tue, 2016-05-03 at 18:26 +0530, arun at accosted.net wrote: > @@ -1253,6 +1255,7 @@ static int ucm_create_mapping_direction( > Â Â Â Â Â Â Â Â Â pa_alsa_profile_set *ps, > Â Â Â Â Â Â Â Â Â pa_alsa_profile *p, > Â Â Â Â Â Â Â Â Â pa_alsa_ucm_device *device, > +Â Â Â Â Â Â Â Â pa_alsa_ucm_verb *verb, > Â Â Â Â Â Â Â Â Â const char *verb_name, The verb_name argument could be removed, since it's available through the verb object. > @@ -1310,6 +1324,7 @@ static int ucm_create_mapping_for_modifier( > Â Â Â Â Â Â Â Â Â pa_alsa_profile_set *ps, > Â Â Â Â Â Â Â Â Â pa_alsa_profile *p, > Â Â Â Â Â Â Â Â Â pa_alsa_ucm_modifier *modifier, > +Â Â Â Â Â Â Â Â pa_alsa_ucm_verb *verb, > Â Â Â Â Â Â Â Â Â const char *verb_name, Same as above. > @@ -1355,6 +1385,7 @@ static int ucm_create_mapping( > Â Â Â Â Â Â Â Â Â pa_alsa_profile_set *ps, > Â Â Â Â Â Â Â Â Â pa_alsa_profile *p, > Â Â Â Â Â Â Â Â Â pa_alsa_ucm_device *device, > +Â Â Â Â Â Â Â Â pa_alsa_ucm_verb *verb, > Â Â Â Â Â Â Â Â Â const char *verb_name, Same as above. > @@ -249,7 +249,7 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) { > Â Â Â Â Â Â Â Â Â PA_IDXSET_FOREACH(am, nd->profile->output_mappings, idx) { > Â > Â Â Â Â Â Â Â Â Â Â Â Â Â if (!am->sink) > -Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â am->sink = pa_alsa_sink_new(c->module, u->modargs, __FILE__, c, am); > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â am->sink = pa_alsa_sink_new(c->module, am->sink_modargs ? am->sink_modargs : u->modargs, __FILE__, c, am); I think it would be nicer if the place where you prepare am- >sink_modargs would always set the variable, so that we could always pass am->sink_modargs here. > +static pa_modargs* prepare_modargs(const char *module, const char *config) { > +Â Â Â Â pa_modargs *ma; > + > +Â Â Â Â /* It's easier to re-parse the module arguments than to do a deep modargs copy */ > +Â Â Â Â ma = pa_modargs_new(module, valid_modargs); > +Â Â Â Â if (!ma) > +Â Â Â Â Â Â Â Â return NULL; This should never happen, so an assertion would be better here. --Â Tanu