Lines Matching refs:pC
185 static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC) in control_cache_alloc_check() argument
189 if (!pC) in control_cache_alloc_check()
192 if (pC->init) in control_cache_alloc_check()
193 return pC->init; in control_cache_alloc_check()
195 if (!pC->p_cache) in control_cache_alloc_check()
198 if (pC->control_count && pC->cache_size_in_bytes) { in control_cache_alloc_check()
202 p_master_cache = (char *)pC->p_cache; in control_cache_alloc_check()
204 pC->control_count); in control_cache_alloc_check()
205 for (i = 0; i < pC->control_count; i++) { in control_cache_alloc_check()
211 if (control_index >= pC->control_count) { in control_cache_alloc_check()
214 pC->adap_idx, control_index); in control_cache_alloc_check()
222 pC->adap_idx); in control_cache_alloc_check()
231 pC->adap_idx, i); in control_cache_alloc_check()
236 pC->p_info[control_index] = info; in control_cache_alloc_check()
239 pC->p_info[control_index] = NULL; in control_cache_alloc_check()
246 cached, pC->p_info[info->control_index], in control_cache_alloc_check()
254 if (byte_count >= pC->cache_size_in_bytes) in control_cache_alloc_check()
257 if (info->control_index == pC->control_count - 1) in control_cache_alloc_check()
261 if (byte_count != pC->cache_size_in_bytes) in control_cache_alloc_check()
264 pC->adap_idx, byte_count, in control_cache_alloc_check()
265 pC->cache_size_in_bytes); in control_cache_alloc_check()
269 pC->adap_idx, byte_count); in control_cache_alloc_check()
271 pC->init = (u16)cached; in control_cache_alloc_check()
273 return pC->init; in control_cache_alloc_check()
320 short hpi_check_control_cache_single(struct hpi_control_cache_single *pC, in hpi_check_control_cache_single() argument
331 switch (pC->u.i.control_type) { in hpi_check_control_cache_single()
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()
338 if (pC->u.meter.an_logRMS[0] == in hpi_check_control_cache_single()
346 pC->u.meter.an_logRMS[0]; in hpi_check_control_cache_single()
348 pC->u.meter.an_logRMS[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()
358 if (pC->u.vol.flags & HPI_VOLUME_FLAG_HAS_MUTE) { in hpi_check_control_cache_single()
359 if (pC->u.vol.flags & HPI_VOLUME_FLAG_MUTED) 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()
400 if (pC->u.tuner.s_level_avg == in hpi_check_control_cache_single()
407 pC->u.tuner.s_level_avg; 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()
447 if (pC->u.clk.source_index == 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()
461 p_pad = (struct hpi_control_cache_pad *)pC; in hpi_check_control_cache_single()
525 pC->u.i.control_index, pC->u.i.control_type, in hpi_check_control_cache_single()
565 *pC, struct hpi_message *phm, struct hpi_response *phr) in hpi_cmn_control_cache_sync_to_msg_single()
567 switch (pC->u.i.control_type) { in hpi_cmn_control_cache_sync_to_msg_single()
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()
574 pC->u.vol.flags |= HPI_VOLUME_FLAG_MUTED; in hpi_cmn_control_cache_sync_to_msg_single()
576 pC->u.vol.flags &= ~HPI_VOLUME_FLAG_MUTED; in hpi_cmn_control_cache_sync_to_msg_single()
582 pC->u.mux.source_node_type = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
583 pC->u.mux.source_node_index = (u16)phm->u.c.param2; in hpi_cmn_control_cache_sync_to_msg_single()
589 pC->u.mode.mode = (u16)phm->u.c.param1; 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()
599 pC->u.microphone.phantom_state = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
603 pC->u.aes3tx.format = phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
607 pC->u.aes3rx.format = phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
611 pC->u.clk.source = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
613 pC->u.clk.source_index = (u16)phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
615 pC->u.clk.sample_rate = phm->u.c.param1; in hpi_cmn_control_cache_sync_to_msg_single()
625 struct hpi_control_cache_single *pC; in hpi_cmn_control_cache_sync_to_msg() local
641 pC = (struct hpi_control_cache_single *)pI; 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()