Lines Matching refs:phr
46 u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr) in hpi_validate_response() argument
48 if (phr->type != HPI_TYPE_RESPONSE) { in hpi_validate_response()
49 HPI_DEBUG_LOG(ERROR, "header type %d invalid\n", phr->type); in hpi_validate_response()
53 if (phr->object != phm->object) { in hpi_validate_response()
55 phr->object); in hpi_validate_response()
59 if (phr->function != phm->function) { in hpi_validate_response()
61 phr->function); in hpi_validate_response()
161 struct hpi_response *phr) in subsys_get_adapter() argument
176 phr->u.s.adapter_index = adapters.adapter[index].index; in subsys_get_adapter()
177 phr->u.s.adapter_type = adapters.adapter[index].type; in subsys_get_adapter()
179 phr->u.s.adapter_index = 0; in subsys_get_adapter()
180 phr->u.s.adapter_type = 0; in subsys_get_adapter()
181 phr->error = HPI_ERROR_INVALID_OBJ_INDEX; in subsys_get_adapter()
313 struct hpi_message *phm, struct hpi_response *phr) in hpi_check_control_cache() argument
326 phr->error = 0; in hpi_check_control_cache()
327 phr->specific_error = 0; in hpi_check_control_cache()
328 phr->version = 0; in hpi_check_control_cache()
344 phr->u.c.an_log_value[0] = pC->u.meter.an_log_peak[0]; in hpi_check_control_cache()
345 phr->u.c.an_log_value[1] = pC->u.meter.an_log_peak[1]; in hpi_check_control_cache()
349 phr->error = in hpi_check_control_cache()
351 phr->u.c.an_log_value[0] = HPI_METER_MINIMUM; in hpi_check_control_cache()
352 phr->u.c.an_log_value[1] = HPI_METER_MINIMUM; in hpi_check_control_cache()
354 phr->u.c.an_log_value[0] = in hpi_check_control_cache()
356 phr->u.c.an_log_value[1] = in hpi_check_control_cache()
364 phr->u.c.an_log_value[0] = pC->u.vol.an_log[0]; in hpi_check_control_cache()
365 phr->u.c.an_log_value[1] = pC->u.vol.an_log[1]; in hpi_check_control_cache()
369 phr->u.c.param1 = in hpi_check_control_cache()
372 phr->u.c.param1 = 0; in hpi_check_control_cache()
374 phr->error = in hpi_check_control_cache()
376 phr->u.c.param1 = 0; in hpi_check_control_cache()
384 phr->u.c.param1 = pC->u.mux.source_node_type; in hpi_check_control_cache()
385 phr->u.c.param2 = pC->u.mux.source_node_index; in hpi_check_control_cache()
392 phr->u.c.param1 = pC->u.mode.mode; in hpi_check_control_cache()
398 phr->u.c.an_log_value[0] = pC->u.level.an_log[0]; in hpi_check_control_cache()
399 phr->u.c.an_log_value[1] = pC->u.level.an_log[1]; in hpi_check_control_cache()
405 phr->u.c.param1 = pC->u.tuner.freq_ink_hz; in hpi_check_control_cache()
407 phr->u.c.param1 = pC->u.tuner.band; in hpi_check_control_cache()
411 phr->u.cu.tuner.s_level = 0; in hpi_check_control_cache()
412 phr->error = in hpi_check_control_cache()
415 phr->u.cu.tuner.s_level = in hpi_check_control_cache()
422 phr->u.c.param1 = pC->u.aes3rx.error_status; in hpi_check_control_cache()
424 phr->u.c.param1 = pC->u.aes3rx.format; in hpi_check_control_cache()
430 phr->u.c.param1 = pC->u.aes3tx.format; in hpi_check_control_cache()
436 phr->u.c.param1 = pC->u.tone.state; in hpi_check_control_cache()
442 phr->u.c.param1 = pC->u.silence.state; in hpi_check_control_cache()
448 phr->u.c.param1 = pC->u.microphone.phantom_state; in hpi_check_control_cache()
454 phr->u.c.param1 = pC->u.clk.source; in hpi_check_control_cache()
458 phr->u.c.param1 = 0; in hpi_check_control_cache()
459 phr->error = in hpi_check_control_cache()
462 phr->u.c.param1 = pC->u.clk.source_index; in hpi_check_control_cache()
464 phr->u.c.param1 = pC->u.clk.sample_rate; in hpi_check_control_cache()
475 phr->error = in hpi_check_control_cache()
481 phr->u.c.param1 = p_pad->pI; in hpi_check_control_cache()
483 phr->u.c.param1 = p_pad->pTY; in hpi_check_control_cache()
494 phr->error = in hpi_check_control_cache()
509 phr->error = in hpi_check_control_cache()
515 if (tocopy > sizeof(phr->u.cu.chars8.sz_data)) in hpi_check_control_cache()
516 tocopy = sizeof(phr->u.cu.chars8. in hpi_check_control_cache()
519 memcpy(phr->u.cu.chars8.sz_data, in hpi_check_control_cache()
522 phr->u.cu.chars8.remaining_chars = in hpi_check_control_cache()
537 phr->size = (u16)response_size; in hpi_check_control_cache()
538 phr->type = HPI_TYPE_RESPONSE; in hpi_check_control_cache()
539 phr->object = phm->object; in hpi_check_control_cache()
540 phr->function = phm->function; in hpi_check_control_cache()
553 struct hpi_message *phm, struct hpi_response *phr) in hpi_cmn_control_cache_sync_to_msg() argument
558 if (phr->error) in hpi_cmn_control_cache_sync_to_msg()
576 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0]; in hpi_cmn_control_cache_sync_to_msg()
577 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1]; in hpi_cmn_control_cache_sync_to_msg()
599 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0]; in hpi_cmn_control_cache_sync_to_msg()
600 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1]; in hpi_cmn_control_cache_sync_to_msg()
661 static void subsys_message(struct hpi_message *phm, struct hpi_response *phr) in subsys_message() argument
663 hpi_init_response(phr, HPI_OBJ_SUBSYSTEM, phm->function, 0); in subsys_message()
675 subsys_get_adapter(phm, phr); in subsys_message()
678 phr->u.s.num_adapters = adapters.gw_num_adapters; in subsys_message()
683 phr->error = HPI_ERROR_INVALID_FUNC; in subsys_message()
688 void HPI_COMMON(struct hpi_message *phm, struct hpi_response *phr) in HPI_COMMON() argument
694 subsys_message(phm, phr); in HPI_COMMON()
700 phr->error = HPI_ERROR_INVALID_TYPE; in HPI_COMMON()