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()
321 struct hpi_message *phm, struct hpi_response *phr) in hpi_check_control_cache_single() argument
335 phr->u.c.an_log_value[0] = pC->u.meter.an_log_peak[0]; in hpi_check_control_cache_single()
336 phr->u.c.an_log_value[1] = pC->u.meter.an_log_peak[1]; in hpi_check_control_cache_single()
340 phr->error = in hpi_check_control_cache_single()
342 phr->u.c.an_log_value[0] = HPI_METER_MINIMUM; in hpi_check_control_cache_single()
343 phr->u.c.an_log_value[1] = HPI_METER_MINIMUM; in hpi_check_control_cache_single()
345 phr->u.c.an_log_value[0] = in hpi_check_control_cache_single()
347 phr->u.c.an_log_value[1] = in hpi_check_control_cache_single()
355 phr->u.c.an_log_value[0] = pC->u.vol.an_log[0]; in hpi_check_control_cache_single()
356 phr->u.c.an_log_value[1] = pC->u.vol.an_log[1]; in hpi_check_control_cache_single()
360 phr->u.c.param1 = in hpi_check_control_cache_single()
363 phr->u.c.param1 = 0; in hpi_check_control_cache_single()
365 phr->error = in hpi_check_control_cache_single()
367 phr->u.c.param1 = 0; in hpi_check_control_cache_single()
375 phr->u.c.param1 = pC->u.mux.source_node_type; in hpi_check_control_cache_single()
376 phr->u.c.param2 = pC->u.mux.source_node_index; in hpi_check_control_cache_single()
383 phr->u.c.param1 = pC->u.mode.mode; in hpi_check_control_cache_single()
389 phr->u.c.an_log_value[0] = pC->u.level.an_log[0]; in hpi_check_control_cache_single()
390 phr->u.c.an_log_value[1] = pC->u.level.an_log[1]; in hpi_check_control_cache_single()
396 phr->u.c.param1 = pC->u.tuner.freq_ink_hz; in hpi_check_control_cache_single()
398 phr->u.c.param1 = pC->u.tuner.band; in hpi_check_control_cache_single()
402 phr->u.cu.tuner.s_level = 0; in hpi_check_control_cache_single()
403 phr->error = in hpi_check_control_cache_single()
406 phr->u.cu.tuner.s_level = in hpi_check_control_cache_single()
413 phr->u.c.param1 = pC->u.aes3rx.error_status; in hpi_check_control_cache_single()
415 phr->u.c.param1 = pC->u.aes3rx.format; in hpi_check_control_cache_single()
421 phr->u.c.param1 = pC->u.aes3tx.format; in hpi_check_control_cache_single()
427 phr->u.c.param1 = pC->u.tone.state; in hpi_check_control_cache_single()
433 phr->u.c.param1 = pC->u.silence.state; in hpi_check_control_cache_single()
439 phr->u.c.param1 = pC->u.microphone.phantom_state; in hpi_check_control_cache_single()
445 phr->u.c.param1 = pC->u.clk.source; in hpi_check_control_cache_single()
449 phr->u.c.param1 = 0; in hpi_check_control_cache_single()
450 phr->error = in hpi_check_control_cache_single()
453 phr->u.c.param1 = pC->u.clk.source_index; in hpi_check_control_cache_single()
455 phr->u.c.param1 = pC->u.clk.sample_rate; in hpi_check_control_cache_single()
466 phr->error = in hpi_check_control_cache_single()
472 phr->u.c.param1 = p_pad->pI; in hpi_check_control_cache_single()
474 phr->u.c.param1 = p_pad->pTY; in hpi_check_control_cache_single()
485 phr->error = in hpi_check_control_cache_single()
500 phr->error = in hpi_check_control_cache_single()
506 if (tocopy > sizeof(phr->u.cu.chars8.sz_data)) in hpi_check_control_cache_single()
507 tocopy = sizeof(phr->u.cu.chars8. in hpi_check_control_cache_single()
510 memcpy(phr->u.cu.chars8.sz_data, in hpi_check_control_cache_single()
513 phr->u.cu.chars8.remaining_chars = in hpi_check_control_cache_single()
529 phr->size = (u16)response_size; in hpi_check_control_cache_single()
530 phr->type = HPI_TYPE_RESPONSE; in hpi_check_control_cache_single()
531 phr->object = phm->object; in hpi_check_control_cache_single()
532 phr->function = phm->function; in hpi_check_control_cache_single()
539 struct hpi_message *phm, struct hpi_response *phr) in hpi_check_control_cache() argument
550 phr->error = 0; in hpi_check_control_cache()
551 phr->specific_error = 0; in hpi_check_control_cache()
552 phr->version = 0; in hpi_check_control_cache()
555 *)pI, phm, phr); in hpi_check_control_cache()
565 *pC, struct hpi_message *phm, struct hpi_response *phr) in hpi_cmn_control_cache_sync_to_msg_single() argument
570 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0]; in hpi_cmn_control_cache_sync_to_msg_single()
571 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1]; in hpi_cmn_control_cache_sync_to_msg_single()
593 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0]; in hpi_cmn_control_cache_sync_to_msg_single()
594 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1]; in hpi_cmn_control_cache_sync_to_msg_single()
623 struct hpi_message *phm, struct hpi_response *phr) in hpi_cmn_control_cache_sync_to_msg() argument
628 if (phr->error) in hpi_cmn_control_cache_sync_to_msg()
643 hpi_cmn_control_cache_sync_to_msg_single(pC, phm, phr); in hpi_cmn_control_cache_sync_to_msg()
680 static void subsys_message(struct hpi_message *phm, struct hpi_response *phr) in subsys_message() argument
682 hpi_init_response(phr, HPI_OBJ_SUBSYSTEM, phm->function, 0); in subsys_message()
694 subsys_get_adapter(phm, phr); in subsys_message()
697 phr->u.s.num_adapters = adapters.gw_num_adapters; in subsys_message()
702 phr->error = HPI_ERROR_INVALID_FUNC; in subsys_message()
707 void HPI_COMMON(struct hpi_message *phm, struct hpi_response *phr) in HPI_COMMON() argument
713 subsys_message(phm, phr); in HPI_COMMON()
719 phr->error = HPI_ERROR_INVALID_TYPE; in HPI_COMMON()