Lines Matching refs:pC
176 static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC) in control_cache_alloc_check() argument
180 if (!pC) in control_cache_alloc_check()
183 if (pC->init) in control_cache_alloc_check()
184 return pC->init; in control_cache_alloc_check()
186 if (!pC->p_cache) in control_cache_alloc_check()
189 if (pC->control_count && pC->cache_size_in_bytes) { in control_cache_alloc_check()
193 p_master_cache = (char *)pC->p_cache; in control_cache_alloc_check()
195 pC->control_count); in control_cache_alloc_check()
196 for (i = 0; i < pC->control_count; i++) { in control_cache_alloc_check()
202 if (control_index >= pC->control_count) { in control_cache_alloc_check()
205 pC->adap_idx, control_index); in control_cache_alloc_check()
213 pC->adap_idx); in control_cache_alloc_check()
222 pC->adap_idx, i); in control_cache_alloc_check()
227 pC->p_info[control_index] = info; in control_cache_alloc_check()
230 pC->p_info[control_index] = NULL; in control_cache_alloc_check()
237 cached, pC->p_info[info->control_index], in control_cache_alloc_check()
245 if (byte_count >= pC->cache_size_in_bytes) in control_cache_alloc_check()
248 if (info->control_index == pC->control_count - 1) in control_cache_alloc_check()
252 if (byte_count != pC->cache_size_in_bytes) in control_cache_alloc_check()
255 pC->adap_idx, byte_count, in control_cache_alloc_check()
256 pC->cache_size_in_bytes); in control_cache_alloc_check()
260 pC->adap_idx, byte_count); in control_cache_alloc_check()
262 pC->init = (u16)cached; in control_cache_alloc_check()
264 return pC->init; in control_cache_alloc_check()
311 short hpi_check_control_cache_single(struct hpi_control_cache_single *pC, in hpi_check_control_cache_single() argument
322 switch (pC->u.i.control_type) { in hpi_check_control_cache_single()
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()
329 if (pC->u.meter.an_logRMS[0] == in hpi_check_control_cache_single()
337 pC->u.meter.an_logRMS[0]; in hpi_check_control_cache_single()
339 pC->u.meter.an_logRMS[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()
349 if (pC->u.vol.flags & HPI_VOLUME_FLAG_HAS_MUTE) { in hpi_check_control_cache_single()
350 if (pC->u.vol.flags & HPI_VOLUME_FLAG_MUTED) 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()
391 if (pC->u.tuner.s_level_avg == in hpi_check_control_cache_single()
398 pC->u.tuner.s_level_avg; 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()
438 if (pC->u.clk.source_index == 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()
452 p_pad = (struct hpi_control_cache_pad *)pC; in hpi_check_control_cache_single()
516 pC->u.i.control_index, pC->u.i.control_type, in hpi_check_control_cache_single()
556 *pC, struct hpi_message *phm, struct hpi_response *phr) in hpi_cmn_control_cache_sync_to_msg_single()
558 switch (pC->u.i.control_type) { in hpi_cmn_control_cache_sync_to_msg_single()
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()
565 pC->u.vol.flags |= HPI_VOLUME_FLAG_MUTED; in hpi_cmn_control_cache_sync_to_msg_single()
567 pC->u.vol.flags &= ~HPI_VOLUME_FLAG_MUTED; in hpi_cmn_control_cache_sync_to_msg_single()
573 pC->u.mux.source_node_type = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
574 pC->u.mux.source_node_index = (u16)phm->u.c.param2; in hpi_cmn_control_cache_sync_to_msg_single()
580 pC->u.mode.mode = (u16)phm->u.c.param1; 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()
590 pC->u.microphone.phantom_state = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
594 pC->u.aes3tx.format = phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
598 pC->u.aes3rx.format = phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
602 pC->u.clk.source = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
604 pC->u.clk.source_index = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
606 pC->u.clk.sample_rate = phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
616 struct hpi_control_cache_single *pC; in hpi_cmn_control_cache_sync_to_msg() local
632 pC = (struct hpi_control_cache_single *)pI; 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()