Lines Matching refs:state

60 	struct vcs_state state;  member
86 vol_rend.state.volume, vol_rend.state.mute, in read_vol_state()
87 vol_rend.state.change_counter); in read_vol_state()
90 &vol_rend.state, sizeof(vol_rend.state)); in read_vol_state()
141 notify(inst, NOTIFY_STATE, BT_UUID_VCS_STATE, &inst->state, sizeof(inst->state)); in notify_work_handler()
190 if (cp_val->cp.counter != vol_rend.state.change_counter) { in write_vcs_control()
197 if (vol_rend.state.volume > 0) { in write_vcs_control()
198 vol_rend.state.volume = VOLUME_DOWN(vol_rend.state.volume); in write_vcs_control()
205 if (vol_rend.state.volume != UINT8_MAX) { in write_vcs_control()
206 vol_rend.state.volume = VOLUME_UP(vol_rend.state.volume); in write_vcs_control()
213 if (vol_rend.state.volume > 0) { in write_vcs_control()
214 vol_rend.state.volume = VOLUME_DOWN(vol_rend.state.volume); in write_vcs_control()
217 if (vol_rend.state.mute) { in write_vcs_control()
218 vol_rend.state.mute = BT_VCP_STATE_UNMUTED; in write_vcs_control()
225 if (vol_rend.state.volume != UINT8_MAX) { in write_vcs_control()
226 vol_rend.state.volume = VOLUME_UP(vol_rend.state.volume); in write_vcs_control()
229 if (vol_rend.state.mute) { in write_vcs_control()
230 vol_rend.state.mute = BT_VCP_STATE_UNMUTED; in write_vcs_control()
237 opcode, vol_rend.state.volume); in write_vcs_control()
238 if (vol_rend.state.volume != cp_val->volume) { in write_vcs_control()
239 vol_rend.state.volume = cp_val->volume; in write_vcs_control()
246 if (vol_rend.state.mute) { in write_vcs_control()
247 vol_rend.state.mute = BT_VCP_STATE_UNMUTED; in write_vcs_control()
253 if (vol_rend.state.mute == BT_VCP_STATE_UNMUTED) { in write_vcs_control()
254 vol_rend.state.mute = BT_VCP_STATE_MUTED; in write_vcs_control()
264 vol_rend.state.change_counter++; in write_vcs_control()
266 vol_rend.state.volume, vol_rend.state.mute, in write_vcs_control()
267 vol_rend.state.change_counter); in write_vcs_control()
271 if (vol_rend.cb && vol_rend.cb->state) { in write_vcs_control()
272 vol_rend.cb->state(conn, 0, vol_rend.state.volume, vol_rend.state.mute); in write_vcs_control()
478 vol_rend.state.volume = param->volume; in bt_vcp_vol_rend_register()
479 vol_rend.state.mute = param->mute; in bt_vcp_vol_rend_register()
525 if (vol_rend.cb && vol_rend.cb->state) { in bt_vcp_vol_rend_get_state()
526 vol_rend.cb->state(NULL, 0, vol_rend.state.volume, vol_rend.state.mute); in bt_vcp_vol_rend_get_state()
545 .counter = vol_rend.state.change_counter, in bt_vcp_vol_rend_vol_down()
558 .counter = vol_rend.state.change_counter, in bt_vcp_vol_rend_vol_up()
571 .counter = vol_rend.state.change_counter, in bt_vcp_vol_rend_unmute_vol_down()
584 .counter = vol_rend.state.change_counter, in bt_vcp_vol_rend_unmute_vol_up()
598 .counter = vol_rend.state.change_counter in bt_vcp_vol_rend_set_vol()
613 .counter = vol_rend.state.change_counter, in bt_vcp_vol_rend_unmute()
626 .counter = vol_rend.state.change_counter, in bt_vcp_vol_rend_mute()