diff options
author | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-06-21 23:45:33 +0200 |
---|---|---|
committer | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-06-21 23:45:33 +0200 |
commit | b45791b1525cf26b186d476f84229cb9ef563f99 (patch) | |
tree | b4c2c2ff12e5b9a6fdf570a72da955898d3900d9 | |
parent | c95c4ad7e1adade38d71962379f194434b44c1bd (diff) | |
download | mediapointer-dvb-s2-b45791b1525cf26b186d476f84229cb9ef563f99.tar.gz mediapointer-dvb-s2-b45791b1525cf26b186d476f84229cb9ef563f99.tar.bz2 |
libv4l: update upside down devices table
From: Hans de Goede <hdegoede@redhat.com>
libv4l: update upside down devices table
Priority: normal
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | v4l2-apps/libv4l/Makefile | 2 | ||||
-rw-r--r-- | v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol-priv.h | 4 | ||||
-rw-r--r-- | v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c | 23 |
3 files changed, 26 insertions, 3 deletions
diff --git a/v4l2-apps/libv4l/Makefile b/v4l2-apps/libv4l/Makefile index acec5c540..b0fdd6331 100644 --- a/v4l2-apps/libv4l/Makefile +++ b/v4l2-apps/libv4l/Makefile @@ -1,5 +1,5 @@ LIB_RELEASE=0 -V4L2_LIB_VERSION=$(LIB_RELEASE).5.99 +V4L2_LIB_VERSION=$(LIB_RELEASE).6.0-test all install: $(MAKE) -C libv4lconvert V4L2_LIB_VERSION=$(V4L2_LIB_VERSION) $@ diff --git a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol-priv.h b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol-priv.h index 6211ee22a..3394132e0 100644 --- a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol-priv.h +++ b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol-priv.h @@ -49,6 +49,10 @@ struct v4lcontrol_flags_info { const char *product; */ int flags; int default_gamma; +/* Some seldom used dmi strings (for notebooks with bogus info in the board + entries, but usefull info elsewhere). We keep this at the end as to not + polute the initalizers for the normal case. */ + const char *dmi_system_version; }; #endif diff --git a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c index eae1438e1..f23b18026 100644 --- a/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c +++ b/v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c @@ -58,7 +58,9 @@ static const struct v4lcontrol_flags_info v4lcontrol_flags[] = { { 0x093a, 0x2476, 0, NULL, NULL, V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED|V4LCONTROL_WANTS_WB, 1500 }, /* Laptops */ - { 0x04f2, 0xb106, 0, "ASUSTeK Computer Inc. ", "N50Vn ", + { 0x04f2, 0xb106, 0, "ASUSTeK Computer Inc. ", "N50Vn ", + V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, + { 0x04f2, 0xb106, 0, "ASUSTeK Computer Inc. ", "N51Vg ", V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, { 0x04f2, 0xb012, 0, "ASUSTeK Computer Inc. ", "F7SR ", V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, @@ -68,12 +70,18 @@ static const struct v4lcontrol_flags_info v4lcontrol_flags[] = { V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, { 0x064e, 0xa116, 0, "ASUSTeK Computer Inc. ", "N20A ", V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, + { 0x174f, 0x5a35, 0, "ASUSTeK Computer Inc. ", "F3Ke ", + V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, { 0x174f, 0x5a35, 0, "ASUSTeK Computer Inc. ", "F3Sr ", V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, { 0x174f, 0x5a35, 0, "ASUSTeK Computer Inc. ", "G1S ", V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, + { 0x174f, 0x5a35, 0, "ASUSTeK Computer Inc. ", "G1Sn ", + V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, { 0x174f, 0x5a35, 0, "ASUSTeK Computer Inc. ", "G2S ", V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED }, + { 0x5986, 0x0205, 0, "LENOVO", "Base Board Product Name", + V4LCONTROL_HFLIPPED|V4LCONTROL_VFLIPPED, 0, "Lenovo IdeaPad U330" }, /* Second: devices which should use some software processing by default */ /* Pac207 based devices */ @@ -111,6 +119,7 @@ static void v4lcontrol_init_flags(struct v4lcontrol_data *data) unsigned short product_id = 0; char dmi_board_vendor[512] = ""; char dmi_board_name[512]= ""; + char dmi_system_version[512]= ""; int i, minor; char c, *s, buf[32]; struct v4l2_input input; @@ -206,6 +215,14 @@ static void v4lcontrol_init_flags(struct v4lcontrol_data *data) fclose(f); } + f = fopen("/sys/devices/virtual/dmi/id/product_version", "r"); + if (f) { + s = fgets(dmi_system_version, sizeof(dmi_system_version), f); + if (s) + s[strlen(s) - 1] = 0; + fclose(f); + } + for (i = 0; i < ARRAY_SIZE(v4lcontrol_flags); i++) if (v4lcontrol_flags[i].vendor_id == vendor_id && v4lcontrol_flags[i].product_id == @@ -213,7 +230,9 @@ static void v4lcontrol_init_flags(struct v4lcontrol_data *data) (v4lcontrol_flags[i].dmi_board_vendor == NULL || !strcmp(v4lcontrol_flags[i].dmi_board_vendor, dmi_board_vendor)) && (v4lcontrol_flags[i].dmi_board_name == NULL || - !strcmp(v4lcontrol_flags[i].dmi_board_name, dmi_board_name))) { + !strcmp(v4lcontrol_flags[i].dmi_board_name, dmi_board_name)) && + (v4lcontrol_flags[i].dmi_system_version == NULL || + !strcmp(v4lcontrol_flags[i].dmi_system_version, dmi_system_version))) { data->flags |= v4lcontrol_flags[i].flags; data->flags_info = &v4lcontrol_flags[i]; break; |