Lines Matching refs:cp

255 	const struct bt_aics_gain_control *cp = buf;  in write_aics_control()  local
267 if (!VALID_AICS_OPCODE(cp->cp.opcode)) { in write_aics_control()
268 LOG_DBG("Invalid opcode %u", cp->cp.opcode); in write_aics_control()
273 (len == AICS_CP_SET_GAIN_LEN && cp->cp.opcode != BT_AICS_OPCODE_SET_GAIN) || in write_aics_control()
278 LOG_DBG("Opcode %u, counter %u", cp->cp.opcode, cp->cp.counter); in write_aics_control()
279 if (cp->cp.counter != inst->srv.state.change_counter) { in write_aics_control()
283 switch (cp->cp.opcode) { in write_aics_control()
285 LOG_DBG("Set gain %d", cp->gain_setting); in write_aics_control()
286 if (cp->gain_setting < inst->srv.gain_settings.minimum || in write_aics_control()
287 cp->gain_setting > inst->srv.gain_settings.maximum) { in write_aics_control()
291 inst->srv.state.gain != cp->gain_setting) { in write_aics_control()
292 inst->srv.state.gain = cp->gain_setting; in write_aics_control()
778 struct bt_aics_control cp; in bt_aics_unmute() local
780 cp.opcode = BT_AICS_OPCODE_UNMUTE; in bt_aics_unmute()
781 cp.counter = inst->srv.state.change_counter; in bt_aics_unmute()
783 return aics_write(inst, write_aics_control, &cp, sizeof(cp)); in bt_aics_unmute()
799 struct bt_aics_control cp; in bt_aics_mute() local
801 cp.opcode = BT_AICS_OPCODE_MUTE; in bt_aics_mute()
802 cp.counter = inst->srv.state.change_counter; in bt_aics_mute()
804 return aics_write(inst, write_aics_control, &cp, sizeof(cp)); in bt_aics_mute()
820 struct bt_aics_control cp; in bt_aics_manual_gain_set() local
822 cp.opcode = BT_AICS_OPCODE_SET_MANUAL; in bt_aics_manual_gain_set()
823 cp.counter = inst->srv.state.change_counter; in bt_aics_manual_gain_set()
825 return aics_write(inst, write_aics_control, &cp, sizeof(cp)); in bt_aics_manual_gain_set()
841 struct bt_aics_control cp; in bt_aics_automatic_gain_set() local
843 cp.opcode = BT_AICS_OPCODE_SET_AUTO; in bt_aics_automatic_gain_set()
844 cp.counter = inst->srv.state.change_counter; in bt_aics_automatic_gain_set()
846 return aics_write(inst, write_aics_control, &cp, sizeof(cp)); in bt_aics_automatic_gain_set()
862 struct bt_aics_gain_control cp; in bt_aics_gain_set() local
864 cp.cp.opcode = BT_AICS_OPCODE_SET_GAIN; in bt_aics_gain_set()
865 cp.cp.counter = inst->srv.state.change_counter; in bt_aics_gain_set()
866 cp.gain_setting = gain; in bt_aics_gain_set()
868 return aics_write(inst, write_aics_control, &cp, sizeof(cp)); in bt_aics_gain_set()