{
struct adv7604_state *state = to_state(sd);
- v4l2_dbg(2, debug, sd, "%s: input %d", __func__, input);
+ v4l2_dbg(2, debug, sd, "%s: input %d, selected input %d",
+ __func__, input, state->selected_input);
+
+ if (input == state->selected_input)
+ return 0;
state->selected_input = input;
u8 fmt_change, fmt_change_digital, tx_5v;
u32 input_status;
+ v4l2_dbg(2, debug, sd, "%s: ", __func__);
+
/* format change */
fmt_change = io_read(sd, 0x43) & 0x98;
if (fmt_change)
/* initialize variables */
state->restart_stdi_once = true;
state->prev_input_status = ~0;
+ state->selected_input = ~0;
/* platform data */
if (!pdata) {