Lines Matching refs:phr

37 u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr)  in hpi_validate_response()  argument
39 if (phr->type != HPI_TYPE_RESPONSE) { in hpi_validate_response()
40 HPI_DEBUG_LOG(ERROR, "header type %d invalid\n", phr->type); in hpi_validate_response()
44 if (phr->object != phm->object) { in hpi_validate_response()
46 phr->object); in hpi_validate_response()
50 if (phr->function != phm->function) { in hpi_validate_response()
52 phr->function); in hpi_validate_response()
152 struct hpi_response *phr) in subsys_get_adapter() argument
167 phr->u.s.adapter_index = adapters.adapter[index].index; in subsys_get_adapter()
168 phr->u.s.adapter_type = adapters.adapter[index].type; in subsys_get_adapter()
170 phr->u.s.adapter_index = 0; in subsys_get_adapter()
171 phr->u.s.adapter_type = 0; in subsys_get_adapter()
172 phr->error = HPI_ERROR_INVALID_OBJ_INDEX; in subsys_get_adapter()
312 struct hpi_message *phm, struct hpi_response *phr) in hpi_check_control_cache_single() argument
326 phr->u.c.an_log_value[0] = pC->u.meter.an_log_peak[0]; in hpi_check_control_cache_single()
327 phr->u.c.an_log_value[1] = pC->u.meter.an_log_peak[1]; in hpi_check_control_cache_single()
331 phr->error = in hpi_check_control_cache_single()
333 phr->u.c.an_log_value[0] = HPI_METER_MINIMUM; in hpi_check_control_cache_single()
334 phr->u.c.an_log_value[1] = HPI_METER_MINIMUM; in hpi_check_control_cache_single()
336 phr->u.c.an_log_value[0] = in hpi_check_control_cache_single()
338 phr->u.c.an_log_value[1] = in hpi_check_control_cache_single()
346 phr->u.c.an_log_value[0] = pC->u.vol.an_log[0]; in hpi_check_control_cache_single()
347 phr->u.c.an_log_value[1] = pC->u.vol.an_log[1]; in hpi_check_control_cache_single()
351 phr->u.c.param1 = in hpi_check_control_cache_single()
354 phr->u.c.param1 = 0; in hpi_check_control_cache_single()
356 phr->error = in hpi_check_control_cache_single()
358 phr->u.c.param1 = 0; in hpi_check_control_cache_single()
366 phr->u.c.param1 = pC->u.mux.source_node_type; in hpi_check_control_cache_single()
367 phr->u.c.param2 = pC->u.mux.source_node_index; in hpi_check_control_cache_single()
374 phr->u.c.param1 = pC->u.mode.mode; in hpi_check_control_cache_single()
380 phr->u.c.an_log_value[0] = pC->u.level.an_log[0]; in hpi_check_control_cache_single()
381 phr->u.c.an_log_value[1] = pC->u.level.an_log[1]; in hpi_check_control_cache_single()
387 phr->u.c.param1 = pC->u.tuner.freq_ink_hz; in hpi_check_control_cache_single()
389 phr->u.c.param1 = pC->u.tuner.band; in hpi_check_control_cache_single()
393 phr->u.cu.tuner.s_level = 0; in hpi_check_control_cache_single()
394 phr->error = in hpi_check_control_cache_single()
397 phr->u.cu.tuner.s_level = in hpi_check_control_cache_single()
404 phr->u.c.param1 = pC->u.aes3rx.error_status; in hpi_check_control_cache_single()
406 phr->u.c.param1 = pC->u.aes3rx.format; in hpi_check_control_cache_single()
412 phr->u.c.param1 = pC->u.aes3tx.format; in hpi_check_control_cache_single()
418 phr->u.c.param1 = pC->u.tone.state; in hpi_check_control_cache_single()
424 phr->u.c.param1 = pC->u.silence.state; in hpi_check_control_cache_single()
430 phr->u.c.param1 = pC->u.microphone.phantom_state; in hpi_check_control_cache_single()
436 phr->u.c.param1 = pC->u.clk.source; in hpi_check_control_cache_single()
440 phr->u.c.param1 = 0; in hpi_check_control_cache_single()
441 phr->error = in hpi_check_control_cache_single()
444 phr->u.c.param1 = pC->u.clk.source_index; in hpi_check_control_cache_single()
446 phr->u.c.param1 = pC->u.clk.sample_rate; in hpi_check_control_cache_single()
457 phr->error = in hpi_check_control_cache_single()
463 phr->u.c.param1 = p_pad->pI; in hpi_check_control_cache_single()
465 phr->u.c.param1 = p_pad->pTY; in hpi_check_control_cache_single()
476 phr->error = in hpi_check_control_cache_single()
491 phr->error = in hpi_check_control_cache_single()
497 if (tocopy > sizeof(phr->u.cu.chars8.sz_data)) in hpi_check_control_cache_single()
498 tocopy = sizeof(phr->u.cu.chars8. in hpi_check_control_cache_single()
501 memcpy(phr->u.cu.chars8.sz_data, in hpi_check_control_cache_single()
504 phr->u.cu.chars8.remaining_chars = in hpi_check_control_cache_single()
520 phr->size = (u16)response_size; in hpi_check_control_cache_single()
521 phr->type = HPI_TYPE_RESPONSE; in hpi_check_control_cache_single()
522 phr->object = phm->object; in hpi_check_control_cache_single()
523 phr->function = phm->function; in hpi_check_control_cache_single()
530 struct hpi_message *phm, struct hpi_response *phr) in hpi_check_control_cache() argument
541 phr->error = 0; in hpi_check_control_cache()
542 phr->specific_error = 0; in hpi_check_control_cache()
543 phr->version = 0; in hpi_check_control_cache()
546 *)pI, phm, phr); in hpi_check_control_cache()
556 *pC, struct hpi_message *phm, struct hpi_response *phr) in hpi_cmn_control_cache_sync_to_msg_single() argument
561 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0]; in hpi_cmn_control_cache_sync_to_msg_single()
562 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1]; in hpi_cmn_control_cache_sync_to_msg_single()
584 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0]; in hpi_cmn_control_cache_sync_to_msg_single()
585 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1]; in hpi_cmn_control_cache_sync_to_msg_single()
614 struct hpi_message *phm, struct hpi_response *phr) in hpi_cmn_control_cache_sync_to_msg() argument
619 if (phr->error) in hpi_cmn_control_cache_sync_to_msg()
634 hpi_cmn_control_cache_sync_to_msg_single(pC, phm, phr); in hpi_cmn_control_cache_sync_to_msg()
671 static void subsys_message(struct hpi_message *phm, struct hpi_response *phr) in subsys_message() argument
673 hpi_init_response(phr, HPI_OBJ_SUBSYSTEM, phm->function, 0); in subsys_message()
685 subsys_get_adapter(phm, phr); in subsys_message()
688 phr->u.s.num_adapters = adapters.gw_num_adapters; in subsys_message()
693 phr->error = HPI_ERROR_INVALID_FUNC; in subsys_message()
698 void HPI_COMMON(struct hpi_message *phm, struct hpi_response *phr) in HPI_COMMON() argument
704 subsys_message(phm, phr); in HPI_COMMON()
710 phr->error = HPI_ERROR_INVALID_TYPE; in HPI_COMMON()