Lines Matching defs:hdr

50 			       struct snd_soc_tplg_ctl_hdr *hdr)
69 hdr->access |= ctl_access[j].value;
81 struct snd_soc_tplg_ctl_hdr *hdr)
95 err = parse_access_values(n, hdr);
109 struct snd_soc_tplg_ctl_hdr *hdr,
116 if (hdr->access == 0)
119 access = hdr->access;
133 access = hdr->access;
156 mixer_ctrl->hdr.tlv = *tlv;
450 snd_strlcpy(be->hdr.name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
451 be->hdr.type = SND_SOC_TPLG_TYPE_BYTES;
524 &be->hdr);
539 err = parse_access(cfg, &be->hdr);
550 be->hdr.access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
552 be->hdr.access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
585 err = tplg_save_ops(tplg, &be->hdr, dst, pfx2);
589 err = tplg_save_access(tplg, &be->hdr, dst, pfx2);
618 snd_strlcpy(ec->hdr.name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
619 ec->hdr.type = SND_SOC_TPLG_TYPE_ENUM;
668 &ec->hdr);
682 err = parse_access(cfg, &ec->hdr);
692 ec->hdr.access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
723 err = tplg_save_ops(tplg, &ec->hdr, dst, pfx2);
725 err = tplg_save_access(tplg, &ec->hdr, dst, pfx2);
756 snd_strlcpy(mc->hdr.name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
757 mc->hdr.type = SND_SOC_TPLG_TYPE_MIXER;
815 &mc->hdr);
842 err = parse_access(cfg, &mc->hdr);
853 mc->hdr.access = SNDRV_CTL_ELEM_ACCESS_READWRITE;
855 mc->hdr.access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
887 err = tplg_save_ops(tplg, &mc->hdr, dst, pfx2);
889 err = tplg_save_access(tplg, &mc->hdr, dst, pfx2);
903 struct snd_soc_tplg_ctl_hdr *hdr,
909 hdr->size = sizeof(struct snd_soc_tplg_ctl_hdr);
910 hdr->type = t->type;
912 snd_strlcpy(hdr->name, t->name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
924 hdr->access = t->access;
925 hdr->ops.get = t->ops.get;
926 hdr->ops.put = t->ops.put;
927 hdr->ops.info = t->ops.info;
930 if (hdr->access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
931 && !(hdr->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)) {
960 struct snd_tplg_tlv_dbscale_template, hdr);
985 tplg_dbg(" Control Mixer: %s", mixer->hdr.name);
987 if (mixer->hdr.type != SND_SOC_TPLG_TYPE_MIXER) {
988 SNDERR("invalid mixer type %d", mixer->hdr.type);
992 elem = tplg_elem_new_common(tplg, NULL, mixer->hdr.name,
1000 ret = init_ctl_hdr(tplg, elem, &mc->hdr, &mixer->hdr);
1049 tplg_dbg(" Control Enum: %s", enum_ctl->hdr.name);
1051 if (enum_ctl->hdr.type != SND_SOC_TPLG_TYPE_ENUM) {
1052 SNDERR("invalid enum type %d", enum_ctl->hdr.type);
1056 elem = tplg_elem_new_common(tplg, NULL, enum_ctl->hdr.name,
1063 ret = init_ctl_hdr(tplg, elem, &ec->hdr, &enum_ctl->hdr);
1093 enum_ctl->hdr.name, SND_TPLG_TYPE_TEXT);
1104 tplg_ref_add(elem, SND_TPLG_TYPE_TEXT, enum_ctl->hdr.name);
1140 tplg_dbg(" Control Bytes: %s", bytes_ctl->hdr.name);
1142 if (bytes_ctl->hdr.type != SND_SOC_TPLG_TYPE_BYTES) {
1143 SNDERR("invalid bytes type %d", bytes_ctl->hdr.type);
1147 elem = tplg_elem_new_common(tplg, NULL, bytes_ctl->hdr.name,
1154 ret = init_ctl_hdr(tplg, elem, &be->hdr, &bytes_ctl->hdr);
1177 if (be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) {
1178 if ((be->hdr.access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE)
1181 be->hdr.access);
1229 mc->size, mc->hdr.tlv.size, mc->priv.size);
1236 mt->hdr.type = mc->hdr.type;
1237 mt->hdr.name = mc->hdr.name;
1238 mt->hdr.access = mc->hdr.access;
1239 mt->hdr.ops.get = mc->hdr.ops.get;
1240 mt->hdr.ops.put = mc->hdr.ops.put;
1241 mt->hdr.ops.info = mc->hdr.ops.info;
1246 mt->hdr.name, mt->hdr.access);
1257 if (mc->hdr.tlv.size == 0) {
1259 } else if (mc->hdr.tlv.size == sizeof(struct snd_soc_tplg_ctl_tlv)) {
1260 if (mc->hdr.tlv.type != SNDRV_CTL_TLVT_DB_SCALE) {
1262 mc->hdr.tlv.type);
1268 mt->hdr.tlv_scale = db;
1269 db->hdr.type = mc->hdr.tlv.type;
1270 db->min = mc->hdr.tlv.scale.min;
1271 db->step = mc->hdr.tlv.scale.step;
1272 db->mute = mc->hdr.tlv.scale.mute;
1276 SNDERR("mixer: wrong TLV size %d", mc->hdr.tlv.size);
1288 struct snd_soc_tplg_hdr *hdr,
1298 err = tplg_decode_template(tplg, pos, hdr, &t);
1354 et->hdr.type = ec->hdr.type;
1355 et->hdr.name = ec->hdr.name;
1356 et->hdr.access = ec->hdr.access;
1357 et->hdr.ops.get = ec->hdr.ops.get;
1358 et->hdr.ops.put = ec->hdr.ops.put;
1359 et->hdr.ops.info = ec->hdr.ops.info;
1391 struct snd_soc_tplg_hdr *hdr,
1401 err = tplg_decode_template(tplg, pos, hdr, &t);
1461 bt->hdr.type = bc->hdr.type;
1462 bt->hdr.name = bc->hdr.name;
1463 bt->hdr.access = bc->hdr.access;
1464 bt->hdr.ops.get = bc->hdr.ops.get;
1465 bt->hdr.ops.put = bc->hdr.ops.put;
1466 bt->hdr.ops.info = bc->hdr.ops.info;
1475 bt->hdr.name, bt->hdr.access);
1483 struct snd_soc_tplg_hdr *hdr,
1492 err = tplg_decode_template(tplg, pos, hdr, &t);