Commit 389e21b3 authored by Johan Korsnes's avatar Johan Korsnes Committed by Mauro Carvalho Chehab

media: vivid: add number of HDMI ports to device state

This will be used for HDMI-specific controls such as hotplug detection
and power present.
Signed-off-by: default avatarJohan Korsnes <johan.korsnes@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent c533435f
...@@ -720,6 +720,7 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) ...@@ -720,6 +720,7 @@ static int vivid_create_instance(struct platform_device *pdev, int inst)
in_type_counter[HDMI]--; in_type_counter[HDMI]--;
dev->num_inputs--; dev->num_inputs--;
} }
dev->num_hdmi_inputs = in_type_counter[HDMI];
/* how many outputs do we have and of what type? */ /* how many outputs do we have and of what type? */
dev->num_outputs = num_outputs[inst]; dev->num_outputs = num_outputs[inst];
...@@ -742,6 +743,7 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) ...@@ -742,6 +743,7 @@ static int vivid_create_instance(struct platform_device *pdev, int inst)
out_type_counter[HDMI]--; out_type_counter[HDMI]--;
dev->num_outputs--; dev->num_outputs--;
} }
dev->num_hdmi_outputs = out_type_counter[HDMI];
/* do we create a video capture device? */ /* do we create a video capture device? */
dev->has_vid_cap = node_type & 0x0001; dev->has_vid_cap = node_type & 0x0001;
......
...@@ -168,9 +168,11 @@ struct vivid_dev { ...@@ -168,9 +168,11 @@ struct vivid_dev {
/* supported features */ /* supported features */
bool multiplanar; bool multiplanar;
unsigned num_inputs; unsigned num_inputs;
unsigned int num_hdmi_inputs;
u8 input_type[MAX_INPUTS]; u8 input_type[MAX_INPUTS];
u8 input_name_counter[MAX_INPUTS]; u8 input_name_counter[MAX_INPUTS];
unsigned num_outputs; unsigned num_outputs;
unsigned int num_hdmi_outputs;
u8 output_type[MAX_OUTPUTS]; u8 output_type[MAX_OUTPUTS];
u8 output_name_counter[MAX_OUTPUTS]; u8 output_name_counter[MAX_OUTPUTS];
bool has_audio_inputs; bool has_audio_inputs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment