Lines Matching refs:kc
633 struct snd_kcontrol_new *kc, struct snd_soc_tplg_tlv_dbscale *scale) in soc_tplg_create_tlv_db_scale() argument
648 kc->tlv.p = (void *)p; in soc_tplg_create_tlv_db_scale()
653 struct snd_kcontrol_new *kc, struct snd_soc_tplg_ctl_hdr *tc) in soc_tplg_create_tlv() argument
665 return soc_tplg_create_tlv_db_scale(tplg, kc, in soc_tplg_create_tlv()
683 struct snd_kcontrol_new kc; in soc_tplg_dbytes_create() local
709 memset(&kc, 0, sizeof(kc)); in soc_tplg_dbytes_create()
710 kc.name = be->hdr.name; in soc_tplg_dbytes_create()
711 kc.private_value = (long)sbe; in soc_tplg_dbytes_create()
712 kc.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_dbytes_create()
713 kc.access = le32_to_cpu(be->hdr.access); in soc_tplg_dbytes_create()
721 ret = soc_tplg_kcontrol_bind_io(&be->hdr, &kc, tplg); in soc_tplg_dbytes_create()
728 ret = soc_tplg_control_load(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)be); in soc_tplg_dbytes_create()
735 ret = soc_tplg_add_kcontrol(tplg, &kc, &sbe->dobj.control.kcontrol); in soc_tplg_dbytes_create()
751 struct snd_kcontrol_new kc; in soc_tplg_dmixer_create() local
776 memset(&kc, 0, sizeof(kc)); in soc_tplg_dmixer_create()
777 kc.name = mc->hdr.name; in soc_tplg_dmixer_create()
778 kc.private_value = (long)sm; in soc_tplg_dmixer_create()
779 kc.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_dmixer_create()
780 kc.access = le32_to_cpu(mc->hdr.access); in soc_tplg_dmixer_create()
798 ret = soc_tplg_kcontrol_bind_io(&mc->hdr, &kc, tplg); in soc_tplg_dmixer_create()
805 ret = soc_tplg_create_tlv(tplg, &kc, &mc->hdr); in soc_tplg_dmixer_create()
812 ret = soc_tplg_control_load(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)mc); in soc_tplg_dmixer_create()
819 ret = soc_tplg_add_kcontrol(tplg, &kc, &sm->dobj.control.kcontrol); in soc_tplg_dmixer_create()
899 struct snd_kcontrol_new kc; in soc_tplg_denum_create() local
924 memset(&kc, 0, sizeof(kc)); in soc_tplg_denum_create()
925 kc.name = ec->hdr.name; in soc_tplg_denum_create()
926 kc.private_value = (long)se; in soc_tplg_denum_create()
927 kc.iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_denum_create()
928 kc.access = le32_to_cpu(ec->hdr.access); in soc_tplg_denum_create()
973 ret = soc_tplg_kcontrol_bind_io(&ec->hdr, &kc, tplg); in soc_tplg_denum_create()
980 ret = soc_tplg_control_load(tplg, &kc, (struct snd_soc_tplg_ctl_hdr *)ec); in soc_tplg_denum_create()
987 ret = soc_tplg_add_kcontrol(tplg, &kc, &se->dobj.control.kcontrol); in soc_tplg_denum_create()
1133 static int soc_tplg_dapm_widget_dmixer_create(struct soc_tplg *tplg, struct snd_kcontrol_new *kc) in soc_tplg_dapm_widget_dmixer_create() argument
1156 kc->private_value = (long)sm; in soc_tplg_dapm_widget_dmixer_create()
1157 kc->name = devm_kstrdup(tplg->dev, mc->hdr.name, GFP_KERNEL); in soc_tplg_dapm_widget_dmixer_create()
1158 if (!kc->name) in soc_tplg_dapm_widget_dmixer_create()
1160 kc->iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_dapm_widget_dmixer_create()
1161 kc->access = le32_to_cpu(mc->hdr.access); in soc_tplg_dapm_widget_dmixer_create()
1181 err = soc_tplg_kcontrol_bind_io(&mc->hdr, kc, tplg); in soc_tplg_dapm_widget_dmixer_create()
1188 err = soc_tplg_create_tlv(tplg, kc, &mc->hdr); in soc_tplg_dapm_widget_dmixer_create()
1196 err = soc_tplg_control_load(tplg, kc, (struct snd_soc_tplg_ctl_hdr *)mc); in soc_tplg_dapm_widget_dmixer_create()
1206 static int soc_tplg_dapm_widget_denum_create(struct soc_tplg *tplg, struct snd_kcontrol_new *kc) in soc_tplg_dapm_widget_denum_create() argument
1228 kc->private_value = (long)se; in soc_tplg_dapm_widget_denum_create()
1229 kc->name = devm_kstrdup(tplg->dev, ec->hdr.name, GFP_KERNEL); in soc_tplg_dapm_widget_denum_create()
1230 if (!kc->name) in soc_tplg_dapm_widget_denum_create()
1232 kc->iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_dapm_widget_denum_create()
1233 kc->access = le32_to_cpu(ec->hdr.access); in soc_tplg_dapm_widget_denum_create()
1273 err = soc_tplg_kcontrol_bind_io(&ec->hdr, kc, tplg); in soc_tplg_dapm_widget_denum_create()
1280 err = soc_tplg_control_load(tplg, kc, (struct snd_soc_tplg_ctl_hdr *)ec); in soc_tplg_dapm_widget_denum_create()
1290 static int soc_tplg_dapm_widget_dbytes_create(struct soc_tplg *tplg, struct snd_kcontrol_new *kc) in soc_tplg_dapm_widget_dbytes_create() argument
1314 kc->private_value = (long)sbe; in soc_tplg_dapm_widget_dbytes_create()
1315 kc->name = devm_kstrdup(tplg->dev, be->hdr.name, GFP_KERNEL); in soc_tplg_dapm_widget_dbytes_create()
1316 if (!kc->name) in soc_tplg_dapm_widget_dbytes_create()
1318 kc->iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_dapm_widget_dbytes_create()
1319 kc->access = le32_to_cpu(be->hdr.access); in soc_tplg_dapm_widget_dbytes_create()
1325 err = soc_tplg_kcontrol_bind_io(&be->hdr, kc, tplg); in soc_tplg_dapm_widget_dbytes_create()
1332 err = soc_tplg_control_load(tplg, kc, (struct snd_soc_tplg_ctl_hdr *)be); in soc_tplg_dapm_widget_dbytes_create()
1350 struct snd_kcontrol_new *kc; in soc_tplg_dapm_widget_create() local
1403 kc = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(*kc), GFP_KERNEL); in soc_tplg_dapm_widget_create()
1404 if (!kc) in soc_tplg_dapm_widget_create()
1422 kc[i].index = mixer_count; in soc_tplg_dapm_widget_create()
1425 ret = soc_tplg_dapm_widget_dmixer_create(tplg, &kc[i]); in soc_tplg_dapm_widget_create()
1435 kc[i].index = enum_count; in soc_tplg_dapm_widget_create()
1438 ret = soc_tplg_dapm_widget_denum_create(tplg, &kc[i]); in soc_tplg_dapm_widget_create()
1444 kc[i].index = bytes_count; in soc_tplg_dapm_widget_create()
1447 ret = soc_tplg_dapm_widget_dbytes_create(tplg, &kc[i]); in soc_tplg_dapm_widget_create()
1460 template.kcontrol_news = kc; in soc_tplg_dapm_widget_create()