Lines Matching refs:fu
188 static uint8_t get_num_of_channels(const struct feature_unit_descriptor *fu) in get_num_of_channels() argument
190 return (fu->bLength - FU_FIXED_ELEMS_SIZE)/sizeof(uint16_t); in get_num_of_channels()
197 static uint16_t get_controls(const struct feature_unit_descriptor *fu) in get_controls() argument
199 return sys_get_le16((uint8_t *)&fu->bmaControls[0]); in get_controls()
206 const struct feature_unit_descriptor *fu) in get_fu_dir() argument
210 ((uint8_t *)fu + fu->bLength); in get_fu_dir()
228 struct feature_unit_descriptor *fu; in fix_fu_descriptors() local
233 fu = (struct feature_unit_descriptor *)((uint8_t *)header + in fix_fu_descriptors()
238 for (int i = 1; i < get_num_of_channels(fu); i++) { in fix_fu_descriptors()
239 (void)memcpy(&fu->bmaControls[i], in fix_fu_descriptors()
240 &fu->bmaControls[0], in fix_fu_descriptors()
245 fu = (struct feature_unit_descriptor *)((uint8_t *)fu + in fix_fu_descriptors()
246 fu->bLength + in fix_fu_descriptors()
249 for (int i = 1; i < get_num_of_channels(fu); i++) { in fix_fu_descriptors()
250 (void)memcpy(&fu->bmaControls[i], in fix_fu_descriptors()
251 &fu->bmaControls[0], in fix_fu_descriptors()
266 struct feature_unit_descriptor *fu; in get_feature_unit() local
268 fu = (struct feature_unit_descriptor *) in get_feature_unit()
273 if (fu->bUnitID == fu_id) { in get_feature_unit()
275 return fu; in get_feature_unit()
278 fu = (struct feature_unit_descriptor *) in get_feature_unit()
279 ((uint8_t *)fu + fu->bLength + in get_feature_unit()
284 return fu; in get_feature_unit()
398 const struct feature_unit_descriptor *fu; in is_entity_valid() local
401 fu = (struct feature_unit_descriptor *)((uint8_t *)header + in is_entity_valid()
404 if (fu->bUnitID == entity->id) { in is_entity_valid()
405 entity->subtype = fu->bDescriptorSubtype; in is_entity_valid()
410 fu = (struct feature_unit_descriptor *)((uint8_t *)fu + in is_entity_valid()
411 fu->bLength + in is_entity_valid()
414 if (fu->bUnitID == entity->id) { in is_entity_valid()
415 entity->subtype = fu->bDescriptorSubtype; in is_entity_valid()
641 const struct feature_unit_descriptor *fu; in handle_feature_unit_req() local
651 fu = get_feature_unit(audio_dev_data, &device, fu_id); in handle_feature_unit_req()
659 if (!(BIT(cs) & (get_controls(fu) << 1))) { in handle_feature_unit_req()
690 evt.dir = get_fu_dir(fu); in handle_feature_unit_req()