History log of /haiku/src/add-ons/media/media-add-ons/usb_webcam/addons/sonix/SonixCamDevice.cpp
Revision Date Author Comments
# edb48467 07-Oct-2020 Murai Takashi <tmurai01@gmail.com>

media-add-ons/usb_webcam: Fix -wformat=

Change-Id: Ie726c7b4ef9328e5542d845a1e7276e0509c4682
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3344
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 72bfb144 17-Jul-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

PVS V1028: cast result of operation instead of operands

If an overflow occurs before the cast, we can't fix it. If we cast
first, we can rely on integer promotion to make the result use the
appropriate size.

Change-Id: I7462e28422456c07f179f94d39c10c408d9bec36
Reviewed-on: https://review.haiku-os.org/c/1623
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# cb1f2e65 20-Jul-2012 Philippe Saint-Pierre <stpere@gmail.com>

Precedence of operators issues

Bitwise OR is taking precedence on Conditional operator.

CID 701957, CID 602560


# 02af02f9 12-Apr-2010 Jérôme Duval <korli@users.berlios.de>

partial clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36198 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb086488 28-Aug-2009 François Revol <revol@free.fr>

- style fixes,
- fix error handling in CamDevice.cpp,
- implemented PowerOnSensor() for Sonix,
- add a ProbeByIICSignature method to CamSensor, that takes a list of regs and values to match, as some Linux drivers do,
- add (unfinished, mostly copied from TAS5110C1B) support for TAS5130D1B sensor,
- add (unfinished) support for PAS106 sensor, probe by IIC signature as the Linux driver does,
- add probing by IIC signature for the HV7131E1 sensor as the Linux driver does,
- use -lusb for BeOS (actually ZETA) builds, don't try to use the Haiku USB Kit,
- for the TAS5110C1B sensor, use remove code dup and call SetVideoFrame(), tweaked the values to match those sniffed from the XP driver,
- disabled gain control for now on sonix, doesn't seem to work on all models.
This gets another sonix-based webcam working, partially at least, so if you want to get one to try until UVC works, try this one:
http://www.macally.com/EN/product/ArticleShow.asp?ArticleID=119
We should at least have one webcam supported in the alpha :D
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32795 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1830cbd 30-Sep-2008 François Revol <revol@free.fr>

Add missing copyrights.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0866ac7e 07-May-2008 François Revol <revol@free.fr>

