Lines Matching defs:state
87 struct wm8739_state *state = to_state(sd);
102 work_l = (min(65536 - state->balance->val, 32768) * state->volume->val) / 32768;
103 work_r = (min(state->balance->val, 32768) * state->volume->val) / 32768;
109 mute = state->mute->val ? 0x80 : 0;
123 struct wm8739_state *state = to_state(sd);
125 state->clock_freq = audiofreq;
151 struct wm8739_state *state = to_state(sd);
153 v4l2_info(sd, "Frequency: %u Hz\n", state->clock_freq);
154 v4l2_ctrl_handler_log_status(&state->hdl, sd->name);
184 struct wm8739_state *state;
194 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL);
195 if (state == NULL)
197 sd = &state->sd;
199 v4l2_ctrl_handler_init(&state->hdl, 2);
200 state->volume = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops,
202 state->mute = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops,
204 state->balance = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops,
206 sd->ctrl_handler = &state->hdl;
207 if (state->hdl.error) {
208 int err = state->hdl.error;
210 v4l2_ctrl_handler_free(&state->hdl);
213 v4l2_ctrl_cluster(3, &state->volume);
215 state->clock_freq = 48000;
233 v4l2_ctrl_handler_setup(&state->hdl);
240 struct wm8739_state *state = to_state(sd);
243 v4l2_ctrl_handler_free(&state->hdl);