Lines Matching defs:pC

176 static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
180 if (!pC)
183 if (pC->init)
184 return pC->init;
186 if (!pC->p_cache)
189 if (pC->control_count && pC->cache_size_in_bytes) {
193 p_master_cache = (char *)pC->p_cache;
195 pC->control_count);
196 for (i = 0; i < pC->control_count; i++) {
202 if (control_index >= pC->control_count) {
205 pC->adap_idx, control_index);
213 pC->adap_idx);
222 pC->adap_idx, i);
227 pC->p_info[control_index] = info;
230 pC->p_info[control_index] = NULL;
237 cached, pC->p_info[info->control_index],
245 if (byte_count >= pC->cache_size_in_bytes)
248 if (info->control_index == pC->control_count - 1)
252 if (byte_count != pC->cache_size_in_bytes)
255 pC->adap_idx, byte_count,
256 pC->cache_size_in_bytes);
260 pC->adap_idx, byte_count);
262 pC->init = (u16)cached;
264 return pC->init;
311 short hpi_check_control_cache_single(struct hpi_control_cache_single *pC,
322 switch (pC->u.i.control_type) {
326 phr->u.c.an_log_value[0] = pC->u.meter.an_log_peak[0];
327 phr->u.c.an_log_value[1] = pC->u.meter.an_log_peak[1];
329 if (pC->u.meter.an_logRMS[0] ==
337 pC->u.meter.an_logRMS[0];
339 pC->u.meter.an_logRMS[1];
346 phr->u.c.an_log_value[0] = pC->u.vol.an_log[0];
347 phr->u.c.an_log_value[1] = pC->u.vol.an_log[1];
349 if (pC->u.vol.flags & HPI_VOLUME_FLAG_HAS_MUTE) {
350 if (pC->u.vol.flags & HPI_VOLUME_FLAG_MUTED)
366 phr->u.c.param1 = pC->u.mux.source_node_type;
367 phr->u.c.param2 = pC->u.mux.source_node_index;
374 phr->u.c.param1 = pC->u.mode.mode;
380 phr->u.c.an_log_value[0] = pC->u.level.an_log[0];
381 phr->u.c.an_log_value[1] = pC->u.level.an_log[1];
387 phr->u.c.param1 = pC->u.tuner.freq_ink_hz;
389 phr->u.c.param1 = pC->u.tuner.band;
391 if (pC->u.tuner.s_level_avg ==
398 pC->u.tuner.s_level_avg;
404 phr->u.c.param1 = pC->u.aes3rx.error_status;
406 phr->u.c.param1 = pC->u.aes3rx.format;
412 phr->u.c.param1 = pC->u.aes3tx.format;
418 phr->u.c.param1 = pC->u.tone.state;
424 phr->u.c.param1 = pC->u.silence.state;
430 phr->u.c.param1 = pC->u.microphone.phantom_state;
436 phr->u.c.param1 = pC->u.clk.source;
438 if (pC->u.clk.source_index ==
444 phr->u.c.param1 = pC->u.clk.source_index;
446 phr->u.c.param1 = pC->u.clk.sample_rate;
452 p_pad = (struct hpi_control_cache_pad *)pC;
516 pC->u.i.control_index, pC->u.i.control_type,
556 *pC, struct hpi_message *phm, struct hpi_response *phr)
558 switch (pC->u.i.control_type) {
561 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0];
562 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1];
565 pC->u.vol.flags |= HPI_VOLUME_FLAG_MUTED;
567 pC->u.vol.flags &= ~HPI_VOLUME_FLAG_MUTED;
573 pC->u.mux.source_node_type = (u16)phm->u.c.param1;
574 pC->u.mux.source_node_index = (u16)phm->u.c.param2;
580 pC->u.mode.mode = (u16)phm->u.c.param1;
584 pC->u.vol.an_log[0] = phr->u.c.an_log_value[0];
585 pC->u.vol.an_log[1] = phr->u.c.an_log_value[1];
590 pC->u.microphone.phantom_state = (u16)phm->u.c.param1;
594 pC->u.aes3tx.format = phm->u.c.param1;
598 pC->u.aes3rx.format = phm->u.c.param1;
602 pC->u.clk.source = (u16)phm->u.c.param1;
604 pC->u.clk.source_index = (u16)phm->u.c.param1;
606 pC->u.clk.sample_rate = phm->u.c.param1;
616 struct hpi_control_cache_single *pC;
629 /* pC is the default cached control strucure.
632 pC = (struct hpi_control_cache_single *)pI;
634 hpi_cmn_control_cache_sync_to_msg_single(pC, phm, phr);