/device/linaro/hikey/hifi/xaf/hifi-dpf/plugins/cadence/mixer/ |
D | xa-mixer.c | 158 XF_CHK_ERR(b[j] = d->input[j], XA_MIXER_EXEC_FATAL_INPUT); in xa_mixer_do_execute_stereo_16bit() 225 XF_CHK_ERR(pv_value, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_get_api_size() 237 XF_CHK_ERR(d, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_init() 256 XF_CHK_ERR(d->state & XA_MIXER_FLAG_PREINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_init() 270 XF_CHK_ERR(d->state & XA_MIXER_FLAG_POSTINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_init() 281 XF_CHK_ERR(pv_value, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_init() 302 XF_CHK_ERR(d && pv_value, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_set_config_param() 305 XF_CHK_ERR(d->state & XA_MIXER_FLAG_PREINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_set_config_param() 315 XF_CHK_ERR(i_value == 16, XA_MIXER_CONFIG_NONFATAL_RANGE); in xa_mixer_set_config_param() 321 XF_CHK_ERR(i_value == 2, XA_MIXER_CONFIG_NONFATAL_RANGE); in xa_mixer_set_config_param() [all …]
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/plugins/cadence/pcm_proc/ |
D | xa-pcm.c | 126 XF_CHK_ERR(input && n && output, XA_PCM_EXEC_FATAL_STATE); in xa_pcm_do_execute_copy() 154 XF_CHK_ERR(input && n && output, XA_PCM_EXEC_FATAL_STATE); in xa_pcm_do_execute_pcm16_chmap() 197 XF_CHK_ERR(input && n && output, XA_PCM_EXEC_FATAL_STATE); in xa_pcm_do_execute_pcm24_chmap() 235 XF_CHK_ERR(input && n && output, XA_PCM_EXEC_FATAL_STATE); in xa_pcm_do_execute_pcm24_to_pcm16() 277 XF_CHK_ERR(input && n && output, XA_PCM_EXEC_FATAL_STATE); in xa_pcm_do_execute_pcm16_to_pcm24() 368 XF_CHK_ERR(d, XA_API_FATAL_INVALID_CMD_TYPE); in xa_pcm_init() 397 XF_CHK_ERR(d->state & XA_PCM_FLAG_PREINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_pcm_init() 412 XF_CHK_ERR(d->state & XA_PCM_FLAG_POSTINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_pcm_init() 421 XF_CHK_ERR(d->state & XA_PCM_FLAG_POSTINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_pcm_init() 431 return XF_CHK_ERR(0, XA_API_FATAL_INVALID_CMD_TYPE); in xa_pcm_init() [all …]
|
/device/linaro/hikey/hifi/xaf/host-apf/proxy/ |
D | xf-fio.c | 74 XF_CHK_ERR(write(fd, msg, sizeof(*msg)) == sizeof(*msg), -errno); in xf_ipc_send() 118 XF_CHK_ERR((*buffer = xf_ipc_a2b(ipc, msg->address)) != (void *)-1, -EBADFD); in xf_ipc_recv() 131 XF_CHK_ERR((*buffer = xf_ipc_a2b(ipc, temp.address)) != (void *)-1, -EBADFD); in xf_ipc_recv() 156 XF_CHK_ERR((ipc->fd = open("/dev/xtensa-proxy", O_RDWR)) >= 0, -errno); in xf_ipc_open() 159 XF_CHK_ERR(ioctl(ipc->fd, XF_PROXY_SETUP_IOCTL, core) >= 0, -errno); in xf_ipc_open() 161 XF_CHK_ERR((ipc->fd = open(HIFI_DSP_MISC_DRIVER, O_RDWR,0)) >= 0, -errno); in xf_ipc_open() 164 XF_CHK_ERR(pipe(ipc->pipe) == 0, -errno); in xf_ipc_open() 171 …XF_CHK_ERR((ipc->shmem = mmap(NULL, XF_CFG_REMOTE_IPC_POOL_SIZE, PROT_READ | PROT_WRITE, MAP_SHARE… in xf_ipc_open() 173 …XF_CHK_ERR((ipc->shmem = mmap(NULL, xf_cfg_remote_ipc_pool_size, PROT_READ | PROT_WRITE, MAP_SHARE… in xf_ipc_open()
|
D | xf-proxy.c | 57 XF_CHK_ERR((m.address = xf_proxy_b2a(proxy, msg->buffer)) != XF_PROXY_BADADDR, -EINVAL); in xf_proxy_cmd_exec() 69 XF_CHK_ERR((msg->buffer = xf_proxy_a2b(proxy, m.address)) != (void *)-1, -EBADFD); in xf_proxy_cmd_exec() 88 XF_CHK_ERR((msg.address = xf_proxy_b2a(proxy, m->buffer)) != XF_PROXY_BADADDR, -EINVAL); 156 XF_CHK_ERR(msg.opcode == (u32) XF_REGISTER, -EFAULT); in xf_client_register() 207 XF_CHK_ERR(msg.opcode == XF_ALLOC, -EBADFD); in xf_proxy_buffer_alloc() 210 XF_CHK_ERR(msg.buffer != NULL, -ENOMEM); in xf_proxy_buffer_alloc() 236 XF_CHK_ERR(msg.opcode == XF_FREE, -EBADFD); in xf_proxy_buffer_free() 373 XF_CHK_ERR(handle->aux = xf_buffer_get(proxy->aux), -EBUSY); in xf_open() 455 XF_CHK_ERR(proxy == dst->proxy, -EINVAL); in xf_route() 458 XF_CHK_ERR(num && size && xf_is_power_of_two(align), -EINVAL); in xf_route() [all …]
|
D | xaf-api.c | 282 XF_CHK_ERR((p_adev->n_comp > 0), XAF_API_ERR); in xaf_comp_delete() 333 XF_CHK_ERR(rmsg.opcode == (u32) XF_SET_PARAM && rmsg.buffer == smsg, XAF_API_ERR); in xaf_comp_set_config() 371 XF_CHK_ERR(rmsg.opcode == (u32) XF_GET_PARAM && rmsg.buffer == smsg, XAF_API_ERR); in xaf_comp_get_config() 435 XF_CHK_ERR(rmsg.opcode == (u32) XF_EMPTY_THIS_BUFFER, XAF_API_ERR); in xaf_comp_get_status() 495 … XF_CHK_ERR(rmsg.opcode == XF_FILL_THIS_BUFFER && rmsg.buffer == p_comp->start_buf, XAF_API_ERR); in xaf_comp_process()
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/audio/ |
D | xa-class-mixer.c | 192 XF_CHK_ERR(factor = xf_timebase_factor(msg->sample_rate), XA_MIXER_CONFIG_FATAL_RANGE); in xa_mixer_prepare_runtime() 215 XF_CHK_ERR(i < XA_MIXER_MAX_TRACK_NUMBER, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_empty_this_buffer() 218 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_mixer_empty_this_buffer() 261 XF_CHK_ERR(i == XA_MIXER_MAX_TRACK_NUMBER, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_fill_this_buffer() 264 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_mixer_fill_this_buffer() 270 XF_CHK_ERR(m->length == 0, XA_MIXER_EXEC_FATAL_STATE); in xa_mixer_fill_this_buffer() 275 XF_CHK_ERR(m->length == mixer->output.length, XA_MIXER_EXEC_FATAL_STATE); in xa_mixer_fill_this_buffer() 300 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_mixer_port_route() 303 XF_CHK_ERR(XF_MSG_DST_PORT(m->id) == XA_MIXER_MAX_TRACK_NUMBER, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_port_route() 306 XF_CHK_ERR(!xf_output_port_routed(port), XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_port_route() [all …]
|
D | xa-class-audio-codec.c | 133 … XF_CHK_ERR(frame_size * codec->sample_size == msg->output_length, XA_API_FATAL_INVALID_CMD_TYPE); in xa_codec_prepare_runtime() 136 XF_CHK_ERR(factor = xf_timebase_factor(msg->sample_rate), XA_API_FATAL_INVALID_CMD_TYPE); in xa_codec_prepare_runtime() 164 XF_CHK_ERR(XF_MSG_DST_PORT(m->id) == 0, XA_API_FATAL_INVALID_CMD); in xa_codec_empty_this_buffer() 167 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_codec_empty_this_buffer() 186 …XF_CHK_ERR(base->state & (XA_BASE_FLAG_RUNTIME_INIT | XA_BASE_FLAG_EXECUTION), XA_API_FATAL_INVALI… in xa_codec_empty_this_buffer() 206 XF_CHK_ERR(XF_MSG_DST_PORT(m->id) == 1, XA_API_FATAL_INVALID_CMD); in xa_codec_fill_this_buffer() 209 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_codec_fill_this_buffer() 271 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_codec_port_route() 274 XF_CHK_ERR(XF_MSG_DST_PORT(m->id) == 1, XA_API_FATAL_INVALID_CMD_TYPE); in xa_codec_port_route() 277 XF_CHK_ERR(!xf_output_port_routed(port), XA_API_FATAL_INVALID_CMD_TYPE); in xa_codec_port_route() [all …]
|
D | xa-class-base.c | 58 XF_CHK_ERR(base->state == 0, XA_API_FATAL_INVALID_CMD); in xa_base_preinit() 119 XF_CHK_ERR(size <= XF_CFG_CODEC_SCRATCHMEM_SIZE, XA_API_FATAL_MEM_ALLOC); in xa_base_postinit() 122 XF_CHK_ERR((XF_CFG_CODEC_SCRATCHMEM_ALIGN & (align - 1)) == 0, XA_API_FATAL_MEM_ALIGN); in xa_base_postinit() 176 XF_CHK_ERR(m->length == XF_SET_PARAM_CMD_LEN(n), XA_API_FATAL_INVALID_CMD_TYPE); in xa_base_set_param() 221 XF_CHK_ERR(XF_GET_PARAM_CMD_LEN(n) == m->length, XA_API_FATAL_INVALID_CMD_TYPE); in xa_base_get_param() 279 XF_CHK_ERR(remaining >= dsize, XA_API_FATAL_INVALID_CMD_TYPE); in xa_base_set_param_ext() 294 XF_CHK_ERR(remaining == 0, XA_API_FATAL_INVALID_CMD_TYPE); in xa_base_set_param_ext() 341 XF_CHK_ERR(remaining >= size, XA_API_FATAL_INVALID_CMD_TYPE); in xa_base_get_param_ext() 356 XF_CHK_ERR(remaining == 0, XA_API_FATAL_INVALID_CMD_TYPE); in xa_base_get_param_ext() 427 XF_CHK_ERR(!XA_ERROR_SEVERITY(xa_base_process(base)), -EPIPE); in xa_base_command() [all …]
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/core/ |
D | xf-core.c | 102 XF_CHK_ERR((client = xf_client_alloc(cd)) != XF_CFG_MAX_CLIENTS, -EBUSY); in xf_proxy_register() 140 XF_CHK_ERR(xf_shmem_enabled(core), -EPERM); in xf_proxy_alloc() 155 XF_CHK_ERR(xf_shmem_enabled(core), -EPERM); in xf_proxy_free() 177 XF_CHK_ERR(XF_MSG_SRC_CORE(src) == core, -EINVAL); 219 XF_CHK_ERR(XF_MSG_SRC_CORE(src) == core, -EINVAL); 272 return XF_CHK_ERR(0, -EINVAL); in xf_proxy_output() 291 return XF_CHK_ERR(0, -EINVAL); in xf_proxy_flush() 621 XF_CHK_ERR(cd->scratch = xf_scratch_mem_init(core), -ENOMEM); in xf_core_init()
|
D | xf-msg.c | 48 …XF_CHK_ERR(pool->p = xf_mem_alloc(XF_MM(sizeof(*pool->p) * n), XF_PROXY_ALIGNMENT, core, 1), -ENOM… in xf_msg_pool_init() 79 XF_CHK_ERR(_m = pool->head, NULL); in xf_msg_pool_get()
|
D | xf-mem.c | 249 XF_CHK_ERR(b = xf_mm_find_by_size(pool, size), NULL); in xf_mm_alloc() 344 XF_CHK_ERR(((u32)addr & (sizeof(xf_mm_block_t) - 1)) == 0, -EINVAL); in xf_mm_init() 347 XF_CHK_ERR(((size) & (sizeof(xf_mm_block_t) - 1)) == 0, -EINVAL); in xf_mm_init()
|
D | xf-io.c | 58 XF_CHK_ERR(port->buffer = xf_mem_alloc(size, align, core, 0), -ENOMEM); in xf_input_port_init()
|
/device/linaro/hikey/hifi/xaf/host-apf/include/ |
D | xf-debug.h | 183 #define XF_CHK_ERR(cond, error) \ macro
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/sys/xt-shmem/ |
D | xf-mem.h | 163 XF_CHK_ERR(b->addr = xf_mem_alloc(size, align, core, 0), -ENOMEM); in xf_mm_alloc_buffer()
|
/device/linaro/hikey/hifi/xaf/hifi-dpf/include/ |
D | xf-debug.h | 206 #define XF_CHK_ERR(cond, error) \ macro
|