- point to logitech opensource website
- cleanup
- handle frame size suggestions (Codycam gets QVGA now, and eXposer doesn't complain), though the picture is not centered nor scaled yet.
- added a stat text parameter to show actual frame rate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c38af24c 05-May-2008 François Revol <revol@free.fr>

- Finaly got sensor gain to work for mine...
- added brightness and contrast parameters for sn9cxxx according to a linux driver, but doesn't seem to work for mine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25323 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d55e0f83 05-May-2008 François Revol <revol@free.fr>

Turns out my QuickCam is not a usual quickcam with an WTV600 chip but an NW80x based one...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 74b3713a 05-May-2008 François Revol <revol@free.fr>

- style cleanup (remove // -----, 2 lines between funcs)
- hooks to handle probing sensor chips instead of hardcoding them.
- more urls for reference drivers (the macam driver would be interesting but it's GPL and ObjC :-( )...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25320 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b880818 04-May-2008 François Revol <revol@free.fr>

- some code to support isochronous, not yet functional.
- some code for quickcam, not yet functional.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25319 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1571aa7f 04-May-2008 François Revol <revol@free.fr>

Add IDs for Sonix cams according to linux driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25316 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a486abdc 04-May-2008 François Revol <revol@free.fr>

- don't hardcode frame size, use the maximum available instead. Setting it at connection won't work yet.
- Added hooks to handle device and sensor-specific parameters
- Added gain controls for my webcam, oddly none seem to work correctly except green gain :^)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25315 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e53032e5 08-Mar-2008 François Revol <revol@free.fr>

Fix warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24319 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f1863e2 09-Jan-2008 Marcus Overhagen <marcusoverhagen@gmail.com>

fix gcc4 build


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23312 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6bb8b29f 09-Jan-2008 François Revol <revol@free.fr>

Make CamFrame a subclass of BMallocIO to add a timestamp field.
Set the field on allocation and pass it around.
Still disabled as CodyCam drops everything, I should probably drop old frames from the buffer...
for now it uses system_time() to make CodyCam happy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23307 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e9a5067 23-Jan-2007 François Revol <revol@free.fr>

more Zeta vs Haiku USB Kit cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c9bd703 28-Aug-2006 François Revol <revol@free.fr>

Current version of my USB Webcam driver. WORK IN PROGRESS!
Uses the USB Kit (userland API, needs libusb) to publish a
media node representing the webcam.
It currently only works with my Sonix webcam (3Euro cheapo
cam), but is modular enough to easily expand it, some code
is already there to detect Quickcams.
For now you should be able to build it under Zeta with the
makefile provided.
Making a Jamfile might get tricky as several source files are
created by the makefile itself to include addons and censors
in the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb1f2e6525cd8c221a6b4571674d288858a394d4 20-Jul-2012 Philippe Saint-Pierre <stpere@gmail.com>

Precedence of operators issues

Bitwise OR is taking precedence on Conditional operator.

CID 701957, CID 602560


# 02af02f93ae67777d65cce1eda1c5f21aaed3446 12-Apr-2010 Jérôme Duval <korli@users.berlios.de>

partial clean up


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36198 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb086488a9cfb386e73a31e0303940f0176df11c 28-Aug-2009 François Revol <revol@free.fr>

- style fixes,
- fix error handling in CamDevice.cpp,
- implemented PowerOnSensor() for Sonix,
- add a ProbeByIICSignature method to CamSensor, that takes a list of regs and values to match, as some Linux drivers do,
- add (unfinished, mostly copied from TAS5110C1B) support for TAS5130D1B sensor,
- add (unfinished) support for PAS106 sensor, probe by IIC signature as the Linux driver does,
- add probing by IIC signature for the HV7131E1 sensor as the Linux driver does,
- use -lusb for BeOS (actually ZETA) builds, don't try to use the Haiku USB Kit,
- for the TAS5110C1B sensor, use remove code dup and call SetVideoFrame(), tweaked the values to match those sniffed from the XP driver,
- disabled gain control for now on sonix, doesn't seem to work on all models.
This gets another sonix-based webcam working, partially at least, so if you want to get one to try until UVC works, try this one:
http://www.macally.com/EN/product/ArticleShow.asp?ArticleID=119
We should at least have one webcam supported in the alpha :D
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32795 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a1830cbd577f57e8c92e5fea206d5dbf777a67a0 30-Sep-2008 François Revol <revol@free.fr>

Add missing copyrights.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27812 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0866ac7e91ed776223ec00160e60faaa8a9682e6 07-May-2008 François Revol <revol@free.fr>

- point to logitech opensource website
- cleanup
- handle frame size suggestions (Codycam gets QVGA now, and eXposer doesn't complain), though the picture is not centered nor scaled yet.
- added a stat text parameter to show actual frame rate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c38af24ceadc7935c37043e4a0b137542762f90d 05-May-2008 François Revol <revol@free.fr>

- Finaly got sensor gain to work for mine...
- added brightness and contrast parameters for sn9cxxx according to a linux driver, but doesn't seem to work for mine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25323 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d55e0f83f2ae17b5c4528647ab7d7d57db8cc6b5 05-May-2008 François Revol <revol@free.fr>

Turns out my QuickCam is not a usual quickcam with an WTV600 chip but an NW80x based one...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25321 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 74b3713ab98b669bbc98d4b5c074c9dd89db613d 05-May-2008 François Revol <revol@free.fr>

- style cleanup (remove // -----, 2 lines between funcs)
- hooks to handle probing sensor chips instead of hardcoding them.
- more urls for reference drivers (the macam driver would be interesting but it's GPL and ObjC :-( )...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25320 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5b880818a5d7b789bdd2b3a253b320b26c3dd1b6 04-May-2008 François Revol <revol@free.fr>

- some code to support isochronous, not yet functional.
- some code for quickcam, not yet functional.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25319 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1571aa7ff924d00bdb6cf8116872db25be5b6017 04-May-2008 François Revol <revol@free.fr>

Add IDs for Sonix cams according to linux driver.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25316 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a486abdce0e5725976184dd2752d42caa432fbb3 04-May-2008 François Revol <revol@free.fr>

- don't hardcode frame size, use the maximum available instead. Setting it at connection won't work yet.
- Added hooks to handle device and sensor-specific parameters
- Added gain controls for my webcam, oddly none seem to work correctly except green gain :^)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25315 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e53032e55dd3ce646da788cd78ee86a293d491c2 08-Mar-2008 François Revol <revol@free.fr>

Fix warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24319 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f1863e2a8326c54007a3c035caa55157d6f5163 09-Jan-2008 Marcus Overhagen <marcusoverhagen@gmail.com>

fix gcc4 build


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23312 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6bb8b29f4808742e25b256451e77ada26ed136a4 09-Jan-2008 François Revol <revol@free.fr>

Make CamFrame a subclass of BMallocIO to add a timestamp field.
Set the field on allocation and pass it around.
Still disabled as CodyCam drops everything, I should probably drop old frames from the buffer...
for now it uses system_time() to make CodyCam happy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23307 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e9a5067ef7d9207dfca7b68debebc9d44db0b62 23-Jan-2007 François Revol <revol@free.fr>

more Zeta vs Haiku USB Kit cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19927 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c9bd70310636a2ce913fba5ef02a51008c06ef5 28-Aug-2006 François Revol <revol@free.fr>

Current version of my USB Webcam driver. WORK IN PROGRESS!
Uses the USB Kit (userland API, needs libusb) to publish a
media node representing the webcam.
It currently only works with my Sonix webcam (3Euro cheapo
cam), but is modular enough to easily expand it, some code
is already there to detect Quickcams.
For now you should be able to build it under Zeta with the
makefile provided.
Making a Jamfile might get tricky as several source files are
created by the makefile itself to include addons and censors
in the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18670 a95241bf-73f2-0310-859d-f6bbb57e9c96