Lines Matching refs:state

330 	struct s2250 *state = to_state(sd);  in s2250_s_video_routing()  local
334 vidsys = (state->std == V4L2_STD_NTSC) ? 0x01 : 0x00; in s2250_s_video_routing()
348 state->input = input; in s2250_s_video_routing()
354 struct s2250 *state = to_state(sd); in s2250_s_std() local
358 vidsource = (state->input == 1) ? 0x040 : 0x020; in s2250_s_std()
367 state->std = norm; in s2250_s_std()
373 struct s2250 *state = container_of(ctrl->handler, struct s2250, hdl); in s2250_s_ctrl() local
374 struct i2c_client *client = v4l2_get_subdevdata(&state->sd); in s2250_s_ctrl()
413 struct s2250 *state = to_state(sd); in s2250_set_fmt() local
423 write_reg_fp(client, 0x12b, state->reg12b_val | 0x400); in s2250_set_fmt()
426 write_reg_fp(client, 0x12b, state->reg12b_val & ~0x400); in s2250_set_fmt()
435 struct s2250 *state = to_state(sd); in s2250_s_audio_routing() local
439 write_reg(state->audio, 0x08, 0x02); /* Line In */ in s2250_s_audio_routing()
442 write_reg(state->audio, 0x08, 0x04); /* Mic */ in s2250_s_audio_routing()
445 write_reg(state->audio, 0x08, 0x05); /* Mic Boost */ in s2250_s_audio_routing()
450 state->audio_input = input; in s2250_s_audio_routing()
457 struct s2250 *state = to_state(sd); in s2250_log_status() local
459 v4l2_info(sd, "Standard: %s\n", state->std == V4L2_STD_NTSC ? "NTSC" : in s2250_log_status()
460 state->std == V4L2_STD_PAL ? "PAL" : in s2250_log_status()
461 state->std == V4L2_STD_SECAM ? "SECAM" : in s2250_log_status()
463 v4l2_info(sd, "Input: %s\n", state->input == 0 ? "Composite" : in s2250_log_status()
464 state->input == 1 ? "S-video" : in s2250_log_status()
466 v4l2_info(sd, "Audio input: %s\n", state->audio_input == 0 ? "Line In" : in s2250_log_status()
467 state->audio_input == 1 ? "Mic" : in s2250_log_status()
468 state->audio_input == 2 ? "Mic Boost" : in s2250_log_status()
510 struct s2250 *state; in s2250_probe() local
520 state = kzalloc(sizeof(struct s2250), GFP_KERNEL); in s2250_probe()
521 if (state == NULL) { in s2250_probe()
526 sd = &state->sd; in s2250_probe()
532 v4l2_ctrl_handler_init(&state->hdl, 4); in s2250_probe()
533 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
535 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
537 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
539 v4l2_ctrl_new_std(&state->hdl, &s2250_ctrl_ops, in s2250_probe()
541 sd->ctrl_handler = &state->hdl; in s2250_probe()
542 if (state->hdl.error) { in s2250_probe()
543 int err = state->hdl.error; in s2250_probe()
545 v4l2_ctrl_handler_free(&state->hdl); in s2250_probe()
546 kfree(state); in s2250_probe()
550 state->std = V4L2_STD_NTSC; in s2250_probe()
551 state->brightness = 50; in s2250_probe()
552 state->contrast = 50; in s2250_probe()
553 state->saturation = 50; in s2250_probe()
554 state->hue = 0; in s2250_probe()
555 state->audio = audio; in s2250_probe()
578 state->audio_input = 0; in s2250_probe()
609 v4l2_ctrl_handler_free(&state->hdl); in s2250_probe()
610 kfree(state); in s2250_probe()
616 struct s2250 *state = to_state(i2c_get_clientdata(client)); in s2250_remove() local
618 v4l2_device_unregister_subdev(&state->sd); in s2250_remove()
619 v4l2_ctrl_handler_free(&state->hdl); in s2250_remove()
620 kfree(state); in s2250_remove()