V4L/DVB (8092): videodev: simplify and fix standard enumeration

VIDIOC_ENUMSTD did not return all the PAL/SECAM/NTSC variants: it just returned
one single PAL/SECAM/NTSC standard without separate entries for the trickier
standards like NTSC-JP.

Changed the code so that it behaves better.

Also simplified the if/switch statements into a common standards lookup table.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Hans Verkuil
2008-06-21 13:23:27 -03:00
committed by Mauro Carvalho Chehab
parent 7876ad75b1
commit 7fa8e6fa15
2 changed files with 69 additions and 178 deletions

View File

@@ -40,9 +40,9 @@
#define VFL_TYPE_VTX 3
/* Video standard functions */
extern char *v4l2_norm_to_name(v4l2_std_id id);
extern const char *v4l2_norm_to_name(v4l2_std_id id);
extern int v4l2_video_std_construct(struct v4l2_standard *vs,
int id, char *name);
int id, const char *name);
/* Prints the ioctl in a human-readable format */
extern void v4l_printk_ioctl(unsigned int cmd);