Lines Matching refs:state

322 	struct s2250 *state = to_state(sd);
326 vidsys = (state->std == V4L2_STD_NTSC) ? 0x01 : 0x00;
340 state->input = input;
346 struct s2250 *state = to_state(sd);
350 vidsource = (state->input == 1) ? 0x040 : 0x020;
359 state->std = norm;
365 struct s2250 *state = container_of(ctrl->handler, struct s2250, hdl);
366 struct i2c_client *client = v4l2_get_subdevdata(&state->sd);
405 struct s2250 *state = to_state(sd);
415 write_reg_fp(client, 0x12b, state->reg12b_val | 0x400);
418 write_reg_fp(client, 0x12b, state->reg12b_val & ~0x400);
427 struct s2250 *state = to_state(sd);
431 write_reg(state->audio, 0x08, 0x02); /* Line In */
434 write_reg(state->audio, 0x08, 0x04); /* Mic */
437 write_reg(state->audio, 0x08, 0x05); /* Mic Boost */
442 state->audio_input = input;
449 struct s2250 *state = to_state(sd);
451 v4l2_info(sd, "Standard: %s\n", state->std == V4L2_STD_NTSC ? "NTSC" :
452 state->std == V4L2_STD_PAL ? "PAL" :
453 state->std == V4L2_STD_SECAM ? "SECAM" :
455 v4l2_info(sd, "Input: %s\n", state->input == 0 ? "Composite" :
456 state->input == 1 ? "S-video" :
458 v4l2_info(sd, "Audio input: %s\n", state->audio_input == 0 ? "Line In" :
459 state->audio_input == 1 ? "Mic" :
460 state->audio_input == 2 ? "Mic Boost" :
502 struct s2250 *state;
513 state = kzalloc(sizeof(struct s2250), GFP_KERNEL);
514 if (state == NULL) {
519 sd = &state->sd;
525 v4l2_ctrl_handler_init(&state->hdl, 4);
526 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops,
528 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops,
530 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops,
532 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops,
534 sd->ctrl_handler = &state->hdl;
535 if (state->hdl.error) {
536 err = state->hdl.error;
540 state->std = V4L2_STD_NTSC;
541 state->brightness = 50;
542 state->contrast = 50;
543 state->saturation = 50;
544 state->hue = 0;
545 state->audio = audio;
568 state->audio_input = 0;
599 v4l2_ctrl_handler_free(&state->hdl);
600 kfree(state);
606 struct s2250 *state = to_state(i2c_get_clientdata(client));
608 i2c_unregister_device(state->audio);
609 v4l2_device_unregister_subdev(&state->sd);
610 v4l2_ctrl_handler_free(&state->hdl);
611 kfree(state);