Lines Matching refs:state

96 	struct wm8775_state *state = to_state(sd);  in wm8775_set_audio()  local
98 int muted = 0 != state->mute->val; in wm8775_set_audio()
99 u16 volume = (u16)state->vol->val; in wm8775_set_audio()
100 u16 balance = (u16)state->bal->val; in wm8775_set_audio()
108 wm8775_write(sd, R21, 0x0c0 | state->input); in wm8775_set_audio()
115 wm8775_write(sd, R21, state->input); in wm8775_set_audio()
121 struct wm8775_state *state = to_state(sd); in wm8775_s_routing() local
132 state->input = input; in wm8775_s_routing()
133 if (v4l2_ctrl_g_ctrl(state->mute)) in wm8775_s_routing()
135 if (!v4l2_ctrl_g_ctrl(state->vol)) in wm8775_s_routing()
160 struct wm8775_state *state = to_state(sd); in wm8775_log_status() local
162 v4l2_info(sd, "Input: %d\n", state->input); in wm8775_log_status()
163 v4l2_ctrl_handler_log_status(&state->hdl, sd->name); in wm8775_log_status()
216 struct wm8775_state *state; in wm8775_probe() local
233 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); in wm8775_probe()
234 if (state == NULL) in wm8775_probe()
236 sd = &state->sd; in wm8775_probe()
238 state->input = 2; in wm8775_probe()
240 v4l2_ctrl_handler_init(&state->hdl, 4); in wm8775_probe()
241 state->mute = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops, in wm8775_probe()
243 state->vol = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops, in wm8775_probe()
245 state->bal = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops, in wm8775_probe()
247 state->loud = v4l2_ctrl_new_std(&state->hdl, &wm8775_ctrl_ops, in wm8775_probe()
249 sd->ctrl_handler = &state->hdl; in wm8775_probe()
250 err = state->hdl.error; in wm8775_probe()
252 v4l2_ctrl_handler_free(&state->hdl); in wm8775_probe()
283 wm8775_write(sd, R17, (state->loud->val ? ALC_EN : 0) | ALC_HOLD); in wm8775_probe()
306 struct wm8775_state *state = to_state(sd); in wm8775_remove() local
309 v4l2_ctrl_handler_free(&state->hdl); in wm8775_remove()