Lines Matching refs:w
325 struct snd_soc_dapm_widget *w, struct snd_soc_tplg_dapm_widget *tplg_w) in soc_tplg_widget_load() argument
328 return tplg->ops->widget_load(tplg->comp, w, tplg_w); in soc_tplg_widget_load()
454 struct snd_soc_dapm_widget *w = in remove_widget() local
471 (struct soc_enum *)w->kcontrols[0]->private_value; in remove_widget()
473 snd_ctl_remove(card, w->kcontrols[0]); in remove_widget()
480 kfree(w->kcontrol_news); in remove_widget()
483 for (i = 0; i < w->num_kcontrols; i++) { in remove_widget()
484 struct snd_kcontrol *kcontrol = w->kcontrols[i]; in remove_widget()
488 kfree(w->kcontrols[i]->tlv.p); in remove_widget()
490 snd_ctl_remove(card, w->kcontrols[i]); in remove_widget()
493 kfree(w->kcontrol_news); in remove_widget()
591 int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w, in snd_soc_tplg_widget_bind_event() argument
597 w->event = NULL; in snd_soc_tplg_widget_bind_event()
603 w->event = events[i].event_handler; in snd_soc_tplg_widget_bind_event()
1371 struct snd_soc_tplg_dapm_widget *w) in soc_tplg_dapm_widget_create() argument
1379 if (strnlen(w->name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == in soc_tplg_dapm_widget_create()
1382 if (strnlen(w->sname, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == in soc_tplg_dapm_widget_create()
1387 w->name, w->id); in soc_tplg_dapm_widget_create()
1392 template.id = get_widget_id(w->id); in soc_tplg_dapm_widget_create()
1396 template.name = kstrdup(w->name, GFP_KERNEL); in soc_tplg_dapm_widget_create()
1399 template.sname = kstrdup(w->sname, GFP_KERNEL); in soc_tplg_dapm_widget_create()
1404 template.reg = w->reg; in soc_tplg_dapm_widget_create()
1405 template.shift = w->shift; in soc_tplg_dapm_widget_create()
1406 template.mask = w->mask; in soc_tplg_dapm_widget_create()
1407 template.subseq = w->subseq; in soc_tplg_dapm_widget_create()
1408 template.on_val = w->invert ? 0 : 1; in soc_tplg_dapm_widget_create()
1409 template.off_val = w->invert ? 1 : 0; in soc_tplg_dapm_widget_create()
1410 template.ignore_suspend = w->ignore_suspend; in soc_tplg_dapm_widget_create()
1411 template.event_flags = w->event_flags; in soc_tplg_dapm_widget_create()
1415 (sizeof(struct snd_soc_tplg_dapm_widget) + w->priv.size); in soc_tplg_dapm_widget_create()
1416 if (w->num_kcontrols == 0) { in soc_tplg_dapm_widget_create()
1423 w->name, w->num_kcontrols, control_hdr->type); in soc_tplg_dapm_widget_create()
1432 template.num_kcontrols = w->num_kcontrols; in soc_tplg_dapm_widget_create()
1456 template.num_kcontrols = w->num_kcontrols; in soc_tplg_dapm_widget_create()
1474 ret = soc_tplg_widget_load(tplg, &template, w); in soc_tplg_dapm_widget_create()
1486 w->name); in soc_tplg_dapm_widget_create()
1778 void snd_soc_tplg_widget_remove(struct snd_soc_dapm_widget *w) in snd_soc_tplg_widget_remove() argument
1781 if (w->dobj.type != SND_SOC_DOBJ_WIDGET) in snd_soc_tplg_widget_remove()
1784 remove_widget(w->dapm->component, &w->dobj, SOC_TPLG_PASS_WIDGET); in snd_soc_tplg_widget_remove()
1792 struct snd_soc_dapm_widget *w, *next_w; in snd_soc_tplg_widget_remove_all() local
1794 list_for_each_entry_safe(w, next_w, &dapm->card->widgets, list) { in snd_soc_tplg_widget_remove_all()
1797 if (w->dobj.type != SND_SOC_DOBJ_WIDGET || w->dapm != dapm) in snd_soc_tplg_widget_remove_all()
1801 if (w->dobj.index != index && in snd_soc_tplg_widget_remove_all()
1802 w->dobj.index != SND_SOC_TPLG_INDEX_ALL) in snd_soc_tplg_widget_remove_all()
1805 snd_soc_tplg_widget_remove(w); in snd_soc_tplg_widget_remove_all()
1806 snd_soc_dapm_free_widget(w); in snd_soc_tplg_widget_remove_all()