36#ifndef __INCLUDE_AUDIOLITE_WORKER_H
37#define __INCLUDE_AUDIOLITE_WORKER_H
43#include <nuttx/config.h>
45#include <nuttx/queue.h>
46#include <mossfw/mossfw_lock.h>
47#include <audiolite/al_memalloc.h>
48#include <audiolite/alworker_comm.h>
54#define CHECK_HDR(hdr, g, c) \
55 (((hdr).grp == AL_COMM_MESSAGE_##g) && \
56 ((hdr).code == AL_COMM_MSGCODE##c))
79 mossfw_condition_t _cond;
80 struct dq_queue_s _mem_proc;
92 int get_qsize() {
return _max_qsz; };
93 int current_sz() {
return dq_count(&_mem_proc); };
103 mossfw_thread_t _tid;
106 alwkr_msghandler_t _hdlr;
110 static void *msg_receiver(
void *arg);
113 void mod_running(
bool running);
120 int bringup_worker(
const char *dspname,
bool is_spk =
false,
121 const char *rcvname =
"alworker",
122 int prio = CONFIG_AUDIOLITE_WSVR_DEFPRIO,
123 int stksz = CONFIG_AUDIOLITE_WSVR_DEFSTACK);
124 void terminate_worker();
125 void set_msghandler(alwkr_msghandler_t hdr,
void *arg);
Definition: al_memalloc.h:156
Definition: al_worker.h:101
Definition: al_worker.h:74
Definition: alworker_comm.h:183
Definition: alworker_comm.h:133
Definition: alworker_comm.h:146