Lines Matching +full:pre +full:- +full:programmed

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (C) 2005-2008 Auvitek International, Ltd.
11 * Enough is implemented here for CVBS and S-Video inputs, but the actual
22 #include <media/v4l2-common.h>
23 #include <media/v4l2-device.h>
47 0="ATV RF" 1="ATV RF13" 2="CVBS" 3="S-Video" 4="PAL" 5=CVBS13" 6="SVideo13"
202 if (state->std == V4L2_STD_PAL_M) { in setup_decoder_defaults()
276 * Despite what the table says, for the HVR-950q we still need in setup_decoder_defaults()
277 * to be in CVBS mode for the S-Video input (reason unknown). in setup_decoder_defaults()
303 /* here we're going to try the pre-programmed route */ in au8522_setup_cvbs_mode()
324 /* here we're going to try the pre-programmed route */ in au8522_setup_cvbs_tuner_mode()
368 /* ----------------------------------------------------------------------- */
386 int aud_input = state->aud_input; in set_audio_input()
435 /* ----------------------------------------------------------------------- */
440 container_of(ctrl->handler, struct au8522_state, hdl); in au8522_s_ctrl()
442 switch (ctrl->id) { in au8522_s_ctrl()
445 ctrl->val - 128); in au8522_s_ctrl()
449 ctrl->val); in au8522_s_ctrl()
453 ctrl->val); in au8522_s_ctrl()
455 ctrl->val); in au8522_s_ctrl()
459 ctrl->val >> 8); in au8522_s_ctrl()
461 ctrl->val & 0xFF); in au8522_s_ctrl()
464 return -EINVAL; in au8522_s_ctrl()
470 /* ----------------------------------------------------------------------- */
478 reg->val = au8522_readreg(state, reg->reg & 0xffff); in au8522_g_register()
487 au8522_writereg(state, reg->reg, reg->val & 0xff); in au8522_s_register()
498 switch (state->vid_input) { in au8522_video_set()
541 state->current_frequency = 0; in au8522_s_stream()
550 state->operational_mode = AU8522_ANALOG_MODE; in au8522_s_stream()
556 state->operational_mode = AU8522_SUSPEND_MODE; in au8522_s_stream()
570 state->vid_input = input; in au8522_s_video_routing()
574 return -EINVAL; in au8522_s_video_routing()
577 if (state->operational_mode == AU8522_ANALOG_MODE) in au8522_s_video_routing()
588 return -EINVAL; in au8522_s_std()
590 state->std = std; in au8522_s_std()
592 if (state->operational_mode == AU8522_ANALOG_MODE) in au8522_s_std()
603 state->aud_input = input; in au8522_s_audio_routing()
605 if (state->operational_mode == AU8522_ANALOG_MODE) in au8522_s_audio_routing()
622 vt->signal = 0xffff; in au8522_g_tuner()
624 vt->signal = 0x00; in au8522_g_tuner()
626 vt->capability |= in au8522_g_tuner()
631 vt->rxsubchans = val; in au8522_g_tuner()
632 vt->audmode = V4L2_TUNER_MODE_STEREO; in au8522_g_tuner()
636 /* ----------------------------------------------------------------------- */
671 /* ----------------------------------------------------------------------- */
684 if (!i2c_check_functionality(client->adapter, in au8522_probe()
686 return -EIO; in au8522_probe()
690 instance = au8522_get_state(&state, client->adapter, client->addr); in au8522_probe()
694 return -EIO; in au8522_probe()
705 state->config.demod_address = 0x8e >> 1; in au8522_probe()
706 state->i2c = client->adapter; in au8522_probe()
708 sd = &state->sd; in au8522_probe()
712 state->pads[AU8522_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; in au8522_probe()
713 state->pads[AU8522_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG; in au8522_probe()
714 state->pads[AU8522_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; in au8522_probe()
715 state->pads[AU8522_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV; in au8522_probe()
716 state->pads[AU8522_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE; in au8522_probe()
717 state->pads[AU8522_PAD_AUDIO_OUT].sig_type = PAD_SIGNAL_AUDIO; in au8522_probe()
718 sd->entity.function = MEDIA_ENT_F_ATV_DECODER; in au8522_probe()
720 ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads), in au8522_probe()
721 state->pads); in au8522_probe()
728 hdl = &state->hdl; in au8522_probe()
738 V4L2_CID_HUE, -32768, 32767, 1, 0); in au8522_probe()
739 sd->ctrl_handler = hdl; in au8522_probe()
740 if (hdl->error) { in au8522_probe()
741 int err = hdl->error; in au8522_probe()
748 state->c = client; in au8522_probe()
749 state->std = V4L2_STD_NTSC_M; in au8522_probe()
750 state->vid_input = AU8522_COMPOSITE_CH1; in au8522_probe()
751 state->aud_input = AU8522_AUDIO_NONE; in au8522_probe()
752 state->id = 8522; in au8522_probe()
753 state->rev = 0; in au8522_probe()
765 v4l2_ctrl_handler_free(sd->ctrl_handler); in au8522_remove()