Lines Matching refs: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);
183 struct wm8739_state *state;
193 state = devm_kzalloc(&client->dev, sizeof(*state), GFP_KERNEL);
194 if (state == NULL)
196 sd = &state->sd;
198 v4l2_ctrl_handler_init(&state->hdl, 2);
199 state->volume = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops,
201 state->mute = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops,
203 state->balance = v4l2_ctrl_new_std(&state->hdl, &wm8739_ctrl_ops,
205 sd->ctrl_handler = &state->hdl;
206 if (state->hdl.error) {
207 int err = state->hdl.error;
209 v4l2_ctrl_handler_free(&state->hdl);
212 v4l2_ctrl_cluster(3, &state->volume);
214 state->clock_freq = 48000;
232 v4l2_ctrl_handler_setup(&state->hdl);
239 struct wm8739_state *state = to_state(sd);
242 v4l2_ctrl_handler_free(&state->hdl);