aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/stkwebcam
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-02-12 03:25:38 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-05 12:34:03 -0500
commit2aeb73e19dc3d17beebc1b9a678f4c60e1072e25 (patch)
tree4f0b207726ebd8af5b46987bd8dcb5a2d0c7fca3 /drivers/media/usb/stkwebcam
parent6b236a375d4764a6b7f7b83fb49bccacb7db4969 (diff)
[media] stk-webcam: add ASUS F3JC to upside-down list
And add an extensive comment relating the history of the upside-down handling in this driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Arvydas Sidorenko <asido4@gmail.com> Thanks-to: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/stkwebcam')
-rw-r--r--drivers/media/usb/stkwebcam/stk-webcam.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index 4cbab085e348..b2a5ee453a6a 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -63,7 +63,39 @@ static struct usb_device_id stkwebcam_table[] = {
63}; 63};
64MODULE_DEVICE_TABLE(usb, stkwebcam_table); 64MODULE_DEVICE_TABLE(usb, stkwebcam_table);
65 65
66/* The stk webcam laptop module is mounted upside down in some laptops :( */ 66/*
67 * The stk webcam laptop module is mounted upside down in some laptops :(
68 *
69 * Some background information (thanks to Hans de Goede for providing this):
70 *
71 * 1) Once upon a time the stkwebcam driver was written
72 *
73 * 2) The webcam in question was used mostly in Asus laptop models, including
74 * the laptop of the original author of the driver, and in these models, in
75 * typical Asus fashion (see the long long list for uvc cams inside v4l-utils),
76 * they mounted the webcam-module the wrong way up. So the hflip and vflip
77 * module options were given a default value of 1 (the correct value for
78 * upside down mounted models)
79 *
80 * 3) Years later I got a bug report from a user with a laptop with stkwebcam,
81 * where the module was actually mounted the right way up, and thus showed
82 * upside down under Linux. So now I was facing the choice of 2 options:
83 *
84 * a) Add a not-upside-down list to stkwebcam, which overrules the default.
85 *
86 * b) Do it like all the other drivers do, and make the default right for
87 * cams mounted the proper way and add an upside-down model list, with
88 * models where we need to flip-by-default.
89 *
90 * Despite knowing that going b) would cause a period of pain where we were
91 * building the table I opted to go for option b), since a) is just too ugly,
92 * and worse different from how every other driver does it leading to
93 * confusion in the long run. This change was made in kernel 3.6.
94 *
95 * So for any user report about upside-down images since kernel 3.6 ask them
96 * to provide the output of 'sudo dmidecode' so the laptop can be added in
97 * the table below.
98 */
67static const struct dmi_system_id stk_upside_down_dmi_table[] = { 99static const struct dmi_system_id stk_upside_down_dmi_table[] = {
68 { 100 {
69 .ident = "ASUS G1", 101 .ident = "ASUS G1",
@@ -71,6 +103,12 @@ static const struct dmi_system_id stk_upside_down_dmi_table[] = {
71 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), 103 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
72 DMI_MATCH(DMI_PRODUCT_NAME, "G1") 104 DMI_MATCH(DMI_PRODUCT_NAME, "G1")
73 } 105 }
106 }, {
107 .ident = "ASUS F3JC",
108 .matches = {
109 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
110 DMI_MATCH(DMI_PRODUCT_NAME, "F3JC")
111 }
74 }, 112 },
75 {} 113 {}
76}; 114};