093a:2460 Webcam (Pixart PAC207BCA) - inverted LED logic

Bug #525959 reported by Yuri Glushkov
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Hi all,

Problem:
The LED on this webcam is always turned on when connected to USB, unless some application uses it - the behavior that is opposite to what is expected.

It was tested on Ubuntu 9.10 32 bit, kernel 2.6.31-19-generic.
lsusb shows the webcam information as follows:
ID 093a:2460 Pixart Imaging, Inc. Q-TEC WEBCAM 100

Suggested solution:
The driver for this camera is gspca_pac207 (located at /lib/modules/2.6.31-19-generic/kernel/drivers/media/video/gspca).
In the driver source file pac207.c it can be seen that the bit 1 of the register at 0x41 controls the LED. Looks like it was assumed that '0' at this bit turns the light off, when actually '1' does that. After I've changed the value of this register to the opposite, the re-compiled driver works correctly and the LED is on only when the camera is in use.
I've attached the modified pac207.c. The diff of the changed file vs. original is below:

272c272 change:
pac207_write_reg(gspca_dev, 0x41, 0x00);

to:
pac207_write_reg(gspca_dev, 0x41, 0x02);

308c308 change:
mode = 0x02; /* Image Format (Bit 0), LED (1), Compr. test mode (2) */

to:
mode = 0x00; /* Image Format (Bit 0), LED (1), Compr. test mode (2) */

331c331 change:
pac207_write_reg(gspca_dev, 0x41, 0x00); /* Turn of LED */

to:
pac207_write_reg(gspca_dev, 0x41, 0x02); /* Turn off LED */

AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: yuri 1733 F.... pulseaudio
 /dev/snd/controlC0: yuri 1733 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xfaa00000 irq 52'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0892,1043841b,00100302 HDA:80862805,80862805,00100000'
   Controls : 39
   Simple ctrls : 21
Card1.Amixer.info:
 Card hw:1 'NVidia'/'HDA NVidia at 0xfa080000 irq 17'
   Mixer name : 'Nvidia GPU 15 HDMI/DP'
   Components : 'HDA:10de0015,10de0101,00100100'
   Controls : 16
   Simple ctrls : 4
DistroRelease: Ubuntu 11.10
HibernationDevice: RESUME=UUID=de1eeb67-9373-4213-9118-ae26c42861ed
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
IwConfig:
 lo no wireless extensions.

 eth2 no wireless extensions.
MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-26-generic-pae root=UUID=8e0e5216-29f9-432a-9298-ec75abcd3f07 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.0.0-26.43-generic-pae 3.0.43
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-26-generic-pae N/A
 linux-backports-modules-3.0.0-26-generic-pae N/A
 linux-firmware 1.60.1
RfKill:

