Lines Matching refs:tplg
107 static int tplg_save_access(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_access()
160 static int tplg_build_mixer_control(snd_tplg_t *tplg, in tplg_build_mixer_control() argument
177 ref->elem = tplg_elem_lookup(&tplg->tlv_list, in tplg_build_mixer_control()
183 err = tplg_copy_data(tplg, elem, ref); in tplg_build_mixer_control()
211 static int tplg_build_enum_control(snd_tplg_t *tplg, in tplg_build_enum_control() argument
227 ref->elem = tplg_elem_lookup(&tplg->text_list, in tplg_build_enum_control()
233 err = tplg_copy_data(tplg, elem, ref); in tplg_build_enum_control()
248 static int tplg_build_bytes_control(snd_tplg_t *tplg, struct tplg_elem *elem) in tplg_build_bytes_control() argument
263 err = tplg_copy_data(tplg, elem, ref); in tplg_build_bytes_control()
272 int tplg_build_controls(snd_tplg_t *tplg) in tplg_build_controls() argument
278 base = &tplg->mixer_list; in tplg_build_controls()
282 err = tplg_build_mixer_control(tplg, elem); in tplg_build_controls()
287 tplg->manifest.control_elems++; in tplg_build_controls()
290 base = &tplg->enum_list; in tplg_build_controls()
294 err = tplg_build_enum_control(tplg, elem); in tplg_build_controls()
299 tplg->manifest.control_elems++; in tplg_build_controls()
302 base = &tplg->bytes_ext_list; in tplg_build_controls()
306 err = tplg_build_bytes_control(tplg, elem); in tplg_build_controls()
311 tplg->manifest.control_elems++; in tplg_build_controls()
367 int tplg_parse_tlv(snd_tplg_t *tplg, snd_config_t *cfg, in tplg_parse_tlv() argument
376 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_TLV); in tplg_parse_tlv()
400 int tplg_save_tlv(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_tlv()
431 int tplg_parse_control_bytes(snd_tplg_t *tplg, in tplg_parse_control_bytes() argument
443 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_BYTES); in tplg_parse_control_bytes()
522 err = tplg_parse_compound(tplg, n, tplg_parse_ops, in tplg_parse_control_bytes()
530 err = tplg_parse_compound(tplg, n, tplg_parse_ext_ops, in tplg_parse_control_bytes()
558 int tplg_save_control_bytes(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_control_bytes()
584 err = tplg_save_ops(tplg, &be->hdr, dst, pfx2); in tplg_save_control_bytes()
586 err = tplg_save_ext_ops(tplg, be, dst, pfx2); in tplg_save_control_bytes()
588 err = tplg_save_access(tplg, &be->hdr, dst, pfx2); in tplg_save_control_bytes()
590 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_TLV, in tplg_save_control_bytes()
593 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_DATA, in tplg_save_control_bytes()
601 int tplg_parse_control_enum(snd_tplg_t *tplg, snd_config_t *cfg, in tplg_parse_control_enum() argument
612 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_ENUM); in tplg_parse_control_enum()
620 tplg->channel_idx = 0; in tplg_parse_control_enum()
656 err = tplg_parse_compound(tplg, n, tplg_parse_channel, in tplg_parse_control_enum()
661 ec->num_channels = tplg->channel_idx; in tplg_parse_control_enum()
666 err = tplg_parse_compound(tplg, n, tplg_parse_ops, in tplg_parse_control_enum()
698 int tplg_save_control_enum(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_control_enum()
716 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_TEXT, in tplg_save_control_enum()
719 err = tplg_save_channels(tplg, ec->channel, ec->num_channels, in tplg_save_control_enum()
722 err = tplg_save_ops(tplg, &ec->hdr, dst, pfx2); in tplg_save_control_enum()
724 err = tplg_save_access(tplg, &ec->hdr, dst, pfx2); in tplg_save_control_enum()
726 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_DATA, in tplg_save_control_enum()
737 int tplg_parse_control_mixer(snd_tplg_t *tplg, in tplg_parse_control_mixer() argument
749 elem = tplg_elem_new_common(tplg, cfg, NULL, SND_TPLG_TYPE_MIXER); in tplg_parse_control_mixer()
758 tplg->channel_idx = 0; in tplg_parse_control_mixer()
784 err = tplg_parse_compound(tplg, n, tplg_parse_channel, in tplg_parse_control_mixer()
789 mc->num_channels = tplg->channel_idx; in tplg_parse_control_mixer()
813 err = tplg_parse_compound(tplg, n, tplg_parse_ops, in tplg_parse_control_mixer()
860 int tplg_save_control_mixer(snd_tplg_t *tplg ATTRIBUTE_UNUSED, in tplg_save_control_mixer()
877 err = tplg_save_channels(tplg, mc->channel, mc->num_channels, in tplg_save_control_mixer()
886 err = tplg_save_ops(tplg, &mc->hdr, dst, pfx2); in tplg_save_control_mixer()
888 err = tplg_save_access(tplg, &mc->hdr, dst, pfx2); in tplg_save_control_mixer()
890 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_TLV, in tplg_save_control_mixer()
893 err = tplg_save_refs(tplg, elem, SND_TPLG_TYPE_DATA, in tplg_save_control_mixer()
900 static int init_ctl_hdr(snd_tplg_t *tplg, in init_ctl_hdr() argument
942 elem = tplg_elem_new_common(tplg, NULL, parent->id, in init_ctl_hdr()
976 int tplg_add_mixer(snd_tplg_t *tplg, struct snd_tplg_mixer_template *mixer, in tplg_add_mixer() argument
991 elem = tplg_elem_new_common(tplg, NULL, mixer->hdr.name, in tplg_add_mixer()
999 ret = init_ctl_hdr(tplg, elem, &mc->hdr, &mixer->hdr); in tplg_add_mixer()
1029 ret = tplg_add_data(tplg, elem, priv, in tplg_add_mixer()
1040 int tplg_add_enum(snd_tplg_t *tplg, struct snd_tplg_enum_template *enum_ctl, in tplg_add_enum() argument
1055 elem = tplg_elem_new_common(tplg, NULL, enum_ctl->hdr.name, in tplg_add_enum()
1062 ret = init_ctl_hdr(tplg, elem, &ec->hdr, &enum_ctl->hdr); in tplg_add_enum()
1091 struct tplg_elem *texts = tplg_elem_new_common(tplg, NULL, in tplg_add_enum()
1120 ret = tplg_add_data(tplg, elem, priv, in tplg_add_enum()
1131 int tplg_add_bytes(snd_tplg_t *tplg, struct snd_tplg_bytes_template *bytes_ctl, in tplg_add_bytes() argument
1146 elem = tplg_elem_new_common(tplg, NULL, bytes_ctl->hdr.name, in tplg_add_bytes()
1153 ret = init_ctl_hdr(tplg, elem, &be->hdr, &bytes_ctl->hdr); in tplg_add_bytes()
1169 ret = tplg_add_data(tplg, elem, priv, in tplg_add_bytes()
1196 int tplg_add_mixer_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t) in tplg_add_mixer_object() argument
1198 return tplg_add_mixer(tplg, t->mixer, NULL); in tplg_add_mixer_object()
1201 int tplg_add_enum_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t) in tplg_add_enum_object() argument
1203 return tplg_add_enum(tplg, t->enum_ctl, NULL); in tplg_add_enum_object()
1206 int tplg_add_bytes_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t) in tplg_add_bytes_object() argument
1208 return tplg_add_bytes(tplg, t->bytes_ctl, NULL); in tplg_add_bytes_object()
1211 int tplg_decode_control_mixer1(snd_tplg_t *tplg, in tplg_decode_control_mixer1() argument
1227 tplg_log(tplg, 'D', pos, "mixer: size %d TLV size %d private size %d", in tplg_decode_control_mixer1()
1244 tplg_log(tplg, 'D', pos, "mixer: name '%s' access 0x%x", in tplg_decode_control_mixer1()
1272 tplg_log(tplg, 'D', pos, "mixer: dB scale TLV: min %d step %d mute %d", in tplg_decode_control_mixer1()
1280 tplg_log(tplg, 'D', pos + offsetof(struct snd_soc_tplg_mixer_control, priv), in tplg_decode_control_mixer1()
1285 int tplg_decode_control_mixer(snd_tplg_t *tplg, in tplg_decode_control_mixer() argument
1297 err = tplg_decode_template(tplg, pos, hdr, &t); in tplg_decode_control_mixer()
1315 err = tplg_decode_control_mixer1(tplg, &heap, &mt, pos, bin, size2); in tplg_decode_control_mixer()
1318 err = snd_tplg_add_object(tplg, &t); in tplg_decode_control_mixer()
1334 int tplg_decode_control_enum1(snd_tplg_t *tplg, in tplg_decode_control_enum1() argument
1377 tplg_log(tplg, 'D', pos + ((void *)&ec->channel[i] - (void *)ec), in tplg_decode_control_enum1()
1388 int tplg_decode_control_enum(snd_tplg_t *tplg, in tplg_decode_control_enum() argument
1400 err = tplg_decode_template(tplg, pos, hdr, &t); in tplg_decode_control_enum()
1418 tplg_log(tplg, 'D', pos, "enum: size %d private size %d", in tplg_decode_control_enum()
1421 err = tplg_decode_control_enum1(tplg, &heap, &et, pos, ec); in tplg_decode_control_enum()
1424 err = snd_tplg_add_object(tplg, &t); in tplg_decode_control_enum()
1440 int tplg_decode_control_bytes1(snd_tplg_t *tplg, in tplg_decode_control_bytes1() argument
1452 tplg_log(tplg, 'D', pos, "control bytes: size %d private size %d", in tplg_decode_control_bytes1()
1473 tplg_log(tplg, 'D', pos, "control bytes: name '%s' access 0x%x", in tplg_decode_control_bytes1()
1480 int tplg_decode_control_bytes(snd_tplg_t *tplg, in tplg_decode_control_bytes() argument
1491 err = tplg_decode_template(tplg, pos, hdr, &t); in tplg_decode_control_bytes()
1508 err = tplg_decode_control_bytes1(tplg, &bt, pos, bin, size); in tplg_decode_control_bytes()
1513 err = snd_tplg_add_object(tplg, &t); in tplg_decode_control_bytes()