zr364xx: Aiptek DV8800 (neo): 08ca:2062: Fails on subsequent zr364xx_open()

2010-02-11 Thread thomas schorpp
Hi, 


Linux 2.6.30+32.x

Great there's a driver but seems to be untested/stub for this device:

usb 1-2: new high speed USB device using ehci_hcd and address 9
usb 1-2: New USB device found, idVendor=08ca, idProduct=2062
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: DV 8800
usb 1-2: Manufacturer: AIPTEK
usb 1-2: configuration #1 chosen from 1 choice
zr364xx probing...
zr364xx 1-2:1.0: Zoran 364xx compatible webcam plugged
zr364xx 1-2:1.0: model 08ca:2062 detected
usb 1-2: 320x240 mode selected
zr364xx dev: 88001eb62000, udev 88001e84c000 interface 88001ea35400
zr364xx num endpoints 3
zr364xx board init: 88001eb62000
zr364xx valloc 88001eb62028, idx 0, pdata c900039d9000
zr364xx zr364xx_start_readpipe: start pipe IN x81
zr364xx submitting URB 88001eafccc0
zr364xx : board initialized
usb 1-2: Zoran 364xx controlling video device 3
zr364xx zr364xx_open
zr364xx zr364xx_open: 0
Zoran 364xx: VIDIOC_QUERYCAP driver=Zoran 364xx, card=DV 8800, bus=1-2, 
version=0x0703, capabilities=0x0501
zr364xx zr364xx_release
zr364xx zr364xx_open
usb 1-2: Failed sending control message, error -110.
usb 1-2: error during open sequence: 6
zr364xx zr364xx_open: -110
usb 1-2: USB disconnect, address 9
zr364xx read_pipe_completion, err shutdown
zr364xx 1-2:1.0: Zoran 364xx webcam unplugged
zr364xx stop read pipe
zr364xx vfree c900039d9000

Same with mode=2 like the cam is configured (VGA+QVGA available in settings).

I'll sniff out the cmd sequences on an old win xp32 installation, no x64/vista/7 drivers found, 
or do You see the failure reason already?


Looks like the device does not like to be fed with the (full) init METHOD2 on 
every open()...
Since the VIDIOC_QUERYCAP worked it should not be the wrong METHOD.

y
tom

--
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] drivers/media/radio/si470x/radio-si470x-usb.c fix use after free

2010-02-11 Thread Darren Jenkins
In si470x_usb_driver_disconnect() radio-disconnect_lock is accessed
after it is freed. This fixes the problem.

Coverity CID: 2530

Signed-off-by: Darren Jenkins darrenrjenk...@gmail.com
---
 drivers/media/radio/si470x/radio-si470x-usb.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c 
b/drivers/media/radio/si470x/radio-si470x-usb.c
index a96e1b9..1588a9d 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -842,9 +842,11 @@ static void si470x_usb_driver_disconnect(struct 
usb_interface *intf)
kfree(radio-int_in_buffer);
video_unregister_device(radio-videodev);
kfree(radio-buffer);
+   mutex_unlock(radio-disconnect_lock);
kfree(radio);
+   } else {
+   mutex_unlock(radio-disconnect_lock);
}
-   mutex_unlock(radio-disconnect_lock);
 }
 
 
-- 
1.6.3.3



--
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: New Hauppauge HVR-2200 Revision?

2010-02-11 Thread Francis Barber

On 24/01/2010 3:26 PM, Francis Barber wrote:
Using a03ea24beafc from www.kernellabs.com/hg/saa7164-stable pretty 
well, thanks very much for working on this quickly!  As an aside, I'm 
interested as to why I should use the firmware from the older drivers.


The only problem with it now is that when I tune HD channels tzap 
consistently reports unc, for example:


status 1f | signal fefe | snr 00f6 | ber 000f | unc 006a | 
FE_HAS_LOCK
status 1f | signal fefe | snr 00f6 | ber 000e | unc 006a | 
FE_HAS_LOCK
status 1f | signal fefe | snr 00f6 | ber 0012 | unc 006a | 
FE_HAS_LOCK


I can't see any problems when watching the channels, however (ie, the 
picture looks fine).


Thanks again,
Frank.
--
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


Hello Steven,

I have been using my HVR-2200 for a few weeks now.  Apart from the unc 
anomaly noted above, there has been one other problem.  Twice, the 
following errors appeared in the log:


Feb  6 02:44:28 ent kernel: [1083565.117248] saa7164_api_i2c_read() 
error, ret(2) = 0x13
Feb  6 02:44:28 ent kernel: [1083565.117274] tda18271_read_regs: 
[2-0060|S] ERROR: i2c_transfer returned: -5


When this happened, I couldn't tune anything and I had to reload the dvb 
modules to get it working again.  I wonder if you have any idea what 
could be causing this?


I was also wondering if it might help to use the latest firmware?  I got 
the drivers from here 
http://www.hauppauge.com/site/support/support_hvr2250.html.  Looking at 
your extract script, it is trivial to get the saa7164 firmware but I've 
no idea how you calculated the offsets tda10048 firmware.  Would you 
have any pointers on this?


Anyway, apart from the problems noted above it is fine.  I'm not sure 
what the criteria is for merging support for this card into the main 
repository, but I would view it as worthy of merging even with these 
problems outstanding.


Many thanks,
Frank.
--
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


[no subject]

2010-02-11 Thread Giacomo
unsubscribe linux-media
--
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] Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant = sizeof conversion.

2010-02-11 Thread Martin Fuzzey
Regression was caused by my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0
which determined message size using sizeof rather than hardcoded constants.

Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte
message too so the sizeof was bogus in this case.

All other uses of sizeof checked and are ok.

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
CC: sta...@kernel.org

Signed-off-by: Martin Fuzzey mfuz...@gmail.com

---

 drivers/media/video/pwc/pwc-ctrl.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/pwc/pwc-ctrl.c 
b/drivers/media/video/pwc/pwc-ctrl.c
index 50b415e..f7f7e04 100644
--- a/drivers/media/video/pwc/pwc-ctrl.c
+++ b/drivers/media/video/pwc/pwc-ctrl.c
@@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int 
mode, int value)
buf[0] = 0xff; /* fixed */
 
ret = send_control_msg(pdev,
-   SET_LUM_CTL, SHUTTER_MODE_FORMATTER, buf, sizeof(buf));
+   SET_LUM_CTL, SHUTTER_MODE_FORMATTER, buf, 1);
 
if (!mode  ret = 0) {
if (value  0)

--
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: New Hauppauge HVR-2200 Revision?

2010-02-11 Thread Francis Barber

On 11/02/2010 8:23 PM, Francis Barber wrote:

On 24/01/2010 3:26 PM, Francis Barber wrote:
Using a03ea24beafc from www.kernellabs.com/hg/saa7164-stable pretty 
well, thanks very much for working on this quickly!  As an aside, I'm 
interested as to why I should use the firmware from the older drivers.


The only problem with it now is that when I tune HD channels tzap 
consistently reports unc, for example:


status 1f | signal fefe | snr 00f6 | ber 000f | unc 006a | 
FE_HAS_LOCK
status 1f | signal fefe | snr 00f6 | ber 000e | unc 006a | 
FE_HAS_LOCK
status 1f | signal fefe | snr 00f6 | ber 0012 | unc 006a | 
FE_HAS_LOCK


I can't see any problems when watching the channels, however (ie, the 
picture looks fine).


Thanks again,
Frank.
--
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


Hello Steven,

I have been using my HVR-2200 for a few weeks now.  Apart from the unc 
anomaly noted above, there has been one other problem.  Twice, the 
following errors appeared in the log:


Feb  6 02:44:28 ent kernel: [1083565.117248] saa7164_api_i2c_read() 
error, ret(2) = 0x13
Feb  6 02:44:28 ent kernel: [1083565.117274] tda18271_read_regs: 
[2-0060|S] ERROR: i2c_transfer returned: -5


When this happened, I couldn't tune anything and I had to reload the 
dvb modules to get it working again.  I wonder if you have any idea 
what could be causing this?


I was also wondering if it might help to use the latest firmware?  I 
got the drivers from here 
http://www.hauppauge.com/site/support/support_hvr2250.html.  Looking 
at your extract script, it is trivial to get the saa7164 firmware but 
I've no idea how you calculated the offsets tda10048 firmware.  Would 
you have any pointers on this?


Anyway, apart from the problems noted above it is fine.  I'm not sure 
what the criteria is for merging support for this card into the main 
repository, but I would view it as worthy of merging even with these 
problems outstanding.


Many thanks,
Frank.

Interestingly, so far it only seems to affect the second adapter.  The 
first one is still working.


Cheers,
Frank.

--
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


16APSK/32APSK

2010-02-11 Thread Abylai Ospan
Hello,

We have tested 16APSK/32APSK on STV0900A. Small experimental change set
created. 16APSK 2/3 (TS bit rate is 70Mbps) works fine:
http://udev.netup.ru/cgi-bin/hgwebdir.cgi/v4l-dvb-aospan-stv0900aac

Description added to linuxtv wiki:
http://linuxtv.org/wiki/index.php/STMicroelectronics_STV0900A_16APSK_32APSK

-- 
Abylai Ospan aos...@netup.ru
NetUP Inc.

--
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: [linux-dvb] Twinhan dtv 3030 mantis

