Lines Matching refs:state

100 	struct wm8739_state *state = to_state(sd);  in wm8739_s_ctrl()  local
115 work_l = (min(65536 - state->balance->val, 32768) * state->volume->val) / 32768; in wm8739_s_ctrl()
116 work_r = (min(state->balance->val, 32768) * state->volume->val) / 32768; in wm8739_s_ctrl()
122 mute = state->mute->val ? 0x80 : 0; in wm8739_s_ctrl()
136 struct wm8739_state *state = to_state(sd); in wm8739_s_clock_freq() local
138 state->clock_freq = audiofreq; in wm8739_s_clock_freq()
164 struct wm8739_state *state = to_state(sd); in wm8739_log_status() local
166 v4l2_info(sd, "Frequency: %u Hz\n", state->clock_freq); in wm8739_log_status()
167 v4l2_ctrl_handler_log_status(&state->hdl, sd->name); in wm8739_log_status()
204 struct wm8739_state *state; in wm8739_probe() local
214 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL); in wm8739_probe()
215 if (state == NULL) in wm8739_probe()
217 sd = &state->sd; in wm8739_probe()
219 v4l2_ctrl_handler_init(&state->hdl, 2); in wm8739_probe()
220 state->volume = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops, in wm8739_probe()
222 state->mute = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops, in wm8739_probe()
224 state->balance = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops, in wm8739_probe()
226 sd->ctrl_handler = &state->hdl; in wm8739_probe()
227 if (state->hdl.error) { in wm8739_probe()
228 int err = state->hdl.error; in wm8739_probe()
230 v4l2_ctrl_handler_free(&state->hdl); in wm8739_probe()
233 v4l2_ctrl_cluster(3, &state->volume); in wm8739_probe()
235 state->clock_freq = 48000; in wm8739_probe()
253 v4l2_ctrl_handler_setup(&state->hdl); in wm8739_probe()
260 struct wm8739_state *state = to_state(sd); in wm8739_remove() local
263 v4l2_ctrl_handler_free(&state->hdl); in wm8739_remove()