Lines Matching defs:afg

67     auto& afg = *widget.afg_;
72 : afg.default_pcm_size_rate_;
78 auto& afg = *widget.afg_;
83 : afg.default_pcm_formats_;
89 auto& afg = *widget.afg_;
95 : afg.default_input_amp_caps_;
102 auto& afg = *widget.afg_;
108 : afg.default_output_amp_caps_;
271 static zx_status_t ParseAFGCaps(AudioFunctionGroupState& afg, const CodecResponse& resp) {
272 afg.caps_.raw_data_ = resp.data;
276 static zx_status_t ParseAFGPcmSizeRate(AudioFunctionGroupState& afg, const CodecResponse& resp) {
278 afg.default_pcm_size_rate_ = resp.data;
282 static zx_status_t ParseAFGPcmFormats(AudioFunctionGroupState& afg, const CodecResponse& resp) {
283 afg.default_pcm_formats_ = resp.data;
287 static zx_status_t ParseAFGInputAmpCaps(AudioFunctionGroupState& afg, const CodecResponse& resp) {
288 afg.default_input_amp_caps_.raw_data_ = resp.data;
292 static zx_status_t ParseAFGOutputAmpCaps(AudioFunctionGroupState& afg, const CodecResponse& resp) {
293 afg.default_output_amp_caps_.raw_data_ = resp.data;
297 static zx_status_t ParseAFGGPIOCount(AudioFunctionGroupState& afg, const CodecResponse& resp) {
299 afg.gpio_can_wake_ = (resp.data & 0x80000000) != 0;
300 afg.gpio_can_send_unsolicited_ = (resp.data & 0x40000000) != 0;
301 afg.gpi_count_ = (resp.data >> 16) & 0xFF;
302 afg.gpo_count_ = (resp.data >> 8) & 0xFF;
303 afg.gpio_count_ = (resp.data >> 0) & 0xFF;
308 static zx_status_t ParseAFGImplId(AudioFunctionGroupState& afg, const CodecResponse& resp) {
309 afg.impl_id_.raw_data_ = resp.data;
313 static zx_status_t ParseAFGWidgetCount(AudioFunctionGroupState& afg, const CodecResponse& resp) {
315 afg.widget_count_ = resp.data & 0xFF;
316 afg.widget_starting_id_ = (resp.data >> 16) & 0xFF;
317 uint32_t last_widget_nid = static_cast<uint32_t>(afg.widget_starting_id_)
318 + afg.widget_count_ - 1;
323 if (afg.widget_count_) {
325 afg.widgets_.reset(new (&ac) AudioWidgetStatePtr[afg.widget_count_]);
518 auto& afg = *(static_cast<AudioFunctionGroupState*>(ptr.get()));
519 return ReadAudioFunctionGroupState(afg);
539 zx_status_t IntelHDACodec::ReadAudioFunctionGroupState(AudioFunctionGroupState& afg) {
542 RUN_COMMAND_LIST(afg, afg.nid_, FETCH_AFG_PROPERTIES,
543 "Failed to audio fn group properties (nid %hu)", afg.nid_);
545 RUN_COMMAND_LIST(afg.power_, afg.nid_, FETCH_POWER_STATE,
547 afg.nid_);
549 for (uint32_t i = 0; i < afg.widget_count_; ++i) {
550 auto& widget_ptr = afg.widgets_[i];
551 uint16_t nid = static_cast<uint16_t>(afg.widget_starting_id_ + i);
555 "group located at nid %hu", nid, afg.nid_);
558 widget_ptr->afg_ = &afg;