StagingDrivers: mei
Tags: oneiric running-unity staging
Uname: Linux 3.0.0-26-generic-pae i686
UpgradeStatus: Upgraded to oneiric on 2011-10-30 (353 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 04/01/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 1002
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: P8H67-M PRO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1002:bd04/01/2011:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP8H67-MPRO:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Yuri Glushkov (yglushkov) wrote :
Revision history for this message
Tristan Schmelcher (tschmelcher) wrote :

Same behaviour here with my "Pixart Imaging, Inc. Q-TEC WEBCAM 100" (093a:2460).

Changed in gspca (Ubuntu):
status: New → Confirmed
Logan Rosen (logan)
affects: gspca (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Medium
penalvch (penalvch)
summary: - Webcam 093a:2460 (Pixart PAC207BCA) - inverted LED logic
+ 093a:2460 Webcam (Pixart PAC207BCA) - inverted LED logic
Revision history for this message
penalvch (penalvch) wrote :

Yuri Glushkov, thank you for reporting this and helping make Ubuntu better. Could you please execute the following at a terminal:
apport-collect 525959

As well, reviewing the Ubuntu Quantal git kernel pac207.c from http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-quantal.git;a=blob_plain;f=drivers/media/video/gspca/pac207.c;hb=HEAD shows the code mentioned in the Bug Description is still in the original state that you proposed to diff.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: karmic needs-kernel-logs
tags: added: patch
Revision history for this message
Yuri Glushkov (yglushkov) wrote : AcpiTables.txt

apport information

tags: added: apport-collected oneiric running-unity staging
description: updated
Revision history for this message
Yuri Glushkov (yglushkov) wrote : AlsaDevices.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : AplayDevices.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : BootDmesg.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card0.Codecs.codec.3.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card1.Amixer.values.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card1.Codecs.codec.0.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card1.Codecs.codec.1.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card1.Codecs.codec.2.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Card1.Codecs.codec.3.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Lspci.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : Lsusb.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : PciMultimedia.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : ProcEnviron.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : ProcModules.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : PulseSinks.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : PulseSources.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : UdevDb.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : UdevLog.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote : WifiSyslog.txt

apport information

Revision history for this message
Yuri Glushkov (yglushkov) wrote :

>Could you please execute the following at a terminal:
>apport-collect 525959

Done.

Revision history for this message
Yuri Glushkov (yglushkov) wrote :

>As well, reviewing the Ubuntu Quantal git kernel pac207.c from
>http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-quantal.git;a=blob_plain;f=drivers/media/video/gspca/pac207.c;hb=HEAD >shows the code mentioned in the Bug Description is still in the original state that you proposed to diff.

Corrrect, as I've only offered one way to this bug fix, while the final one may be different. There was no patch applied, as far as I can recall.

penalvch (penalvch)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: removed: needs-kernel-logs
penalvch (penalvch)
description: updated
Revision history for this message
penalvch (penalvch) wrote :

Yuri Glushkov, as per both Linus Master:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/media/usb/gspca/pac207.c;h=d236d1791f78da1ff0bdf965b8dde6389d169155;hb=0e4a43ed08e2f44aa7b96aa95d0a540d675483e1

and Quantal HEAD:
http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-quantal.git;a=blob_plain;f=drivers/media/video/gspca/pac207.c;hb=HEAD

the code you propose to change is still unchanged. Hence, the issue you are reporting is an upstream one. Could you please report this problem through the appropriate channel by following the instructions _verbatim_ at https://wiki.ubuntu.com/Bugs/Upstream/kernel#KernelTeam.2BAC8-KernelTeamBugPolicies.Overview_on_Reporting_Bugs_Upstream ?

Thank you for your understanding.

Marking Triaged due to code in Quantal HEAD and Linus Master both the same, unchanged code from proposed patch. Hence, mainline kernel test equivalent has been performed.

Changed in linux (Ubuntu):
status: Confirmed → Triaged
tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-v3.7-rc4
Revision history for this message
Yuri Glushkov (yglushkov) wrote :
Download full text (14.7 KiB)

[1.] One line summary of the problem:
093a:2460 Webcam (Pixart PAC207BCA) - inverted LED logic

[2.] Full description of the problem/report:
The LED on this webcam is always turned on when connected to USB, unless
 some application uses it - the behavior that is opposite to what is
expected.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/525959
The problem persists on all versions of Ubuntu I've tested.

[3.] Keywords (i.e., modules, networking, kernel): Please note, Kernel.org uses a different keyword system then the Ubuntu Tags system.
gspca, pac207, 093a:2460, Pixart PAC207BCA

[4.] Kernel version (from /proc/version):
Linux version 3.2.0-32-generic-pae (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012

[5.] Output of Oops.. message (if applicable) with symbolic information resolved (see Documentation/oops-tracing.txt)
NA

[6.] A small shell script or example program which triggers the problem (if possible)
NA

[7.] Environment
Description:    Ubuntu 12.04.1 LTS
Release:    12.04

[7.1.] Software (add the output of the ver_linux script here)

Linux yuri-desktop 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012 i686 i686 i386 GNU/Linux

Gnu C                  4.6
Gnu make               3.81
binutils               2.22
util-linux             2.20.1
mount                  support
module-init-tools      3.16
e2fsprogs              1.42
pcmciautils            018
Linux C Library        2.15
Dynamic linker (ldd)   2.15
Procps                 3.2.8
Net-tools              1.60
Kbd                    1.15.2
Sh-utils               8.13
wireless-tools         30
Modules Loaded         rfcomm bnep bluetooth binfmt_misc dm_crypt snd_hda_codec_hdmi gspca_pac207 gspca_main videodev snd_hda_codec_realtek ppdev eeepc_wmi asus_wmi sparse_keymap snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq nvidia parport_pc snd_timer wmi snd_seq_device snd serio_raw mac_hid soundcore snd_page_alloc mei lp parport vesafb usbhid hid r8169 pata_via video

[7.2.] Processor information (from /proc/cpuinfo):

processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 42
model name    : Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
stepping    : 7
microcode    : 0x28
cpu MHz        : 1600.000
cache size    : 6144 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 4
apicid        : 0
initial apicid    : 0
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips    : 6622.34
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
pow...

Revision history for this message
penalvch (penalvch) wrote :

Yuri Glushkov, thank you for contacting the upstream mailing list. Regarding this post https://bugs.launchpad.net/ubuntu/+source/linux/+bug/525959/comments/32 :
>"[4.] Kernel version (from /proc/version): Linux version 3.2.0-32-generic-pae"

Despite how this issue has been identified by downstream to be an upstream issue, please be mindful then when you provide information to upstream kernel.org developers and triagers, you should be booted into the newest upstream mainline kernel available that demonstrates this problem. 3.2.0-32-generic-pae is a Ubuntu kernel, not an upstream mainline kernel. Booting into the mainline avoids some potentially dismissing your problem as a downstream/distro problem only.

For more on this, please see https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Boot_Into_Mainline_Kernel .

Thank you for your understanding.

Revision history for this message
penalvch (penalvch) wrote :
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Yuri Glushkov (yglushkov) wrote :

Tested (on Trusty live image) and working for me.
led_invert=1 for gspca_pac207 inverts the LED logic, so it performs correctly with my webcam.

Revision history for this message
penalvch (penalvch) wrote :

Yuri Glushkov, would you need a backport to a release prior to Trusty, or may this be closed as Status Invalid?

Revision history for this message
Yuri Glushkov (yglushkov) wrote :

It would be nice to have a backport at least for the latest LTS version. Anyway, why the status should be Invalid? The bug was eventually fixed.

Revision history for this message
penalvch (penalvch) wrote :

Yuri Glushkov, thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because as per https://bugs.launchpad.net/ubuntu/+source/linux/+bug/525959/comments/35 the bug has been fixed in the latest development version of Ubuntu - Trusty Tahr.

This is a significant bug in Ubuntu. If you need a fix for the bug in previous versions of Ubuntu, please perform as much as possible of the SRU Procedure [1] to bring the need to a developer's attention.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.