v4l2: fix sink/source and output/input names

This commit is contained in:
Wim Taymans 2021-02-12 16:13:00 +01:00
parent 2a83811297
commit 3cc577ddd6
2 changed files with 4 additions and 4 deletions

View file

@ -24,11 +24,11 @@ rules = [
{
matches = [
{
# Matches all sinks.
# Matches all sources.
node.name = "~v4l2_input.*"
}
{
# Matches all sources.
# Matches all sinks.
node.name = "~v4l2_output.*"
}
]

View file

@ -156,9 +156,9 @@ static struct node *v4l2_create_node(struct device *dev, uint32_t id,
str += 12;
if (strstr(info->factory_name, "sink") != NULL)
prefix = "v4l2_input";
else if (strstr(info->factory_name, "source") != NULL)
prefix = "v4l2_output";
else if (strstr(info->factory_name, "source") != NULL)
prefix = "v4l2_input";
else
prefix = info->factory_name;