[PATCH] gspca pac7311/pac7302: propagate error to higher level software

2009-11-07 Thread Németh Márton
From: Márton Németh nm...@freemail.hu

The usb_control_msg() can fail any time. Only continue writing
sequence if there was no error with the previous write. If there
was any problem stop sending URBs and propagate the error to the
gspca_main.

Only the pac7302 driver was tested with Labtec Webcam 2200
(USB ID 093a:2626) because of lack of hardware for pac7311.

Signed-off-by: Márton Németh nm...@freemail.hu
---
diff -upr a/linux/drivers/media/video/gspca/pac7302.c 
b/linux/drivers/media/video/gspca/pac7302.c
--- a/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 08:57:26.0 
+0100
+++ b/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 09:08:16.0 
+0100
@@ -331,7 +331,7 @@ static const __u8 page3_7302[] = {
0x00
 };

-static void reg_w_buf(struct gspca_dev *gspca_dev,
+static int reg_w_buf(struct gspca_dev *gspca_dev,
  __u8 index,
  const char *buffer, int len)
 {
@@ -349,6 +349,7 @@ static void reg_w_buf(struct gspca_dev *
PDEBUG(D_ERR, reg_w_buf(): 
Failed to write registers to index 0x%x, error %i,
index, ret);
+   return ret;
 }

 #if 0 /* not used */
@@ -373,7 +374,7 @@ static __u8 reg_r(struct gspca_dev *gspc
 }
 #endif

-static void reg_w(struct gspca_dev *gspca_dev,
+static int reg_w(struct gspca_dev *gspca_dev,
  __u8 index,
  __u8 value)
 {
@@ -390,23 +391,27 @@ static void reg_w(struct gspca_dev *gspc
PDEBUG(D_ERR, reg_w(): 
Failed to write register to index 0x%x, value 0x%x, error %i,
index, value, ret);
+   return ret;
 }

-static void reg_w_seq(struct gspca_dev *gspca_dev,
+static int reg_w_seq(struct gspca_dev *gspca_dev,
const __u8 *seq, int len)
 {
+   int ret = 0;
while (--len = 0) {
-   reg_w(gspca_dev, seq[0], seq[1]);
+   if (0 = ret)
+   ret = reg_w(gspca_dev, seq[0], seq[1]);
seq += 2;
}
+   return ret;
 }

 /* load the beginning of a page */
-static void reg_w_page(struct gspca_dev *gspca_dev,
+static int reg_w_page(struct gspca_dev *gspca_dev,
const __u8 *page, int len)
 {
int index;
-   int ret;
+   int ret = 0;

for (index = 0; index  len; index++) {
if (page[index] == SKIP)/* skip this index */
@@ -418,52 +423,61 @@ static void reg_w_page(struct gspca_dev
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
0, index, gspca_dev-usb_buf, 1,
500);
-   if (ret  0)
+   if (ret  0) {
PDEBUG(D_ERR, reg_w_page(): 
Failed to write register to index 0x%x, 
value 0x%x, error %i,
index, page[index], ret);
+   break;
+   }
}
+   return ret;
 }

 /* output a variable sequence */
-static void reg_w_var(struct gspca_dev *gspca_dev,
+static int reg_w_var(struct gspca_dev *gspca_dev,
const __u8 *seq,
const __u8 *page3, unsigned int page3_len,
const __u8 *page4, unsigned int page4_len)
 {
int index, len;
+   int ret = 0;

for (;;) {
index = *seq++;
len = *seq++;
switch (len) {
case END_OF_SEQUENCE:
-   return;
+   return ret;
case LOAD_PAGE4:
-   reg_w_page(gspca_dev, page4, page4_len);
+   ret = reg_w_page(gspca_dev, page4, page4_len);
break;
case LOAD_PAGE3:
-   reg_w_page(gspca_dev, page3, page3_len);
+   ret = reg_w_page(gspca_dev, page3, page3_len);
break;
default:
if (len  USB_BUF_SZ) {
PDEBUG(D_ERR|D_STREAM,
Incorrect variable sequence);
-   return;
+   return -EINVAL;
}
while (len  0) {
if (len  8) {
-   reg_w_buf(gspca_dev, index, seq, len);
+   ret = reg_w_buf(gspca_dev,
+   index, seq, len);
+   if (ret  0)
+   return ret;
seq += len;
break;
}
-   reg_w_buf(gspca_dev, index, seq, 8);
+   ret = reg_w_buf(gspca_dev, 

[PATCH] gspca pac7302: simplify init sequence

2009-11-07 Thread Németh Márton
From: Márton Németh nm...@freemail.hu

The init sequence contains register writes which are overwritten later.
Remove these redundant writes from the init sequence.

The patch was tested together with Labtec Webcam 2200 (USB ID 093a:2626).

Signed-off-by: Márton Németh nm...@freemail.hu
---
diff -upr b/linux/drivers/media/video/gspca/pac7302.c 
c/linux/drivers/media/video/gspca/pac7302.c
--- b/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 09:08:16.0 
+0100
+++ c/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 10:33:57.0 
+0100
@@ -49,6 +49,18 @@
-/0x27  Seems to toggle various gains on / off, Setting bit 7 seems to
completely disable the analog amplification block. Set to 0x68
for max gain, 0x14 for minimal gain.
+
+   The registers are accessed in the following functions:
+
+   Page | Register   | Function
+   -++---
+0   | 0x0f..0x20 | setcolors()
+0   | 0xa2..0xab | setbrightcont()
+0   | 0xdc   | setbrightcont(), setcolors()
+3   | 0x02   | setexposure()
+3   | 0x10   | setgain()
+3   | 0x11   | setcolors(), setgain(), setexposure(), sethvflip()
+3   | 0x21   | sethvflip()
 */

 #define MODULE_NAME pac7302
@@ -247,9 +259,8 @@ static const __u8 start_7302[] = {
0xff, 1,0x00,   /* page 0 */
0x00, 12,   0x01, 0x40, 0x40, 0x40, 0x01, 0xe0, 0x02, 0x80,
0x00, 0x00, 0x00, 0x00,
-   0x0d, 24,   0x03, 0x01, 0x00, 0xb5, 0x07, 0xcb, 0x00, 0x00,
-   0x07, 0xc8, 0x00, 0xea, 0x07, 0xcf, 0x07, 0xf7,
-   0x07, 0x7e, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x11,
+   0x0d, 2,0x03, 0x01,
+   0x21, 4,0x00, 0x00, 0x00, 0x11,
0x26, 2,0xaa, 0xaa,
0x2e, 1,0x31,
0x38, 1,0x01,
@@ -264,8 +275,6 @@ static const __u8 start_7302[] = {
0x7d, 23,   0x01, 0x01, 0x58, 0x46, 0x50, 0x3c, 0x50, 0x3c,
0x54, 0x46, 0x54, 0x56, 0x52, 0x50, 0x52, 0x50,
0x56, 0x64, 0xa4, 0x00, 0xda, 0x00, 0x00,
-   0xa2, 10,   0x22, 0x2c, 0x3c, 0x54, 0x69, 0x7c, 0x9c, 0xb9,
-   0xd2, 0xeb,
0xaf, 1,0x02,
0xb5, 2,0x08, 0x08,
0xb8, 2,0x08, 0x88,
@@ -309,26 +318,32 @@ static const __u8 start_7302[] = {
 #define SKIP   0xaa
 /* page 3 - the value SKIP says skip the index - see reg_w_page() */
 static const __u8 page3_7302[] = {
-   0x90, 0x40, 0x03, 0x50, 0xc2, 0x01, 0x14, 0x16,
-   0x14, 0x12, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00,
-   0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x47, 0x01, 0xb3, 0x01, 0x00,
-   0x00, 0x08, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x21,
-   0x00, 0x00, 0x00, 0x54, 0xf4, 0x02, 0x52, 0x54,
-   0xa4, 0xb8, 0xe0, 0x2a, 0xf6, 0x00, 0x00, 0x00,
-   0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0xfc, 0x00, 0xf2, 0x1f, 0x04, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0xc0, 0xc0, 0x10, 0x00, 0x00,
-   0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x40, 0xff, 0x03, 0x19, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc8, 0xc8,
-   0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
-   0x08, 0x10, 0x24, 0x40, 0x00, 0x00, 0x00, 0x00,
-   0x01, 0x00, 0x02, 0x47, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x02, 0xfa, 0x00, 0x64, 0x5a, 0x28, 0x00,
-   0x00
+   /* 0x00 */ 0x90, 0x40,
+  SKIP, /* accessed in setexposure() */
+0x50, 0xc2, 0x01, 0x14, 0x16,
+   /* 0x08 */ 0x14, 0x12, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00,
+   /* 0x10 */ SKIP, /* accessed in setgain() */
+SKIP, /* accessed in setcolors() */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   /* 0x18 */ 0x00, 0x00, 0x00, 0x47, 0x01, 0xb3, 0x01, 0x00,
+   /* 0x20 */ 0x00,
+SKIP, /* accessed in sethvflip() */
+  0x00, 0x00, 0x0d, 0x00, 0x00, 0x21,
+   /* 0x28 */ 0x00, 0x00, 0x00, 0x54, 0xf4, 0x02, 0x52, 0x54,
+   /* 0x30 */ 0xa4, 0xb8, 0xe0, 0x2a, 0xf6, 0x00, 0x00, 0x00,
+   /* 0x38 */ 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   /* 0x40 */ 0x00, 0xfc, 0x00, 0xf2, 0x1f, 0x04, 0x00, 0x00,
+   /* 0x48 */ 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x10, 0x00, 0x00,
+   /* 0x50 */ 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   /* 0x58 */ 0x00, 0x40, 0xff, 0x03, 0x19, 0x00, 0x00, 0x00,
+   /* 0x60 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   /* 0x68 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc8, 0xc8,
+   /* 0x70 */ 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
+   /* 0x78 

dibusb-common.c FE_HAS_LOCK problem

2009-11-07 Thread Mario Bachmann
Hi there, 

I tried linux-2.6.31.5 and tuning still does not work: 
tuning to 73800 Hz
video pid 0x0131, audio pid 0x0132
status 00 | signal  | snr  | ber 001f | unc  | 
status 00 | signal  | snr  | ber 001f | unc  | 
status 00 | signal  | snr  | ber 001f | unc  | 
status 04 | signal  | snr  | ber 001f | unc  | 

With some changes for the following file it works again:
/usr/src/linux/drivers/media/dvb/dvb-usb/dibusb-common.c

diff -Naur dibusb-common.c-ORIGINAL dibusb-common.c

--- dibusb-common.c-ORIGINAL2009-11-07 10:30:43.705344308 +0100
+++ dibusb-common.c 2009-11-07 10:33:49.969345253 +0100
@@ -133,17 +133,14 @@
 
for (i = 0; i  num; i++) {
/* write/read request */
-   if (i+1  num  (msg[i].flags  I2C_M_RD) == 0
-  (msg[i+1].flags  I2C_M_RD)) {
+   if (i+1  num  (msg[i+1].flags  I2C_M_RD)) {
if (dibusb_i2c_msg(d, msg[i].addr, 
msg[i].buf,msg[i].len,
msg[i+1].buf,msg[i+1].len)  0)
break;
i++;
-   } else if ((msg[i].flags  I2C_M_RD) == 0) {
+   } else
if (dibusb_i2c_msg(d, msg[i].addr, 
msg[i].buf,msg[i].len,NULL,0)  0)
break;
-   } else
-   break;
}
 
mutex_unlock(d-i2c_mutex);


With this patch, tuning works again:
tuning to 73800 Hz
video pid 0x0131, audio pid 0x0132
status 00 | signal  | snr  | ber 001f | unc  | 
status 1f | signal  | snr 008d | ber 001f | unc  | FE_HAS_LOCK
status 1f | signal  | snr 00a1 | ber 05a4 | unc 0043 | FE_HAS_LOCK
status 1f | signal  | snr 00a3 | ber 05a4 | unc 0043 | FE_HAS_LOCK
status 1f | signal  | snr 009d | ber  | unc  | FE_HAS_LOCK


This is my DVB-T-Box (dmesg):
usb 4-2: new full speed USB device using ohci_hcd and address 6
usb 4-2: configuration #1 chosen from 1 choice
dvb-usb: found a 'TwinhanDTV USB-Ter USB1.1 / Magic Box I / HAMA USB1.1
DVB-T device' in warm state. dvb-usb: will use the device's hardware
PID filter (table count: 16). DVB: registering new adapter (TwinhanDTV
USB-Ter USB1.1 / Magic Box I / HAMA USB1.1 DVB-T device) DVB:
registering adapter 0 frontend 0 (DiBcom 3000M-B DVB-T)... dibusb: This
device has the Thomson Cable onboard. Which is default. input:
IR-receiver inside an USB DVB receiver
as /devices/pci:00/:00:04.0/usb4/4-2/input/input6 dvb-usb:
schedule remote query interval to 150 msecs. dvb-usb: TwinhanDTV
USB-Ter USB1.1 / Magic Box I / HAMA USB1.1 DVB-T device successfully
initialized and connected.

Mario
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] gspca pac7302: simplify init sequence

2009-11-07 Thread Jean-Francois Moine
On Sat, 07 Nov 2009 10:41:19 +0100
Németh Márton nm...@freemail.hu wrote:

 The init sequence contains register writes which are overwritten
 later. Remove these redundant writes from the init sequence.
[snip]

Hello Németh,

I am not sure it is a good idea. The webcam may need some
initialization values to start working before the control are applied.
Also, if any problem occurs, it is not easy to find the differences
with the ms-win traces.

Cheers.

-- 
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef |   http://moinejf.free.fr/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: bisected regression in tuner-xc2028 on DVICO dual digital 4

2009-11-07 Thread Vincent McIntyre
Hi Devin

 please confirm exactly which of your boards is not working.

Sorry for being unclear.

I have three test setups I am working with, all on the same computer.
1. Ubuntu Hardy, kernel 2.6.24-23-rt and drivers from v4l-dvb tip.
2. Ubuntu Karmic, kernel 2.6.31-14-generic, stock Ubuntu drivers.
3. Ubuntu Karmic, kernel 2.6.31-14-generic, v4l-dvb tip.

Setups 2  3 are the same install, on a separate hard disk from setup 1.
I change between 2  3 by installing the v4l modules or restoring the
ubuntu stuff from backup. (rsync -av --delete).

The computer has two DVB-T cards.

First device is the same as Robert's, I believe. It has two tuners. lsusb gives:
Bus 003 Device 003: ID 0fe9:db78 DVICO FusionHDTV DVB-T Dual Digital 4
(ZL10353+xc2028/xc3028) (initialized)
Bus 003 Device 002: ID 0fe9:db78 DVICO FusionHDTV DVB-T Dual Digital 4
(ZL10353+xc2028/xc3028) (initialized)
I have a 'rev1' version of this board.


Second device is DViCO FusionHDTV Dual Digital Express, a PCIe card
based on cx23885[1] It also has two tuners. lspci gives:
04:00.0 Multimedia video controller [0400]: Conexant Systems, Inc.
CX23885 PCI Video and Audio Decoder [14f1:8852] (rev 02)
Subsystem: DViCO Corporation Device [18ac:db78]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast TAbort-
TAbort- MAbort- SERR- PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 19
Region 0: Memory at 9000 (64-bit, non-prefetchable) [size=2M]
Capabilities: access denied
Kernel driver in use: cx23885
Kernel modules: cx23885

With Robert's patch compiled in:
 * On setup 1
  I am able to tune both cards and there are no errors from the cxusb module
   or dvb-usb anymore.
   I tested each of the four tuners, by running dvbscan with
appropriate arguments to
   select the right /dev/dvb/adapterN.

   I just realised I should probably revert the patch and check which
tuners show the
   original problem. Before I was taking the default choice (adapter0,
I think) which is
one of lhe Dual Digital 4 tuners.

 * I have yet to test setup 2,
   I have built the patched kernel module but the box is back 'in
production' right now.
   I plan to test tomorrow.

 * On setup 3. I attempted to tune using dvbscan, w_scan and vlc.
   Again, I was not specific about which tuner the applications should use.
   So to answer your question, I think it is the lsusb id 0fe9:db78
that is unable to tune.
   I will check the tuners individually, tomorrow.

   My impression was that the failures were because of API differences
between the
   applications (all provided as part of the ubuntu install) and the
V4L modules. I have
   not tried to build v4l-apps from the mercurial tree.

So, I hope this makes things clearer. Happy to run tests if you have
any time to look at this.

Kind regards
Vince


[1] http://linuxtv.org/wiki/index.php/DViCO_FusionHDTV_DVB-T_Dual_Express

On 11/7/09, Devin Heitmueller dheitmuel...@kernellabs.com wrote:
 Please excuse the top post. This is coming from my phone.

 Vincent, please confirm exactly which of your boards is not working.
 Roberts patch is not a general fix and only applies to his EXACT
 product .

 please provide the pci/usb I'd in question.

 thanks,

 devin

 On 11/6/09, Vincent McIntyre vincent.mcint...@gmail.com wrote:
 I tried this patch, on 2.6.24-23-rt and 2.6.31-14-generic
 .
 On the first, it appears to work fine. Thanks again Rob!

 On the second, while the kernel seems happy I am unable to get any
 applications to tune the card, when I use the latest v4l tree + Rob's
 patch (40705fec2fb2 tip).

  * dvbscan fails with 'unable to query frontend status'

  * vlc is unable to tune as well
 [0x9c2cf50] dvb access error: DVB-T: setting frontend failed (-1):
 Invalid argument
 [0x9c2cf50] dvb access error: DVB-T: tuning failed
 [0xb7400c18] main input error: open of `dvb://frequency=177500' failed:
 (null)


  * w_scan fails a bit more informatively
 w_scan version 20090808 (compiled for DVB API 5.0)
 using settings for AUSTRALIA
 DVB aerial
 DVB-T AU
 frontend_type DVB-T, channellist 3
 output format vdr-1.6
 Info: using DVB adapter auto detection.
 /dev/dvb/adapter0/frontend0 - DVB-T Zarlink ZL10353 DVB-T: good
 :-)
 /dev/dvb/adapter1/frontend0 - DVB-T Zarlink ZL10353 DVB-T: good
 :-)
 /dev/dvb/adapter2/frontend0 - DVB-T Zarlink ZL10353 DVB-T: good
 :-)
 /dev/dvb/adapter3/frontend0 - DVB-T Zarlink ZL10353 DVB-T: good
 :-)
 Using DVB-T frontend (adapter /dev/dvb/adapter0/frontend0)
 -_-_-_-_ Getting frontend capabilities-_-_-_-_
 Using DVB API 5.1
 frontend Zarlink ZL10353 DVB-T supports
 INVERSION_AUTO
 QAM_AUTO
 TRANSMISSION_MODE_AUTO
 GUARD_INTERVAL_AUTO
 HIERARCHY_AUTO
 FEC_AUTO
 -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 Scanning 7MHz frequencies...
 177500: (time: 00:00) 

Re: [PATCH] gspca pac7302: simplify init sequence

2009-11-07 Thread Németh Márton
Hi Jef,
Jean-Francois Moine wrote:
 On Sat, 07 Nov 2009 10:41:19 +0100
 Németh Márton nm...@freemail.hu wrote:
 
 The init sequence contains register writes which are overwritten
 later. Remove these redundant writes from the init sequence.
   [snip]
 
 Hello Németh,
 
 I am not sure it is a good idea. The webcam may need some
 initialization values to start working before the control are applied.
 Also, if any problem occurs, it is not easy to find the differences
 with the ms-win traces.

OK, maybe this change was made too early. I also reverted this change and
I'll send my next patch without modifying the init sequence.

Regards,

Márton Németh

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] gspca pac7302: add red and blue balance control

2009-11-07 Thread Németh Márton
From: Márton Németh nm...@freemail.hu

Add the red and blue balance control to the pac7302 driver. The valid
values for these controls are 0..3 which was identified by trial and error
on Labtec Webcam 2200 (USB ID 093a:2626). The upper 5 bits are ignored
on page 0, registers 0xc5 and 0xc7 by the camera.

Signed-off-by: Márton Németh nm...@freemail.hu
---
diff -upr b/linux/drivers/media/video/gspca/pac7302.c 
d/linux/drivers/media/video/gspca/pac7302.c
--- b/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 09:08:16.0 
+0100
+++ d/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 12:27:15.0 
+0100
@@ -49,6 +49,20 @@
-/0x27  Seems to toggle various gains on / off, Setting bit 7 seems to
completely disable the analog amplification block. Set to 0x68
for max gain, 0x14 for minimal gain.
+
+   The registers are accessed in the following functions:
+
+   Page | Register   | Function
+   -++---
+0   | 0x0f..0x20 | setcolors()
+0   | 0xa2..0xab | setbrightcont()
+0   | 0xc5   | setredbalance()
+0   | 0xc7   | setbluebalance()
+0   | 0xdc   | setbrightcont(), setcolors()
+3   | 0x02   | setexposure()
+3   | 0x10   | setgain()
+3   | 0x11   | setcolors(), setgain(), setexposure(), sethvflip()
+3   | 0x21   | sethvflip()
 */

 #define MODULE_NAME pac7302
@@ -66,6 +80,8 @@ struct sd {
unsigned char brightness;
unsigned char contrast;
unsigned char colors;
+   unsigned char red_balance;
+   unsigned char blue_balance;
unsigned char gain;
unsigned char exposure;
unsigned char autogain;
@@ -85,6 +101,10 @@ static int sd_setcontrast(struct gspca_d
 static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setredbalance(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getredbalance(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setbluebalance(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getbluebalance(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val);
@@ -145,6 +165,34 @@ static struct ctrl sd_ctrls[] = {
.set = sd_setcolors,
.get = sd_getcolors,
},
+   {
+   {
+   .id  = V4L2_CID_RED_BALANCE,
+   .type= V4L2_CTRL_TYPE_INTEGER,
+   .name= Red,
+   .minimum = 0,
+   .maximum = 3,
+   .step= 1,
+#define REDBALANCE_DEF 1
+   .default_value = REDBALANCE_DEF,
+   },
+   .set = sd_setredbalance,
+   .get = sd_getredbalance,
+   },
+   {
+   {
+   .id  = V4L2_CID_BLUE_BALANCE,
+   .type= V4L2_CTRL_TYPE_INTEGER,
+   .name= Blue,
+   .minimum = 0,
+   .maximum = 3,
+   .step= 1,
+#define BLUEBALANCE_DEF 1
+   .default_value = BLUEBALANCE_DEF,
+   },
+   .set = sd_setbluebalance,
+   .get = sd_getbluebalance,
+   },
 /* All controls below are for both the 7302 and the 7311 */
{
{
@@ -498,6 +546,8 @@ static int sd_config(struct gspca_dev *g
sd-brightness = BRIGHTNESS_DEF;
sd-contrast = CONTRAST_DEF;
sd-colors = COLOR_DEF;
+   sd-red_balance = REDBALANCE_DEF;
+   sd-blue_balance = BLUEBALANCE_DEF;
sd-gain = GAIN_DEF;
sd-exposure = EXPOSURE_DEF;
sd-autogain = AUTOGAIN_DEF;
@@ -566,6 +616,36 @@ static int setcolors(struct gspca_dev *g
return ret;
 }

+static int setredbalance(struct gspca_dev *gspca_dev)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+
+   ret = reg_w(gspca_dev, 0xff, 0x00); /* page 0 */
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xc5, sd-red_balance);
+
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xdc, 0x01);
+   PDEBUG(D_CONF|D_STREAM, red: %i, sd-red_balance);
+   return ret;
+}
+
+static int setbluebalance(struct gspca_dev *gspca_dev)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+
+   ret = reg_w(gspca_dev, 0xff, 0x00); /* page 0 */
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xc7, sd-blue_balance);
+
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xdc, 0x01);
+   PDEBUG(D_CONF|D_STREAM, red: %i, sd-blue_balance);
+   return ret;
+}
+
 static int setgain(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
@@ -647,6 +727,10 @@ static int 

Re: [PATCH] gspca pac7302: add red and blue balance control

2009-11-07 Thread Németh Márton
Németh Márton wrote:
 Add the red and blue balance control to the pac7302 driver. The valid
 values for these controls are 0..3 which was identified by trial and error
 on Labtec Webcam 2200 (USB ID 093a:2626). The upper 5 bits are ignored

The upper 6 bits, I mean. The lower two bits are only used for value.

Regards,

Márton Németh
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] gspca pac7302: add red and blue balance control

2009-11-07 Thread Németh Márton
From: Márton Németh nm...@freemail.hu

Add the red and blue balance control to the pac7302 driver. The valid
values for these controls are 0..3 (lower two bits) which was identified
by trial and error on Labtec Webcam 2200 (USB ID 093a:2626). The upper
6 bits are ignored on page 0, registers 0xc5 and 0xc7 by the camera.

Signed-off-by: Márton Németh nm...@freemail.hu
---
Patch description corrected, debug message in setbluebalance() corrected.
---
diff -upr b/linux/drivers/media/video/gspca/pac7302.c 
d/linux/drivers/media/video/gspca/pac7302.c
--- b/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 09:08:16.0 
+0100
+++ d/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 12:27:15.0 
+0100
@@ -49,6 +49,20 @@
-/0x27  Seems to toggle various gains on / off, Setting bit 7 seems to
completely disable the analog amplification block. Set to 0x68
for max gain, 0x14 for minimal gain.
+
+   The registers are accessed in the following functions:
+
+   Page | Register   | Function
+   -++---
+0   | 0x0f..0x20 | setcolors()
+0   | 0xa2..0xab | setbrightcont()
+0   | 0xc5   | setredbalance()
+0   | 0xc7   | setbluebalance()
+0   | 0xdc   | setbrightcont(), setcolors()
+3   | 0x02   | setexposure()
+3   | 0x10   | setgain()
+3   | 0x11   | setcolors(), setgain(), setexposure(), sethvflip()
+3   | 0x21   | sethvflip()
 */

 #define MODULE_NAME pac7302
@@ -66,6 +80,8 @@ struct sd {
unsigned char brightness;
unsigned char contrast;
unsigned char colors;
+   unsigned char red_balance;
+   unsigned char blue_balance;
unsigned char gain;
unsigned char exposure;
unsigned char autogain;
@@ -85,6 +101,10 @@ static int sd_setcontrast(struct gspca_d
 static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setredbalance(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getredbalance(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setbluebalance(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getbluebalance(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val);
@@ -145,6 +165,34 @@ static struct ctrl sd_ctrls[] = {
.set = sd_setcolors,
.get = sd_getcolors,
},
+   {
+   {
+   .id  = V4L2_CID_RED_BALANCE,
+   .type= V4L2_CTRL_TYPE_INTEGER,
+   .name= Red,
+   .minimum = 0,
+   .maximum = 3,
+   .step= 1,
+#define REDBALANCE_DEF 1
+   .default_value = REDBALANCE_DEF,
+   },
+   .set = sd_setredbalance,
+   .get = sd_getredbalance,
+   },
+   {
+   {
+   .id  = V4L2_CID_BLUE_BALANCE,
+   .type= V4L2_CTRL_TYPE_INTEGER,
+   .name= Blue,
+   .minimum = 0,
+   .maximum = 3,
+   .step= 1,
+#define BLUEBALANCE_DEF 1
+   .default_value = BLUEBALANCE_DEF,
+   },
+   .set = sd_setbluebalance,
+   .get = sd_getbluebalance,
+   },
 /* All controls below are for both the 7302 and the 7311 */
{
{
@@ -498,6 +546,8 @@ static int sd_config(struct gspca_dev *g
sd-brightness = BRIGHTNESS_DEF;
sd-contrast = CONTRAST_DEF;
sd-colors = COLOR_DEF;
+   sd-red_balance = REDBALANCE_DEF;
+   sd-blue_balance = BLUEBALANCE_DEF;
sd-gain = GAIN_DEF;
sd-exposure = EXPOSURE_DEF;
sd-autogain = AUTOGAIN_DEF;
@@ -566,6 +616,36 @@ static int setcolors(struct gspca_dev *g
return ret;
 }

+static int setredbalance(struct gspca_dev *gspca_dev)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+
+   ret = reg_w(gspca_dev, 0xff, 0x00); /* page 0 */
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xc5, sd-red_balance);
+
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xdc, 0x01);
+   PDEBUG(D_CONF|D_STREAM, red_balance: %i, sd-red_balance);
+   return ret;
+}
+
+static int setbluebalance(struct gspca_dev *gspca_dev)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+
+   ret = reg_w(gspca_dev, 0xff, 0x00); /* page 0 */
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xc7, sd-blue_balance);
+
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xdc, 0x01);
+   PDEBUG(D_CONF|D_STREAM, blue_balance: %i, sd-blue_balance);
+   return ret;
+}
+
 static int setgain(struct 

Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Magnus Alm
Hi

I read some where that trying different card types for a DVB tuner can
potentially cause damage to them.

You are probably right about the firmare.
Do you have a link to the manufacture of your stick?
I tried to google the name of it but couldn't found an exact match.

The EM2881_BOARD_PINNACLE_HYBRID_PRO uses it's XC3028 to getter with a
ZARLINK456
as you can see from the following line in em28xx-cards.c

case EM2881_BOARD_PINNACLE_HYBRID_PRO:
ctl-demod = XC3028_FE_ZARLINK456;
break;

It is probably not compliant with your  Zarlink MT352.

There is a mt352 module tho, but I guess it doesn't get loaded when
you plug your stick in.

I'll pooke around a bit.

PS
Use the reply all, so others can see your mails, since I'm probably
one of the least competent guys/gals on this mailing list.
DS



2009/11/7 Johan Mutsaerts joh...@gmail.com:
 Hi Magnus,

 Thanks for a quick reply. Here is some more detailed information:

 My USB device ID is 0xeb1a:0x2881 it is eMPIA based.

 These are the components inside
 - Empia EM2880
 - Texas Instruments 5150AM1
 - XCeive XC3028
 - Empia EMP202
 - Zarlink MT352

 Difficult for me to get to the windows stuff

 No /dev/dvb/ is generated ? Could it have something to do with no 
 Firmware ?

 I found my device to be quite similar to the Pinnacle Hybrid Pro so I tried
 sudo rmmod em28xx-dvb
 sudo rmmod em28xx-alsa
 sudo rmmod em28xx
 sudo modprobe em28xx card=53 and card=56
 sudo modprobe em28xx-alsa
 sudo modprobe em28xx-dvb
 However with not much success.
 Card=53 cased MeTV to see a tuner but no channels could be found

 TIA for any assistance you can provide.

 Best Regards,
 Johan

 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi!

 The dmesg didn't reveal what tuner your stick/card has, it's probably
 a XC2028/XC3028 or something like that.
 Easiest way to find out would be if you could open the cover and have
 a look inside.

 If you have access to windows and the pvr program that came with the
 tuner you could do a usb-sniff.

 http://www.pcausa.com/Utilities/UsbSnoop/
 or
 http://benoit.papillault.free.fr/usbsnoop/

 Switch between different inputs while doing the log, like dvb,
 analog and if it has svideo/composite input.

 copy the windows log to unix and parse the output with parser.pl (I've
 added is as an attachment.)
 I think there is a new parser somewhere, but I forgot the name of it.

 I'm also not sure how I used it, but I think it was like this: perl
 parser.pl  your_windows_log  parsed_log
 That log is needed to  find out what gpio your tuner needs for
 different settings.

 Don't be scared of the size of the windows log, it gets large, often a
 few hundred MB.
 The parsed log is much smaller,  a few hundred KB.

 That is all I can think about atm.

 /Magnus Alm


 2009/11/6 Johan Mutsaerts joh...@gmail.com:
 Hi,

 I have an iDream UTVHYL2 USB TV Tuner (with IR remote control) that I
 cannot get to work with Ubuntu (9.04, 2.6.28-16). I have successfully
 compiled and installed the em28xx-new driver from linuxtv.org. No
 /dev/dvb/adapter... is created and that is where it ends for me know.
 MyTV claims no adapter is detected.

 I have attached the output of lsusb and dmesg as requested...

 Please let me know what more I can do and what exactly it is you can do ?

 Thanks in advance and
 Best Regards,
 Johan (Belgium)



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] Restructure video_device

2009-11-07 Thread Hans Verkuil
On Friday 06 November 2009 11:23:59 Laurent Pinchart wrote:
 Hi Hans,
 
 On Thursday 05 November 2009 15:19:06 Hans Verkuil wrote:
  On Friday 23 October 2009 16:25:40 Laurent Pinchart wrote:
   Hi everybody,
  
   while working on device node support for subdevs I ran into an issue with
   the way v4l2 objects are structured.
  
   We currently have the following structure:
  
   - video_device represents a device that complies with the V4L1 or V4L2
   API. Every video_device has a corresponding device node.
  
   - v4l2_device represents a high-level media device that handles
   sub-devices. With the new media controller infrastructure a v4l2_device
   will have a device node as well.
  
   - v4l2_subdev represents a sub-device. As for v4l2_device's, the new
   media controller infrastructure will give a device node for every
   sub-device.
  
   - v4l2_entity is the structure that both v4l2_subdev and video_device
   derive from. Most of the media controller code will deal with entities
   rather than sub-devices or video devices, as most operations (such as
   discovering the topology and create links) do not depend on the exact
   nature of the entity. New types of entities could be introduced later.
  
   Both the video_device and v4l2_subdev structure inherit from v4l2_entity,
   so both of them have a v4l2_entity field. With v4l2_device and
   v4l2_subdev now needing to devices to have device nodes created, the
   v4l2_device and v4l2_subdev structure both have a video_device field.
  
   This isn't clean for two reasons:
  
   - v4l2_device isn't a v4l2_entity, so it should inherit from a structure
   (video_device) that itself inherits from v4l2_entity.
  
   - v4l2_subdev shouldn't inherit twice from v4l2_entity, once directly and
   once through video_device.
  
  I agree.
  
   To fix this I would like to refactor the video_device structure and cut
   it in two pieces. One of them will deal with device node related tasks,
   being mostly V4L1/V4L2 agnostic, and the other will inherit from the
   first and add V4L1/V4L2 support (tvnorms/current_norm/ioctl_ops fields
   from the current video_device structure), as well as media controller
   support (inheriting from v4l2_entity).
  
   My plan was to create a video_devnode structure for the low-level device
   node
  
  Let's call it v4l2_devnode to be consistent with the current naming
   convention.
 
 Ok.
 
   related structure, and keeping the video_device name for the higher level
   structure. v4l2_device, v4l2_subdev and video_device would then all have
   a video_devnode field.
  
   While this isn't exactly difficult, it would require changing a lot of
   drivers, as some field will be moved from video_device to
   video_device::video_devnode. Some of those fields are internal, some of
   them are accessed by drivers while they shouldn't in most cases (the
   minor field for instance), and some are public (name, parent).
  
   I would like to have your opinion on whether you think this proposal is
   acceptable or whether you see a better and cleaner way to restructure the
   video device code structures.
  
  I have two issues with this:
  
  1) Is it really necessary to do this now? We are still in the prototyping
  phase and I think it is probably more efficient right now to hack around
   this and postpone the real fix (as described above) until we are sure that
   the mc concept is working correctly.
 
 The media controller prototyping code is, as usual with prototyping codes, a 
 bit messy. Splitting the device node management part from video_device into 
 v4l2_devnode will make the media controller code easier to understand for 
 outsiders (by outsider I mean every person who haven't been actively working 
 on the code, so that includes pretty much everybody). I think it's worth it, 
 especially given that I've already written the patches. They can live in the 
 media controller tree of course, we don't have to apply them to mainline at 
 the moment.

Ah, it's only for the mc tree. I was getting the impression that you wanted to
do this for the mainline tree as well. But if it is just for the mc tree, then
go ahead. You can just do it in your own tree; as far as I am concerned your
tree is leading for now.

  2) I'm not sure whether the final media controller will and should be part
  of the v4l framework at all. I think that this is something that can be
   used separately from the v4l subsystem.
 
 I think it should not be part of the v4l subsystem. ALSA will benefit from 
 the 
 media controller, and so might other subsystems such as GPU. A media_ prefix 
 would be much nicer.

I agree, but let's postpone such decisions until later.

   So we should be very careful about integrating this too closely in v4l.
   Again, this is not much of an issue while prototyping, but it definitely
   will need some careful thinking when we do the final implementation.
 
 Agreed. Let's rename v4l2_devnode to media_devnode in the future then 

Re: bug in changeset 13239:54535665f94b ?

2009-11-07 Thread Mauro Carvalho Chehab
Hi Hartmut,

Em Sun, 01 Nov 2009 16:59:26 +0100
e9hack e9h...@googlemail.com escreveu:

 Hi,
 
 something is wrong in changeset 13239:54535665f94b. After applying it, I get 
 page faults
 in various applications:
 ...
 
 If I remove the call to release_all_pagetables() in buffer_release(), I don't 
 see this
 page faults.


Em Mon, 2 Nov 2009 21:27:44 +0100
e9h...@googlemail.com escreveu:

 the BUG is in vidioc_streamoff() for the saa7146. This function
 releases all buffers first, and stops the capturing and dma tranfer of
 the saa7146 as second. If the page table, which is currently used by
 the saa7146, is modified by another thread, the saa7146 writes
 anywhere to the physical RAM. IMHO vidioc_streamoff() must stop the
 saa7146 first and may then release the buffers.

I agree. We need first to stop DMA activity, and then release the page tables.

Could you please test if the enclosed patch fixes the issue?

Cheers,
Mauro

saa7146: stop DMA before de-allocating DMA scatter/gather page buffers

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

diff --git a/linux/drivers/media/common/saa7146_video.c 
b/linux/drivers/media/common/saa7146_video.c
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1334,9 +1334,9 @@ static void buffer_release(struct videob
 
DEB_CAP((vbuf:%p\n,vb));
 
+   saa7146_dma_free(dev,q,buf);
+
release_all_pagetables(dev, buf);
-
-   saa7146_dma_free(dev,q,buf);
 }
 
 static struct videobuf_queue_ops video_qops = {
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Magnus Alm
Well, maybe you where more right than me...

From em28xx-dvb.c

case EM2880_BOARD_TERRATEC_HYBRID_XS:
case EM2881_BOARD_PINNACLE_HYBRID_PRO:
dvb-frontend = dvb_attach(zl10353_attach,
   em28xx_zl10353_xc3028_no_i2c_gate,
   dev-i2c_adap);
if (dvb-frontend == NULL) {
/* This board could have either a zl10353 or a mt352.
   If the chip id isn't for zl10353, try mt352 */
dvb-frontend = dvb_attach(mt352_attach,
   terratec_xs_mt352_cfg,
   dev-i2c_adap);
}


2009/11/7 Magnus Alm magnus@gmail.com:
 Hi

 I read some where that trying different card types for a DVB tuner can
 potentially cause damage to them.

 You are probably right about the firmare.
 Do you have a link to the manufacture of your stick?
 I tried to google the name of it but couldn't found an exact match.

 The EM2881_BOARD_PINNACLE_HYBRID_PRO uses it's XC3028 to getter with a
 ZARLINK456
 as you can see from the following line in em28xx-cards.c

 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                ctl-demod = XC3028_FE_ZARLINK456;
                break;

 It is probably not compliant with your  Zarlink MT352.

 There is a mt352 module tho, but I guess it doesn't get loaded when
 you plug your stick in.

 I'll pooke around a bit.

 PS
 Use the reply all, so others can see your mails, since I'm probably
 one of the least competent guys/gals on this mailing list.
 DS



 2009/11/7 Johan Mutsaerts joh...@gmail.com:
 Hi Magnus,

 Thanks for a quick reply. Here is some more detailed information:

 My USB device ID is 0xeb1a:0x2881 it is eMPIA based.

 These are the components inside
 - Empia EM2880
 - Texas Instruments 5150AM1
 - XCeive XC3028
 - Empia EMP202
 - Zarlink MT352

 Difficult for me to get to the windows stuff

 No /dev/dvb/ is generated ? Could it have something to do with no 
 Firmware ?

 I found my device to be quite similar to the Pinnacle Hybrid Pro so I tried
 sudo rmmod em28xx-dvb
 sudo rmmod em28xx-alsa
 sudo rmmod em28xx
 sudo modprobe em28xx card=53 and card=56
 sudo modprobe em28xx-alsa
 sudo modprobe em28xx-dvb
 However with not much success.
 Card=53 cased MeTV to see a tuner but no channels could be found

 TIA for any assistance you can provide.

 Best Regards,
 Johan

 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi!

 The dmesg didn't reveal what tuner your stick/card has, it's probably
 a XC2028/XC3028 or something like that.
 Easiest way to find out would be if you could open the cover and have
 a look inside.

 If you have access to windows and the pvr program that came with the
 tuner you could do a usb-sniff.

 http://www.pcausa.com/Utilities/UsbSnoop/
 or
 http://benoit.papillault.free.fr/usbsnoop/

 Switch between different inputs while doing the log, like dvb,
 analog and if it has svideo/composite input.

 copy the windows log to unix and parse the output with parser.pl (I've
 added is as an attachment.)
 I think there is a new parser somewhere, but I forgot the name of it.

 I'm also not sure how I used it, but I think it was like this: perl
 parser.pl  your_windows_log  parsed_log
 That log is needed to  find out what gpio your tuner needs for
 different settings.

 Don't be scared of the size of the windows log, it gets large, often a
 few hundred MB.
 The parsed log is much smaller,  a few hundred KB.

 That is all I can think about atm.

 /Magnus Alm


 2009/11/6 Johan Mutsaerts joh...@gmail.com:
 Hi,

 I have an iDream UTVHYL2 USB TV Tuner (with IR remote control) that I
 cannot get to work with Ubuntu (9.04, 2.6.28-16). I have successfully
 compiled and installed the em28xx-new driver from linuxtv.org. No
 /dev/dvb/adapter... is created and that is where it ends for me know.
 MyTV claims no adapter is detected.

 I have attached the output of lsusb and dmesg as requested...

 Please let me know what more I can do and what exactly it is you can do ?

 Thanks in advance and
 Best Regards,
 Johan (Belgium)




--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Another gpsca kernel BUG when disconnecting camera while streaming with mmap

2009-11-07 Thread Hans de Goede

Hi,

On 11/04/2009 10:37 AM, Sean wrote:

Hi, I am having a bug when removing my pac207 camera while
capture-example is streaming with mmap. It doesn't always do it. This is
a complete lock up - num lock key stops functioning. A related bug also
happens sometimes when capture-example finishes, that output is included.

Debug kernel is 2.6.31.5, v4l-dvb version is f6680fa8e7ec.
(http://linuxtv.org/hg/v4l-dvb/archive/f6680fa8e7ec.tar.bz2) This is on
low end 486 hardware, 128MB ram, 300Mhz cpu.

Let me know if I can try anything or if you need more output.



This does not seem to be a gspca specific bug, but you are simply running
out of memory.

The error:
unable to handle kernel paging request

Means the kernel could not find a free memory page for some data structure
it needed to allocate for itself at the time the oops happened.

Regards,

Hans




--
pac207 camera removal - complete lock up:
--
[r...@x-linux]:~ # capture-example
..usb 4-2: USB disconnect, address 6
BUG: unable to handle kernel paging request at a7a7a7c3
IP: [c11c5cef] td_free+0x23/0x75
*pde = 
Oops:  [#1] DEBUG_PAGEALLOC
last sysfs file:
Modules linked in: gspca_pac207 gspca_main videodev v4l1_compat

Pid: 160, comm: khubd Not tainted (2.6.31.5 #2)
EIP: 0060:[c11c5cef] EFLAGS: 0087 CPU: 0
EIP is at td_free+0x23/0x75
EAX: a7a7a7a7 EBX: c6b46bf0 ECX: c6b46ce4 EDX: a7a7a7c3
ESI: c6b97880 EDI: c6b46cd4 EBP: c798de78 ESP: c798de6c
DS: 007b ES: 007b FS:  GS:  SS: 0068
Process khubd (pid: 160, ti=c798c000 task=c7994338 task.ti=c798c000)
Stack:
c6b46bf0 03e8 c6b46cd4 c798dea4 c11c8175 c6532ea0 c6b46bf0 
0 c11b518a 0286 c6b96000 c6b46bf0 c6532ea0 c14062e5 c798deb4 c11b4428
0 c6b36bf0 c6532ea0 c798dec8 c11b5b3f 014234b3 0006  c798deec
Call Trace:
[c11c8175] ? ohci_endpoint_disable+0x113/0x192
[c11b518a] ? usb_free_urb+0x11/0x13
[c11b4428] ? usb_hcd_disable_endpoint+0x2e/0x32
[c11b5b3f] ? usb_disable_endpoint+0x6d/0x72
[c11b5bad] ? usb_disable_device+0x69/0x13a
[c1017619] ? printk+0x15/0x17
[c11b12a8] ? usb_disconnect+0xa1/0xf7
[c11b18bf] ? hub_thread+0x484/0xcec
[c12e23cd] ? schedule+0x3b0/0x3d5
[c1026151] ? autoremove_wake_function+0x0/0x33
[c11b143b] ? hub_thread+0x0/0xcec
[c10260aa] ? kthread+0x6b/0x71
[c102603f] ? kthread+0x0/0x71
[c1002f97] ? kernel_thread_helper+0x7/0x10
Code: e5 e8 bf 7b e9 ff 5d c3 55 89 e5 57 89 c7 56 89 d6 53 8b 42 28 89
c2 c1 ea 06 31 d0 83 e0 3f 8d 94 87 cc 00 00 00 eb 03 8d 50 1c 8b 02
85 c0 74 0b 39 f0 75 f3 8b 46 1c 89 02 eb 29 8b 06 25 00
EIP: [c11c5cef] td_free+0x23/0x75 SS:ESP 0068:c798de6c
CR2: a7a7a7c3
---[ end trace 2ee1dbf620895015 ]---
BUG: spinlock lockup on CPU#0, swapper/0, c6b46cd4
Pid: 0, comm: swapper Tainted: G D 2.6.31.5 #2
Call Trace:
[c111e85c] _raw_spin_lock+0xad/0xc9
[c12e4210] _spin_lock_irqsave+0x46/0x5a
[c11c991e] ohci_hub_status_data+0x1d/0x1d8
[c11b3779] usb_hcd_poll_rh_status+0x49/0x148
[c11b3880] rh_timer_func+0x8/0xa
[c101dcbe] run_timer_softirq+0x154/0x1c3
[c101dc59] ? run_timer_softirq+0xef/0x1c3
[c11b3878] ? rh_timer_func+0x0/0xa
[c101a7d9] __do_softirq+0x9f/0x14d
[c101a8b1] do_softirq+0x2a/0x42
[c101ab94] irq_exit+0x33/0x35
[c1004086] do_IRQ+0x5b/0x71
[c1002e6e] common_interrupt+0x2e/0x40
[c10018f8] ? cpu_idle+0x1b/0x35
[c1006d03] ? default_idle+0x59/0x9c
[c12e007b] ? sdhci_pci_probe+0x410/0x42c
[c1006d05] ? default_idle+0x5b/0x9c
[c10018fe] cpu_idle+0x21/0x35
[c12d3c31] rest_init+0x4d/0x4f
[c15ed72e] start_kernel+0x2a6/0x2ad
[c15ed068] i386_start_kernel+0x68/0x6d


--
capture-example crash on program end:
--
[r...@x-linux]:~ # capture-example
..BUG:
sleeping function called from invalid context at arch/x86/mm/fault.c:1069
in_atomic(): 0, irqs_disabled(): 1, pid: 1183, name: capture-example
4 locks held by capture-example/1183:
#0: (gspca_dev-queue_lock){+.+.+.}, at: [c8866fbb]
vidioc_streamoff+0x3b/0xb4 [gspca_main]
#1: (gspca_dev-usb_lock){+.+.+.}, at: [c8866fce]
vidioc_streamoff+0x4e/0xb4 [gspca_main]
#2: (ohci-lock){-.-...}, at: [c11c8093]
ohci_endpoint_disable+0x31/0x192
#3: (mm-mmap_sem){++}, at: [c100c168] do_page_fault+0xc1/0x1fe
irq event stamp: 11502
hardirqs last enabled at (11501): [c12e41a0] _spin_unlock_irq+0x22/0x26
hardirqs last disabled at (11502): [c12e41da]
_spin_lock_irqsave+0x10/0x5a
softirqs last enabled at (11486): [c101a87f] __do_softirq+0x145/0x14d
softirqs last disabled at (11481): [c101a8b1] do_softirq+0x2a/0x42
Pid: 1183, comm: capture-example Not tainted 2.6.31.5 #2
Call Trace:
[c101222d] __might_sleep+0xcb/0xd0
[c100c1ad] do_page_fault+0x106/0x1fe
[c100c0a7] ? do_page_fault+0x0/0x1fe
[c12e43c3] error_code+0x63/0x70
[c100c0a7] ? do_page_fault+0x0/0x1fe
[c11c5cef] ? td_free+0x23/0x75
[c11c8175] ohci_endpoint_disable+0x113/0x192
[c11b4428] usb_hcd_disable_endpoint+0x2e/0x32
[c11b5b3f] usb_disable_endpoint+0x6d/0x72
[c11b5cae] 

Re: bug in changeset 13239:54535665f94b ?

2009-11-07 Thread e9hack
Mauro Carvalho Chehab schrieb:

 I agree. We need first to stop DMA activity, and then release the page tables.
 
 Could you please test if the enclosed patch fixes the issue?

Hi Mauro,

your patch doesn't solve the problem, because saa7146_dma_free() doesn't stop a 
running
dma transfer of the saa7146. Since last weekend, I'm using the attached patch. 
I'm not
sure, if the functionality of video_end() must be split. Maybe the last part of
video_end() must be execute at the end of vidioc_streamoff().

Regards,
Hartmut




vdr:/usr/src/v4l-dvb/linux/drivers/media/common # hg diff saa7146_video.c
diff -r 40705fec2fb2 linux/drivers/media/common/saa7146_video.c
--- a/linux/drivers/media/common/saa7146_video.cFri Nov 06 15:54:49 2009 -0200
+++ b/linux/drivers/media/common/saa7146_video.cSat Nov 07 15:02:32 2009 +0100
@@ -1093,22 +1093,18 @@ static int vidioc_streamoff(struct file
return 0;
}

-   if (vv-video_fh != fh) {
-   DEB_S((capturing, but in another open.\n));
-   return -EBUSY;
-   }
+   err = video_end(fh, file);
+   if (err != 0)
+   return err;

err = -EINVAL;
if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
err = videobuf_streamoff(fh-video_q);
else if (type == V4L2_BUF_TYPE_VBI_CAPTURE)
err = videobuf_streamoff(fh-vbi_q);
-   if (0 != err) {
+   if (0 != err)
DEB_D((warning: videobuf_streamoff() failed.\n));
-   video_end(fh, file);
-   } else {
-   err = video_end(fh, file);
-   }
+
return err;
 }

@@ -1332,7 +1328,44 @@ static void buffer_release(struct videob
struct saa7146_dev *dev = fh-dev;
struct saa7146_buf *buf = (struct saa7146_buf *)vb;

+   int i;
+   u32 mc1;
+
DEB_CAP((vbuf:%p\n,vb));
+
+   mc1 = saa7146_read(dev, MC1);
+   for(i = 0; i  3; i++)
+   {
+   u32 base_even;
+   u32 base_odd;
+   u32 prot_addr;
+   u32 base_page;
+   u32 pitch;
+   u32 num;
+   u32 vptr;
+
+   if (buf-pt[i].cpu  buf-pt[i].dma) {
+   const u32 dma_mask[] = {MASK_06, MASK_05, MASK_04};
+   vptr = saa7146_read(dev, PCI_VDP1 + i * (PCI_VDP2 - PCI_VDP1));
+   base_even = saa7146_read(dev, BASE_EVEN1 + i * (BASE_EVEN2 - BASE_EVEN1));
+   base_odd = saa7146_read(dev, BASE_ODD1 + i * (BASE_ODD2 - BASE_ODD1));
+   prot_addr = saa7146_read(dev, PROT_ADDR1 + i * (PROT_ADDR2 - PROT_ADDR1));
+   base_page = saa7146_read(dev, BASE_PAGE1 + i *(BASE_PAGE2 - BASE_PAGE1));
+   pitch = saa7146_read(dev, PITCH1 + i * (PITCH2 - PITCH1));
+   num = saa7146_read(dev, NUM_LINE_BYTE1 + i * (NUM_LINE_BYTE2 - NUM_LINE_BYTE1));
+
+   if ((base_page  (0xf000 | ME1)) == (buf-pt[i].dma | ME1)  (mc1  dma_mask[i])) {
+   printk((%s:%d) vdma%d.base_even: %08x\n, __FILE__, __LINE__, i + 1, base_even);
+   printk((%s:%d) vdma%d.base_odd:  %08x\n, __FILE__, __LINE__, i + 1, base_odd);
+   printk((%s:%d) vdma%d.prot_addr: %08x\n, __FILE__, __LINE__, i + 1, prot_addr);
+   printk((%s:%d) vdma%d.base_page: %08x\n, __FILE__, __LINE__, i + 1, base_page);
+   printk((%s:%d) vdma%d.pitch: %08x\n, __FILE__, __LINE__, i + 1, pitch);
+   printk((%s:%d) vdma%d.num_line_byte: %08x\n, __FILE__, __LINE__, i + 1, num);
+   printk((%s:%d) vdma%d.vptr:  %08x\n, __FILE__, __LINE__, i + 1, vptr);
+   printk((%s:%d) MC1: %08x\n, __FILE__, __LINE__, mc1);
+   }
+   }
+   }

release_all_pagetables(dev, buf);




Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Magnus Alm
I think your stick has more in common with
EM2881_BOARD_DNT_DA2_HYBRID, dvb support hasn't been enabled for that
tuner yet tho, only analog..

If you look at pdf for the  utvhyl3 (seems like they removed the
utvhyl2) http://idream.com.hk/consulter.php?pid=120tab=6
And compares it with the DNT DA2 ,
http://www.dnt.de/neu/data/download/files/110/Prospekt%20-%20DA2%20Hybrid.pdf
 (only avalible in german tho)
They even seem to have the same remote (doesn't mean they are identical tho.)

/Magnus Alm

2009/11/7 Magnus Alm magnus@gmail.com:
 Well, maybe you where more right than me...

 From em28xx-dvb.c

        case EM2880_BOARD_TERRATEC_HYBRID_XS:
        case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                dvb-frontend = dvb_attach(zl10353_attach,
                                           em28xx_zl10353_xc3028_no_i2c_gate,
                                           dev-i2c_adap);
                if (dvb-frontend == NULL) {
                        /* This board could have either a zl10353 or a mt352.
                           If the chip id isn't for zl10353, try mt352 */
                        dvb-frontend = dvb_attach(mt352_attach,
                                                   terratec_xs_mt352_cfg,
                                                   dev-i2c_adap);
                }


 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi

 I read some where that trying different card types for a DVB tuner can
 potentially cause damage to them.

 You are probably right about the firmare.
 Do you have a link to the manufacture of your stick?
 I tried to google the name of it but couldn't found an exact match.

 The EM2881_BOARD_PINNACLE_HYBRID_PRO uses it's XC3028 to getter with a
 ZARLINK456
 as you can see from the following line in em28xx-cards.c

 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                ctl-demod = XC3028_FE_ZARLINK456;
                break;

 It is probably not compliant with your  Zarlink MT352.

 There is a mt352 module tho, but I guess it doesn't get loaded when
 you plug your stick in.

 I'll pooke around a bit.

 PS
 Use the reply all, so others can see your mails, since I'm probably
 one of the least competent guys/gals on this mailing list.
 DS



 2009/11/7 Johan Mutsaerts joh...@gmail.com:
 Hi Magnus,

 Thanks for a quick reply. Here is some more detailed information:

 My USB device ID is 0xeb1a:0x2881 it is eMPIA based.

 These are the components inside
 - Empia EM2880
 - Texas Instruments 5150AM1
 - XCeive XC3028
 - Empia EMP202
 - Zarlink MT352

 Difficult for me to get to the windows stuff

 No /dev/dvb/ is generated ? Could it have something to do with no 
 Firmware ?

 I found my device to be quite similar to the Pinnacle Hybrid Pro so I tried
 sudo rmmod em28xx-dvb
 sudo rmmod em28xx-alsa
 sudo rmmod em28xx
 sudo modprobe em28xx card=53 and card=56
 sudo modprobe em28xx-alsa
 sudo modprobe em28xx-dvb
 However with not much success.
 Card=53 cased MeTV to see a tuner but no channels could be found

 TIA for any assistance you can provide.

 Best Regards,
 Johan

 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi!

 The dmesg didn't reveal what tuner your stick/card has, it's probably
 a XC2028/XC3028 or something like that.
 Easiest way to find out would be if you could open the cover and have
 a look inside.

 If you have access to windows and the pvr program that came with the
 tuner you could do a usb-sniff.

 http://www.pcausa.com/Utilities/UsbSnoop/
 or
 http://benoit.papillault.free.fr/usbsnoop/

 Switch between different inputs while doing the log, like dvb,
 analog and if it has svideo/composite input.

 copy the windows log to unix and parse the output with parser.pl (I've
 added is as an attachment.)
 I think there is a new parser somewhere, but I forgot the name of it.

 I'm also not sure how I used it, but I think it was like this: perl
 parser.pl  your_windows_log  parsed_log
 That log is needed to  find out what gpio your tuner needs for
 different settings.

 Don't be scared of the size of the windows log, it gets large, often a
 few hundred MB.
 The parsed log is much smaller,  a few hundred KB.

 That is all I can think about atm.

 /Magnus Alm


 2009/11/6 Johan Mutsaerts joh...@gmail.com:
 Hi,

 I have an iDream UTVHYL2 USB TV Tuner (with IR remote control) that I
 cannot get to work with Ubuntu (9.04, 2.6.28-16). I have successfully
 compiled and installed the em28xx-new driver from linuxtv.org. No
 /dev/dvb/adapter... is created and that is where it ends for me know.
 MyTV claims no adapter is detected.

 I have attached the output of lsusb and dmesg as requested...

 Please let me know what more I can do and what exactly it is you can do ?

 Thanks in advance and
 Best Regards,
 Johan (Belgium)





--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: bug in changeset 13239:54535665f94b ?

2009-11-07 Thread Mauro Carvalho Chehab
Em Sat, 07 Nov 2009 15:05:02 +0100
e9hack e9h...@googlemail.com escreveu:

 Mauro Carvalho Chehab schrieb:
 
  I agree. We need first to stop DMA activity, and then release the page 
  tables.
  
  Could you please test if the enclosed patch fixes the issue?
 
 Hi Mauro,
 
 your patch doesn't solve the problem, because saa7146_dma_free() doesn't stop 
 a running
 dma transfer of the saa7146.

Well, it should be stopping it. The logic is to wait for an incoming dma
transfer and then disable dma transfers:

void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
struct saa7146_buf *buf)
{
struct videobuf_dmabuf *dma=videobuf_to_dma(buf-vb);
DEB_EE((dev:%p, buf:%p\n,dev,buf));

BUG_ON(in_interrupt());

videobuf_waiton(buf-vb,0,0);
videobuf_dma_unmap(q, dma);
videobuf_dma_free(dma);
buf-vb.state = VIDEOBUF_NEEDS_INIT;
}

Maybe the code for dma_unmap is incomplete?

 Since last weekend, I'm using the attached patch. I'm not
 sure, if the functionality of video_end() must be split. Maybe the last part 
 of
 video_end() must be execute at the end of vidioc_streamoff().

It is not safe to stop at streamoff(), since applications may close the device
without calling streamoff. The kernel driver should be able to handle such
situations as well.

So, if my patch doesn't work, we'll need to add more bits at saa7146_dma_free().

-- 

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Johan Mutsaerts
Hi,

Seems like you are on a hot trail here ... Great !
What can I do to test your hypothesis on the EM2881_BOARD_DNT_DA2_HYBRID ?
May be I can verify if analog works ?
How are my chances in getting DVB supported ?

TIA for your time and effort in helping out.

Best Regards,
Johan

2009/11/7 Magnus Alm magnus@gmail.com:
 I think your stick has more in common with
 EM2881_BOARD_DNT_DA2_HYBRID, dvb support hasn't been enabled for that
 tuner yet tho, only analog..

 If you look at pdf for the  utvhyl3 (seems like they removed the
 utvhyl2) http://idream.com.hk/consulter.php?pid=120tab=6
 And compares it with the DNT DA2 ,
 http://www.dnt.de/neu/data/download/files/110/Prospekt%20-%20DA2%20Hybrid.pdf
  (only avalible in german tho)
 They even seem to have the same remote (doesn't mean they are identical tho.)

 /Magnus Alm

 2009/11/7 Magnus Alm magnus@gmail.com:
 Well, maybe you where more right than me...

 From em28xx-dvb.c

        case EM2880_BOARD_TERRATEC_HYBRID_XS:
        case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                dvb-frontend = dvb_attach(zl10353_attach,
                                           em28xx_zl10353_xc3028_no_i2c_gate,
                                           dev-i2c_adap);
                if (dvb-frontend == NULL) {
                        /* This board could have either a zl10353 or a mt352.
                           If the chip id isn't for zl10353, try mt352 */
                        dvb-frontend = dvb_attach(mt352_attach,
                                                   terratec_xs_mt352_cfg,
                                                   dev-i2c_adap);
                }


 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi

 I read some where that trying different card types for a DVB tuner can
 potentially cause damage to them.

 You are probably right about the firmare.
 Do you have a link to the manufacture of your stick?
 I tried to google the name of it but couldn't found an exact match.

 The EM2881_BOARD_PINNACLE_HYBRID_PRO uses it's XC3028 to getter with a
 ZARLINK456
 as you can see from the following line in em28xx-cards.c

 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                ctl-demod = XC3028_FE_ZARLINK456;
                break;

 It is probably not compliant with your  Zarlink MT352.

 There is a mt352 module tho, but I guess it doesn't get loaded when
 you plug your stick in.

 I'll pooke around a bit.

 PS
 Use the reply all, so others can see your mails, since I'm probably
 one of the least competent guys/gals on this mailing list.
 DS



 2009/11/7 Johan Mutsaerts joh...@gmail.com:
 Hi Magnus,

 Thanks for a quick reply. Here is some more detailed information:

 My USB device ID is 0xeb1a:0x2881 it is eMPIA based.

 These are the components inside
 - Empia EM2880
 - Texas Instruments 5150AM1
 - XCeive XC3028
 - Empia EMP202
 - Zarlink MT352

 Difficult for me to get to the windows stuff

 No /dev/dvb/ is generated ? Could it have something to do with no 
 Firmware ?

 I found my device to be quite similar to the Pinnacle Hybrid Pro so I tried
 sudo rmmod em28xx-dvb
 sudo rmmod em28xx-alsa
 sudo rmmod em28xx
 sudo modprobe em28xx card=53 and card=56
 sudo modprobe em28xx-alsa
 sudo modprobe em28xx-dvb
 However with not much success.
 Card=53 cased MeTV to see a tuner but no channels could be found

 TIA for any assistance you can provide.

 Best Regards,
 Johan

 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi!

 The dmesg didn't reveal what tuner your stick/card has, it's probably
 a XC2028/XC3028 or something like that.
 Easiest way to find out would be if you could open the cover and have
 a look inside.

 If you have access to windows and the pvr program that came with the
 tuner you could do a usb-sniff.

 http://www.pcausa.com/Utilities/UsbSnoop/
 or
 http://benoit.papillault.free.fr/usbsnoop/

 Switch between different inputs while doing the log, like dvb,
 analog and if it has svideo/composite input.

 copy the windows log to unix and parse the output with parser.pl (I've
 added is as an attachment.)
 I think there is a new parser somewhere, but I forgot the name of it.

 I'm also not sure how I used it, but I think it was like this: perl
 parser.pl  your_windows_log  parsed_log
 That log is needed to  find out what gpio your tuner needs for
 different settings.

 Don't be scared of the size of the windows log, it gets large, often a
 few hundred MB.
 The parsed log is much smaller,  a few hundred KB.

 That is all I can think about atm.

 /Magnus Alm


 2009/11/6 Johan Mutsaerts joh...@gmail.com:
 Hi,

 I have an iDream UTVHYL2 USB TV Tuner (with IR remote control) that I
 cannot get to work with Ubuntu (9.04, 2.6.28-16). I have successfully
 compiled and installed the em28xx-new driver from linuxtv.org. No
 /dev/dvb/adapter... is created and that is where it ends for me know.
 MyTV claims no adapter is detected.

 I have attached the output of lsusb and dmesg as requested...

 Please let me know what more I can 

Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Devin Heitmueller
On Sat, Nov 7, 2009 at 7:35 AM, Magnus Alm magnus@gmail.com wrote:
 Hi

 I read some where that trying different card types for a DVB tuner can
 potentially cause damage to them.

 You are probably right about the firmare.
 Do you have a link to the manufacture of your stick?
 I tried to google the name of it but couldn't found an exact match.

 The EM2881_BOARD_PINNACLE_HYBRID_PRO uses it's XC3028 to getter with a
 ZARLINK456
 as you can see from the following line in em28xx-cards.c

 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                ctl-demod = XC3028_FE_ZARLINK456;
                break;

 It is probably not compliant with your  Zarlink MT352.

 There is a mt352 module tho, but I guess it doesn't get loaded when
 you plug your stick in.

 I'll pooke around a bit.

 PS
 Use the reply all, so others can see your mails, since I'm probably
 one of the least competent guys/gals on this mailing list.
 DS



 2009/11/7 Johan Mutsaerts joh...@gmail.com:
 Hi Magnus,

 Thanks for a quick reply. Here is some more detailed information:

 My USB device ID is 0xeb1a:0x2881 it is eMPIA based.

 These are the components inside
 - Empia EM2880
 - Texas Instruments 5150AM1
 - XCeive XC3028
 - Empia EMP202
 - Zarlink MT352

 Difficult for me to get to the windows stuff

 No /dev/dvb/ is generated ? Could it have something to do with no 
 Firmware ?

 I found my device to be quite similar to the Pinnacle Hybrid Pro so I tried
 sudo rmmod em28xx-dvb
 sudo rmmod em28xx-alsa
 sudo rmmod em28xx
 sudo modprobe em28xx card=53 and card=56
 sudo modprobe em28xx-alsa
 sudo modprobe em28xx-dvb
 However with not much success.
 Card=53 cased MeTV to see a tuner but no channels could be found

 TIA for any assistance you can provide.

 Best Regards,
 Johan

 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi!

 The dmesg didn't reveal what tuner your stick/card has, it's probably
 a XC2028/XC3028 or something like that.
 Easiest way to find out would be if you could open the cover and have
 a look inside.

 If you have access to windows and the pvr program that came with the
 tuner you could do a usb-sniff.

 http://www.pcausa.com/Utilities/UsbSnoop/
 or
 http://benoit.papillault.free.fr/usbsnoop/

 Switch between different inputs while doing the log, like dvb,
 analog and if it has svideo/composite input.

 copy the windows log to unix and parse the output with parser.pl (I've
 added is as an attachment.)
 I think there is a new parser somewhere, but I forgot the name of it.

 I'm also not sure how I used it, but I think it was like this: perl
 parser.pl  your_windows_log  parsed_log
 That log is needed to  find out what gpio your tuner needs for
 different settings.

 Don't be scared of the size of the windows log, it gets large, often a
 few hundred MB.
 The parsed log is much smaller,  a few hundred KB.

 That is all I can think about atm.

 /Magnus Alm


 2009/11/6 Johan Mutsaerts joh...@gmail.com:
 Hi,

 I have an iDream UTVHYL2 USB TV Tuner (with IR remote control) that I
 cannot get to work with Ubuntu (9.04, 2.6.28-16). I have successfully
 compiled and installed the em28xx-new driver from linuxtv.org. No
 /dev/dvb/adapter... is created and that is where it ends for me know.
 MyTV claims no adapter is detected.

 I have attached the output of lsusb and dmesg as requested...

 Please let me know what more I can do and what exactly it is you can do ?

 Thanks in advance and
 Best Regards,
 Johan (Belgium)

I'm away from Internet access so I can't write an extended answer, but
I can tell you that XC3028_FE_ZARLINK456 is appropriate for both the
zarlink zl10353 and m352.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fwd: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Johan Mutsaerts
Sorry, forgot to reply all


-- Forwarded message --
From: Johan Mutsaerts joh...@gmail.com
Date: 2009/11/7
Subject: Re: em28xx based USB Hybrid (Analog  DVB-T) TV Tuner not supported
To: Devin Heitmueller dheitmuel...@kernellabs.com


Hi,

Something caught my eye while examining em28xx-dvb.c

#include mt352.h
#include mt352_priv.h /* FIXME */

What's the FIXME about ? Could it be a clue ?

What do you suggest I try/text ?

Best Regards,
Johan

2009/11/7 Devin Heitmueller dheitmuel...@kernellabs.com:
 On Sat, Nov 7, 2009 at 7:35 AM, Magnus Alm magnus@gmail.com wrote:
 Hi

 I read some where that trying different card types for a DVB tuner can
 potentially cause damage to them.

 You are probably right about the firmare.
 Do you have a link to the manufacture of your stick?
 I tried to google the name of it but couldn't found an exact match.

 The EM2881_BOARD_PINNACLE_HYBRID_PRO uses it's XC3028 to getter with a
 ZARLINK456
 as you can see from the following line in em28xx-cards.c

 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
                ctl-demod = XC3028_FE_ZARLINK456;
                break;

 It is probably not compliant with your  Zarlink MT352.

 There is a mt352 module tho, but I guess it doesn't get loaded when
 you plug your stick in.

 I'll pooke around a bit.

 PS
 Use the reply all, so others can see your mails, since I'm probably
 one of the least competent guys/gals on this mailing list.
 DS



 2009/11/7 Johan Mutsaerts joh...@gmail.com:
 Hi Magnus,

 Thanks for a quick reply. Here is some more detailed information:

 My USB device ID is 0xeb1a:0x2881 it is eMPIA based.

 These are the components inside
 - Empia EM2880
 - Texas Instruments 5150AM1
 - XCeive XC3028
 - Empia EMP202
 - Zarlink MT352

 Difficult for me to get to the windows stuff

 No /dev/dvb/ is generated ? Could it have something to do with no 
 Firmware ?

 I found my device to be quite similar to the Pinnacle Hybrid Pro so I tried
 sudo rmmod em28xx-dvb
 sudo rmmod em28xx-alsa
 sudo rmmod em28xx
 sudo modprobe em28xx card=53 and card=56
 sudo modprobe em28xx-alsa
 sudo modprobe em28xx-dvb
 However with not much success.
 Card=53 cased MeTV to see a tuner but no channels could be found

 TIA for any assistance you can provide.

 Best Regards,
 Johan

 2009/11/7 Magnus Alm magnus@gmail.com:
 Hi!

 The dmesg didn't reveal what tuner your stick/card has, it's probably
 a XC2028/XC3028 or something like that.
 Easiest way to find out would be if you could open the cover and have
 a look inside.

 If you have access to windows and the pvr program that came with the
 tuner you could do a usb-sniff.

 http://www.pcausa.com/Utilities/UsbSnoop/
 or
 http://benoit.papillault.free.fr/usbsnoop/

 Switch between different inputs while doing the log, like dvb,
 analog and if it has svideo/composite input.

 copy the windows log to unix and parse the output with parser.pl (I've
 added is as an attachment.)
 I think there is a new parser somewhere, but I forgot the name of it.

 I'm also not sure how I used it, but I think it was like this: perl
 parser.pl  your_windows_log  parsed_log
 That log is needed to  find out what gpio your tuner needs for
 different settings.

 Don't be scared of the size of the windows log, it gets large, often a
 few hundred MB.
 The parsed log is much smaller,  a few hundred KB.

 That is all I can think about atm.

 /Magnus Alm


 2009/11/6 Johan Mutsaerts joh...@gmail.com:
 Hi,

 I have an iDream UTVHYL2 USB TV Tuner (with IR remote control) that I
 cannot get to work with Ubuntu (9.04, 2.6.28-16). I have successfully
 compiled and installed the em28xx-new driver from linuxtv.org. No
 /dev/dvb/adapter... is created and that is where it ends for me know.
 MyTV claims no adapter is detected.

 I have attached the output of lsusb and dmesg as requested...

 Please let me know what more I can do and what exactly it is you can do ?

 Thanks in advance and
 Best Regards,
 Johan (Belgium)

 I'm away from Internet access so I can't write an extended answer, but
 I can tell you that XC3028_FE_ZARLINK456 is appropriate for both the
 zarlink zl10353 and m352.

 Devin

 --
 Devin J. Heitmueller - Kernel Labs
 http://www.kernellabs.com

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: bug in changeset 13239:54535665f94b ?

2009-11-07 Thread e9hack
Mauro Carvalho Chehab schrieb:
 Em Sat, 07 Nov 2009 15:05:02 +0100
 e9hack e9h...@googlemail.com escreveu:
 
 Mauro Carvalho Chehab schrieb:

 I agree. We need first to stop DMA activity, and then release the page 
 tables.

 Could you please test if the enclosed patch fixes the issue?
 Hi Mauro,

 your patch doesn't solve the problem, because saa7146_dma_free() doesn't 
 stop a running
 dma transfer of the saa7146.
 
 Well, it should be stopping it. The logic is to wait for an incoming dma
 transfer and then disable dma transfers:
 
 void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
 struct saa7146_buf *buf)
 {
 struct videobuf_dmabuf *dma=videobuf_to_dma(buf-vb);
 DEB_EE((dev:%p, buf:%p\n,dev,buf));
 
 BUG_ON(in_interrupt());
 
 videobuf_waiton(buf-vb,0,0);
 videobuf_dma_unmap(q, dma);
 videobuf_dma_free(dma);
 buf-vb.state = VIDEOBUF_NEEDS_INIT;
 }

In my case, videobuf_queue_cancel() is called previously. 
videobuf_queue_cancel() wakes up
all buffers, but it doesn't handle the currently by the saa7146 used buffer. 
queue-curr
points to this buffer. Waiting for an incoming dma transfer in 
saa7146_dma_free() has no
effect for such a buffer.

Regards,
Hartmut
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: em28xx based USB Hybrid (Analog DVB-T) TV Tuner not supported

2009-11-07 Thread Devin Heitmueller
On Sat, Nov 7, 2009 at 10:31 AM, Johan Mutsaerts joh...@gmail.com wrote:
 Hi,

 Something caught my eye while examining em28xx-dvb.c

 #include mt352.h
 #include mt352_priv.h /* FIXME */

 What's the FIXME about ? Could it be a clue ?

 What do you suggest I try/text ?

Please don't top post.

No, I just put that FIXME there because the driver really shouldn't be
using the private headers.

I'm actually not in front of the code right now, so I cannot provide
any recommendations.  I will be back home on Sunday though and at that
point I can take a look at the code and offer some suggestions.

Cheers,

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GIT PATCHES for 2.6.32] V4L/DVB fixes

2009-11-07 Thread Mauro Carvalho Chehab
Linus,

Please pull from:
ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 
for_linus

For a couple of fixes:

   - v4l-core: fix use-after-free Oops;
   - Build system: fix build dependency for dib0700 and pt1;
   - Some fixes for panic and oops conditions, on dib0700 and em28xx;
   - An old, hard to notice frame order error at bttv driver (noticed only with 
certain
 de-interlacing algorithms);
   - Several fixes on drivers (tda18271, gspca, sh_mobile_ceu_camera, 
pxa_camera, bttv,
smsusb, s2255, firedtv, pxa-camera, ce6230, uvcvideo and saa7134).

Cheers,
Mauro.

---

 drivers/media/common/tuners/tda18271-fe.c  |8 ++--
 drivers/media/dvb/dvb-usb/Kconfig  |2 +-
 drivers/media/dvb/dvb-usb/ce6230.c |2 +-
 drivers/media/dvb/dvb-usb/dib0700_devices.c|   15 -
 drivers/media/dvb/firewire/firedtv-avc.c   |   38 ---
 drivers/media/dvb/firewire/firedtv-fe.c|8 +
 drivers/media/dvb/frontends/dib0070.h  |7 -
 drivers/media/dvb/frontends/dib7000p.c |5 +++
 drivers/media/dvb/pt1/pt1.c|1 +
 drivers/media/dvb/siano/smsusb.c   |6 
 drivers/media/video/bt8xx/bttv-driver.c|   33 +---
 drivers/media/video/em28xx/em28xx-audio.c  |5 +++
 drivers/media/video/gspca/m5602/m5602_s5k4aa.c |   20 
 drivers/media/video/gspca/mr97310a.c   |2 +-
 drivers/media/video/gspca/ov519.c  |2 +-
 drivers/media/video/gspca/stv06xx/stv06xx.c|3 +-
 drivers/media/video/pxa_camera.c   |5 ++-
 drivers/media/video/s2255drv.c |5 ---
 drivers/media/video/saa7134/saa7134-cards.c|1 +
 drivers/media/video/saa7134/saa7134-ts.c   |6 ++-
 drivers/media/video/saa7134/saa7134.h  |1 +
 drivers/media/video/saa7164/saa7164-cmd.c  |2 +-
 drivers/media/video/sh_mobile_ceu_camera.c |4 +-
 drivers/media/video/soc_camera.c   |   16 +
 drivers/media/video/uvc/uvc_ctrl.c |2 +-
 drivers/media/video/uvc/uvc_video.c|3 +-
 26 files changed, 133 insertions(+), 69 deletions(-)

Devin Heitmueller (1):
  V4L/DVB (13190): em28xx: fix panic that can occur when starting audio 
streaming

Erik Andrén (3):
  V4L/DVB (13255): gspca - m5602-s5k4aa: Add vflip quirk for the Bruneinit 
laptop
  V4L/DVB (13256): gspca - m5602-s5k4aa: Add another MSI GX700 vflip quirk
  V4L/DVB (13257): gspca - m5602-s5k4aa: Add vflip for Fujitsu Amilo Xi 2528

Guennadi Liakhovetski (3):
  V4L/DVB (13129): sh_mobile_ceu_camera: fix cropping for scaling clients
  V4L/DVB (13131): pxa_camera: fix camera pixel format configuration
  V4L/DVB (13132): fix use-after-free Oops, resulting from a driver-core 
API change

HIRANO Takahito (1):
  V4L/DVB (13167): pt1: Fix a compile error on arm

Hans de Goede (1):
  V4L/DVB (13122): gscpa - stv06xx + ov518: dont discard every other frame

Henrik Kurelid (1):
  V4L/DVB (13237): firedtv: length field corrupt in ca2host if length127

Jean Delvare (1):
  V4L/DVB (13287): ce6230 - saa7164-cmd: Fix wrong sizeof

Jonathan Cameron (1):
  V4L/DVB (13286): pxa-camera: Fix missing sched.h

Laurent Pinchart (2):
  V4L/DVB (13309): uvcvideo: Ignore the FIX_BANDWIDTH for compressed video
  V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to 
type mismatch with abs()

Martin Samek (1):
  V4L/DVB (13079): dib0700: fixed xc2028 firmware loading kernel oops

Michael Krufky (5):
  V4L/DVB (13048): dib0070: fix build dependency when driver is disabled
  V4L/DVB (13107): tda18271: fix overflow in FM radio frequency calculation
  V4L/DVB (13202): smsusb: add autodetection support for three additional 
Hauppauge USB IDs
  V4L/DVB (13313): saa7134: add support for FORCE_TS_VALID mode for mpeg ts 
input
  V4L/DVB (13314): saa7134: set ts_force_val for the Hauppauge WinTV 
HVR-1150

Mike Isely (3):
  V4L/DVB (13169): bttv: Fix potential out-of-order field processing
  V4L/DVB (13170): bttv: Fix reversed polarity error when switching video 
standard
  V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion 
on waiting processes

Patrick Boettcher (1):
  V4L/DVB (13050): DIB0700: fix-up USB device ID for Terratec/Leadtek

Seth Barry (1):
  V4L/DVB (13109): tda18271: fix signedness issue in 
tda18271_rf_tracking_filters_init

Stefan Richter (1):
  V4L/DVB (13240): firedtv: fix regression: tuning fails due to bogus error 
return

Theodore Kilgore (1):
  V4L/DVB (13264): gspca_mr97310a: Change vstart for CIF sensor type 1 cams

---
V4L/DVB development is hosted at http://linuxtv.org
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to 

Re: bug in changeset 13239:54535665f94b ?

2009-11-07 Thread e9hack
e9hack schrieb:
 I agree. We need first to stop DMA activity, and then release the page 
 tables.

 Could you please test if the enclosed patch fixes the issue?
 
 your patch doesn't solve the problem, because saa7146_dma_free() doesn't stop 
 a running
 dma transfer of the saa7146. 

Sorry, that was wrong. I did only look, if my additional messages were print or 
not, but I
didn't wait for the memory corruption, because it may corrupt the file system. 
With your
patch, I get the messages, but the protection address is set to 0, which 
disables the dma
transfer even if the dma transfer is enabled within the MC1 register.

Regards,
Hartmut
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] gspca pac7302: add white balance control

2009-11-07 Thread Németh Márton
From: Márton Németh nm...@freemail.hu

Add white balance control to pac7302 driver. All 8 bits seems to be
relevant on Labtec Webcam 2200 (USB ID 093a:2626). The control is
at page 0, register 0xc6.

Signed-off-by: Márton Németh nm...@freemail.hu
---
diff -upr a/linux/drivers/media/video/gspca/pac7302.c 
b/linux/drivers/media/video/gspca/pac7302.c
--- a/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 13:29:00.0 
+0100
+++ b/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 21:25:15.0 
+0100
@@ -57,6 +57,7 @@
 0   | 0x0f..0x20 | setcolors()
 0   | 0xa2..0xab | setbrightcont()
 0   | 0xc5   | setredbalance()
+0   | 0xc6   | setwhitebalance()
 0   | 0xc7   | setbluebalance()
 0   | 0xdc   | setbrightcont(), setcolors()
 3   | 0x02   | setexposure()
@@ -80,6 +81,7 @@ struct sd {
unsigned char brightness;
unsigned char contrast;
unsigned char colors;
+   unsigned char white_balance;
unsigned char red_balance;
unsigned char blue_balance;
unsigned char gain;
@@ -101,6 +103,8 @@ static int sd_setcontrast(struct gspca_d
 static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setwhitebalance(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getwhitebalance(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setredbalance(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getredbalance(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setbluebalance(struct gspca_dev *gspca_dev, __s32 val);
@@ -167,6 +171,20 @@ static struct ctrl sd_ctrls[] = {
},
{
{
+   .id  = V4L2_CID_WHITE_BALANCE_TEMPERATURE,
+   .type= V4L2_CTRL_TYPE_INTEGER,
+   .name= White Balance,
+   .minimum = 0,
+   .maximum = 255,
+   .step= 1,
+#define WHITEBALANCE_DEF 4
+   .default_value = WHITEBALANCE_DEF,
+   },
+   .set = sd_setwhitebalance,
+   .get = sd_getwhitebalance,
+   },
+   {
+   {
.id  = V4L2_CID_RED_BALANCE,
.type= V4L2_CTRL_TYPE_INTEGER,
.name= Red,
@@ -546,6 +564,7 @@ static int sd_config(struct gspca_dev *g
sd-brightness = BRIGHTNESS_DEF;
sd-contrast = CONTRAST_DEF;
sd-colors = COLOR_DEF;
+   sd-white_balance = WHITEBALANCE_DEF;
sd-red_balance = REDBALANCE_DEF;
sd-blue_balance = BLUEBALANCE_DEF;
sd-gain = GAIN_DEF;
@@ -616,6 +635,21 @@ static int setcolors(struct gspca_dev *g
return ret;
 }

+static int setwhitebalance(struct gspca_dev *gspca_dev)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+
+   ret = reg_w(gspca_dev, 0xff, 0x00); /* page 0 */
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xc6, sd-white_balance);
+
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0xdc, 0x01);
+   PDEBUG(D_CONF|D_STREAM, white_balance: %i, sd-white_balance);
+   return ret;
+}
+
 static int setredbalance(struct gspca_dev *gspca_dev)
 {
struct sd *sd = (struct sd *) gspca_dev;
@@ -727,6 +761,8 @@ static int sd_start(struct gspca_dev *gs
if (0 = ret)
ret = setcolors(gspca_dev);
if (0 = ret)
+   ret = setwhitebalance(gspca_dev);
+   if (0 = ret)
ret = setredbalance(gspca_dev);
if (0 = ret)
ret = setbluebalance(gspca_dev);
@@ -962,6 +998,27 @@ static int sd_getcolors(struct gspca_dev
return 0;
 }

+static int sd_setwhitebalance(struct gspca_dev *gspca_dev, __s32 val)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret = 0;
+
+   sd-white_balance = val;
+   if (gspca_dev-streaming)
+   ret = setwhitebalance(gspca_dev);
+   if (0 = ret)
+   ret = 0;
+   return ret;
+}
+
+static int sd_getwhitebalance(struct gspca_dev *gspca_dev, __s32 *val)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+
+   *val = sd-white_balance;
+   return 0;
+}
+
 static int sd_setredbalance(struct gspca_dev *gspca_dev, __s32 val)
 {
struct sd *sd = (struct sd *) gspca_dev;
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[cron job] v4l-dvb daily build 2.6.22 and up: ERRORS, 2.6.16-2.6.21: ERRORS

2009-11-07 Thread Hans Verkuil
This message is generated daily by a cron job that builds v4l-dvb for
the kernels and architectures in the list below.

Results of the daily build of v4l-dvb:

date:Sat Nov  7 19:00:06 CET 2009
path:http://www.linuxtv.org/hg/v4l-dvb
changeset:   13327:19c0469c02c3
gcc version: gcc (GCC) 4.3.1
hardware:x86_64
host os: 2.6.26

linux-2.6.22.19-armv5: WARNINGS
linux-2.6.23.12-armv5: WARNINGS
linux-2.6.24.7-armv5: WARNINGS
linux-2.6.25.11-armv5: WARNINGS
linux-2.6.26-armv5: WARNINGS
linux-2.6.27-armv5: WARNINGS
linux-2.6.28-armv5: WARNINGS
linux-2.6.29.1-armv5: WARNINGS
linux-2.6.30-armv5: WARNINGS
linux-2.6.31-armv5: WARNINGS
linux-2.6.32-rc3-armv5: ERRORS
linux-2.6.32-rc3-armv5-davinci: ERRORS
linux-2.6.27-armv5-ixp: WARNINGS
linux-2.6.28-armv5-ixp: WARNINGS
linux-2.6.29.1-armv5-ixp: WARNINGS
linux-2.6.30-armv5-ixp: WARNINGS
linux-2.6.31-armv5-ixp: WARNINGS
linux-2.6.32-rc3-armv5-ixp: ERRORS
linux-2.6.28-armv5-omap2: WARNINGS
linux-2.6.29.1-armv5-omap2: WARNINGS
linux-2.6.30-armv5-omap2: WARNINGS
linux-2.6.31-armv5-omap2: ERRORS
linux-2.6.32-rc3-armv5-omap2: OK
linux-2.6.22.19-i686: WARNINGS
linux-2.6.23.12-i686: WARNINGS
linux-2.6.24.7-i686: WARNINGS
linux-2.6.25.11-i686: WARNINGS
linux-2.6.26-i686: WARNINGS
linux-2.6.27-i686: WARNINGS
linux-2.6.28-i686: WARNINGS
linux-2.6.29.1-i686: WARNINGS
linux-2.6.30-i686: WARNINGS
linux-2.6.31-i686: WARNINGS
linux-2.6.32-rc3-i686: WARNINGS
linux-2.6.23.12-m32r: WARNINGS
linux-2.6.24.7-m32r: WARNINGS
linux-2.6.25.11-m32r: WARNINGS
linux-2.6.26-m32r: WARNINGS
linux-2.6.27-m32r: WARNINGS
linux-2.6.28-m32r: WARNINGS
linux-2.6.29.1-m32r: WARNINGS
linux-2.6.30-m32r: WARNINGS
linux-2.6.31-m32r: WARNINGS
linux-2.6.32-rc3-m32r: OK
linux-2.6.30-mips: WARNINGS
linux-2.6.31-mips: WARNINGS
linux-2.6.32-rc3-mips: ERRORS
linux-2.6.27-powerpc64: WARNINGS
linux-2.6.28-powerpc64: WARNINGS
linux-2.6.29.1-powerpc64: WARNINGS
linux-2.6.30-powerpc64: WARNINGS
linux-2.6.31-powerpc64: WARNINGS
linux-2.6.32-rc3-powerpc64: WARNINGS
linux-2.6.22.19-x86_64: WARNINGS
linux-2.6.23.12-x86_64: WARNINGS
linux-2.6.24.7-x86_64: WARNINGS
linux-2.6.25.11-x86_64: WARNINGS
linux-2.6.26-x86_64: WARNINGS
linux-2.6.27-x86_64: WARNINGS
linux-2.6.28-x86_64: WARNINGS
linux-2.6.29.1-x86_64: WARNINGS
linux-2.6.30-x86_64: WARNINGS
linux-2.6.31-x86_64: WARNINGS
linux-2.6.32-rc3-x86_64: ERRORS
sparse (linux-2.6.31): OK
sparse (linux-2.6.32-rc3): OK
linux-2.6.16.61-i686: ERRORS
linux-2.6.17.14-i686: ERRORS
linux-2.6.18.8-i686: WARNINGS
linux-2.6.19.5-i686: WARNINGS
linux-2.6.20.21-i686: WARNINGS
linux-2.6.21.7-i686: WARNINGS
linux-2.6.16.61-x86_64: ERRORS
linux-2.6.17.14-x86_64: ERRORS
linux-2.6.18.8-x86_64: WARNINGS
linux-2.6.19.5-x86_64: WARNINGS
linux-2.6.20.21-x86_64: WARNINGS
linux-2.6.21.7-x86_64: WARNINGS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Saturday.tar.bz2

The V4L2 specification failed to build, but the last compiled spec is here:

http://www.xs4all.nl/~hverkuil/spec/v4l2.html

The DVB API specification failed to build, but the last compiled spec is here:

http://www.xs4all.nl/~hverkuil/spec/dvbapi.pdf

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Another gpsca kernel BUG when disconnecting camera while streaming with mmap

2009-11-07 Thread Sean

Thanks for your reply.

That makes a lot of sense, because this is an embedded platform and 
there is no swap! But there seems to be 89544K free while 
capture-example is running. hmmm.


Sean Lazar

Hans de Goede wrote:

Hi,

On 11/04/2009 10:37 AM, Sean wrote:

Hi, I am having a bug when removing my pac207 camera while
capture-example is streaming with mmap. It doesn't always do it. This is
a complete lock up - num lock key stops functioning. A related bug also
happens sometimes when capture-example finishes, that output is 
included.


Debug kernel is 2.6.31.5, v4l-dvb version is f6680fa8e7ec.
(http://linuxtv.org/hg/v4l-dvb/archive/f6680fa8e7ec.tar.bz2) This is on
low end 486 hardware, 128MB ram, 300Mhz cpu.

Let me know if I can try anything or if you need more output.



This does not seem to be a gspca specific bug, but you are simply running
out of memory.

The error:
unable to handle kernel paging request

Means the kernel could not find a free memory page for some data 
structure

it needed to allocate for itself at the time the oops happened.

Regards,

Hans




--
pac207 camera removal - complete lock up:
--
[r...@x-linux]:~ # capture-example
..usb 4-2: USB disconnect, address 6
BUG: unable to handle kernel paging request at a7a7a7c3
IP: [c11c5cef] td_free+0x23/0x75
*pde = 
Oops:  [#1] DEBUG_PAGEALLOC
last sysfs file:
Modules linked in: gspca_pac207 gspca_main videodev v4l1_compat

Pid: 160, comm: khubd Not tainted (2.6.31.5 #2)
EIP: 0060:[c11c5cef] EFLAGS: 0087 CPU: 0
EIP is at td_free+0x23/0x75
EAX: a7a7a7a7 EBX: c6b46bf0 ECX: c6b46ce4 EDX: a7a7a7c3
ESI: c6b97880 EDI: c6b46cd4 EBP: c798de78 ESP: c798de6c
DS: 007b ES: 007b FS:  GS:  SS: 0068
Process khubd (pid: 160, ti=c798c000 task=c7994338 task.ti=c798c000)
Stack:
c6b46bf0 03e8 c6b46cd4 c798dea4 c11c8175 c6532ea0 c6b46bf0 
0 c11b518a 0286 c6b96000 c6b46bf0 c6532ea0 c14062e5 c798deb4 
c11b4428
0 c6b36bf0 c6532ea0 c798dec8 c11b5b3f 014234b3 0006  
c798deec

Call Trace:
[c11c8175] ? ohci_endpoint_disable+0x113/0x192
[c11b518a] ? usb_free_urb+0x11/0x13
[c11b4428] ? usb_hcd_disable_endpoint+0x2e/0x32
[c11b5b3f] ? usb_disable_endpoint+0x6d/0x72
[c11b5bad] ? usb_disable_device+0x69/0x13a
[c1017619] ? printk+0x15/0x17
[c11b12a8] ? usb_disconnect+0xa1/0xf7
[c11b18bf] ? hub_thread+0x484/0xcec
[c12e23cd] ? schedule+0x3b0/0x3d5
[c1026151] ? autoremove_wake_function+0x0/0x33
[c11b143b] ? hub_thread+0x0/0xcec
[c10260aa] ? kthread+0x6b/0x71
[c102603f] ? kthread+0x0/0x71
[c1002f97] ? kernel_thread_helper+0x7/0x10
Code: e5 e8 bf 7b e9 ff 5d c3 55 89 e5 57 89 c7 56 89 d6 53 8b 42 28 89
c2 c1 ea 06 31 d0 83 e0 3f 8d 94 87 cc 00 00 00 eb 03 8d 50 1c 8b 02
85 c0 74 0b 39 f0 75 f3 8b 46 1c 89 02 eb 29 8b 06 25 00
EIP: [c11c5cef] td_free+0x23/0x75 SS:ESP 0068:c798de6c
CR2: a7a7a7c3
---[ end trace 2ee1dbf620895015 ]---
BUG: spinlock lockup on CPU#0, swapper/0, c6b46cd4
Pid: 0, comm: swapper Tainted: G D 2.6.31.5 #2
Call Trace:
[c111e85c] _raw_spin_lock+0xad/0xc9
[c12e4210] _spin_lock_irqsave+0x46/0x5a
[c11c991e] ohci_hub_status_data+0x1d/0x1d8
[c11b3779] usb_hcd_poll_rh_status+0x49/0x148
[c11b3880] rh_timer_func+0x8/0xa
[c101dcbe] run_timer_softirq+0x154/0x1c3
[c101dc59] ? run_timer_softirq+0xef/0x1c3
[c11b3878] ? rh_timer_func+0x0/0xa
[c101a7d9] __do_softirq+0x9f/0x14d
[c101a8b1] do_softirq+0x2a/0x42
[c101ab94] irq_exit+0x33/0x35
[c1004086] do_IRQ+0x5b/0x71
[c1002e6e] common_interrupt+0x2e/0x40
[c10018f8] ? cpu_idle+0x1b/0x35
[c1006d03] ? default_idle+0x59/0x9c
[c12e007b] ? sdhci_pci_probe+0x410/0x42c
[c1006d05] ? default_idle+0x5b/0x9c
[c10018fe] cpu_idle+0x21/0x35
[c12d3c31] rest_init+0x4d/0x4f
[c15ed72e] start_kernel+0x2a6/0x2ad
[c15ed068] i386_start_kernel+0x68/0x6d


--
capture-example crash on program end:
--
[r...@x-linux]:~ # capture-example
..BUG: 

sleeping function called from invalid context at 
arch/x86/mm/fault.c:1069

in_atomic(): 0, irqs_disabled(): 1, pid: 1183, name: capture-example
4 locks held by capture-example/1183:
#0: (gspca_dev-queue_lock){+.+.+.}, at: [c8866fbb]
vidioc_streamoff+0x3b/0xb4 [gspca_main]
#1: (gspca_dev-usb_lock){+.+.+.}, at: [c8866fce]
vidioc_streamoff+0x4e/0xb4 [gspca_main]
#2: (ohci-lock){-.-...}, at: [c11c8093]
ohci_endpoint_disable+0x31/0x192
#3: (mm-mmap_sem){++}, at: [c100c168] do_page_fault+0xc1/0x1fe
irq event stamp: 11502
hardirqs last enabled at (11501): [c12e41a0] 
_spin_unlock_irq+0x22/0x26

hardirqs last disabled at (11502): [c12e41da]
_spin_lock_irqsave+0x10/0x5a
softirqs last enabled at (11486): [c101a87f] __do_softirq+0x145/0x14d
softirqs last disabled at (11481): [c101a8b1] do_softirq+0x2a/0x42
Pid: 1183, comm: capture-example Not tainted 2.6.31.5 #2
Call Trace:
[c101222d] __might_sleep+0xcb/0xd0
[c100c1ad] do_page_fault+0x106/0x1fe
[c100c0a7] ? do_page_fault+0x0/0x1fe
[c12e43c3] 

[PATCH 10/75] V4L/DVB: declare MODULE_FIRMWARE for modules using XC2028 and XC3028L tuners

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
I'm not really sure whether it's better to do this in the drivers which
specify which firmware file to use, or just once in the xc2028 tuner
driver.  Your call.

Ben.

 drivers/media/dvb/dvb-usb/cxusb.c   |1 +
 drivers/media/dvb/dvb-usb/dib0700_devices.c |1 +
 drivers/media/video/cx18/cx18-driver.c  |1 +
 drivers/media/video/cx23885/cx23885-dvb.c   |3 +++
 drivers/media/video/cx88/cx88-cards.c   |2 ++
 drivers/media/video/em28xx/em28xx-cards.c   |3 +++
 drivers/media/video/ivtv/ivtv-driver.c  |1 +
 drivers/media/video/saa7134/saa7134-cards.c |2 ++
 8 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/cxusb.c 
b/drivers/media/dvb/dvb-usb/cxusb.c
index f65591f..bc44d30 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -1863,3 +1863,4 @@ MODULE_AUTHOR(Chris Pascoe c.pas...@itee.uq.edu.au);
 MODULE_DESCRIPTION(Driver for Conexant USB2.0 hybrid reference design);
 MODULE_VERSION(1.0-alpha);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c 
b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 684146f..d003ff0 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -408,6 +408,7 @@ static struct xc2028_ctrl stk7700ph_xc3028_ctrl = {
.max_len = 64,
.demod = XC3028_FE_DIBCOM52,
 };
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 
 static struct xc2028_config stk7700ph_xc3028_config = {
.i2c_addr = 0x61,
diff --git a/drivers/media/video/cx18/cx18-driver.c 
b/drivers/media/video/cx18/cx18-driver.c
index e12082b..6fdd57e 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -237,6 +237,7 @@ MODULE_AUTHOR(Hans Verkuil);
 MODULE_DESCRIPTION(CX23418 driver);
 MODULE_SUPPORTED_DEVICE(CX23418 MPEG2 encoder);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 
 MODULE_VERSION(CX18_VERSION);
 
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c 
b/drivers/media/video/cx23885/cx23885-dvb.c
index f4f046c..fe8331a 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -956,6 +956,9 @@ static int dvb_register(struct cx23885_tsport *port)
return ret;
 }
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(XC3028L_DEFAULT_FIRMWARE);
+
 int cx23885_dvb_register(struct cx23885_tsport *port)
 {
 
diff --git a/drivers/media/video/cx88/cx88-cards.c 
b/drivers/media/video/cx88/cx88-cards.c
index 7330a2d..4a91dd9 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -3080,6 +3080,8 @@ void cx88_setup_xc3028(struct cx88_core *core, struct 
xc2028_ctrl *ctl)
 }
 EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+
 static void cx88_card_setup(struct cx88_core *core)
 {
static u8 eeprom[256];
diff --git a/drivers/media/video/em28xx/em28xx-cards.c 
b/drivers/media/video/em28xx/em28xx-cards.c
index 4fd91f5..8c2048b 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -2090,6 +2090,9 @@ static void em28xx_setup_xc3028(struct em28xx *dev, 
struct xc2028_ctrl *ctl)
}
 }
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(XC3028L_DEFAULT_FIRMWARE);
+
 static void em28xx_tuner_setup(struct em28xx *dev)
 {
struct tuner_setup   tun_setup;
diff --git a/drivers/media/video/ivtv/ivtv-driver.c 
b/drivers/media/video/ivtv/ivtv-driver.c
index 7cdbc1a..4c74142 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -254,6 +254,7 @@ MODULE_SUPPORTED_DEVICE
 (CX23415/CX23416 MPEG2 encoder (WinTV PVR-150/250/350/500,\n
\t\t\tYuan MPG series and similar));
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 
 MODULE_VERSION(IVTV_VERSION);
 
diff --git a/drivers/media/video/saa7134/saa7134-cards.c 
b/drivers/media/video/saa7134/saa7134-cards.c
index 7e40d6d..e137203 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -7029,6 +7029,8 @@ static void saa7134_tuner_setup(struct saa7134_dev *dev)
}
 }
 
+MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+
 /* stuff which needs working i2c */
 int saa7134_board_init2(struct saa7134_dev *dev)
 {
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/75] xc5000: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/common/tuners/xc5000.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/tuners/xc5000.c 
b/drivers/media/common/tuners/xc5000.c
index 432003d..e13165a 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -1130,3 +1130,4 @@ EXPORT_SYMBOL(xc5000_attach);
 MODULE_AUTHOR(Steven Toth);
 MODULE_DESCRIPTION(Xceive xc5000 silicon tuner driver);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-fe-xc5000-1.6.114.fw);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 12/75] dvb-usb: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/dvb-usb/a800.c|1 +
 drivers/media/dvb/dvb-usb/af9005.c  |1 +
 drivers/media/dvb/dvb-usb/af9015.c  |1 +
 drivers/media/dvb/dvb-usb/cxusb.c   |2 ++
 drivers/media/dvb/dvb-usb/dib0700_devices.c |1 +
 drivers/media/dvb/dvb-usb/dibusb-mb.c   |4 
 drivers/media/dvb/dvb-usb/digitv.c  |1 +
 drivers/media/dvb/dvb-usb/dtt200u.c |5 +
 drivers/media/dvb/dvb-usb/dw2102.c  |4 
 drivers/media/dvb/dvb-usb/gp8psk.c  |1 +
 drivers/media/dvb/dvb-usb/m920x.c   |4 
 drivers/media/dvb/dvb-usb/nova-t-usb2.c |1 +
 drivers/media/dvb/dvb-usb/opera1.c  |1 +
 drivers/media/dvb/dvb-usb/ttusb2.c  |2 ++
 drivers/media/dvb/dvb-usb/umt-010.c |1 +
 drivers/media/dvb/dvb-usb/vp702x.c  |1 +
 drivers/media/dvb/dvb-usb/vp7045.c  |1 +
 17 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c
index 6247239..ae74174 100644
--- a/drivers/media/dvb/dvb-usb/a800.c
+++ b/drivers/media/dvb/dvb-usb/a800.c
@@ -195,3 +195,4 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(AVerMedia AverTV DVB-T USB 2.0 (A800));
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-avertv-a800-02.fw);
diff --git a/drivers/media/dvb/dvb-usb/af9005.c 
b/drivers/media/dvb/dvb-usb/af9005.c
index ca5a0a4..d26c70b 100644
--- a/drivers/media/dvb/dvb-usb/af9005.c
+++ b/drivers/media/dvb/dvb-usb/af9005.c
@@ -1142,3 +1142,4 @@ MODULE_AUTHOR(Luca Olivetti l...@ventoso.org);
 MODULE_DESCRIPTION(Driver for Afatech 9005 DVB-T USB1.1 stick);
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(af9005.fw);
diff --git a/drivers/media/dvb/dvb-usb/af9015.c 
b/drivers/media/dvb/dvb-usb/af9015.c
index bad3e10..8463faf 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -1687,3 +1687,4 @@ module_exit(af9015_usb_module_exit);
 MODULE_AUTHOR(Antti Palosaari cr...@iki.fi);
 MODULE_DESCRIPTION(Driver for Afatech AF9015 DVB-T);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-af9015.fw);
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c 
b/drivers/media/dvb/dvb-usb/cxusb.c
index bc44d30..556f643 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -1864,3 +1864,5 @@ MODULE_DESCRIPTION(Driver for Conexant USB2.0 hybrid 
reference design);
 MODULE_VERSION(1.0-alpha);
 MODULE_LICENSE(GPL);
 MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(dvb-usb-bluebird-01.fw);
+MODULE_FIRMWARE(dvb-usb-bluebird-02.fw);
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c 
b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index d003ff0..ee6a60b 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -1951,6 +1951,7 @@ MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
.size_of_priv  = sizeof(struct dib0700_state), \
.i2c_algo  = dib0700_i2c_algo, \
.identify_state= dib0700_identify_state
+MODULE_FIRMWARE(dvb-usb-dib0700-1.20.fw);
 
 #define DIB0700_DEFAULT_STREAMING_CONFIG(ep) \
.streaming_ctrl   = dib0700_streaming_ctrl, \
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c 
b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index eeef50b..87f1775 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -467,3 +467,7 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(Driver for DiBcom USB DVB-T devices (DiB3000M-B based));
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-dibusb-5.0.0.11.fw);
+MODULE_FIRMWARE(dvb-usb-dibusb-an2235-01.fw);
+MODULE_FIRMWARE(dvb-usb-adstech-usb2-02.fw);
+MODULE_FIRMWARE(dvb-usb-dibusb-6.0.0.8.fw);
diff --git a/drivers/media/dvb/dvb-usb/digitv.c 
b/drivers/media/dvb/dvb-usb/digitv.c
index 955147d..09e2d44 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -361,3 +361,4 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(Driver for Nebula Electronics uDigiTV DVB-T USB2.0);
 MODULE_VERSION(1.0-alpha);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-digitv-02.fw);
diff --git a/drivers/media/dvb/dvb-usb/dtt200u.c 
b/drivers/media/dvb/dvb-usb/dtt200u.c
index a1b12b0..38ecca0 100644
--- a/drivers/media/dvb/dvb-usb/dtt200u.c
+++ b/drivers/media/dvb/dvb-usb/dtt200u.c
@@ -365,3 +365,8 @@ MODULE_AUTHOR(Patrick Boettcher 
patrick.boettc...@desy.de);
 MODULE_DESCRIPTION(Driver for the WideView/Yakumo/Hama/Typhoon/Club3D/Miglia 
DVB-T USB2.0 devices);
 MODULE_VERSION(1.0);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-usb-dtt200u-01.fw);
+MODULE_FIRMWARE(dvb-usb-wt220u-02.fw);
+MODULE_FIRMWARE(dvb-usb-wt220u-fc03.fw);
+MODULE_FIRMWARE(dvb-usb-wt220u-zl0353-01.fw);

[PATCH 13/75] af90013: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/af9013.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/af9013.c 
b/drivers/media/dvb/frontends/af9013.c
index 12e018b..fc1c8c8 100644
--- a/drivers/media/dvb/frontends/af9013.c
+++ b/drivers/media/dvb/frontends/af9013.c
@@ -1694,3 +1694,4 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_AUTHOR(Antti Palosaari cr...@iki.fi);
 MODULE_DESCRIPTION(Afatech AF9013 DVB-T demodulator driver);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(AF9013_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 14/75] bcm3510: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/bcm3510.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/bcm3510.c 
b/drivers/media/dvb/frontends/bcm3510.c
index cf5e576..a08bd1f 100644
--- a/drivers/media/dvb/frontends/bcm3510.c
+++ b/drivers/media/dvb/frontends/bcm3510.c
@@ -852,3 +852,4 @@ static struct dvb_frontend_ops bcm3510_ops = {
 MODULE_DESCRIPTION(Broadcom BCM3510 ATSC (8VSB/16VSB  ITU J83 AnnexB FEC 
QAM64/256) demodulator driver);
 MODULE_AUTHOR(Patrick Boettcher patrick.boettc...@desy.de);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(BCM3510_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 15/75] cx24416: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/cx24116.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/cx24116.c 
b/drivers/media/dvb/frontends/cx24116.c
index 2410d8b..f3eef67 100644
--- a/drivers/media/dvb/frontends/cx24116.c
+++ b/drivers/media/dvb/frontends/cx24116.c
@@ -1506,4 +1506,4 @@ static struct dvb_frontend_ops cx24116_ops = {
 MODULE_DESCRIPTION(DVB Frontend module for Conexant cx24116/cx24118 
hardware);
 MODULE_AUTHOR(Steven Toth);
 MODULE_LICENSE(GPL);
-
+MODULE_FIRMWARE(CX24116_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 16/75] drx397xD: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Move punctuation into definition of _FW_ENTRY so we can use either a
comma or semicolon.

Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/drx397xD.c|7 ---
 drivers/media/dvb/frontends/drx397xD_fw.h |4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb/frontends/drx397xD.c 
b/drivers/media/dvb/frontends/drx397xD.c
index 868b78b..4f4c403 100644
--- a/drivers/media/dvb/frontends/drx397xD.c
+++ b/drivers/media/dvb/frontends/drx397xD.c
@@ -39,7 +39,7 @@ static const char mod_name[] = drx397xD;
 #define F_SET_0D4h 2
 
 enum fw_ix {
-#define _FW_ENTRY(a, b, c) b
+#define _FW_ENTRY(a, b, c) b,
 #include drx397xD_fw.h
 };
 
@@ -77,7 +77,7 @@ static struct {
.file   = NULL, \
.lock   = __RW_LOCK_UNLOCKED(fw[c].lock),   \
.refcnt = 0,\
-   .data   = { }   }
+   .data   = { }   },
 #include drx397xD_fw.h
 };
 
@@ -1507,4 +1507,5 @@ EXPORT_SYMBOL(drx397xD_attach);
 MODULE_DESCRIPTION(Micronas DRX397xD DVB-T Frontend);
 MODULE_AUTHOR(Henk Vergonet);
 MODULE_LICENSE(GPL);
-
+#define _FW_ENTRY(a, b, c) MODULE_FIRMWARE(a);
+#include drx397xD_fw.h
diff --git a/drivers/media/dvb/frontends/drx397xD_fw.h 
b/drivers/media/dvb/frontends/drx397xD_fw.h
index c8b44c1..f0260ad 100644
--- a/drivers/media/dvb/frontends/drx397xD_fw.h
+++ b/drivers/media/dvb/frontends/drx397xD_fw.h
@@ -18,8 +18,8 @@
  */
 
 #ifdef _FW_ENTRY
-   _FW_ENTRY(drx397xD.A2.fw, DRXD_FW_A2 = 0, DRXD_FW_A2  ),
-   _FW_ENTRY(drx397xD.B1.fw, DRXD_FW_B1, DRXD_FW_B1  ),
+   _FW_ENTRY(drx397xD.A2.fw, DRXD_FW_A2 = 0, DRXD_FW_A2  )
+   _FW_ENTRY(drx397xD.B1.fw, DRXD_FW_B1, DRXD_FW_B1  )
 #undef _FW_ENTRY
 #endif /* _FW_ENTRY */
 
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 17/75] nxt200x: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/nxt200x.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/nxt200x.c 
b/drivers/media/dvb/frontends/nxt200x.c
index eac2065..9c6f530 100644
--- a/drivers/media/dvb/frontends/nxt200x.c
+++ b/drivers/media/dvb/frontends/nxt200x.c
@@ -1236,6 +1236,8 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(NXT200X (ATSC 8VSB  ITU-T J.83 AnnexB 64/256 QAM) 
Demodulator Driver);
 MODULE_AUTHOR(Kirk Lapray, Michael Krufky, Jean-Francois Thibert, and Taylor 
Jacob);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(NXT2002_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(NXT2004_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(nxt200x_attach);
 
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 18/75] or51132: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/or51132.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/or51132.c 
b/drivers/media/dvb/frontends/or51132.c
index 38e67ac..1b6529d 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -615,6 +615,8 @@ MODULE_DESCRIPTION(OR51132 ATSC [pcHDTV HD-3000] (8VSB  
ITU J83 AnnexB FEC QAM
 MODULE_AUTHOR(Kirk Lapray);
 MODULE_AUTHOR(Trent Piepho);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(OR51132_VSB_FIRMWARE);
+MODULE_FIRMWARE(OR51132_QAM_FIRMWARE);
 
 EXPORT_SYMBOL(or51132_attach);
 
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 19/75] or51211: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/or51211.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/or51211.c 
b/drivers/media/dvb/frontends/or51211.c
index c709ce6..5102038 100644
--- a/drivers/media/dvb/frontends/or51211.c
+++ b/drivers/media/dvb/frontends/or51211.c
@@ -577,6 +577,7 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(Oren OR51211 VSB [pcHDTV HD-2000] Demodulator Driver);
 MODULE_AUTHOR(Kirk Lapray);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(OR51211_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(or51211_attach);
 
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 20/75] sp8870: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/sp8870.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/sp8870.c 
b/drivers/media/dvb/frontends/sp8870.c
index b85eb60..51bee98 100644
--- a/drivers/media/dvb/frontends/sp8870.c
+++ b/drivers/media/dvb/frontends/sp8870.c
@@ -615,5 +615,6 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(Spase SP8870 DVB-T Demodulator driver);
 MODULE_AUTHOR(Juergen Peitz);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(SP8870_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(sp8870_attach);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 21/75] sp887x: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/sp887x.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/sp887x.c 
b/drivers/media/dvb/frontends/sp887x.c
index 4a7c3d8..298e2a5 100644
--- a/drivers/media/dvb/frontends/sp887x.c
+++ b/drivers/media/dvb/frontends/sp887x.c
@@ -613,5 +613,6 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 
 MODULE_DESCRIPTION(Spase sp887x DVB-T demodulator driver);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(SP887X_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(sp887x_attach);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 22/75] tda10048: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/tda10048.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda10048.c 
b/drivers/media/dvb/frontends/tda10048.c
index 4e2a7c8..175e90e 100644
--- a/drivers/media/dvb/frontends/tda10048.c
+++ b/drivers/media/dvb/frontends/tda10048.c
@@ -1170,3 +1170,4 @@ MODULE_PARM_DESC(debug, Enable verbose debug messages);
 MODULE_DESCRIPTION(NXP TDA10048HN DVB-T Demodulator driver);
 MODULE_AUTHOR(Steven Toth);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(TDA10048_DEFAULT_FIRMWARE);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 23/75] tda1004x: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/frontends/tda1004x.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/tda1004x.c 
b/drivers/media/dvb/frontends/tda1004x.c
index f2a8abe..0561aa1 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -1375,6 +1375,8 @@ MODULE_PARM_DESC(debug, Turn on/off frontend debugging 
(default:off).);
 MODULE_DESCRIPTION(Philips TDA10045H  TDA10046H DVB-T Demodulator);
 MODULE_AUTHOR(Andrew de Quincey  Robert Schlabbach);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(TDA10045_DEFAULT_FIRMWARE);
+MODULE_FIRMWARE(TDA10046_DEFAULT_FIRMWARE);
 
 EXPORT_SYMBOL(tda10045_attach);
 EXPORT_SYMBOL(tda10046_attach);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 24/75] smsmdtv/smsusb: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/siano/sms-cards.c  |4 
 drivers/media/dvb/siano/smscoreapi.c |7 +++
 drivers/media/dvb/siano/smsusb.c |4 
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/siano/sms-cards.c 
b/drivers/media/dvb/siano/sms-cards.c
index e216389..9c425d7 100644
--- a/drivers/media/dvb/siano/sms-cards.c
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -96,6 +96,10 @@ static struct sms_board sms_boards[] = {
.type = SMS_VEGA,
},
 };
+MODULE_FIRMWARE(sms1xxx-stellar-dvbt-01.fw);
+MODULE_FIRMWARE(sms1xxx-nova-a-dvbt-01.fw);
+MODULE_FIRMWARE(sms1xxx-nova-b-dvbt-01.fw);
+MODULE_FIRMWARE(sms1xxx-hcw-55xxx-dvbt-02.fw);
 
 struct sms_board *sms_get_board(int id)
 {
diff --git a/drivers/media/dvb/siano/smscoreapi.c 
b/drivers/media/dvb/siano/smscoreapi.c
index ca758bc..c613f0d 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -790,6 +790,13 @@ static char *smscore_fw_lkup[][SMS_NUM_OF_DEVICE_TYPES] = {
/*CMMB*/
{none, none, none, cmmb_vega_12mhz.inp}
 };
+MODULE_FIRMWARE(dvb_nova_12mhz.inp);
+MODULE_FIRMWARE(dvb_nova_12mhz_b0.inp);
+MODULE_FIRMWARE(tdmb_nova_12mhz.inp);
+MODULE_FIRMWARE(tdmb_nova_12mhz_b0.inp);
+MODULE_FIRMWARE(isdbt_nova_12mhz.inp);
+MODULE_FIRMWARE(isdbt_nova_12mhz_b0.inp);
+MODULE_FIRMWARE(cmmb_vega_12mhz.inp);
 
 static inline char *sms_get_fw_name(struct smscore_device_t *coredev,
int mode, enum sms_device_type_st type)
diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
index 8f88a58..a97bf96 100644
--- a/drivers/media/dvb/siano/smsusb.c
+++ b/drivers/media/dvb/siano/smsusb.c
@@ -193,6 +193,10 @@ static char *smsusb1_fw_lkup[] = {
none,
dvbt_bda_stellar_usb.inp,
 };
+MODULE_FIRMWARE(dvbt_stellar_usb.inp);
+MODULE_FIRMWARE(dvbh_stellar_usb.inp);
+MODULE_FIRMWARE(tdmb_stellar_usb.inp);
+MODULE_FIRMWARE(dvbt_bda_stellar_usb.inp);
 
 static inline char *sms_get_fw_name(int mode, int board_id)
 {
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 25/75] dvb-ttpci/av7110: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/ttpci/av7110.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 8d65c65..5ddc9d6 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -2922,3 +2922,4 @@ MODULE_DESCRIPTION(driver for the SAA7146 based AV110 
PCI DVB cards by 
   Siemens, Technotrend, Hauppauge);
 MODULE_AUTHOR(Ralph Metzler, Marcus Metzler, others);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dvb-ttpci-01.fw);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 26/75] ttusb-dec: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/dvb/ttusb-dec/ttusb_dec.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c 
b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index d91e063..f835852 100644
--- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1781,3 +1781,6 @@ MODULE_AUTHOR(Alex Woods linux-...@giblets.org);
 MODULE_DESCRIPTION(DRIVER_NAME);
 MODULE_LICENSE(GPL);
 MODULE_DEVICE_TABLE(usb, ttusb_dec_table);
+MODULE_FIRMWARE(dvb-ttusb-dec-2000t.fw);
+MODULE_FIRMWARE(dvb-ttusb-dec-2540t.fw);
+MODULE_FIRMWARE(dvb-ttusb-dec-3000s.fw);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 27/75] bttv: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/bt8xx/bttv-cards.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/bt8xx/bttv-cards.c 
b/drivers/media/video/bt8xx/bttv-cards.c
index 12279f6..000b970 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -3820,6 +3820,8 @@ static int __devinit pvr_boot(struct bttv *btv)
return rc;
 }
 
+MODULE_FIRMWARE(hcwamc.rbf);
+
 /* --- */
 /* some osprey specific stuff  */
 
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 28/75] cpia2: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cpia2/cpia2_core.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cpia2/cpia2_core.c 
b/drivers/media/video/cpia2/cpia2_core.c
index 1cc0df8..8897032 100644
--- a/drivers/media/video/cpia2/cpia2_core.c
+++ b/drivers/media/video/cpia2/cpia2_core.c
@@ -943,6 +943,8 @@ static int apply_vp_patch(struct camera_data *cam)
return 0;
 }
 
+MODULE_FIRMWARE(cpia2/stv0672_vp4.bin);
+
 /**
  *
  *  set_default_user_mode
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 30/75] cx23885: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cx23885/cx23885-417.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx23885/cx23885-417.c 
b/drivers/media/video/cx23885/cx23885-417.c
index 0eed852..ff36155 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -41,6 +41,7 @@
 
 #define CX23885_FIRM_IMAGE_SIZE 376836
 #define CX23885_FIRM_IMAGE_NAME v4l-cx23885-enc.fw
+MODULE_FIRMWARE(CX23885_FIRM_IMAGE_NAME);
 
 static unsigned int mpegbufs = 32;
 module_param(mpegbufs, int, 0644);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 31/75] cx25840: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cx25840/cx25840-firmware.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx25840/cx25840-firmware.c 
b/drivers/media/video/cx25840/cx25840-firmware.c
index 8150200..6dd9253 100644
--- a/drivers/media/video/cx25840/cx25840-firmware.c
+++ b/drivers/media/video/cx25840/cx25840-firmware.c
@@ -73,6 +73,9 @@ static const char *get_fw_name(struct i2c_client *client)
return v4l-cx231xx-avcore-01.fw;
return v4l-cx25840.fw;
 }
+MODULE_FIRMWARE(v4l-cx23885-avcore-01.fw);
+MODULE_FIRMWARE(v4l-cx231xx-avcore-01.fw);
+MODULE_FIRMWARE(v4l-cx25840.fw);
 
 static int check_fw_load(struct i2c_client *client, int size)
 {
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 32/75] cx88-blackbird: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/cx88/cx88-blackbird.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-blackbird.c 
b/drivers/media/video/cx88/cx88-blackbird.c
index fbdc1cd..da62b37 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -42,6 +42,7 @@
 MODULE_DESCRIPTION(driver for cx2388x/cx23416 based mpeg encoder cards);
 MODULE_AUTHOR(Jelle Foks je...@foks.us, Gerd Knorr kra...@bytesex.org 
[SuSE Labs]);
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(CX2341X_FIRM_ENC_FILENAME);
 
 static unsigned int mpegbufs = 32;
 module_param(mpegbufs,int,0644);
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 33/75] dabusb: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/dabusb.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c
index ee43876..9b413a3 100644
--- a/drivers/media/video/dabusb.c
+++ b/drivers/media/video/dabusb.c
@@ -913,6 +913,8 @@ static void __exit dabusb_cleanup (void)
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
 MODULE_LICENSE(GPL);
+MODULE_FIRMWARE(dabusb/firmware.fw);
+MODULE_FIRMWARE(dabusb/bitstream.bin);
 
 module_param(buffers, int, 0);
 MODULE_PARM_DESC (buffers, Number of buffers (default=256));
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 34/75] ivtv: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/ivtv/ivtv-firmware.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/ivtv/ivtv-firmware.c 
b/drivers/media/video/ivtv/ivtv-firmware.c
index c1b7ec4..fd74d41 100644
--- a/drivers/media/video/ivtv/ivtv-firmware.c
+++ b/drivers/media/video/ivtv/ivtv-firmware.c
@@ -41,6 +41,7 @@
 
 #define IVTV_DECODE_INIT_MPEG_FILENAME v4l-cx2341x-init.mpg
 #define IVTV_DECODE_INIT_MPEG_SIZE (152*1024)
+MODULE_FIRMWARE(IVTV_DECODE_INIT_MPEG_FILENAME);
 
 /* Encoder/decoder firmware sizes */
 #define IVTV_FW_ENC_SIZE   (376836)
@@ -171,6 +172,8 @@ static int ivtv_firmware_copy(struct ivtv *itv)
}
return 0;
 }
+MODULE_FIRMWARE(CX2341X_FIRM_ENC_FILENAME);
+MODULE_FIRMWARE(CX2341X_FIRM_DEC_FILENAME);
 
 static volatile struct ivtv_mailbox __iomem *ivtv_search_mailbox(const 
volatile u8 __iomem *mem, u32 size)
 {
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 35/75] pvrusb2: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/pvrusb2/pvrusb2-devattr.c |4 
 drivers/media/video/pvrusb2/pvrusb2-hdw.c |1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c 
b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index e4d7c13..aa65a8d 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -56,6 +56,7 @@ static const struct pvr2_device_client_desc pvr2_cli_29xxx[] 
= {
 static const char *pvr2_fw1_names_29xxx[] = {
v4l-pvrusb2-29xxx-01.fw,
 };
+MODULE_FIRMWARE(v4l-pvrusb2-29xxx-01.fw);
 
 static const struct pvr2_device_desc pvr2_device_29xxx = {
.description = WinTV PVR USB2 Model Category 29xxx,
@@ -89,6 +90,7 @@ static const struct pvr2_device_client_desc pvr2_cli_24xxx[] 
= {
 static const char *pvr2_fw1_names_24xxx[] = {
v4l-pvrusb2-24xxx-01.fw,
 };
+MODULE_FIRMWARE(v4l-pvrusb2-24xxx-01.fw);
 
 static const struct pvr2_device_desc pvr2_device_24xxx = {
.description = WinTV PVR USB2 Model Category 24xxx,
@@ -338,6 +340,7 @@ static const struct pvr2_device_client_desc 
pvr2_cli_73xxx[] = {
 static const char *pvr2_fw1_names_73xxx[] = {
v4l-pvrusb2-73xxx-01.fw,
 };
+MODULE_FIRMWARE(v4l-pvrusb2-73xxx-01.fw);
 
 static const struct pvr2_device_desc pvr2_device_73xxx = {
.description = WinTV HVR-1900 Model Category 73xxx,
@@ -443,6 +446,7 @@ static const struct pvr2_dvb_props pvr2_751xx_dvb_props = {
 static const char *pvr2_fw1_names_75xxx[] = {
v4l-pvrusb2-73xxx-01.fw,
 };
+MODULE_FIRMWARE(v4l-pvrusb2-73xxx-01.fw);
 
 static const struct pvr2_device_desc pvr2_device_750xx = {
.description = WinTV HVR-1950 Model Category 750xx,
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c 
b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 4c1a2a5..97a6713 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1674,6 +1674,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
return ret;
 }
 
+MODULE_FIRMWARE(CX2341X_FIRM_ENC_FILENAME);
 
 static const char *pvr2_get_state_name(unsigned int st)
 {
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 36/75] s2255drv: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/s2255drv.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index d0824f3..cf12356 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -56,7 +56,7 @@
 #include linux/usb.h
 
 #define FIRMWARE_FILE_NAME f2255usb.bin
-
+MODULE_FIRMWARE(FIRMWARE_FILE_NAME);
 

 /* default JPEG quality */
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 37/75] saa7164: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
Signed-off-by: Ben Hutchings b...@decadent.org.uk
---
 drivers/media/video/saa7164/saa7164-fw.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/saa7164/saa7164-fw.c 
b/drivers/media/video/saa7164/saa7164-fw.c
index ee0af35..b411fa0 100644
--- a/drivers/media/video/saa7164/saa7164-fw.c
+++ b/drivers/media/video/saa7164/saa7164-fw.c
@@ -25,9 +25,11 @@
 
 #define SAA7164_REV2_FIRMWARE  v4l-saa7164-1.0.2.fw
 #define SAA7164_REV2_FIRMWARE_SIZE 3978608
+MODULE_FIRMWARE(SAA7164_REV2_FIRMWARE);
 
 #define SAA7164_REV3_FIRMWARE  v4l-saa7164-1.0.3.fw
 #define SAA7164_REV3_FIRMWARE_SIZE 3978608
+MODULE_FIRMWARE(SAA7164_REV3_FIRMWARE);
 
 struct fw_header {
u32 firmwaresize;
-- 
1.6.5.2



--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] gspca pac7302: add test pattern/overlay control

2009-11-07 Thread Németh Márton
From: Márton Németh nm...@freemail.hu

The Labtec Webcam 2200 (USB ID 093a:2626) device can produce some
diagnostic patterns instead of the sensor image. An overlay test
pattern also exsits which can be combined with the sensor image or
with any test patterns. Add controls to activate these test modes.

Signed-off-by: Márton Németh nm...@freemail.hu
Cc: Thomas Kaiser tho...@kaiser-linux.li
---
diff -upr c/linux/drivers/media/video/gspca/pac7302.c 
d/linux/drivers/media/video/gspca/pac7302.c
--- c/linux/drivers/media/video/gspca/pac7302.c 2009-11-07 22:38:32.0 
+0100
+++ d/linux/drivers/media/video/gspca/pac7302.c 2009-11-08 00:55:38.0 
+0100
@@ -27,6 +27,29 @@
addresses is a - sign that register description is not valid for the
matching IC.

+   Register page 0:
+
+   Address Description
+   0x72/-  Different test patterns:
+ bit 0..3:  0 - image, test pattern off
+1 - white
+2 - black
+3 - red
+4 - green
+5 - blue
+6 - cyan
+7 - magenta
+8 - yellow
+9 - color bars
+   10 - high resolution color pattern
+   11 - black to white gradient from top to bottom
+   12 - white to black gradient from left to right
+   13 - white to black gradient repeats from left to 
right
+   14 - dark gray (#11)
+   15 - dark gray 2 (#11)
+ bit 4: overlay some diagnostic points over the image
+ bit 5..7: no effect
+
Register page 1:

Address Description
@@ -57,6 +80,7 @@
 0   | 0x0f..0x20 | setcolors()
 0   | 0xa2..0xab | setbrightcont()
 0   | 0x55   | setedgedetect()
+0   | 0x72   | settestpattern()
 0   | 0xc5   | setredbalance()
 0   | 0xc6   | setwhitebalance()
 0   | 0xc7   | setbluebalance()
@@ -91,6 +115,8 @@ struct sd {
__u8 hflip;
__u8 vflip;
unsigned char edge_detect;
+   unsigned char test_pattern;
+   unsigned char test_overlay;

u8 sof_read;
u8 autogain_ignore_frames;
@@ -123,9 +149,14 @@ static int sd_setexposure(struct gspca_d
 static int sd_getexposure(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setedgedetect(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getedgedetect(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_settestpattern(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_gettestpattern(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_settestoverlay(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_gettestoverlay(struct gspca_dev *gspca_dev, __s32 *val);

 #define V4L2_CID_PRIVATE_EDGE_DETECT (V4L2_CID_PRIVATE_BASE+0)
-
+#define V4L2_CID_PRIVATE_TEST_PATTERN (V4L2_CID_PRIVATE_BASE+1)
+#define V4L2_CID_PRIVATE_TEST_OVERLAY (V4L2_CID_PRIVATE_BASE+2)

 static struct ctrl sd_ctrls[] = {
 /* This control is pac7302 only */
@@ -307,6 +338,34 @@ static struct ctrl sd_ctrls[] = {
.set = sd_setedgedetect,
.get = sd_getedgedetect,
},
+   {
+   {
+   .id  = V4L2_CID_PRIVATE_TEST_PATTERN,
+   .type= V4L2_CTRL_TYPE_MENU,
+   .name= Test Pattern,
+   .minimum = 0,
+   .maximum = 15,
+   .step= 1,
+#define TEST_PATTERN_DEF 0
+   .default_value = TEST_PATTERN_DEF,
+   },
+   .set = sd_settestpattern,
+   .get = sd_gettestpattern,
+   },
+   {
+   {
+   .id  = V4L2_CID_PRIVATE_TEST_OVERLAY,
+   .type= V4L2_CTRL_TYPE_BOOLEAN,
+   .name= Test Overlay,
+   .minimum = 0,
+   .maximum = 1,
+   .step= 1,
+#define TEST_OVERLAY_DEF 0
+   .default_value = TEST_OVERLAY_DEF,
+   },
+   .set = sd_settestoverlay,
+   .get = sd_gettestoverlay,
+   },

 };

@@ -595,6 +654,9 @@ static int sd_config(struct gspca_dev *g
sd-hflip = HFLIP_DEF;
sd-vflip = VFLIP_DEF;
sd-edge_detect = EDGE_DETECT_DEF;
+   sd-test_pattern = TEST_PATTERN_DEF;
+   sd-test_overlay = TEST_OVERLAY_DEF;
+
return 0;
 }

@@ -780,6 +842,23 @@ static int setedgedetect(struct gspca_de
return ret;
 }

+static int settestpattern(struct gspca_dev *gspca_dev)
+{
+   struct sd *sd = (struct sd *) gspca_dev;
+   int ret;
+   __u8 data;
+
+   ret = reg_w(gspca_dev, 0xff, 0x00); /* page 0 */
+   data = sd-test_pattern | (sd-test_overlay ? 0x10 : 0x00);
+   if (0 = ret)
+   ret = reg_w(gspca_dev, 0x72, data);
+
+   if (0 = ret)
+   ret = 

Re: [PATCH 10/75] V4L/DVB: declare MODULE_FIRMWARE for modules using XC2028 and XC3028L tuners

2009-11-07 Thread Andy Walls
On Sat, 2009-11-07 at 21:47 +, Ben Hutchings wrote:
 Signed-off-by: Ben Hutchings b...@decadent.org.uk
 ---
 I'm not really sure whether it's better to do this in the drivers which
 specify which firmware file to use, or just once in the xc2028 tuner
 driver.  Your call.
 
 Ben.

Ben,

I would suspect it's better left in the xc2028 tuner driver module. 

Rationale:

a. it will be consistent with other modules like the cx25840 module.
ivtv and cx23885 load the cx25840 module yet the MODULE_FIRMWARE
advertisement for the CX2584[0123] or CX2388[578] A/V core firmware is
in the cx25840 module.

b. not every ivtv or cx18 supported TV card, for example, needs the
XCeive tuner chip firmware, so it's not a strict requirement for those
modules.  It is a strict(-er) requirement for the xc2028 module.

My $0.02

Regards,
Andy

  drivers/media/dvb/dvb-usb/cxusb.c   |1 +
  drivers/media/dvb/dvb-usb/dib0700_devices.c |1 +
  drivers/media/video/cx18/cx18-driver.c  |1 +
  drivers/media/video/cx23885/cx23885-dvb.c   |3 +++
  drivers/media/video/cx88/cx88-cards.c   |2 ++
  drivers/media/video/em28xx/em28xx-cards.c   |3 +++
  drivers/media/video/ivtv/ivtv-driver.c  |1 +
  drivers/media/video/saa7134/saa7134-cards.c |2 ++
  8 files changed, 14 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/media/dvb/dvb-usb/cxusb.c 
 b/drivers/media/dvb/dvb-usb/cxusb.c
 index f65591f..bc44d30 100644
 --- a/drivers/media/dvb/dvb-usb/cxusb.c
 +++ b/drivers/media/dvb/dvb-usb/cxusb.c
 @@ -1863,3 +1863,4 @@ MODULE_AUTHOR(Chris Pascoe c.pas...@itee.uq.edu.au);
  MODULE_DESCRIPTION(Driver for Conexant USB2.0 hybrid reference design);
  MODULE_VERSION(1.0-alpha);
  MODULE_LICENSE(GPL);
 +MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c 
 b/drivers/media/dvb/dvb-usb/dib0700_devices.c
 index 684146f..d003ff0 100644
 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
 +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
 @@ -408,6 +408,7 @@ static struct xc2028_ctrl stk7700ph_xc3028_ctrl = {
   .max_len = 64,
   .demod = XC3028_FE_DIBCOM52,
  };
 +MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
  
  static struct xc2028_config stk7700ph_xc3028_config = {
   .i2c_addr = 0x61,
 diff --git a/drivers/media/video/cx18/cx18-driver.c 
 b/drivers/media/video/cx18/cx18-driver.c
 index e12082b..6fdd57e 100644
 --- a/drivers/media/video/cx18/cx18-driver.c
 +++ b/drivers/media/video/cx18/cx18-driver.c
 @@ -237,6 +237,7 @@ MODULE_AUTHOR(Hans Verkuil);
  MODULE_DESCRIPTION(CX23418 driver);
  MODULE_SUPPORTED_DEVICE(CX23418 MPEG2 encoder);
  MODULE_LICENSE(GPL);
 +MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
  
  MODULE_VERSION(CX18_VERSION);
  
 diff --git a/drivers/media/video/cx23885/cx23885-dvb.c 
 b/drivers/media/video/cx23885/cx23885-dvb.c
 index f4f046c..fe8331a 100644
 --- a/drivers/media/video/cx23885/cx23885-dvb.c
 +++ b/drivers/media/video/cx23885/cx23885-dvb.c
 @@ -956,6 +956,9 @@ static int dvb_register(struct cx23885_tsport *port)
   return ret;
  }
  
 +MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 +MODULE_FIRMWARE(XC3028L_DEFAULT_FIRMWARE);
 +
  int cx23885_dvb_register(struct cx23885_tsport *port)
  {
  
 diff --git a/drivers/media/video/cx88/cx88-cards.c 
 b/drivers/media/video/cx88/cx88-cards.c
 index 7330a2d..4a91dd9 100644
 --- a/drivers/media/video/cx88/cx88-cards.c
 +++ b/drivers/media/video/cx88/cx88-cards.c
 @@ -3080,6 +3080,8 @@ void cx88_setup_xc3028(struct cx88_core *core, struct 
 xc2028_ctrl *ctl)
  }
  EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
  
 +MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 +
  static void cx88_card_setup(struct cx88_core *core)
  {
   static u8 eeprom[256];
 diff --git a/drivers/media/video/em28xx/em28xx-cards.c 
 b/drivers/media/video/em28xx/em28xx-cards.c
 index 4fd91f5..8c2048b 100644
 --- a/drivers/media/video/em28xx/em28xx-cards.c
 +++ b/drivers/media/video/em28xx/em28xx-cards.c
 @@ -2090,6 +2090,9 @@ static void em28xx_setup_xc3028(struct em28xx *dev, 
 struct xc2028_ctrl *ctl)
   }
  }
  
 +MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
 +MODULE_FIRMWARE(XC3028L_DEFAULT_FIRMWARE);
 +
  static void em28xx_tuner_setup(struct em28xx *dev)
  {
   struct tuner_setup   tun_setup;
 diff --git a/drivers/media/video/ivtv/ivtv-driver.c 
 b/drivers/media/video/ivtv/ivtv-driver.c
 index 7cdbc1a..4c74142 100644
 --- a/drivers/media/video/ivtv/ivtv-driver.c
 +++ b/drivers/media/video/ivtv/ivtv-driver.c
 @@ -254,6 +254,7 @@ MODULE_SUPPORTED_DEVICE
  (CX23415/CX23416 MPEG2 encoder (WinTV PVR-150/250/350/500,\n
   \t\t\tYuan MPG series and similar));
  MODULE_LICENSE(GPL);
 +MODULE_FIRMWARE(XC2028_DEFAULT_FIRMWARE);
  
  MODULE_VERSION(IVTV_VERSION);
  
 diff --git a/drivers/media/video/saa7134/saa7134-cards.c 
 b/drivers/media/video/saa7134/saa7134-cards.c
 index 7e40d6d..e137203 100644
 --- a/drivers/media/video/saa7134/saa7134-cards.c
 +++ b/drivers/media/video/saa7134/saa7134-cards.c
 

Re: [PATCH 29/75] cx18: declare MODULE_FIRMWARE

2009-11-07 Thread Andy Walls
On Sat, 2009-11-07 at 21:51 +, Ben Hutchings wrote:
 Signed-off-by: Ben Hutchings b...@decadent.org.uk
 ---
  drivers/media/video/cx18/cx18-av-firmware.c |1 +
  drivers/media/video/cx18/cx18-dvb.c |2 ++
  drivers/media/video/cx18/cx18-firmware.c|3 +++
  3 files changed, 6 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/media/video/cx18/cx18-av-firmware.c 
 b/drivers/media/video/cx18/cx18-av-firmware.c
 index b9e8cc5..137445c 100644
 --- a/drivers/media/video/cx18/cx18-av-firmware.c
 +++ b/drivers/media/video/cx18/cx18-av-firmware.c
 @@ -32,6 +32,7 @@
  #define CX18_AI1_MUX_INVALID 0x30
  
  #define FWFILE v4l-cx23418-dig.fw
 +MODULE_FIRMWARE(FWFILE);
  
  static int cx18_av_verifyfw(struct cx18 *cx, const struct firmware *fw)
  {
 diff --git a/drivers/media/video/cx18/cx18-dvb.c 
 b/drivers/media/video/cx18/cx18-dvb.c
 index 51a0c33..9f70168 100644
 --- a/drivers/media/video/cx18/cx18-dvb.c
 +++ b/drivers/media/video/cx18/cx18-dvb.c
 @@ -131,6 +131,8 @@ static int yuan_mpc718_mt352_reqfw(struct cx18_stream 
 *stream,
   return ret;
  }
  
 +MODULE_FIRMWARE(dvb-cx18-mpc718-mt352.fw);
 +

Ben,

This particular firmware is only needed by one relatively rare TV card.
Is there any way for MODULE_FIRMWARE advertisements to hint at
mandatory vs. particular case(s)?

Regards,
Andy

  static int yuan_mpc718_mt352_init(struct dvb_frontend *fe)
  {
   struct cx18_dvb *dvb = container_of(fe-dvb,
 diff --git a/drivers/media/video/cx18/cx18-firmware.c 
 b/drivers/media/video/cx18/cx18-firmware.c
 index 83cd559..4ac4b81 100644
 --- a/drivers/media/video/cx18/cx18-firmware.c
 +++ b/drivers/media/video/cx18/cx18-firmware.c
 @@ -446,3 +446,6 @@ int cx18_firmware_init(struct cx18 *cx)
   cx18_write_reg_expect(cx, 0x14001400, 0xc78110, 0x1400, 0x14001400);
   return 0;
  }
 +
 +MODULE_FIRMWARE(v4l-cx23418-cpu.fw);
 +MODULE_FIRMWARE(v4l-cx23418-apu.fw);

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/75] V4L/DVB: declare MODULE_FIRMWARE for modules using XC2028 and XC3028L tuners

2009-11-07 Thread Devin Heitmueller
On Sat, Nov 7, 2009 at 8:37 PM, Andy Walls awa...@radix.net wrote:
 On Sat, 2009-11-07 at 21:47 +, Ben Hutchings wrote:
 Signed-off-by: Ben Hutchings b...@decadent.org.uk
 ---
 I'm not really sure whether it's better to do this in the drivers which
 specify which firmware file to use, or just once in the xc2028 tuner
 driver.  Your call.

 Ben.

 Ben,

 I would suspect it's better left in the xc2028 tuner driver module.

 Rationale:

 a. it will be consistent with other modules like the cx25840 module.
 ivtv and cx23885 load the cx25840 module yet the MODULE_FIRMWARE
 advertisement for the CX2584[0123] or CX2388[578] A/V core firmware is
 in the cx25840 module.

 b. not every ivtv or cx18 supported TV card, for example, needs the
 XCeive tuner chip firmware, so it's not a strict requirement for those
 modules.  It is a strict(-er) requirement for the xc2028 module.

 My $0.02

 Regards,
 Andy

It's not clear to me what this MODULE_FIRMWARE is going to be used
for, but if it's for some sort of module dependency system, then it
definitely should *not* be a dependency for em28xx.  There are lots of
em28xx based devices that do not use the xc3028, and those users
should not be expected to go out and find/extract the firmware for
some tuner they don't have.

Also, how does this approach handle the situation where there are two
different possible firmwares depending on the card using the firmware.
 As in the example above, you the xc3028 can require either the xc3028
or xc3028L firmware depending on the board they have.  Does this
change now result in both firmware images being required?

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 29/75] cx18: declare MODULE_FIRMWARE

2009-11-07 Thread Ben Hutchings
On Sat, 2009-11-07 at 20:40 -0500, Andy Walls wrote:
 On Sat, 2009-11-07 at 21:51 +, Ben Hutchings wrote:
  Signed-off-by: Ben Hutchings b...@decadent.org.uk
  ---
   drivers/media/video/cx18/cx18-av-firmware.c |1 +
   drivers/media/video/cx18/cx18-dvb.c |2 ++
   drivers/media/video/cx18/cx18-firmware.c|3 +++
   3 files changed, 6 insertions(+), 0 deletions(-)
  
  diff --git a/drivers/media/video/cx18/cx18-av-firmware.c 
  b/drivers/media/video/cx18/cx18-av-firmware.c
  index b9e8cc5..137445c 100644
  --- a/drivers/media/video/cx18/cx18-av-firmware.c
  +++ b/drivers/media/video/cx18/cx18-av-firmware.c
  @@ -32,6 +32,7 @@
   #define CX18_AI1_MUX_INVALID 0x30
   
   #define FWFILE v4l-cx23418-dig.fw
  +MODULE_FIRMWARE(FWFILE);
   
   static int cx18_av_verifyfw(struct cx18 *cx, const struct firmware *fw)
   {
  diff --git a/drivers/media/video/cx18/cx18-dvb.c 
  b/drivers/media/video/cx18/cx18-dvb.c
  index 51a0c33..9f70168 100644
  --- a/drivers/media/video/cx18/cx18-dvb.c
  +++ b/drivers/media/video/cx18/cx18-dvb.c
  @@ -131,6 +131,8 @@ static int yuan_mpc718_mt352_reqfw(struct cx18_stream 
  *stream,
  return ret;
   }
   
  +MODULE_FIRMWARE(dvb-cx18-mpc718-mt352.fw);
  +
 
 Ben,
 
 This particular firmware is only needed by one relatively rare TV card.
 Is there any way for MODULE_FIRMWARE advertisements to hint at
 mandatory vs. particular case(s)?

No, but perhaps there ought to be.  In this case the declaration could
be left out for now.  It is only critical to list all firmware in
drivers that may be needed for booting.

Ben.

-- 
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert Coveyou


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 10/75] V4L/DVB: declare MODULE_FIRMWARE for modules using XC2028 and XC3028L tuners

2009-11-07 Thread Andy Walls
On Sat, 2009-11-07 at 20:44 -0500, Devin Heitmueller wrote:
 On Sat, Nov 7, 2009 at 8:37 PM, Andy Walls awa...@radix.net wrote:
  On Sat, 2009-11-07 at 21:47 +, Ben Hutchings wrote:
  Signed-off-by: Ben Hutchings b...@decadent.org.uk
  ---
  I'm not really sure whether it's better to do this in the drivers which
  specify which firmware file to use, or just once in the xc2028 tuner
  driver.  Your call.
 
  Ben.
 
  Ben,
 
  I would suspect it's better left in the xc2028 tuner driver module.
 
  Rationale:
 
  a. it will be consistent with other modules like the cx25840 module.
  ivtv and cx23885 load the cx25840 module yet the MODULE_FIRMWARE
  advertisement for the CX2584[0123] or CX2388[578] A/V core firmware is
  in the cx25840 module.
 
  b. not every ivtv or cx18 supported TV card, for example, needs the
  XCeive tuner chip firmware, so it's not a strict requirement for those
  modules.  It is a strict(-er) requirement for the xc2028 module.
 
  My $0.02
 
  Regards,
  Andy
 
 It's not clear to me what this MODULE_FIRMWARE is going to be used
 for, but if it's for some sort of module dependency system, then it
 definitely should *not* be a dependency for em28xx.  There are lots of
 em28xx based devices that do not use the xc3028, and those users
 should not be expected to go out and find/extract the firmware for
 some tuner they don't have.
 
 Also, how does this approach handle the situation where there are two
 different possible firmwares depending on the card using the firmware.
  As in the example above, you the xc3028 can require either the xc3028
 or xc3028L firmware depending on the board they have.  Does this
 change now result in both firmware images being required?

Devin,

Maybe these old references will help answer questions:

http://lwn.net/Articles/197362/
http://linux.derkeiler.com/Mailing-Lists/Kernel/2006-09/msg01007.html


I generally think (as likely you may) that V4L-DVB drivers may have a
somewhat unique position of having multi-card, multi-chip firmware image
needs.

Some firmware is mandatory for all cards supported by a driver - that's
not an issue.  

However, many drivers then have cases where you may need these other
two firmwares files too, depending on the card you have and the version
of the card you have.

In the cx18 driver, the Yuan MPC-718 is a good example of such a card.

The ivtv driver has a number of required firmware permutations, given
the cards it supports.  The only firmware that is always required in
ivtv is the MPEG encoder firmware.

I'm not sure if MODULE_FIRMWARE advertisements won't cause people undue
worry/work without more amplifying information associated with the
firmware file names.  Maybe it's a don't care in the end;  I've
noticed a trend that many users don't know about /sbin/modinfo...

Regards,
Andy

 Devin


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 29/75] cx18: declare MODULE_FIRMWARE

2009-11-07 Thread Andy Walls
On Sun, 2009-11-08 at 01:53 +, Ben Hutchings wrote:
 On Sat, 2009-11-07 at 20:40 -0500, Andy Walls wrote:
  On Sat, 2009-11-07 at 21:51 +, Ben Hutchings wrote:


   +MODULE_FIRMWARE(dvb-cx18-mpc718-mt352.fw);
   +
  
  Ben,
  
  This particular firmware is only needed by one relatively rare TV card.
  Is there any way for MODULE_FIRMWARE advertisements to hint at
  mandatory vs. particular case(s)?
 
 No, but perhaps there ought to be.  In this case the declaration could
 be left out for now.  It is only critical to list all firmware in
 drivers that may be needed for booting.

OK.  I don't know that a TV card driver is every *needed* for booting.
Maybe one day when I can net-boot with cable-modem like
functionality... ;)


I'm OK with the MODULE_FIRMWARE announcements in cx18 so long as
automatic behaviors like

1. persistent, repeatitive, or truly alarming user warnings, or
2. refusing to load the module due to missing firmware files

don't happen.

Regards,
Andy

 Ben.


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: bisected regression in tuner-xc2028 on DVICO dual digital 4

2009-11-07 Thread Devin Heitmueller
On Sat, Nov 7, 2009 at 6:28 AM, Vincent McIntyre
vincent.mcint...@gmail.com wrote:
 Hi Devin

 please confirm exactly which of your boards is not working.

 Sorry for being unclear.

 I have three test setups I am working with, all on the same computer.
 1. Ubuntu Hardy, kernel 2.6.24-23-rt and drivers from v4l-dvb tip.
 2. Ubuntu Karmic, kernel 2.6.31-14-generic, stock Ubuntu drivers.
 3. Ubuntu Karmic, kernel 2.6.31-14-generic, v4l-dvb tip.

 Setups 2  3 are the same install, on a separate hard disk from setup 1.
 I change between 2  3 by installing the v4l modules or restoring the
 ubuntu stuff from backup. (rsync -av --delete).

 The computer has two DVB-T cards.

 First device is the same as Robert's, I believe. It has two tuners. lsusb 
 gives:
 Bus 003 Device 003: ID 0fe9:db78 DVICO FusionHDTV DVB-T Dual Digital 4
 (ZL10353+xc2028/xc3028) (initialized)
 Bus 003 Device 002: ID 0fe9:db78 DVICO FusionHDTV DVB-T Dual Digital 4
 (ZL10353+xc2028/xc3028) (initialized)
 I have a 'rev1' version of this board.


 Second device is DViCO FusionHDTV Dual Digital Express, a PCIe card
 based on cx23885[1] It also has two tuners. lspci gives:
 04:00.0 Multimedia video controller [0400]: Conexant Systems, Inc.
 CX23885 PCI Video and Audio Decoder [14f1:8852] (rev 02)
        Subsystem: DViCO Corporation Device [18ac:db78]
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
 Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast TAbort-
 TAbort- MAbort- SERR- PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 19
        Region 0: Memory at 9000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: access denied
        Kernel driver in use: cx23885
        Kernel modules: cx23885

 With Robert's patch compiled in:
  * On setup 1
  I am able to tune both cards and there are no errors from the cxusb module
   or dvb-usb anymore.
   I tested each of the four tuners, by running dvbscan with
 appropriate arguments to
   select the right /dev/dvb/adapterN.

   I just realised I should probably revert the patch and check which
 tuners show the
   original problem. Before I was taking the default choice (adapter0,
 I think) which is
    one of lhe Dual Digital 4 tuners.

  * I have yet to test setup 2,
   I have built the patched kernel module but the box is back 'in
 production' right now.
   I plan to test tomorrow.

  * On setup 3. I attempted to tune using dvbscan, w_scan and vlc.
   Again, I was not specific about which tuner the applications should use.
   So to answer your question, I think it is the lsusb id 0fe9:db78
 that is unable to tune.
   I will check the tuners individually, tomorrow.

   My impression was that the failures were because of API differences
 between the
   applications (all provided as part of the ubuntu install) and the
 V4L modules. I have
   not tried to build v4l-apps from the mercurial tree.

 So, I hope this makes things clearer. Happy to run tests if you have
 any time to look at this.

Hello Vince,

I think the next step at this point is for you to definitively find a
use case that does not work with the latest v4l-dvb tip and Robert's
patch, and include exactly what kernel you tested with and which board
is having the problem (including the PCI or USB ID).

At this point, your description seems a bit vague in terms of what is
working and what is not.  If you do the additional testing to narrow
down specifically the failure case you are experiencing, I will see
what I can do.

That said, I'm preparing a tree with Robert's patch since I am pretty
confident at least his particular problem is now addressed.

Thanks,

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] gspca pac7302/pac7311: separate the two subdrivers

2009-11-07 Thread Hans de Goede

Hi Németh,

I'm getting similar reports for other (non pac73xx) model webcams with
2.6.32 on eeepc's and other computers using the uhci usb driver.

Can you try installing an older kernel (so 2.6.30) and then building
and installing the latest v4l-dvb tree (with your changes in) over that ?

I think what you are seeing here is a bug outside of the v4l subsystem,
this is just a hunch though.

Regards,

Hans



On 11/04/2009 07:20 AM, Németh Márton wrote:

Dear Jef,

although I tested my patch on my development computer together with Labtec
Webcam 2200 (gspca_pac7302 driver) it seems that the patch may cause regression
on some computers. For example I tested the gspca_pac7302 driver from
http://linuxtv.org/hg/~jfrancois/gspca/ on top of Linux kernel 2.6.32-rc5 on
an EeePC 901. I get the following error message in dmesg:

[ 4476.992201] usb 3-2: new full speed USB device using uhci_hcd and address 11
[ 4477.230485] usb 3-2: New USB device found, idVendor=093a, idProduct=2626
[ 4477.230507] usb 3-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 4477.231139] usb 3-2: configuration #1 chosen from 1 choice
[ 4477.417456] Linux video capture interface: v2.00
[ 4477.437131] gspca: main v2.7.0 registered
[ 4477.443214] gspca: probing 093a:2626
[ 4477.453491] gspca: /dev/video0 created
[ 4477.453541] gspca: probing 093a:2626
[ 4477.453549] gspca: intf != 0
[ 4477.453598] gspca: probing 093a:2626
[ 4477.453605] gspca: intf != 0
[ 4477.453755] usbcore: registered new interface driver pac7302
[ 4477.453771] pac7302: registered
[ 4489.552153] gspca: set alt 8 err -71

I bisected the problem on EeePC 901 and the changeset 13373:99c23949b411
(gspca - pac7302/pac7311: Separate the two subdrivers.) was marked as the first 
bad
commit.

On my development computer the same configuration works correctly:

[ 7872.020222] usb 3-1: new full speed USB device using uhci_hcd and address 4
[ 7872.251240] usb 3-1: configuration #1 chosen from 1 choice
[ 7872.744755] Linux video capture interface: v2.00
[ 7872.785032] gspca: main v2.7.0 registered
[ 7872.797061] gspca: probing 093a:2626
[ 7872.807577] gspca: /dev/video0 created
[ 7872.809747] usbcore: registered new interface driver pac7302
[ 7872.809798] pac7302: registered

Is the separated driver working for you?
Do you have any idea what could went wrong? Maybe some timing problem?

Regards,

Márton Németh

Németh Márton wrote:

From: Márton Némethnm...@freemail.hu

All PAC7311 specific functions remain in pac7311.c. All PAC7302 specific
functions are moved to pac7302.c. The USB device table is also divided into
two parts. This makes it possible to remove the sensor specific decisions
from different functions and also remove sensor infromation from the USB
device table.

The common functions are just copied to both subdrivers. These common
functions can be separated later to a common file or helper module.

Signed-off-by: Márton Némethnm...@freemail.hu
Cc: Thomas Kaisertho...@kaiser-linux.li
Cc: Theodore Kilgorekilg...@auburn.edu
Cc: Kyle Guinnely...@gmail.com

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html