Lines Matching refs:template
334 struct snd_soc_dapm_widget template; in dapm_kcontrol_data_alloc() local
343 memset(&template, 0, sizeof(template)); in dapm_kcontrol_data_alloc()
344 template.reg = mc->reg; in dapm_kcontrol_data_alloc()
345 template.mask = (1 << fls(mc->max)) - 1; in dapm_kcontrol_data_alloc()
346 template.shift = mc->shift; in dapm_kcontrol_data_alloc()
348 template.off_val = mc->max; in dapm_kcontrol_data_alloc()
350 template.off_val = 0; in dapm_kcontrol_data_alloc()
351 template.on_val = template.off_val; in dapm_kcontrol_data_alloc()
352 template.id = snd_soc_dapm_kcontrol; in dapm_kcontrol_data_alloc()
353 template.name = name; in dapm_kcontrol_data_alloc()
355 data->value = template.on_val; in dapm_kcontrol_data_alloc()
359 &template); in dapm_kcontrol_data_alloc()
372 struct snd_soc_dapm_widget template; in dapm_kcontrol_data_alloc() local
381 memset(&template, 0, sizeof(template)); in dapm_kcontrol_data_alloc()
382 template.reg = e->reg; in dapm_kcontrol_data_alloc()
383 template.mask = e->mask << e->shift_l; in dapm_kcontrol_data_alloc()
384 template.shift = e->shift_l; in dapm_kcontrol_data_alloc()
385 template.off_val = snd_soc_enum_item_to_val(e, 0); in dapm_kcontrol_data_alloc()
386 template.on_val = template.off_val; in dapm_kcontrol_data_alloc()
387 template.id = snd_soc_dapm_kcontrol; in dapm_kcontrol_data_alloc()
388 template.name = name; in dapm_kcontrol_data_alloc()
390 data->value = template.on_val; in dapm_kcontrol_data_alloc()
393 widget->dapm, &template); in dapm_kcontrol_data_alloc()
3609 struct snd_soc_dapm_widget template; in snd_soc_dapm_new_pcm() local
3665 memset(&template, 0, sizeof(template)); in snd_soc_dapm_new_pcm()
3666 template.reg = SND_SOC_NOPM; in snd_soc_dapm_new_pcm()
3667 template.id = snd_soc_dapm_dai_link; in snd_soc_dapm_new_pcm()
3668 template.name = link_name; in snd_soc_dapm_new_pcm()
3669 template.event = snd_soc_dai_link_event; in snd_soc_dapm_new_pcm()
3670 template.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU | in snd_soc_dapm_new_pcm()
3672 template.num_kcontrols = 1; in snd_soc_dapm_new_pcm()
3686 template.kcontrol_news = in snd_soc_dapm_new_pcm()
3690 if (!template.kcontrol_news) { in snd_soc_dapm_new_pcm()
3699 w = snd_soc_dapm_new_control_unlocked(&card->dapm, &template); in snd_soc_dapm_new_pcm()
3718 devm_kfree(card->dev, (void *)template.kcontrol_news); in snd_soc_dapm_new_pcm()
3734 struct snd_soc_dapm_widget template; in snd_soc_dapm_new_dai_widgets() local
3739 memset(&template, 0, sizeof(template)); in snd_soc_dapm_new_dai_widgets()
3740 template.reg = SND_SOC_NOPM; in snd_soc_dapm_new_dai_widgets()
3743 template.id = snd_soc_dapm_dai_in; in snd_soc_dapm_new_dai_widgets()
3744 template.name = dai->driver->playback.stream_name; in snd_soc_dapm_new_dai_widgets()
3745 template.sname = dai->driver->playback.stream_name; in snd_soc_dapm_new_dai_widgets()
3748 template.name); in snd_soc_dapm_new_dai_widgets()
3750 w = snd_soc_dapm_new_control_unlocked(dapm, &template); in snd_soc_dapm_new_dai_widgets()
3762 template.id = snd_soc_dapm_dai_out; in snd_soc_dapm_new_dai_widgets()
3763 template.name = dai->driver->capture.stream_name; in snd_soc_dapm_new_dai_widgets()
3764 template.sname = dai->driver->capture.stream_name; in snd_soc_dapm_new_dai_widgets()
3767 template.name); in snd_soc_dapm_new_dai_widgets()
3769 w = snd_soc_dapm_new_control_unlocked(dapm, &template); in snd_soc_dapm_new_dai_widgets()