Lines Matching refs:nhlt
20 #include "nhlt.h"
21 #include "intel/intel-nhlt.h"
22 #include "intel/dmic-nhlt.h"
23 #include "intel/ssp-nhlt.h"
45 static void debug_print_nhlt(struct nhlt *blob, struct endpoint_descriptor **eps)
52 fprintf(stdout, "printing nhlt as bytes:\n");
54 lines = sizeof(struct nhlt) / 8;
55 remain = sizeof(struct nhlt) % 8;
91 static void debug_print_nhlt(struct nhlt *blob ATTRIBUTE_UNUSED,
140 /* merge manifest struct and nhlt bytes as new config into existing SectionData*/
181 static void save_nhlt_binary(struct nhlt *blob, struct endpoint_descriptor **eps, snd_config_t *cfg)
198 fprintf(stderr, "can't open nhlt binary output file %s\n", bin_file);
202 fprintf(stdout, "saving nhlt as binary in %s\n", bin_file);
204 fwrite(blob, 1, sizeof(struct nhlt), fp);
277 static int nhlt_get_flat_buffer(struct nhlt *blob, struct endpoint_descriptor **eps,
289 nhlt_size = sizeof(struct nhlt);
302 for (i = 0; i < sizeof(struct nhlt); i++)
317 /* called at the end of topology pre-processing, create flat buffer from variable size nhlt */
318 static int nhlt_create(struct intel_nhlt_params *nhlt, snd_config_t *input,
324 struct nhlt blob;
334 for (i = 0; i < nhlt_dmic_get_ep_count(nhlt); i++) {
335 ret = nhlt_dmic_get_ep(nhlt, &eps[eps_count], i);
342 for (i = 0; i < nhlt_ssp_get_ep_count(nhlt); i++) {
343 nhlt_ssp_get_dir(nhlt, i, &dir);
346 ret = nhlt_ssp_get_ep(nhlt, &eps[eps_count], i,
351 ret = nhlt_ssp_get_ep(nhlt, &eps[eps_count], i,
354 ret = nhlt_ssp_get_ep(nhlt, &eps[eps_count], i, dir);
380 size = sizeof(struct nhlt);
403 static int do_nhlt(struct intel_nhlt_params *nhlt, snd_config_t *input, snd_config_t *output)
411 ret = nhlt_create(nhlt, input, output, &nhlt_buffer, &nhlt_size);
413 fprintf(stderr, "can't create nhlt blob, err %d\n", ret);
436 SND_TOPOLOGY_PLUGIN_DEFINE_FUNC(nhlt)
439 struct intel_nhlt_params nhlt;
446 ret = nhlt_ssp_init_params(&nhlt);
450 ret = nhlt_dmic_init_params(&nhlt);
473 ret = nhlt_dmic_set_params(&nhlt, n2, input);
479 ret = nhlt_ssp_set_params(&nhlt, n2, input);
486 /* create the nhlt blob from internal structs */
487 ret = do_nhlt(&nhlt, input, output);
489 fprintf(stderr, "error in nhlt processing\n");
491 free(nhlt.ssp_params);
492 free(nhlt.dmic_params);