Lines Matching refs:kc

597 	struct snd_kcontrol_new *kc, struct snd_soc_tplg_tlv_dbscale *scale)  in soc_tplg_create_tlv_db_scale()  argument
612 kc->tlv.p = (void *)p; in soc_tplg_create_tlv_db_scale()
617 struct snd_kcontrol_new *kc, struct snd_soc_tplg_ctl_hdr *tc) in soc_tplg_create_tlv() argument
629 return soc_tplg_create_tlv_db_scale(tplg, kc, in soc_tplg_create_tlv()
643 static int soc_tplg_control_dmixer_create(struct soc_tplg *tplg, struct snd_kcontrol_new *kc) in soc_tplg_control_dmixer_create() argument
664 kc->name = devm_kstrdup(tplg->dev, mc->hdr.name, GFP_KERNEL); in soc_tplg_control_dmixer_create()
665 if (!kc->name) in soc_tplg_control_dmixer_create()
667 kc->private_value = (long)sm; in soc_tplg_control_dmixer_create()
668 kc->iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_control_dmixer_create()
669 kc->access = le32_to_cpu(mc->hdr.access); in soc_tplg_control_dmixer_create()
683 err = soc_tplg_kcontrol_bind_io(&mc->hdr, kc, tplg); in soc_tplg_control_dmixer_create()
690 err = soc_tplg_create_tlv(tplg, kc, &mc->hdr); in soc_tplg_control_dmixer_create()
697 return soc_tplg_control_load(tplg, kc, &mc->hdr); in soc_tplg_control_dmixer_create()
766 static int soc_tplg_control_denum_create(struct soc_tplg *tplg, struct snd_kcontrol_new *kc) in soc_tplg_control_denum_create() argument
786 kc->name = devm_kstrdup(tplg->dev, ec->hdr.name, GFP_KERNEL); in soc_tplg_control_denum_create()
787 if (!kc->name) in soc_tplg_control_denum_create()
789 kc->private_value = (long)se; in soc_tplg_control_denum_create()
790 kc->iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_control_denum_create()
791 kc->access = le32_to_cpu(ec->hdr.access); in soc_tplg_control_denum_create()
825 err = soc_tplg_kcontrol_bind_io(&ec->hdr, kc, tplg); in soc_tplg_control_denum_create()
832 return soc_tplg_control_load(tplg, kc, &ec->hdr); in soc_tplg_control_denum_create()
835 static int soc_tplg_control_dbytes_create(struct soc_tplg *tplg, struct snd_kcontrol_new *kc) in soc_tplg_control_dbytes_create() argument
856 kc->name = devm_kstrdup(tplg->dev, be->hdr.name, GFP_KERNEL); in soc_tplg_control_dbytes_create()
857 if (!kc->name) in soc_tplg_control_dbytes_create()
859 kc->private_value = (long)sbe; in soc_tplg_control_dbytes_create()
860 kc->iface = SNDRV_CTL_ELEM_IFACE_MIXER; in soc_tplg_control_dbytes_create()
861 kc->access = le32_to_cpu(be->hdr.access); in soc_tplg_control_dbytes_create()
866 err = soc_tplg_kcontrol_bind_io(&be->hdr, kc, tplg); in soc_tplg_control_dbytes_create()
873 return soc_tplg_control_load(tplg, kc, &be->hdr); in soc_tplg_control_dbytes_create()
878 struct snd_kcontrol_new kc = {0}; in soc_tplg_dbytes_create() local
887 ret = soc_tplg_control_dbytes_create(tplg, &kc); in soc_tplg_dbytes_create()
892 sbe = (struct soc_bytes_ext *)kc.private_value; in soc_tplg_dbytes_create()
901 ret = soc_tplg_add_kcontrol(tplg, &kc, &sbe->dobj.control.kcontrol); in soc_tplg_dbytes_create()
912 struct snd_kcontrol_new kc = {0}; in soc_tplg_dmixer_create() local
921 ret = soc_tplg_control_dmixer_create(tplg, &kc); in soc_tplg_dmixer_create()
926 sm = (struct soc_mixer_control *)kc.private_value; in soc_tplg_dmixer_create()
935 ret = soc_tplg_add_kcontrol(tplg, &kc, &sm->dobj.control.kcontrol); in soc_tplg_dmixer_create()
946 struct snd_kcontrol_new kc = {0}; in soc_tplg_denum_create() local
955 ret = soc_tplg_control_denum_create(tplg, &kc); in soc_tplg_denum_create()
960 se = (struct soc_enum *)kc.private_value; in soc_tplg_denum_create()
969 ret = soc_tplg_add_kcontrol(tplg, &kc, &se->dobj.control.kcontrol); in soc_tplg_denum_create()
1125 struct snd_kcontrol_new *kc; in soc_tplg_dapm_widget_create() local
1178 kc = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(*kc), GFP_KERNEL); in soc_tplg_dapm_widget_create()
1179 if (!kc) { in soc_tplg_dapm_widget_create()
1201 kc[i].index = mixer_count; in soc_tplg_dapm_widget_create()
1204 ret = soc_tplg_control_dmixer_create(tplg, &kc[i]); in soc_tplg_dapm_widget_create()
1214 kc[i].index = enum_count; in soc_tplg_dapm_widget_create()
1217 ret = soc_tplg_control_denum_create(tplg, &kc[i]); in soc_tplg_dapm_widget_create()
1223 kc[i].index = bytes_count; in soc_tplg_dapm_widget_create()
1226 ret = soc_tplg_control_dbytes_create(tplg, &kc[i]); in soc_tplg_dapm_widget_create()
1239 template.kcontrol_news = kc; in soc_tplg_dapm_widget_create()