2010-02-11 Thread Manu Abraham
On Mon, Feb 1, 2010 at 12:23 AM, Niklas Claesson
nicke.claes...@gmail.com wrote:
 Hi,
 I'm trying to use this tv-card with ubuntu 9.10. I've installed Manu's
 drivers from http://jusst.de/hg/mantis-v4l-dvb/ and did modprobe mantis
 which resulted in the following in /var/log/messages
 Jan 31 20:57:40 niklas-desktop kernel: [  179.000227] Mantis :05:02.0:
 PCI INT A - GSI 23 (level, low) - IRQ 23
 Jan 31 20:57:40 niklas-desktop kernel: [  179.001234] DVB: registering new
 adapter (Mantis DVB adapter)
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672664] *pde = bac3e067
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672676] Modules linked in:
 mantis(+) mantis_core ir_common ir_core tda665x lnbp21 mb86a16 stb6100
 tda10021 tda10023 zl10353 stb0899 stv0299 dvb_core joydev hidp binfmt_misc
 ppdev bridge stp bnep arc4 ecb snd_hda_codec_analog rtl8187 mac80211
 led_class eeprom_93cx6 snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss
 snd_mixer_oss snd_pcm usblp snd_seq_dummy iptable_filter ip_tables x_tables
 btusb cfg80211 asus_atk0110 lirc_imon lirc_dev lp parport snd_seq_oss
 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device
 snd soundcore snd_page_alloc nvidia(P) usbhid skge ohci1394 ieee1394 sky2
 intel_agp agpgart
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672743]
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672748] Pid: 2768, comm:
 modprobe Tainted: P           (2.6.31-17-generic #54-Ubuntu) System Product
 Name
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672752] EIP: 0060:[f8517480]
 EFLAGS: 00010292 CPU: 1
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672761] EIP is at
 dvb_unregister_frontend+0x10/0xe0 [dvb_core]
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672764] EAX:  EBX:
 f398f800 ECX: f6a51cc0 EDX: 
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672767] ESI:  EDI:
 f398f9fc EBP: f4983dec ESP: f4983dc8
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672771]  DS: 007b ES: 007b FS:
 00d8 GS: 00e0 SS: 0068
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672779]  f4983dec f851c07e
 f398f800  f398f9fc f4983dec f398f800 f398f800
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672797] 0  f4983e2c
 f85955d5 f70fc858 f8599b50 f398f800  f398fc70
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672804] 0 f398f848 f398fc64
 f398fc58 f85a9500 f398fbfc f398f9ac f398f800 
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672820]  [f851c07e] ?
 dvb_net_release+0x1e/0xb0 [dvb_core]
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672827]  [f85955d5] ?
 mantis_dvb_init+0x398/0x3de [mantis_core]
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672833]  [f85a6606] ?
 mantis_pci_probe+0x1d7/0x2f8 [mantis]
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672839]  [c03285ae] ?
 local_pci_probe+0xe/0x10
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672843]  [c0329330] ?
 pci_device_probe+0x60/0x80
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672848]  [c03a2e30] ?
 really_probe+0x50/0x140
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672852]  [c0570cea] ?
 _spin_lock_irqsave+0x2a/0x40
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672855]  [c03a2f39] ?
 driver_probe_device+0x19/0x20
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672859]  [c03a2fb9] ?
 __driver_attach+0x79/0x80
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672862]  [c03a2488] ?
 bus_for_each_dev+0x48/0x70
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672866]  [c03a2cf9] ?
 driver_attach+0x19/0x20
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672869]  [c03a2f40] ?
 __driver_attach+0x0/0x80
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672872]  [c03a26df] ?
 bus_add_driver+0xbf/0x2a0
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672876]  [c0329270] ?
 pci_device_remove+0x0/0x40
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672879]  [c03a3245] ?
 driver_register+0x65/0x120
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672883]  [c0329550] ?
 __pci_register_driver+0x40/0xb0
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672887]  [f85a642d] ?
 mantis_init+0x17/0x19 [mantis]
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672890]  [c010112c] ?
 do_one_initcall+0x2c/0x190
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672894]  [f85a6416] ?
 mantis_init+0x0/0x19 [mantis]
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672899]  [c0173711] ?
 sys_init_module+0xb1/0x1f0
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672903]  [c01e83ed] ?
 sys_write+0x3d/0x70
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672906]  [c010336c] ?
 syscall_call+0x7/0xb
 Jan 31 20:57:41 niklas-desktop kernel: [  179.672961] ---[ end trace
 035b3cc151b9cf1a ]---
 I can't even get the drivers from http://jusst.de/hg/mantis/ to compile:
 Kernel build directory is /lib/modules/2.6.31-17-generic/build
 make -C /lib/modules/2.6.31-17-generic/build
 SUBDIRS=/home/niklas/Hämtningar/mantis-5292a47772ad/v4l  modules
 make[2]: Entering directory `/usr/src/linux-headers-2.6.31-17-generic'
   CC [M]  

Re: [linux-dvb] Twinhan dtv 3030 mantis

2010-02-11 Thread Manu Abraham
On Thu, Feb 4, 2010 at 12:40 AM, listor li...@orresta.no-ip.com wrote:
 Hi,

 Starting with 2.6.33 the mantis driver is included in mainline kernel.
 I have a pre5 installation that works great. I run *buntu 9.10 as well but
 when I saw that the kernel had mantis support I compiled my own. Just
 remember to add mantis as a kernel module, it's not on by default.

 Jakob Sundberg

Please try again from http://jusst.de/hg/mantis-v4l-dvb whether the
issue is sorted out.

Regards,
Manu
--
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: zr364xx: Aiptek DV8800 (neo): 08ca:2062: Fails on subsequent zr364xx_open()

2010-02-11 Thread Antoine Jacquet

Hi Thomas,

Looks like the device does not like to be fed with the (full) init 
METHOD2 on every open()...

Since the VIDIOC_QUERYCAP worked it should not be the wrong METHOD.


Someone reported similar behavior recently, and was apparently able to 
fix the issue by adding more delay between open/close sequences.


Could you try the attached patch to see if it solves the issue?

If not, we can also try to add some mdelay() after each usb_control_msg().

Regards,

Antoine

--
Antoine Royale Jacquet
http://royale.zerezo.com
diff -r 77e731753c15 linux/drivers/media/video/zr364xx.c
--- a/linux/drivers/media/video/zr364xx.c	Thu Feb 11 12:02:16 2010 -0200
+++ b/linux/drivers/media/video/zr364xx.c	Thu Feb 11 16:01:44 2010 +0100
@@ -1005,7 +1005,7 @@
 	/* Added some delay here, since opening/closing the camera quickly,
 	 * like Ekiga does during its startup, can crash the webcam
 	 */
-	mdelay(100);
+	mdelay(200);
 	cam-skip = 2;
 	ret = 0;
 
@@ -1310,7 +1310,7 @@
 	/* Added some delay here, since opening/closing the camera quickly,
 	 * like Ekiga does during its startup, can crash the webcam
 	 */
-	mdelay(100);
+	mdelay(200);
 	err = 0;
 
 out:
@@ -1396,7 +1396,7 @@
 	/* Added some delay here, since opening/closing the camera quickly,
 	 * like Ekiga does during its startup, can crash the webcam
 	 */
-	mdelay(100);
+	mdelay(200);
 	err = 0;
 
 out:


Pull http://jusst.de/hg/mantis-v4l-dvb

2010-02-11 Thread Manu Abraham
Mauro,

Please pull the following changes:

changeset 14168
http://jusst.de/hg/mantis-v4l-dvb/rev/9804df36159c
mantis, hopper: do not unregister modules twice

changeset 14167
http://jusst.de/hg/mantis-v4l-dvb/rev/6f3e1db2432a
Mantis, hopper: use MODULE_DEVICE_TABLE

changeset 14166
http://jusst.de/hg/mantis-v4l-dvb/rev/c2391fa88112
Mantis: Remote Control for Mantis

changeset 13880
http://jusst.de/hg/mantis-v4l-dvb/rev/864d3c4d8312
[Mantis] Add support for another revision of the Terratec Cinergy C PCI HD

Regards,
Manu
--
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] mfd: Add support for the timberdale FPGA.

2010-02-11 Thread Mauro Carvalho Chehab
Samuel Ortiz wrote:

 Now when the radio driver made it into the media tree, can I post an
 updated MFD which defines these drivers too?
 Is a complete MFD patch preferred, or just an incremental against the
 last one?
 Since the mfd driver is currently merged into Mauro's tree, you should make
 incremental patches against it. At least that's how I'd take it in my tree.
 Mauro, do you agree ?

Yes.

Richard, just send me an incremental patch against my -git tree.

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: [Patch/Resend] Kworld 315U remote support

2010-02-11 Thread Franklin Meng
Mauro Carvalho Chehab wrote:
 
 Well, it is not a resend, since changes were made ;)

Yup I guess that is true..  It also looks like I forgot to include the patch to 
actually enable the remote for the Kworld 315U device.

I should have some time tonight to get that one line change sent out.  

Thanks,
Franklin Meng



  
--
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] tm6000: bugfix firmware xc3028L-v36.fw used with Zarlink and DTV78 or DTV8 no shift

2010-02-11 Thread stefan . ringel
From: Stefan Ringel stefan.rin...@arcor.de

Signed-off-by: Stefan Ringel stefan.rin...@arcor.de
---
 drivers/media/common/tuners/tuner-xc2028.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/media/common/tuners/tuner-xc2028.c 
b/drivers/media/common/tuners/tuner-xc2028.c
index ed50168..e051caa 100644
--- a/drivers/media/common/tuners/tuner-xc2028.c
+++ b/drivers/media/common/tuners/tuner-xc2028.c
@@ -1114,7 +1114,12 @@ static int xc2028_set_params(struct dvb_frontend *fe,
 
/* All S-code tables need a 200kHz shift */
if (priv-ctrl.demod) {
-   demod = priv-ctrl.demod + 200;
+   if ((priv-firm_version == 0x0306)  
+   (priv-ctrl.demod == XC3028_FE_ZARLINK456) 
+   ((type  DTV78) || (type  DTV8)))
+   demod = priv-ctrl.demod;
+   else
+   demod = priv-ctrl.demod + 200;
/*
 * The DTV7 S-code table needs a 700 kHz shift.
 * Thanks to Terry Wu terrywu2...@gmail.com for reporting this
-- 
1.6.6.1

--
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: [linux-dvb] linuxtv.org server move Wed, 10 Feb 2pm CET

2010-02-11 Thread Johannes Stezenbach
On Wed, Feb 10, 2010 at 06:29:37PM +0100, Johannes Stezenbach wrote:
 On Mon, Feb 08, 2010 at 11:51:14PM +0100, Johannes Stezenbach wrote:
  
  the linuxtv.org server is going to be moved to a new location
  on Wednesday, around 2pm CET (UTC+1:00).
 
 As you might have noticed, that point in time came and went
 and nothing happened.
 
 Next try tomorrow, around the same time.

The move is complete, the new IP address is 130.149.80.248.
Please report if something doesn't work.

(Note that you can't access git.linuxtv.org via the IP address
because it is a named virtual server.  You can add it to
/etc/hosts if you don't want to wait until DNS updates
have propagated.)


Johannes
--
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] tm6000: add i2c bus id for tm6000

2010-02-11 Thread stefan . ringel
From: Stefan Ringel stefan.rin...@arcor.de

Signed-off-by: Stefan Ringel stefan.rin...@arcor.de
---
 drivers/staging/tm6000/tm6000-i2c.c |2 --
 include/linux/i2c-id.h  |1 +
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-i2c.c 
b/drivers/staging/tm6000/tm6000-i2c.c
index 05df06b..6b17d0b 100644
--- a/drivers/staging/tm6000/tm6000-i2c.c
+++ b/drivers/staging/tm6000/tm6000-i2c.c
@@ -32,8 +32,6 @@
 #include tuner-xc2028.h
 
 
-/*FIXME: Hack to avoid needing to patch i2c-id.h */
-#define I2C_HW_B_TM6000 I2C_HW_B_EM28XX
 /* --- */
 
 static unsigned int i2c_debug = 0;
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index e844a0b..09e3a4e 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -42,6 +42,7 @@
 #define I2C_HW_B_AU08280x010023 /* auvitek au0828 usb bridge */
 #define I2C_HW_B_CX231XX   0x010024 /* Conexant CX231XX USB based cards */
 #define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */
+#define I2C_HW_B_TM60000x010026 /* TM5600/TM6000/TM6010 media 
bridge */
 
 /* --- SGI adapters*/
 #define I2C_HW_SGI_VINO0x16
-- 
1.6.6.1

--
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: DTV2000 H Plus issues

2010-02-11 Thread istva...@mailbox.hu
Update: the following patch, which should be applied after the previous
ones, makes a few additional changes to the XC4000 driver:
  - adds support for DTV7
  - implements power management
  - adds a mutex and locking for tuner operations
  - some unused or unneeded code has been removed

On 02/09/2010 06:35 PM, istva...@mailbox.hu wrote:

 There are two separate patches for v4l-dvb revision 28f5eca12bb0: the
 first one adds the XC4000 driver, while the second one adds support for
 the Leadtek WinFast DTV2000H Plus card in the CX88 driver.
 
 http://www.sharemation.com/IstvanV/v4l/xc4000-28f5eca12bb0.patch
 http://www.sharemation.com/IstvanV/v4l/cx88-dtv2000h+-28f5eca12bb0.patch
 
 These new firmware files are more complete than the previous ones, but
 are not compatible with the original driver. Both version 1.2 and 1.4
 are available:
 
 http://www.sharemation.com/IstvanV/v4l/xc4000-1.2.fw
 http://www.sharemation.com/IstvanV/v4l/xc4000-1.4.fw
 
 The following simple utility was used for creating the firmware files.
 
 http://www.sharemation.com/IstvanV/v4l/xc4000fw.c
diff -r -d -N -U4 v4l-dvb-28f5eca12bb0.old/linux/drivers/media/common/tuners/xc4000.c v4l-dvb-28f5eca12bb0/linux/drivers/media/common/tuners/xc4000.c
--- v4l-dvb-28f5eca12bb0.old/linux/drivers/media/common/tuners/xc4000.c	2010-02-11 20:08:39.0 +0100
+++ v4l-dvb-28f5eca12bb0/linux/drivers/media/common/tuners/xc4000.c	2010-02-11 20:05:01.0 +0100
@@ -27,8 +27,9 @@
 #include linux/videodev2.h
 #include linux/delay.h
 #include linux/dvb/frontend.h
 #include linux/i2c.h
+#include linux/mutex.h
 #include asm/unaligned.h
 
 #include dvb_frontend.h
 
@@ -61,9 +62,9 @@
 	The valid values are a sum of:\n
 	 1: use NICAM/B and A2/B instead of NICAM/A and A2/A\n
 	 2: use A2 instead of NICAM or BTSC\n
 	 4: use SECAM/K3 instead of K1\n
-	 8: force SECAM-L audio\n
+	 8: use PAL-D/K audio for SECAM-D/K\n
 	16: use FM radio input 1 instead of input 2\n
 	32: use mono audio (the lower three bits are ignored)\n);
 
 #define XC4000_DEFAULT_FIRMWARE xc4000.fw
@@ -108,18 +109,20 @@
 	u32	bandwidth;
 	u8	video_standard;
 	u8	rf_mode;
 	u8	card_type;
+	u8	ignore_i2c_write_errors;
  /*	struct xc2028_ctrl	ctrl; */
 	struct firmware_properties cur_fw;
 	__u16	hwmodel;
 	__u16	hwvers;
-	u8	ignore_i2c_write_errors;
+	struct mutex	lock;
 };
 
 /* Misc Defines */
 #define MAX_TV_STANDARD			24
 #define XC_MAX_I2C_WRITE_LENGTH		64
+#define XC_POWERED_DOWN			0x8000U
 
 /* Signal Types */
 #define XC_RF_MODE_AIR			0
 #define XC_RF_MODE_CABLE		1
@@ -240,9 +243,9 @@
 	{D/K-PAL-MONO,	0x0078, 0x8049, 6500},
 	{D/K-SECAM-A2 DK1,	0x, 0x8049, 6340},
 	{D/K-SECAM-A2 L/DK3,	0x, 0x8049, 6000},
 	{D/K-SECAM-A2 MONO,	0x0078, 0x8049, 6500},
-	{D/K-SECAM-NICAM,	0x8080, 0x8049, 6200},
+	{D/K-SECAM-NICAM,	0x0080, 0x8049, 6200},
 	{L-SECAM-NICAM,	0x8080, 0x0009, 6200},
 	{L'-SECAM-NICAM,	0x8080, 0x4009, 6200},
 	{DTV6,		0x00C0, 0x8002,0},
 	{DTV8,		0x00C0, 0x800B,0},
@@ -251,11 +254,8 @@
 	{FM Radio-INPUT2,	0x0008, 0x9800,10700},
 	{FM Radio-INPUT1,	0x0008, 0x9000,10700}
 };
 
-#if 0
-static int xc4000_is_firmware_loaded(struct dvb_frontend *fe);
-#endif
 static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val);
 static int xc4000_TunerReset(struct dvb_frontend *fe);
 
 static int xc_send_i2c_data(struct xc4000_priv *priv, u8 *buf, int len)
@@ -275,25 +275,8 @@
 	}
 	return XC_RESULT_SUCCESS;
 }
 
-/* This routine is never used because the only time we read data from the
-   i2c bus is when we read registers, and we want that to be an atomic i2c
-   transaction in case we are on a multi-master bus */
-#if 0
-static int xc_read_i2c_data(struct xc4000_priv *priv, u8 *buf, int len)
-{
-	struct i2c_msg msg = { .addr = priv-i2c_props.addr,
-		.flags = I2C_M_RD, .buf = buf, .len = len };
-
-	if (i2c_transfer(priv-i2c_props.adap, msg, 1) != 1) {
-		printk(KERN_ERR xc4000 I2C read failed (len=%i)\n, len);
-		return -EREMOTEIO;
-	}
-	return 0;
-}
-#endif
-
 static void xc_wait(int wait_ms)
 {
 	msleep(wait_ms);
 }
@@ -444,17 +427,8 @@
 	   only be used for fast scanning for channel lock) */
 	return xc_write_reg(priv, XREG_RF_FREQ, freq_code); /* WAS: XREG_FINERFREQ */
 }
 
-#if 0
-/* We'll probably need these for analog support */
-static int xc_set_Xtal_frequency(struct xc4000_priv *priv, u32 xtalFreqInKHz)
-{
-	u16 xtalRatio = (32000 * 0x8000)/xtalFreqInKHz;
-	return xc_write_reg(priv, XREG_XTALFREQ, xtalRatio);
-}
-#endif
-
 static int xc_get_ADC_Envelope(struct xc4000_priv *priv, u16 *adc_envelope)
 {
 	return xc4000_readreg(priv, XREG_ADC_ENV, adc_envelope);
 }
@@ -1134,8 +1108,11 @@
 	u16	quality;
 	u8	hw_majorversion = 0, hw_minorversion = 0;
 	u8	fw_majorversion = 0, fw_minorversion = 0;
 
+	if (!(priv-cur_fw.type  BASE))
+		return;
+
 	/* Wait for stats to stabilize.
 	 * Frame Lines needs two frame times after initial lock
 	 * before it is valid.
 	 */
@@ -1174,12 +1151,14 @@
 	struct dvb_frontend_parameters *params)
 {
 	struct 

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

2010-02-11 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:Thu Feb 11 19:01:22 CET 2010
path:http://www.linuxtv.org/hg/v4l-dvb
changeset:   14197:095b1aec2354
gcc version: i686-linux-gcc (GCC) 4.4.3
host hardware:x86_64
host os: 2.6.32.5

linux-2.6.32.6-armv5: OK
linux-2.6.33-rc5-armv5: OK
linux-2.6.32.6-armv5-davinci: ERRORS
linux-2.6.33-rc5-armv5-davinci: ERRORS
linux-2.6.32.6-armv5-dm365: ERRORS
linux-2.6.33-rc5-armv5-dm365: ERRORS
linux-2.6.32.6-armv5-ixp: OK
linux-2.6.33-rc5-armv5-ixp: OK
linux-2.6.32.6-armv5-omap2: OK
linux-2.6.33-rc5-armv5-omap2: OK
linux-2.6.22.19-i686: ERRORS
linux-2.6.23.17-i686: ERRORS
linux-2.6.24.7-i686: ERRORS
linux-2.6.25.20-i686: ERRORS
linux-2.6.26.8-i686: ERRORS
linux-2.6.27.44-i686: ERRORS
linux-2.6.28.10-i686: ERRORS
linux-2.6.29.1-i686: ERRORS
linux-2.6.30.10-i686: ERRORS
linux-2.6.31.12-i686: WARNINGS
linux-2.6.32.6-i686: OK
linux-2.6.33-rc5-i686: OK
linux-2.6.32.6-m32r: OK
linux-2.6.33-rc5-m32r: OK
linux-2.6.32.6-mips: OK
linux-2.6.33-rc5-mips: OK
linux-2.6.32.6-powerpc64: OK
linux-2.6.33-rc5-powerpc64: OK
linux-2.6.22.19-x86_64: ERRORS
linux-2.6.23.17-x86_64: ERRORS
linux-2.6.24.7-x86_64: ERRORS
linux-2.6.25.20-x86_64: ERRORS
linux-2.6.26.8-x86_64: ERRORS
linux-2.6.27.44-x86_64: ERRORS
linux-2.6.28.10-x86_64: ERRORS
linux-2.6.29.1-x86_64: ERRORS
linux-2.6.30.10-x86_64: ERRORS
linux-2.6.31.12-x86_64: WARNINGS
linux-2.6.32.6-x86_64: OK
linux-2.6.33-rc5-x86_64: OK
spec: OK
sparse (v4l-dvb-git): ERRORS
sparse (linux-2.6.33-rc5): ERRORS
linux-2.6.16.62-i686: ERRORS
linux-2.6.17.14-i686: ERRORS
linux-2.6.18.8-i686: ERRORS
linux-2.6.19.7-i686: ERRORS
linux-2.6.20.21-i686: ERRORS
linux-2.6.21.7-i686: ERRORS
linux-2.6.16.62-x86_64: ERRORS
linux-2.6.17.14-x86_64: ERRORS
linux-2.6.18.8-x86_64: ERRORS
linux-2.6.19.7-x86_64: ERRORS
linux-2.6.20.21-x86_64: ERRORS
linux-2.6.21.7-x86_64: ERRORS

Detailed results are available here:

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

Full logs are available here:

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

The V4L-DVB specification from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
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: DTV2000 H Plus issues

2010-02-11 Thread Devin Heitmueller
Hi Istanv,

On Thu, Feb 11, 2010 at 2:16 PM, istva...@mailbox.hu
istva...@mailbox.hu wrote:
 Update: the following patch, which should be applied after the previous
 ones, makes a few additional changes to the XC4000 driver:
  - adds support for DTV7
  - implements power management
  - adds a mutex and locking for tuner operations
  - some unused or unneeded code has been removed

Is the DTV7 support actually tested?  Or are you just blindly adding
the code in the hope that it works?  I'm just asking because the last
time I spoke to you, you actually didn't have access to a DVB-T signal
source.

Also, I'm not sure I'm comfortable with the way the mutex is
implemented here.  Is this logic copied from some other driver (and if
so, which one), or did you come up with it yourself?

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: Pull http://jusst.de/hg/mantis-v4l-dvb

2010-02-11 Thread Mauro Carvalho Chehab
Manu Abraham wrote:

 changeset 14166
 http://jusst.de/hg/mantis-v4l-dvb/rev/c2391fa88112
 Mantis: Remote Control for Mantis

+   ir_input_init(rc_dev, rc_state, IR_TYPE_OTHER);

...

+struct ir_scancode_table ir_codes_mantis_vp2040_table = {
+   .scan = ir_codes_mantis_vp2040,
+   .size = ARRAY_SIZE(ir_codes_mantis_vp2040),
+};
+EXPORT_SYMBOL_GPL(ir_codes_mantis_vp2040_table);

The non-declaration of the IR protocol and the definition of
incomplete IR codes is deprecated. Please, create a table with
the IR protocol type and add the IR address to each IR scancode
at the ir codes tables.

Please look at em28xx-input to see how to implement it right.
The change is minimal: 
- at the driver, you'll need to make sure that you're 
  using the full IR scan code, instead of just the 8 bits for IR cmd;

- at the table: you need to use IR address+command scan code,
  and declare the protocol associated with the table;

- at the driver: instead of using IR_TYPE_OTHER, just pass the
value that comes from the IR table.

A correct implementation allows the replacement of the IR by
universal ones, at userspace, the key re-definition and, if
the driver supports more protocol, the protocol changes,
all provided by the new IR input class.

I think I need to add add a macro to export the IR table, replacing
all *_table definitions, in order to avoid patches submitted with
the legacy way (and to remove a false-positive on checkpatch.pl).

Also there are some coding style troubles here, including bad
whitespaces. By running make whitespace, you'll be clearing most
of the warnings. 



-- 

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: Pull http://jusst.de/hg/mantis-v4l-dvb

2010-02-11 Thread Manu Abraham
On Thu, Feb 11, 2010 at 11:44 PM, Mauro Carvalho Chehab
mche...@infradead.org wrote:
 Manu Abraham wrote:

 changeset 14166
 http://jusst.de/hg/mantis-v4l-dvb/rev/c2391fa88112
 Mantis: Remote Control for Mantis

 +       ir_input_init(rc_dev, rc_state, IR_TYPE_OTHER);

 ...

 +struct ir_scancode_table ir_codes_mantis_vp2040_table = {
 +       .scan = ir_codes_mantis_vp2040,
 +       .size = ARRAY_SIZE(ir_codes_mantis_vp2040),
 +};
 +EXPORT_SYMBOL_GPL(ir_codes_mantis_vp2040_table);

 The non-declaration of the IR protocol and the definition of
 incomplete IR codes is deprecated. Please, create a table with
 the IR protocol type and add the IR address to each IR scancode
 at the ir codes tables.

 Please look at em28xx-input to see how to implement it right.
 The change is minimal:
 - at the driver, you'll need to make sure that you're
  using the full IR scan code, instead of just the 8 bits for IR cmd;

 - at the table: you need to use IR address+command scan code,
  and declare the protocol associated with the table;


Huh ? em28xx uses a I2C based implementation for the IR.
There's no address associated with the IR stuff on the mantis, which
is on something say like COM 0/1, which is more similar, rather than
an I2C device or a polling based device.

 Also the protocol is not something that can be seen externally,  It
is all internal to the firmware on the micro. The micro auto detect's
the relevant protocol. ie, what it outputs is all data, no messages.


I don't follow what you tend to imply ..


 - at the driver: instead of using IR_TYPE_OTHER, just pass the
 value that comes from the IR table.

 A correct implementation allows the replacement of the IR by
 universal ones, at userspace, the key re-definition and, if
 the driver supports more protocol, the protocol changes,
 all provided by the new IR input class.



Ah, i now understand what you are trying to say.. Unfortunately you
can't do a protocol conversion or anything likewise on the Mantis IR
device. It is all in hardware and the protocol type is all auto
detected. All what you can change is the UART settings such as BPS,
Parity and STOP bit. There's nothing the user can do to change
anything in there.

To put it short: whatever remote you use, if it is a supported remote
by the firmware, it will output the relevant keycode directly, not
messages such that the message needs to be decoded further.


 I think I need to add add a macro to export the IR table, replacing
 all *_table definitions, in order to avoid patches submitted with
 the legacy way (and to remove a false-positive on checkpatch.pl).

 Also there are some coding style troubles here, including bad
 whitespaces. By running make whitespace, you'll be clearing most
 of the warnings.


Ok, I will take a look, tomorrow evening.

Regards,
Manu
--
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]Add support for SMT7020 to cx88

2010-02-11 Thread Helmut Auer
From: Helmut Auer hel...@helmutauer.de

This patch (originally written by Dirk Herrendoerfer) adds support for the 
built-in dvb device
of a Samsung SMT7020s (x86 based STB) to the cx88 family.
(see http://www.linuxtv.org/pipermail/linux-dvb/2007-January/015208.html)

Signed-off-by: Helmut Auer hel...@helmutauer.de

-- 
Helmut Auer, hel...@helmutauer.de
diff -r 095b1aec2354 linux/drivers/media/video/cx88/cx88-cards.c
--- a/linux/drivers/media/video/cx88/cx88-cards.c   Thu Feb 11 15:43:41 
2010 -0200
+++ b/linux/drivers/media/video/cx88/cx88-cards.c   Thu Feb 11 22:01:13 
2010 +0100
@@ -1499,6 +1499,18 @@
.audioroute = 8,
},
},
+   [CX88_BOARD_SAMSUNG_SMT_7020] = {
+   .name   = Samsung SMT 7020 DVB-S,
+   .tuner_type = TUNER_ABSENT,
+   .radio_type = UNSET,
+   .tuner_addr = ADDR_UNSET,
+   .radio_addr = ADDR_UNSET,
+   .input  = { {
+   .type   = CX88_VMUX_DVB,
+   .vmux   = 0,
+   } },
+   .mpeg   = CX88_MPEG_DVB,
+   },
[CX88_BOARD_ADSTECH_PTV_390] = {
.name   = ADS Tech Instant Video PCI,
.tuner_type = TUNER_ABSENT,
@@ -2388,6 +2400,14 @@
.subvendor = 0x0070,
.subdevice = 0x1404,
.card  = CX88_BOARD_HAUPPAUGE_HVR3000,
+   }, {
+   .subvendor = 0x18ac,
+   .subdevice = 0xdc00,
+   .card  = CX88_BOARD_SAMSUNG_SMT_7020,
+   }, {
+   .subvendor = 0x18ac,
+   .subdevice = 0xdccd,
+   .card  = CX88_BOARD_SAMSUNG_SMT_7020,
},{
.subvendor = 0x1461,
.subdevice = 0xc111, /* AverMedia M150-D */
@@ -2666,6 +2686,9 @@
case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
/* known */
break;
+   case CX88_BOARD_SAMSUNG_SMT_7020:
+   cx_set(MO_GP0_IO, 0x008989FF);
+   break;
default:
warn_printk(core, warning: unknown hauppauge model #%d\n,
tv.model);
diff -r 095b1aec2354 linux/drivers/media/video/cx88/cx88-dvb.c
--- a/linux/drivers/media/video/cx88/cx88-dvb.c Thu Feb 11 15:43:41 2010 -0200
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c Thu Feb 11 22:01:13 2010 +0100
@@ -681,6 +681,194 @@
return 0;
 }
 
+
+
+static u8 samsung_smt_7020_inittab[] = {
+0x01, 0x15,
+0x02, 0x00,
+0x03, 0x00,
+0x04, 0x7D,
+0x05, 0x0F,
+0x06, 0x02,
+0x07, 0x00,
+0x08, 0x60,
+
+0x0A, 0xC2,
+0x0B, 0x00,
+0x0C, 0x01,
+0x0D, 0x81,
+0x0E, 0x44,
+0x0F, 0x09,
+0x10, 0x3C,
+0x11, 0x84,
+0x12, 0xDA,
+0x13, 0x99,
+0x14, 0x8D,
+0x15, 0xCE,
+0x16, 0xE8,
+0x17, 0x43,
+0x18, 0x1C,
+0x19, 0x1B,
+0x1A, 0x1D,
+
+0x1C, 0x12,
+0x1D, 0x00,
+0x1E, 0x00,
+0x1F, 0x00,
+0x20, 0x00,
+0x21, 0x00,
+0x22, 0x00,
+0x23, 0x00,
+
+0x28, 0x02,
+0x29, 0x28,
+0x2A, 0x14,
+0x2B, 0x0F,
+0x2C, 0x09,
+0x2D, 0x05,
+
+0x31, 0x1F,
+0x32, 0x19,
+0x33, 0xFC,
+0x34, 0x13,
+0xff, 0xff,
+};
+
+
+static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe,
+   struct dvb_frontend_parameters *params)
+{
+   struct cx8802_dev *dev = fe-dvb-priv;
+   u8 buf[4];
+   u32 div;
+   struct i2c_msg msg = {
+   .addr = 0x61,
+   .flags = 0,
+   .buf = buf,
+   .len = sizeof(buf) };
+
+   div = params-frequency / 125;
+
+   buf[0] = (div  8)  0x7f;
+   buf[1] = div  0xff;
+   buf[2] = 0x84;  /* 0xC4 */
+   buf[3] = 0x00;
+
+   if (params-frequency  150)
+   buf[3] |= 0x10;
+
+   if (fe-ops.i2c_gate_ctrl)
+   fe-ops.i2c_gate_ctrl(fe, 1);
+
+   if (i2c_transfer(dev-core-i2c_adap, msg, 1) != 1)
+   return -EIO;
+
+   return 0;
+}
+
+static int samsung_smt_7020_set_tone(struct dvb_frontend *fe,
+   fe_sec_tone_mode_t tone)
+{
+   struct cx8802_dev *dev = fe-dvb-priv;
+   struct cx88_core *core = dev-core;
+
+   cx_set(MO_GP0_IO, 0x0800);
+
+   switch (tone) {
+   case SEC_TONE_ON:
+   cx_set(MO_GP0_IO, 0x08);
+   break;
+   case SEC_TONE_OFF:
+   cx_clear(MO_GP0_IO, 0x08);
+   break;
+   default:
+   return -EINVAL;
+   }
+
+   

Re: Fwd: Re: FM radio problem with HVR1120

2010-02-11 Thread ftape-jlc
Hi,

Thank you for the information.
I didn't tried regspy.exe yet.

Perhaps part of dmesg output for hvr1120 could help someone :

[  27.785329] Linux video capture interface: v2.00
[   27.999680] saa7130/34: v4l2 driver version 0.2.15 loaded
[   27.999767] saa7134 :05:00.0: PCI INT A - GSI 16 (level, low) - IRQ 
16
[   27.999774] saa7133[0]: found at :05:00.0, rev: 209, irq: 16, latency: 
64, mmio: 0xfebff800
[   27.999780] saa7133[0]: subsystem: 0070:6707, board: Hauppauge WinTV-
HVR1120 DVB-T/Hybrid [card=156,autodetected]
[   27.999812] saa7133[0]: board init: gpio is 4
[   28.013025] IRQ 16/saa7133[0]: IRQF_DISABLED is not guaranteed on shared 
IRQs
[   28.154016] saa7133[0]: i2c eeprom 00: 70 00 07 67 54 20 1c 00 43 43 a9 1c 
55 d2 b2 92
[   28.154029] saa7133[0]: i2c eeprom 10: ff ff ff 0e ff 20 ff ff ff ff ff ff 
ff ff ff ff
[   28.154039] saa7133[0]: i2c eeprom 20: 01 40 01 32 32 01 01 33 88 ff 00 b0 
ff ff ff ff
[   28.154050] saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff
[   28.154061] saa7133[0]: i2c eeprom 40: ff 35 00 c0 96 10 06 32 97 04 00 20 
00 ff ff ff
[   28.154071] saa7133[0]: i2c eeprom 50: ff 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00
[   28.154082] saa7133[0]: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00
[   28.154092] saa7133[0]: i2c eeprom 70: 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00
[   28.154102] saa7133[0]: i2c eeprom 80: 84 09 00 04 20 77 00 40 cf f6 61 f0 
73 05 29 00
[   28.154113] saa7133[0]: i2c eeprom 90: 84 08 00 06 89 06 01 00 95 29 8d 72 
07 70 73 09
[   28.154123] saa7133[0]: i2c eeprom a0: 23 5f 73 0a f4 9b 72 0b 2f 72 0e 01 
72 0f 45 72
[   28.154134] saa7133[0]: i2c eeprom b0: 10 01 72 11 ff 73 13 a2 69 79 7f 00 
00 00 00 00
[   28.154144] saa7133[0]: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00
[   28.154154] saa7133[0]: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00
[   28.154165] saa7133[0]: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00
[   28.154175] saa7133[0]: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00
[   28.154186] i2c-adapter i2c-1: Invalid 7-bit address 0x7a
[   28.154678] tveeprom 1-0050: Hauppauge model 67209, rev C2F5, serial# 
6420175
[   28.154681] tveeprom 1-0050: MAC address is 00-0D-FE-61-F6-CF
[   28.154683] tveeprom 1-0050: tuner model is NXP 18271C2 (idx 155, type 54)
[   28.154686] tveeprom 1-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') 
PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)
[   28.154689] tveeprom 1-0050: audio processor is SAA7131 (idx 41)
[   28.154691] tveeprom 1-0050: decoder processor is SAA7131 (idx 35)
[   28.154693] tveeprom 1-0050: has radio, has IR receiver, has no IR 
transmitter
[   28.154695] saa7133[0]: hauppauge eeprom: model=67209
[   28.286091] tuner 1-004b: chip found @ 0x96 (saa7133[0])
[   28.327017] tda829x 1-004b: setting tuner address to 60
[   28.372183] tda18271 1-0060: creating new instance
[   28.402207] TDA18271HD/C2 detected @ 1-0060
[   28.621253] ieee1394: Host added: ID:BUS[0-00:1023]  GUID[001106009769]
[   29.247016] tda18271: performing RF tracking filter calibration
[   40.948017] tda18271: RF tracking filter calibration complete
[   40.981028] tda829x 1-004b: type set to tda8290+18271
[   44.578145] saa7133[0]: registered device video0 [v4l2]
[   44.578208] saa7133[0]: registered device vbi0
[   44.578255] saa7133[0]: registered device radio0
[   45.056344] dvb_init() allocating 1 frontend
[   45.182381] tda829x 1-004b: type set to tda8290
[   45.188089] tda18271 1-0060: attaching existing instance
[   45.188093] DVB: registering new adapter (saa7133[0])
[   45.188097] DVB: registering adapter 0 frontend 0 (NXP TDA10048HN DVB-T)...
[   45.311022] tda10048_firmware_upload: waiting for firmware upload (dvb-fe-
tda10048-1.0.fw)...
[   45.311027] saa7134 :05:00.0: firmware: requesting dvb-fe-
tda10048-1.0.fw
[   45.349443] tda10048_firmware_upload: firmware read 24878 bytes.
[   45.349445] tda10048_firmware_upload: firmware uploading
[   46.482154] tda18271_read_regs: ERROR: i2c_transfer returned: -5
[   46.485876] tda18271_ir_cal_init: error -5 on line 786
[   46.489607] tda18271_init: error -5 on line 810
[   46.493636] tda18271_tune: error -5 on line 867
[   46.497755] tda18271_set_analog_params: error -5 on line 1004
[   49.233138] tda10048_firmware_upload: firmware uploaded
[   49.305625] saa7134 ALSA driver for DMA sound loaded
[   49.305635] IRQ 16/saa7133[0]: IRQF_DISABLED is not guaranteed on shared 
IRQs
[   49.305658] saa7133[0]/alsa: saa7133[0] at 0xfebff800 irq 16 registered as 
card -1

Best Regards,

ftape-jlc



On 11 Feb 2010, you wrote :
 Hi,
 
 Am Mittwoch, den 10.02.2010, 20:28 -0200 schrieb Mauro Carvalho Chehab:
  Hi,
 
  ftape-jlc wrote:
   Hello,
  
   I didn't received any message about radio on HVR1120.
   I just want to know if the use /dev/radio0 is deprecated in v4l2 today.
   In the mails, I only read messages about 

Re: Want to help in MSI TV VOX USB 2.0

2010-02-11 Thread Carlos Jenkins
Hi everyone :)

Here the results, testing with Mplayer:

shell$ sudo modprobe em28xx card=5 tuner=66 --first-time --verbose
shell$ dmesg

[ 2520.516403] usbcore: registered new interface driver em28xx
[ 2520.516413] em28xx driver loaded
[ 2526.068029] usb 1-6: new high speed USB device using ehci_hcd and address 9
[ 2526.201224] usb 1-6: configuration #1 chosen from 1 choice
[ 2526.202159] em28xx: New device @ 480 Mbps (eb1a:2820, interface 0, class 0)
[ 2526.202286] em28xx #0: chip ID is em2820 (or em2710)
[ 2526.304907] em28xx #0: board has no eeprom
[ 2526.306030] em28xx #0: Identified as MSI VOX USB 2.0 (card=5)
[ 2526.669043] saa7115 5-0021: saa7114 found (1f7114d0e00) @ 0x42
(em28xx #0)
[ 2528.824906] All bytes are equal. It is not a TEA5767
[ 2528.825133] tuner 5-0060: chip found @ 0xc0 (em28xx #0)
[ 2528.826040] tuner-simple 5-0060: creating new instance
[ 2528.826048] tuner-simple 5-0060: type set to 66 (LG TALN series)
[ 2528.849779] em28xx #0: Config register raw data: 0x00
[ 2528.980036] em28xx #0: v4l2 driver version 0.1.2
[ 2529.376156] em28xx #0: V4L2 video device registered as video0

*

shell$ ls /dev/ | grep video
video0

*

shell$ mplayer -tv
driver=v4l2:device=/dev/video0:norm=NTSC:chanlist=us-bcast tv://
MPlayer SVN-r29237-4.4.1 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski olschew...@zpr.uni-koeln.de
 comment: first try, more to come ;-)
Selected device: MSI VOX USB 2.0
 Tuner cap:
 Tuner rxs:
 Capabilites:  video capture  tuner  read/write  streaming
 supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR;
4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; 8 = PAL-I; 9 = PAL-DK;
10 = PAL-M; 11 = PAL-N; 12 = PAL-Nc; 13 = PAL-60; 14 = SECAM; 15 =
SECAM-B; 16 = SECAM-G; 17 = SECAM-H; 18 = SECAM-DK; 19 = SECAM-L; 20 =
SECAM-Lc;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
 Current input: 0
 Current format: YUYV
v4l2: current audio mode is : MONO
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: No such file or directory.
[VO_3DFX] Unable to open /dev/3dfx.
==
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Packed YUY2)
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 = 640x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==
Audio: no sound
Starting playback...
v4l2: select timeout
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0
[... Ad infinitum ...]
v4l2: select timeout ??% ??,?% 0 0
v4l2: select timeout ??% ??,?% 0 0
v4l2: 0 frames successfully processed, 1 frames dropped.

Exiting... (Quit)

Still no video.

 At the board entry for your card (at em28xx-cards.c), you may try to remove 
 the
 .max_range line from your board entry:

 ...
        [EM2820_BOARD_MSI_VOX_USB_2] = {
 ...
                .max_range_640_480 = 1,

I'll try that, but as you said, this should not be a problem.

Thanks again.
Cheers
--
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: [linux-dvb] Twinhan dtv 3030 mantis

2010-02-11 Thread Niklas Claesson
I can't compile, I fetched the latest source with hg clone
http://jusst.de/hg/mantis-v4l-dvb; but there seems to be a file
missing: mantis_input.h.

  CC [M]  /home/niklas/hg/mantis-v4l-dvb/v4l/hopper_vp3028.o
/home/niklas/hg/mantis-v4l-dvb/v4l/hopper_cards.c:43:26: error:
mantis_input.h: No such file or directory

(I don't need the hopper-part I think, so I edited this line in
.config CONFIG_DVB_HOPPER=n.)
And tried to compile again:

  CC [M]  /home/niklas/hg/mantis-v4l-dvb/v4l/mantis_vp1034.o
/home/niklas/hg/mantis-v4l-dvb/v4l/mantis_cards.c:51:26: error:
mantis_input.h: No such file or directory
/home/niklas/hg/mantis-v4l-dvb/v4l/mantis_cards.c: In function
'mantis_pci_probe':
/home/niklas/hg/mantis-v4l-dvb/v4l/mantis_cards.c:227: error: implicit
declaration of function 'mantis_input_init'
/home/niklas/hg/mantis-v4l-dvb/v4l/mantis_cards.c: In function
'mantis_pci_remove':
/home/niklas/hg/mantis-v4l-dvb/v4l/mantis_cards.c:250: error: implicit
declaration of function 'mantis_input_exit'
make[3]: *** [/home/niklas/hg/mantis-v4l-dvb/v4l/mantis_cards.o] Error 1

Did I do anything wrong?

Regards
Niklas Claesson
--
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 1/2] soc-camera: add support for VIDIOC_S_PARM and VIDIOC_G_PARM ioctls

2010-02-11 Thread Kuninori Morimoto

Dear Guennadi

Thank you for your hack

 + .vidioc_g_parm   = soc_camera_g_parm,
 + .vidioc_s_parm   = soc_camera_s_parm,

If soc_camera_g_param was defined, 
VIDIOC_G_PARM operation will be changed in v4l2-ioctl.c :: __video_do_ioctl
In fact, It was my anxiety.
But this patch seems good for me.
Thank you

Best regards
--
Kuninori Morimoto
 
--
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 1/5] go7007: driver id cleanup

2010-02-11 Thread Pete Eberlein
From: Pete Eberlein p...@sensoray.com

Removed the I2C_DRIVERID_WIS usage from the device configurations, since
the type parameter is all that is needed to probe the chip driver module.
Eventually wis-i2c.h will be removed.

Priority: normal

Signed-off-by: Pete Eberlein p...@sensoray.com

diff -r 690055993011 -r 2d2a250ca33b 
linux/drivers/staging/go7007/go7007-driver.c
--- a/linux/drivers/staging/go7007/go7007-driver.c  Sun Feb 07 22:26:10 
2010 -0200
+++ b/linux/drivers/staging/go7007/go7007-driver.c  Wed Feb 10 11:25:59 
2010 -0800
@@ -35,7 +35,6 @@
 #include media/v4l2-common.h
 
 #include go7007-priv.h
-#include wis-i2c.h
 
 /*
  * Wait for an interrupt to be delivered from the GO7007SB and return
@@ -191,51 +190,20 @@
  * Attempt to instantiate an I2C client by ID, probably loading a module.
  */
 static int init_i2c_module(struct i2c_adapter *adapter, const char *type,
-  int id, int addr)
+  int addr)
 {
struct go7007 *go = i2c_get_adapdata(adapter);
struct v4l2_device *v4l2_dev = go-v4l2_dev;
-   char *modname;
 
-   switch (id) {
-   case I2C_DRIVERID_WIS_SAA7115:
-   modname = wis-saa7115;
-   break;
-   case I2C_DRIVERID_WIS_SAA7113:
-   modname = wis-saa7113;
-   break;
-   case I2C_DRIVERID_WIS_UDA1342:
-   modname = wis-uda1342;
-   break;
-   case I2C_DRIVERID_WIS_SONY_TUNER:
-   modname = wis-sony-tuner;
-   break;
-   case I2C_DRIVERID_WIS_TW9903:
-   modname = wis-tw9903;
-   break;
-   case I2C_DRIVERID_WIS_TW2804:
-   modname = wis-tw2804;
-   break;
-   case I2C_DRIVERID_WIS_OV7640:
-   modname = wis-ov7640;
-   break;
-   case I2C_DRIVERID_S2250:
-   modname = s2250;
-   break;
-   default:
-   modname = NULL;
-   break;
-   }
-
-   if (v4l2_i2c_new_subdev(v4l2_dev, adapter, modname, type, addr, NULL))
+   if (v4l2_i2c_new_subdev(v4l2_dev, adapter, type, type, addr, NULL))
return 0;
 
-   if (modname != NULL)
+   if (type != NULL)
printk(KERN_INFO
-   go7007: probing for module %s failed\n, modname);
+   go7007: probing for module %s failed\n, type);
else
printk(KERN_INFO
-   go7007: sensor %u seems to be unsupported!\n, id);
+   go7007: sensor seems to be unsupported!\n);
return -1;
 }
 
@@ -274,11 +242,16 @@
for (i = 0; i  go-board_info-num_i2c_devs; ++i)
init_i2c_module(go-i2c_adapter,
go-board_info-i2c_devs[i].type,
-   go-board_info-i2c_devs[i].id,
go-board_info-i2c_devs[i].addr);
-   if (go-board_id == GO7007_BOARDID_ADLINK_MPG24)
-   i2c_clients_command(go-i2c_adapter,
-   DECODER_SET_CHANNEL, go-channel_number);
+   if (go-board_id == GO7007_BOARDID_ADLINK_MPG24) {
+   int channel = go-channel_number;
+   struct v4l2_priv_tun_config config = {
+   .tuner  = go-tuner_type,
+   .priv   = channel,
+   };
+   v4l2_device_call_all(go-v4l2_dev, 0, tuner, s_config,
+   config);
+   }
}
if (go-board_info-flags  GO7007_BOARD_HAS_AUDIO) {
go-audio_enabled = 1;
diff -r 690055993011 -r 2d2a250ca33b linux/drivers/staging/go7007/go7007-priv.h
--- a/linux/drivers/staging/go7007/go7007-priv.hSun Feb 07 22:26:10 
2010 -0200
+++ b/linux/drivers/staging/go7007/go7007-priv.hWed Feb 10 11:25:59 
2010 -0800
@@ -90,7 +90,6 @@
int num_i2c_devs;
struct {
const char *type;
-   int id;
int addr;
} i2c_devs[4];
int num_inputs;
@@ -288,3 +287,14 @@
 /* snd-go7007.c */
 int go7007_snd_init(struct go7007 *go);
 int go7007_snd_remove(struct go7007 *go);
+
+/* Flag to indicate that the client needs to be accessed with SCCB semantics */
+/* We re-use the I2C_M_TEN value so the flag passes through the masks in the
+ * core I2C code.  Major kludge, but the I2C layer ain't exactly flexible. */
+#defineI2C_CLIENT_SCCB 0x10
+
+/* Sony tuner types */
+
+#define TUNER_SONY_BTF_PG472Z  200
+#define TUNER_SONY_BTF_PK467Z  201
+#define TUNER_SONY_BTF_PB463Z  202
diff -r 690055993011 -r 2d2a250ca33b linux/drivers/staging/go7007/go7007-usb.c
--- a/linux/drivers/staging/go7007/go7007-usb.c Sun Feb 07 22:26:10 2010 -0200
+++ b/linux/drivers/staging/go7007/go7007-usb.c 

[PATCH 0/5] go7007 staging changes

2010-02-11 Thread Pete Eberlein
Hello.

This series moves most of the subdevice drivers used by the go7007
driver out of the staging directory.  The sony-tuner, ov7640, tw2804 and
tw9903 are converted to use the v4l2_subdev API, and the wis- versions
are made obsolete.  The wis-saa7113 and wis-saa7115 drivers are
obsolete, and don't add anything not already in the existing saa7113 and
saa7115 video decoder drivers.  The audio chip driver wis-uda1342
doesn't belong in 

If these changes are accepted, it should be determined if the go7007
driver can be moved out of staging, or what work remains to be done.

Pete Eberlein

[PATCH 1/5] go7007: driver id cleanup
[PATCH 2/5] sony-tuner: Subdev conversion from wis-sony-tuner
[PATCH 3/5] tw2804: video decoder subdev conversion
[PATCH 4/5] tw9903: video decoder subdev conversion
[PATCH 5/5] ov7640: sensor driver subdev conversion

 b/linux/drivers/media/common/tuners/sony-tuner.c |  695 +++
 b/linux/drivers/media/video/ov7640.c |  141 
 b/linux/drivers/media/video/tw2804.c |  398 +
 b/linux/drivers/media/video/tw9903.c |  370 
 linux/Documentation/video4linux/CARDLIST.tuner   |3 
 linux/drivers/media/common/tuners/Kconfig|8 
 linux/drivers/media/common/tuners/Makefile   |1 
 linux/drivers/media/common/tuners/tuner-types.c  |   12 
 linux/drivers/media/video/Kconfig|   19 
 linux/drivers/media/video/Makefile   |3 
 linux/drivers/staging/go7007/go7007-driver.c |   55 -
 linux/drivers/staging/go7007/go7007-priv.h   |   18 
 linux/drivers/staging/go7007/go7007-usb.c|   30 
 linux/drivers/staging/go7007/wis-i2c.h   |   11 
 linux/drivers/staging/go7007/wis-ov7640.c|2 
 linux/drivers/staging/go7007/wis-sony-tuner.c|2 
 linux/include/media/tuner.h  |4 
 linux/include/media/v4l2-chip-ident.h|1 
 18 files changed, 1692 insertions(+), 81 deletions(-)



--
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 3/5] tw2804: video decoder subdev conversion

2010-02-11 Thread Pete Eberlein
From: Pete Eberlein p...@sensoray.com

This is a subdev conversion of wis-tw2804 video decoder from the
staging go7007 directory.  This obsoletes the wis-tw2804 driver.

Priority: normal

Signed-off-by: Pete Eberlein p...@sensoray.com

diff -r f7edcbfeb63c -r 024987c00f06 linux/drivers/media/video/Kconfig
--- a/linux/drivers/media/video/Kconfig Wed Feb 10 15:06:05 2010 -0800
+++ b/linux/drivers/media/video/Kconfig Thu Feb 11 14:34:39 2010 -0800
@@ -368,6 +368,12 @@
  To compile this driver as a module, choose M here: the
  module will be called saa7191.
 
+config VIDEO_TW2804
+   tristate Techwell 2804 video decoder
+   depends on VIDEO_V4L2  I2C
+   ---help---
+ Support for the Techwell 2804 video decoder.
+
 config VIDEO_TVP514X
tristate Texas Instruments TVP514x video decoder
depends on VIDEO_V4L2  I2C
diff -r f7edcbfeb63c -r 024987c00f06 linux/drivers/media/video/Makefile
--- a/linux/drivers/media/video/MakefileWed Feb 10 15:06:05 2010 -0800
+++ b/linux/drivers/media/video/MakefileThu Feb 11 14:34:39 2010 -0800
@@ -71,6 +71,7 @@
 obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
 obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
 obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o
+obj-$(CONFIG_VIDEO_TW2804) += tw2804.o
 
 obj-$(CONFIG_SOC_CAMERA_MT9M001)   += mt9m001.o
 obj-$(CONFIG_SOC_CAMERA_MT9M111)   += mt9m111.o
diff -r f7edcbfeb63c -r 024987c00f06 linux/drivers/media/video/tw2804.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/drivers/media/video/tw2804.cThu Feb 11 14:34:39 2010 -0800
@@ -0,0 +1,398 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License (Version 2) as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ */
+
+#include linux/module.h
+#include linux/init.h
+#include linux/i2c.h
+#include linux/videodev2.h
+#include linux/ioctl.h
+#include media/v4l2-device.h
+#include media/v4l2-i2c-drv.h
+
+MODULE_DESCRIPTION(TW2804 I2C subdev driver);
+MODULE_LICENSE(GPL v2);
+
+struct tw2804 {
+   struct v4l2_subdev sd;
+   int channel;
+   v4l2_std_id norm;
+   int brightness;
+   int contrast;
+   int saturation;
+   int hue;
+};
+
+static inline struct tw2804 *to_state(struct v4l2_subdev *sd)
+{
+   return container_of(sd, struct tw2804, sd);
+}
+
+static u8 global_registers[] =
+{
+   0x39, 0x00,
+   0x3a, 0xff,
+   0x3b, 0x84,
+   0x3c, 0x80,
+   0x3d, 0x80,
+   0x3e, 0x82,
+   0x3f, 0x82,
+   0xff, 0xff, /* Terminator (reg 0xff does not exist) */
+};
+
+static u8 channel_registers[] =
+{
+   0x01, 0xc4,
+   0x02, 0xa5,
+   0x03, 0x20,
+   0x04, 0xd0,
+   0x05, 0x20,
+   0x06, 0xd0,
+   0x07, 0x88,
+   0x08, 0x20,
+   0x09, 0x07,
+   0x0a, 0xf0,
+   0x0b, 0x07,
+   0x0c, 0xf0,
+   0x0d, 0x40,
+   0x0e, 0xd2,
+   0x0f, 0x80,
+   0x10, 0x80,
+   0x11, 0x80,
+   0x12, 0x80,
+   0x13, 0x1f,
+   0x14, 0x00,
+   0x15, 0x00,
+   0x16, 0x00,
+   0x17, 0x00,
+   0x18, 0xff,
+   0x19, 0xff,
+   0x1a, 0xff,
+   0x1b, 0xff,
+   0x1c, 0xff,
+   0x1d, 0xff,
+   0x1e, 0xff,
+   0x1f, 0xff,
+   0x20, 0x07,
+   0x21, 0x07,
+   0x22, 0x00,
+   0x23, 0x91,
+   0x24, 0x51,
+   0x25, 0x03,
+   0x26, 0x00,
+   0x27, 0x00,
+   0x28, 0x00,
+   0x29, 0x00,
+   0x2a, 0x00,
+   0x2b, 0x00,
+   0x2c, 0x00,
+   0x2d, 0x00,
+   0x2e, 0x00,
+   0x2f, 0x00,
+   0x30, 0x00,
+   0x31, 0x00,
+   0x32, 0x00,
+   0x33, 0x00,
+   0x34, 0x00,
+   0x35, 0x00,
+   0x36, 0x00,
+   0x37, 0x00,
+   0xff, 0xff, /* Terminator (reg 0xff does not exist) */
+};
+
+static int write_reg(struct v4l2_subdev *sd, u8 reg, u8 value, int channel)
+{
+   struct i2c_client *client = v4l2_get_subdevdata(sd);
+
+   return i2c_smbus_write_byte_data(client, reg | (channel  6), value);
+}
+
+static int write_regs(struct v4l2_subdev *sd, u8 *regs, int channel)
+{
+   int i;
+
+   for (i = 0; regs[i] != 0xff; i += 2)
+   if (write_reg(sd, regs[i], regs[i + 1], channel)  0)
+   return -1;
+   return 0;
+}
+
+static int tw2804_s_config(struct v4l2_subdev *sd,
+  const struct v4l2_priv_tun_config *config)
+{
+   struct tw2804 *dec = 

Re: Driver crash on kernel 2.6.32.7. Interaction between cx8800 (DVB-S) and USB HVR Hauppauge 950q

2010-02-11 Thread Greg KH
On Wed, Feb 10, 2010 at 10:34:56AM -0500, Andy Walls wrote:
 On Tue, 2010-02-09 at 22:12 -0500, Devin Heitmueller wrote:
  On Tue, Feb 9, 2010 at 10:05 PM, Richard Lemieux rlem...@cooptel.qc.ca 
  wrote:
   Andy,
  
   This is a great answer!  Thanks very much.  When I get into this situation
   again
   I will know what to look for.
  
   A possible reason why I got into this problem in the first place is that I
   tried
   many combinations of parameters with mplayer and azap in order to learn 
   how
   to use the USB tuner in both the ATSC and the NTSC mode.  I will look back
   in the terminal history to see if I can find anything.
  
  I think the key to figuring out the bug at this point is you finding a
  sequence where you can reliably reproduce the oops.  If we have that,
  then I can start giving you some code to try which we can see if it
  addresses the problem.
  
  For example, I would start by giving you a fix which results in us not
  calling the firmware release if the request_firmware() call failed,
  but it wouldn't be much help if you could not definitively tell me if
  the problem is fixed.
 
 
 For the oops analysis here:
 
 http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/15954
 
 
 I will also note that the file scope fw_lock mutex is rather
 inconsistently used in
 linux/drivers/base/fw_class.c:firmware_loading_store().  (I guess for
 not wanting to consume the timeout interval with sleeping?)
 
 The mutex protects case 1:, but all other cases appear to be only
 protected by atomic status bit checks that can fall through to
 fw_load_abort() which complete()'s the fw_priv-completion.
 
 Also not that in the _request_firmware() this sequence is the only place
 a once good fw_priv-fw pointer is set to NULL:
 
 mutex_lock(fw_lock);
 if (!fw_priv-fw-size || test_bit(FW_STATUS_ABORT, 
 fw_priv-status)) {
 retval = -ENOENT;
 release_firmware(fw_priv-fw);
 *firmware_p = NULL;
 }
 fw_priv-fw = NULL; --- The only place it is set to 
 NULL
 mutex_unlock(fw_lock);
 
 
 So if the timeout timer fires at nearly the same time as udev coming in
 and say I'm done loading without holding the mutex, one can run into
 the Ooops.  Not only that, I think the above code can leak memory under
 some circumstances when the if clause is not satisfied.
 
 I think this really is a firmware_class.c issue.  I think the just
 right firmware loading timeouts and the particular computer system
 responsiveness, make this Ooops possible.  However, I'm amazed that a
 single person has tripped it more than once.
 
 Revising the locking in linux/drivers/base/firmware_class.c should fix
 the problem.
 
 I don't believe this comment in the code now:
 
 /* fw_lock could be moved to 'struct firmware_priv' but since it is just
  * guarding for corner cases a global lock should be OK */
 static DEFINE_MUTEX(fw_lock);
 
 struct firmware_priv {
 char *fw_id;
   ...
 
 And since f_priv is dynamically created and destroyed by
 request_firmware() I see no harm in 
 
 1. moving the mutex into struct firmware_priv
 2. just always just grabbing an almost never contended mutex
 3. getting rid of the file scope fw_lock.
 
 except grabbing a mutex() while the timeout timer is running during
 loading, means one *could* sleep for a while consuming the timeout
 interval.

That sounds reasonable to me, care to make up a patch for this?

thanks,

greg k-h
--
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: [cron job] v4l-dvb daily build 2.6.22 and up: ERRORS, 2.6.16-2.6.21: ERRORS

2010-02-11 Thread hermann pitton
Am Donnerstag, den 11.02.2010, 20:18 +0100 schrieb 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:Thu Feb 11 19:01:22 CET 2010
 path:http://www.linuxtv.org/hg/v4l-dvb
 changeset:   14197:095b1aec2354
 gcc version: i686-linux-gcc (GCC) 4.4.3
 host hardware:x86_64
 host os: 2.6.32.5
 
 linux-2.6.32.6-armv5: OK
 linux-2.6.33-rc5-armv5: OK
 linux-2.6.32.6-armv5-davinci: ERRORS
 linux-2.6.33-rc5-armv5-davinci: ERRORS
 linux-2.6.32.6-armv5-dm365: ERRORS
 linux-2.6.33-rc5-armv5-dm365: ERRORS
 linux-2.6.32.6-armv5-ixp: OK
 linux-2.6.33-rc5-armv5-ixp: OK
 linux-2.6.32.6-armv5-omap2: OK
 linux-2.6.33-rc5-armv5-omap2: OK
 linux-2.6.22.19-i686: ERRORS
 linux-2.6.23.17-i686: ERRORS
 linux-2.6.24.7-i686: ERRORS
 linux-2.6.25.20-i686: ERRORS
 linux-2.6.26.8-i686: ERRORS
 linux-2.6.27.44-i686: ERRORS
 linux-2.6.28.10-i686: ERRORS
 linux-2.6.29.1-i686: ERRORS
 linux-2.6.30.10-i686: ERRORS
 linux-2.6.31.12-i686: WARNINGS
 linux-2.6.32.6-i686: OK
 linux-2.6.33-rc5-i686: OK
 linux-2.6.32.6-m32r: OK
 linux-2.6.33-rc5-m32r: OK
 linux-2.6.32.6-mips: OK
 linux-2.6.33-rc5-mips: OK
 linux-2.6.32.6-powerpc64: OK
 linux-2.6.33-rc5-powerpc64: OK
 linux-2.6.22.19-x86_64: ERRORS
 linux-2.6.23.17-x86_64: ERRORS
 linux-2.6.24.7-x86_64: ERRORS
 linux-2.6.25.20-x86_64: ERRORS
 linux-2.6.26.8-x86_64: ERRORS
 linux-2.6.27.44-x86_64: ERRORS
 linux-2.6.28.10-x86_64: ERRORS
 linux-2.6.29.1-x86_64: ERRORS
 linux-2.6.30.10-x86_64: ERRORS
 linux-2.6.31.12-x86_64: WARNINGS
 linux-2.6.32.6-x86_64: OK
 linux-2.6.33-rc5-x86_64: OK
 spec: OK
 sparse (v4l-dvb-git): ERRORS
 sparse (linux-2.6.33-rc5): ERRORS
 linux-2.6.16.62-i686: ERRORS
 linux-2.6.17.14-i686: ERRORS
 linux-2.6.18.8-i686: ERRORS
 linux-2.6.19.7-i686: ERRORS
 linux-2.6.20.21-i686: ERRORS
 linux-2.6.21.7-i686: ERRORS
 linux-2.6.16.62-x86_64: ERRORS
 linux-2.6.17.14-x86_64: ERRORS
 linux-2.6.18.8-x86_64: ERRORS
 linux-2.6.19.7-x86_64: ERRORS
 linux-2.6.20.21-x86_64: ERRORS
 linux-2.6.21.7-x86_64: ERRORS
 
 Detailed results are available here:
 
 http://www.xs4all.nl/~hverkuil/logs/Thursday.log
 
 Full logs are available here:
 
 http://www.xs4all.nl/~hverkuil/logs/Thursday.tar.bz2
 
 The V4L-DVB specification from this daily build is here:
 
 http://www.xs4all.nl/~hverkuil/spec/media.html



Douglas did fix it on current hg.

Cheers,
Hermann


--
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 2/5] sony-tuner: Subdev conversion from wis-sony-tuner

2010-02-11 Thread Pete Eberlein
From: Pete Eberlein p...@sensoray.com

This is a subdev conversion of the go7007 wis-sony-tuner i2c driver,
and places it with the other tuner drivers.  This obsoletes the
wis-sony-tuner driver in the go7007 staging directory.

Priority: normal

Signed-off-by: Pete Eberlein p...@sensoray.com

diff -r 2d2a250ca33b -r 628119533574 
linux/Documentation/video4linux/CARDLIST.tuner
--- a/linux/Documentation/video4linux/CARDLIST.tunerWed Feb 10 11:25:59 
2010 -0800
+++ b/linux/Documentation/video4linux/CARDLIST.tunerThu Feb 11 15:21:11 
2010 -0800
@@ -81,3 +81,6 @@
 tuner=81 - Partsnic (Daewoo) PTI-5NF05
 tuner=82 - Philips CU1216L
 tuner=83 - NXP TDA18271
+tuner=84 - Sony PAL+SECAM (BTF-PG472Z)
+tuner=85 - Sony NTSC_JP (BTF-PK467Z)
+tuner=86 - Sony NTSC (BTF-PB463Z)
diff -r 2d2a250ca33b -r 628119533574 linux/drivers/media/common/tuners/Kconfig
--- a/linux/drivers/media/common/tuners/Kconfig Wed Feb 10 11:25:59 2010 -0800
+++ b/linux/drivers/media/common/tuners/Kconfig Thu Feb 11 15:21:11 2010 -0800
@@ -179,4 +179,12 @@
help
  A driver for the silicon tuner MAX2165 from Maxim.
 
+config MEDIA_TUNER_SONY
+   tristate Sony TV tuner
+   depends on VIDEO_MEDIA  I2C
+   default m if MEDIA_TUNER_CUSTOMISE
+   help
+ A driver for the Sony tuners BTF-PG472Z, BTF-PK467Z, BTF-PB463Z.
+
+
 endif # MEDIA_TUNER_CUSTOMISE
diff -r 2d2a250ca33b -r 628119533574 linux/drivers/media/common/tuners/Makefile
--- a/linux/drivers/media/common/tuners/MakefileWed Feb 10 11:25:59 
2010 -0800
+++ b/linux/drivers/media/common/tuners/MakefileThu Feb 11 15:21:11 
2010 -0800
@@ -24,6 +24,7 @@
 obj-$(CONFIG_MEDIA_TUNER_MXL5007T) += mxl5007t.o
 obj-$(CONFIG_MEDIA_TUNER_MC44S803) += mc44s803.o
 obj-$(CONFIG_MEDIA_TUNER_MAX2165) += max2165.o
+obj-$(CONFIG_MEDIA_TUNER_SONY) += sony-tuner.o
 
 EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core
 EXTRA_CFLAGS += -Idrivers/media/dvb/frontends
diff -r 2d2a250ca33b -r 628119533574 
linux/drivers/media/common/tuners/sony-tuner.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/linux/drivers/media/common/tuners/sony-tuner.cThu Feb 11 15:21:11 
2010 -0800
@@ -0,0 +1,695 @@
+/*
+ * Copyright (C) 2005-2006 Micronas USA Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License (Version 2) as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ */
+
+#include linux/module.h
+#include linux/init.h
+#include linux/i2c.h
+#include linux/videodev2.h
+#include media/tuner.h
+#include media/v4l2-common.h
+#include media/v4l2-ioctl.h
+#include media/v4l2-device.h
+#include media/v4l2-i2c-drv.h
+
+MODULE_DESCRIPTION(Sony TV Tuner driver);
+MODULE_LICENSE(GPL v2);
+
+/* #define MPX_DEBUG */
+
+/* AS(IF/MPX) pin:  LOW  HIGH/OPEN
+ * IF/MPX address:   0x42/0x40   0x43/0x44
+ */
+#define IF_I2C_ADDR0x43
+#define MPX_I2C_ADDR   0x44
+
+static v4l2_std_id force_band;
+static char force_band_str[] = -;
+module_param_string(force_band, force_band_str, sizeof(force_band_str), 0644);
+static int force_mpx_mode = -1;
+module_param(force_mpx_mode, int, 0644);
+
+/* Store tuner info in the same format as tuner.c, so maybe we can put the
+ * Sony tuner support in there. */
+struct sony_tunertype {
+   char *name;
+   unsigned char Vendor; /* unused here */
+   unsigned char Type; /* unused here */
+
+   unsigned short thresh1; /*  band switch VHF_LO = VHF_HI */
+   unsigned short thresh2; /*  band switch VHF_HI = UHF */
+   unsigned char VHF_L;
+   unsigned char VHF_H;
+   unsigned char UHF;
+   unsigned char config;
+   unsigned short IFPCoff;
+};
+
+/* This array is indexed by (tuner_type - TUNER_SONY_BTF_PG472Z) */
+static struct sony_tunertype sony_tuners[] = {
+   { Sony PAL+SECAM (BTF-PG472Z), 0, 0,
+ 16*144.25, 16*427.25, 0x01, 0x02, 0x04, 0xc6, 623},
+   { Sony NTSC_JP (BTF-PK467Z), 0, 0,
+ 16*220.25, 16*467.25, 0x01, 0x02, 0x04, 0xc6, 940},
+   { Sony NTSC (BTF-PB463Z), 0, 0,
+ 16*130.25, 16*364.25, 0x01, 0x02, 0x04, 0xc6, 732},
+};
+
+struct sony_tuner {
+   struct v4l2_subdev sd;
+   int type;
+   v4l2_std_id std;
+   unsigned int freq;
+   int mpxmode;
+   u32 audmode;
+};
+
+static inline struct sony_tuner *to_state(struct v4l2_subdev *sd)
+{
+   return container_of(sd, struct sony_tuner, sd);
+}
+
+/* Basically the same as default_set_tv_freq() in tuner.c */
+static int set_freq(struct i2c_client 

[PATCH 1/2] tm6000: only register after initialized

2010-02-11 Thread Mauro Carvalho Chehab
Udev calls an utility when it senses a v4l device. So, register needs
to be delayed, otherwise it may cause block conditions.

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com
---
 drivers/staging/tm6000/tm6000-cards.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-cards.c 
b/drivers/staging/tm6000/tm6000-cards.c
index ff04bba..8297801 100644
--- a/drivers/staging/tm6000/tm6000-cards.c
+++ b/drivers/staging/tm6000/tm6000-cards.c
@@ -453,11 +453,6 @@ static int tm6000_init_dev(struct tm6000_core *dev)
if (rc0)
goto err;
 
-   /* register and initialize V4L2 */
-   rc=tm6000_v4l2_register(dev);
-   if (rc0)
-   goto err;
-
/* Default values for STD and resolutions */
dev-width = 720;
dev-height = 480;
@@ -480,12 +475,18 @@ static int tm6000_init_dev(struct tm6000_core *dev)
v4l2_i2c_new_subdev(dev-v4l2_dev, dev-i2c_adap,
tvaudio, tvaudio, I2C_ADDR_TDA9874, NULL);
 
+   /* register and initialize V4L2 */
+   rc=tm6000_v4l2_register(dev);
+   if (rc0)
+   goto err;
+
if(dev-caps.has_dvb) {
dev-dvb = kzalloc(sizeof(*(dev-dvb)), GFP_KERNEL);
if(!dev-dvb) {
rc = -ENOMEM;
goto err2;
}
+
 #ifdef CONFIG_VIDEO_TM6000_DVB
rc = tm6000_dvb_register(dev);
if(rc  0) {
-- 
1.6.6.1

--
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 2/2] tm6000: fix unlock unbalance

2010-02-11 Thread Mauro Carvalho Chehab

Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com
---
 drivers/staging/tm6000/tm6000-cards.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/tm6000/tm6000-cards.c 
b/drivers/staging/tm6000/tm6000-cards.c
index 8297801..c0159a1 100644
--- a/drivers/staging/tm6000/tm6000-cards.c
+++ b/drivers/staging/tm6000/tm6000-cards.c
@@ -496,6 +496,7 @@ static int tm6000_init_dev(struct tm6000_core *dev)
}
 #endif
}
+   mutex_unlock(dev-lock);
return 0;
 
 err2:
-- 
1.6.6.1


--
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