Lines Matching refs:decoder
90 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_read() local
93 ret = regmap_read(decoder->regmap, addr, &val); in tvp5150_read()
262 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_selmux() local
267 if ((decoder->dev_id == 0x5150 && decoder->rom_ver == 0x0400) || in tvp5150_selmux()
268 (decoder->dev_id == 0x5151 && decoder->rom_ver == 0x0100)) { in tvp5150_selmux()
269 if (!decoder->enable) in tvp5150_selmux()
273 switch (decoder->input) { in tvp5150_selmux()
286 decoder->input, decoder->output, in tvp5150_selmux()
289 regmap_write(decoder->regmap, TVP5150_OP_MODE_CTL, opmode); in tvp5150_selmux()
290 regmap_write(decoder->regmap, TVP5150_VD_IN_SRC_SEL_1, input); in tvp5150_selmux()
300 if (decoder->input == TVP5150_SVIDEO) in tvp5150_selmux()
304 regmap_update_bits(decoder->regmap, TVP5150_MISC_CTL, mask, val); in tvp5150_selmux()
577 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_write_inittab() local
580 regmap_write(decoder->regmap, regs->reg, regs->value); in tvp5150_write_inittab()
588 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_vdp_init() local
589 struct regmap *map = decoder->regmap; in tvp5150_vdp_init()
659 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_set_vbi() local
660 v4l2_std_id std = decoder->norm; in tvp5150_set_vbi()
692 regmap_write(decoder->regmap, reg, type); in tvp5150_set_vbi()
695 regmap_write(decoder->regmap, reg + 1, type); in tvp5150_set_vbi()
702 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_get_vbi() local
703 v4l2_std_id std = decoder->norm; in tvp5150_get_vbi()
738 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_set_std() local
760 regmap_write(decoder->regmap, TVP5150_VIDEO_STD, fmt); in tvp5150_set_std()
766 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_g_std() local
768 *std = decoder->norm; in tvp5150_g_std()
775 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_s_std() local
777 if (decoder->norm == std) in tvp5150_s_std()
782 decoder->rect.height = TVP5150_V_MAX_525_60; in tvp5150_s_std()
784 decoder->rect.height = TVP5150_V_MAX_OTHERS; in tvp5150_s_std()
786 decoder->norm = std; in tvp5150_s_std()
815 struct tvp5150 *decoder = to_tvp5150(sd); in query_lock() local
818 if (decoder->irq) in query_lock()
819 return decoder->lock; in query_lock()
821 regmap_read(decoder->regmap, TVP5150_STATUS_REG_1, &status); in query_lock()
841 struct tvp5150 *decoder = dev_id; in tvp5150_isr() local
842 struct regmap *map = decoder->regmap; in tvp5150_isr()
853 decoder->lock = !!(status & TVP5150_INT_A_LOCK_STATUS); in tvp5150_isr()
854 dev_dbg_lvl(decoder->sd.dev, 1, debug, in tvp5150_isr()
856 decoder->lock ? "ck" : "ss"); in tvp5150_isr()
857 v4l2_subdev_notify_event(&decoder->sd, &tvp5150_ev_fmt); in tvp5150_isr()
859 decoder->lock ? decoder->oe : 0); in tvp5150_isr()
878 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_reset() local
879 struct regmap *map = decoder->regmap; in tvp5150_reset()
884 if (decoder->irq) { in tvp5150_reset()
905 v4l2_ctrl_handler_setup(&decoder->hdl); in tvp5150_reset()
912 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_enable() local
918 if (decoder->norm == V4L2_STD_ALL) in tvp5150_enable()
921 std = decoder->norm; in tvp5150_enable()
930 switch (decoder->mbus_type) { in tvp5150_enable()
933 regmap_update_bits(decoder->regmap, TVP5150_DATA_RATE_SEL, in tvp5150_enable()
935 decoder->oe = TVP5150_MISC_CTL_YCBCR_OE | in tvp5150_enable()
940 decoder->oe = TVP5150_MISC_CTL_YCBCR_OE | in tvp5150_enable()
953 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_s_ctrl() local
957 regmap_write(decoder->regmap, TVP5150_BRIGHT_CTL, ctrl->val); in tvp5150_s_ctrl()
960 regmap_write(decoder->regmap, TVP5150_CONTRAST_CTL, ctrl->val); in tvp5150_s_ctrl()
963 regmap_write(decoder->regmap, TVP5150_SATURATION_CTL, in tvp5150_s_ctrl()
967 regmap_write(decoder->regmap, TVP5150_HUE_CTL, ctrl->val); in tvp5150_s_ctrl()
970 decoder->enable = ctrl->val ? false : true; in tvp5150_s_ctrl()
994 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_fill_fmt() local
1001 f->width = decoder->rect.width; in tvp5150_fill_fmt()
1002 f->height = decoder->rect.height / 2; in tvp5150_fill_fmt()
1017 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_set_selection() local
1034 if (decoder->norm == V4L2_STD_ALL) in tvp5150_set_selection()
1037 std = decoder->norm; in tvp5150_set_selection()
1055 regmap_write(decoder->regmap, TVP5150_VERT_BLANKING_START, rect.top); in tvp5150_set_selection()
1056 regmap_write(decoder->regmap, TVP5150_VERT_BLANKING_STOP, in tvp5150_set_selection()
1058 regmap_write(decoder->regmap, TVP5150_ACT_VD_CROP_ST_MSB, in tvp5150_set_selection()
1060 regmap_write(decoder->regmap, TVP5150_ACT_VD_CROP_ST_LSB, in tvp5150_set_selection()
1062 regmap_write(decoder->regmap, TVP5150_ACT_VD_CROP_STP_MSB, in tvp5150_set_selection()
1065 regmap_write(decoder->regmap, TVP5150_ACT_VD_CROP_STP_LSB, in tvp5150_set_selection()
1068 decoder->rect = rect; in tvp5150_set_selection()
1077 struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd); in tvp5150_get_selection() local
1090 if (decoder->norm == V4L2_STD_ALL) in tvp5150_get_selection()
1093 std = decoder->norm; in tvp5150_get_selection()
1100 sel->r = decoder->rect; in tvp5150_get_selection()
1110 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_g_mbus_config() local
1112 cfg->type = decoder->mbus_type; in tvp5150_g_mbus_config()
1125 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_init_cfg() local
1132 if (decoder->norm == V4L2_STD_ALL) { in tvp5150_init_cfg()
1134 if (std != decoder->detected_norm) { in tvp5150_init_cfg()
1135 decoder->detected_norm = std; in tvp5150_init_cfg()
1136 tvp5150_set_default(std, &decoder->rect); in tvp5150_init_cfg()
1158 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_enum_frame_size() local
1164 fse->min_width = decoder->rect.width; in tvp5150_enum_frame_size()
1165 fse->max_width = decoder->rect.width; in tvp5150_enum_frame_size()
1166 fse->min_height = decoder->rect.height / 2; in tvp5150_enum_frame_size()
1167 fse->max_height = decoder->rect.height / 2; in tvp5150_enum_frame_size()
1182 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_link_setup() local
1186 if (remote->entity == &decoder->input_ent[i]) in tvp5150_link_setup()
1194 decoder->input = i; in tvp5150_link_setup()
1212 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_s_stream() local
1222 if (decoder->irq) in tvp5150_s_stream()
1223 val = decoder->lock ? decoder->oe : 0; in tvp5150_s_stream()
1225 val = decoder->oe; in tvp5150_s_stream()
1227 v4l2_subdev_notify_event(&decoder->sd, &tvp5150_ev_fmt); in tvp5150_s_stream()
1230 regmap_update_bits(decoder->regmap, TVP5150_MISC_CTL, mask, val); in tvp5150_s_stream()
1231 if (decoder->irq) in tvp5150_s_stream()
1233 regmap_update_bits(decoder->regmap, TVP5150_INT_ENABLE_REG_A, in tvp5150_s_stream()
1242 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_s_routing() local
1244 decoder->input = input; in tvp5150_s_routing()
1245 decoder->output = output; in tvp5150_s_routing()
1248 decoder->enable = false; in tvp5150_s_routing()
1250 decoder->enable = true; in tvp5150_s_routing()
1258 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_s_raw_fmt() local
1269 regmap_write(decoder->regmap, TVP5150_LUMA_PROC_CTL_1, 0x70); in tvp5150_s_raw_fmt()
1271 regmap_write(decoder->regmap, TVP5150_VERT_BLANKING_START, in tvp5150_s_raw_fmt()
1273 regmap_write(decoder->regmap, TVP5150_VERT_BLANKING_STOP, 0x01); in tvp5150_s_raw_fmt()
1280 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_s_sliced_fmt() local
1291 regmap_write(decoder->regmap, TVP5150_FIFO_OUT_CTRL, 1); in tvp5150_s_sliced_fmt()
1294 regmap_write(decoder->regmap, TVP5150_FIFO_OUT_CTRL, 0); in tvp5150_s_sliced_fmt()
1297 regmap_write(decoder->regmap, TVP5150_FULL_FIELD_ENA, 0); in tvp5150_s_sliced_fmt()
1301 regmap_write(decoder->regmap, i, 0xff); in tvp5150_s_sliced_fmt()
1339 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_s_register() local
1341 return regmap_write(decoder->regmap, reg->reg & 0xff, reg->val & 0xff); in tvp5150_s_register()
1356 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_registered() local
1361 struct media_entity *input = &decoder->input_ent[i]; in tvp5150_registered()
1362 struct media_pad *pad = &decoder->input_pad[i]; in tvp5150_registered()
1367 decoder->input_pad[i].flags = MEDIA_PAD_FL_SOURCE; in tvp5150_registered()
1594 static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) in tvp5150_parse_dt() argument
1625 decoder->mbus_type = bus_cfg.bus_type; in tvp5150_parse_dt()
1636 dev_err(decoder->sd.dev, in tvp5150_parse_dt()
1649 input = &decoder->input_ent[input_type]; in tvp5150_parse_dt()
1653 dev_err(decoder->sd.dev, in tvp5150_parse_dt()
1675 dev_err(decoder->sd.dev, in tvp5150_parse_dt()
1815 struct tvp5150 *decoder = to_tvp5150(sd); in tvp5150_remove() local
1822 v4l2_ctrl_handler_free(&decoder->hdl); in tvp5150_remove()