linux/drivers/media/cec/usb/extron-da-hd-4k-plus/cec-splitter.c

// SPDX-License-Identifier: GPL-2.0-only

/*
 * Copyright 2021-2024 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
 */

#include <media/cec.h>

#include "cec-splitter.h"

/*
 * Helper function to reply to a received message with a Feature Abort
 * message.
 */
static int cec_feature_abort_reason(struct cec_adapter *adap,
				    struct cec_msg *msg, u8 reason)
{}

/* Transmit an Active Source message from this output port to a sink */
static void cec_port_out_active_source(struct cec_splitter_port *p)
{}

/* Transmit Active Source messages from all output ports to the sinks */
static void cec_out_active_source(struct cec_splitter *splitter)
{}

/* Transmit a Standby message from this output port to a sink */
static void cec_port_out_standby(struct cec_splitter_port *p)
{}

/* Transmit Standby messages from all output ports to the sinks */
static void cec_out_standby(struct cec_splitter *splitter)
{}

/* Transmit an Image/Text View On message from this output port to a sink */
static void cec_port_out_wakeup(struct cec_splitter_port *p, u8 opcode)
{}

/* Transmit Image/Text View On messages from all output ports to the sinks */
static void cec_out_wakeup(struct cec_splitter *splitter, u8 opcode)
{}

/*
 * Update the power state of the unconfigured CEC device to either
 * Off or On depending on the current state of the splitter.
 * This keeps the outputs in a consistent state.
 */
void cec_splitter_unconfigured_output(struct cec_splitter_port *p)
{}

/*
 * Update the power state of the newly configured CEC device to either
 * Off or On depending on the current state of the splitter.
 * This keeps the outputs in a consistent state.
 */
void cec_splitter_configured_output(struct cec_splitter_port *p)
{}

/* Pass the in_msg on to all output ports */
static void cec_out_passthrough(struct cec_splitter *splitter,
				const struct cec_msg *in_msg)
{}

/*
 * See if all output ports received the Report Current Latency message,
 * and if so, transmit the result from the input port to the video source.
 */
static void cec_out_report_current_latency(struct cec_splitter *splitter,
					   struct cec_adapter *input_adap)
{}

/* Transmit Request Current Latency to all output ports */
static int cec_out_request_current_latency(struct cec_splitter *splitter)
{}

/*
 * See if all output ports received the Report Power Status message,
 * and if so, transmit the result from the input port to the video source.
 */
static void cec_out_report_power_status(struct cec_splitter *splitter,
					struct cec_adapter *input_adap)
{}

/* Transmit Give Device Power Status to all output ports */
static int cec_out_give_device_power_status(struct cec_splitter *splitter)
{}

/*
 * CEC messages received on the HDMI input of the splitter are
 * forwarded (if relevant) to the HDMI outputs of the splitter.
 */
int cec_splitter_received_input(struct cec_splitter_port *p, struct cec_msg *msg)
{}

void cec_splitter_nb_transmit_canceled_output(struct cec_splitter_port *p,
					      const struct cec_msg *msg,
					      struct cec_adapter *input_adap)
{}

/*
 * CEC messages received on an HDMI output of the splitter
 * are processed here.
 */
int cec_splitter_received_output(struct cec_splitter_port *p, struct cec_msg *msg,
				 struct cec_adapter *input_adap)
{}

/*
 * Called every second to check for timed out messages and whether there
 * still is a video sink connected or not.
 *
 * Returns true if sinks were lost.
 */
bool cec_splitter_poll(struct cec_splitter *splitter,
		       struct cec_adapter *input_adap, bool debug)
{}