DViCo Dual Fusion Express (cx23885) remote control issue

2010-04-15 Thread Daniel O'Connor
Hi,
I recently upgraded my Myth box from Ubuntu 8.04 to 9.10 (runs 
2.6.31-20-generic). Previously I used the drivers from 
http://www.itee.uq.edu.au/~chrisp/Linux-DVB/DVICO/ however the card 
worked out of the box (once I got the later firmware) and so I presumed 
they had been merged.

However one thing that wasn't working was the IR receiver so I checked 
out the latest v4l-dvb code and built it (after disabling the 1394 
based ones as they broke the build) and then installed and rebooted and it
detected the IR OK, ie

Apr 13 14:40:05 mythtv kernel: [7.601716] input: i2c IR (FusionHDTV) as 
/devices/virtual/input/input6
Apr 13 14:40:05 mythtv kernel: [7.632093] ir-kbd-i2c: i2c IR (FusionHDTV) 
detected at i2c-0/0-006b/ir0 [cx23885[0]]

And it works with lirc etc etc..

However I came to use it this morning and it now doesn't find it even if
I load the module from where it was built..
[mythtv 15:13] ~/v4l-dvb sudo rmmod ir_kbd_i2c
[mythtv 15:13] ~/v4l-dvb lsmod |grep ir_kbd_i2c
[mythtv 15:13] ~/v4l-dvb sudo insmod /home/myth/v4l-dvb/v4l/ir-kbd-i2c.ko

I haven't delved much further yet (planning to printf my way through
the probe routines) as I am a Linux kernel noob (plenty of FreeBSD
experience though!).

If any one has any suggestions or patches I'd be happy to try them
out :)

Thanks.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
The nice thing about standards is that there
are so many of them to choose from.
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


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


Re: Kworld Plus TV Hybrid PCI (DVB-T 210SE)

2010-04-15 Thread 0123peter
on Thu, 15 Apr 2010 01:32 pm
in the Usenet newsgroup gmane.linux.drivers.video-input-infrastructure
hermann pitton wrote:

 Hi,
 
 to be honest, there is a little too much delay on those reports.

I have been very slow, sorry.  
 
  did not even notice a problem with Trent's prior patch.
  The same is also at vivi.
  
  Should I have a file called /etc/modprobe.d/TVanywhereAD 
  that contains the line, 
  
  options saa7134 card=94 gpio_tracking i2c_debug=1
  
  and then watch the command line output of kaffeine?  
 
 I've found a GUI that allows tweaking lots of module parameters 
 that I have never heard of.  Card=94 in the config file, 
 gpio_tracking and i2c_debug are set to 1 in the GUI.  
 
 Strange things are appearing in dmesg and syslog.  I assume that 
 [snip]
 saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 i2c-adapter i2c-0: Invalid 7-bit address 0x7a
 saa7133[0]: i2c xfer:  8e ERROR: NO_DEVICE
 [snip]
 is significant.  
 
 No, not at all for my knowledge.

Unsurprisingly, that just highlights my ignorance.  

  If you want to produce debug output for failing firmware loading from
  file after a cold boot, yes, you might eventually be able to see that
  failing tuner initialization brings down i2c.
  
  If it is a additional new regression, then mercurial bisect can find the
  patch in question fairly quick.
 
 That sounds like something that I should be able to do, if only 
 I'd read the instructions.  
 
 It is totally up to you and all others with that hardware.

Can you provide a like for where to start reading?  

 Since already in some multiple broken conditions, never working without
 flaws previously, I would suggest not to wait any longer, until some
 sort of hadron collider is available ...

Now I'm discouraged.  It might be a better use of my time to do 
something else - anything else.  Maybe I'll just put it in a box 
for a year and see what happens.  

 First try in all known ways.
 
 We likely don't have the budget for anything else that soon ;)
 
 Cheers,
 Hermann

-- 
Sig goes here...  
Peter D.  


--
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: cx18: missing audio for analog recordings

2010-04-15 Thread Mark Lord

On 15/04/10 01:16 AM, Mark Lord wrote:


for now, I've added lower level spinlock protection onto all
register writes,

..

As you expected, this doesn't seem to have cured anything obvious.  :)

I had Mythtv wakeup/record/powerdown several times overnight,
and it still required fallbacks for about half of those.

And.. one of the fallback recordings still had muted audio.
Even though my script which checks for that reported audio ok.

Enough for now.. I'll hack some more on the weekend.

cheers
--
Mark Lord
Real-Time Remedies Inc.
ml...@pobox.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: tm6000: firmware

2010-04-15 Thread Stefan Ringel
Am 14.04.2010 23:06, schrieb Mauro Carvalho Chehab:
 Em 14-04-2010 11:41, Stefan Ringel escreveu:
   
 Am 14.04.2010 19:44, schrieb Mauro Carvalho Chehab:
 
 Hi Stefan,

 Em 14-04-2010 09:26, Stefan Ringel escreveu:
   
   
 Hi Mauro,

 Can you added these three firmwares? The third is into archive file,
 because I'm extracted for an user (Bee Hock Goh).
 
 
 Sorry, but for us to put the firmwares at the server and/or add them at 
 linux-firmware 
 git tree, we need to get the distribution rights from the manufacturer,
 as described on:
 
 http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches#Firmware_submission

 So, we need Xceive's ack, in order to add the firmware files somewhere. 
 That's why
 currently we're using the procedure described on the comments at the 
 extraction
 tool:
 Documentation/video4linux/extract_xc3028.pl  

 Cheers,
 Mauro
   
   
 OK. In the archive is the modified extract_xc3028 tool for
 tm6000-xc3028.fw . Is that useful?
 
 Yes, but:

 1) Please, send it as a patch, with the proper SOB;

 2) From a diff I did here:

 -   my $sourcefile = UDXTTM6000.sys;
 -   my $hash = cb9deb5508a5e150af2880f5b0066d78;
 -   my $outfile = tm6000-xc3028.fw;
 +   my $sourcefile = hcw85bda.sys;
 +   my $hash = 0e44dbf63bb0169d57446aec21881ff2;
 +   my $outfile = xc3028-v27.fw;

 This version works with another *.sys file. The proper way is to
 check for the hash, and use the proper logic, based on the provided
 sys file;

 3) Please document where to get the UDXTTTM6000.sys file at the 
 comments;

 4) tm6000-xc3028.fw is a really bad name. It made sense only during
 the development of tuner-xc2028.c, since, on that time, it seemed that
 tm6000 had a different firmware version. In fact, the first devices
 appeared with v 1.e firmware. So, a proper name for that version
 would be xc3028-v1e.fw. We should rename it to be consistent.

   
The firmware name is was you write in tm6000-card.c file and yes it can
renamed. This firmware work in tm5600 and tm6000 sticks where the
firmware v2.7 or v3.6 not works. The version isn't v1.e , it is v2.4 see
log file from Bee Hock Goh (
http://www.mail-archive.com/linux-media@vger.kernel.org/msg17378.html ).
 It is not clear what version is provided with this version. Is it
 v3.6? On a few cases, we've seen some modified versions of XC3028 firmwares
 shipped with some specific board. Is it the case?


 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
   


-- 
Stefan Ringel stefan.rin...@arcor.de

--- usr/src/src/tm6010/v4l-dvb/linux/Documentation/video4linux/extract_xc3028.pl	2010-03-27 13:14:22.215564668 +0100
+++ home/stefan/Downloads/tm6000-xc3028/extract_xc3028.pl	2010-04-15 16:21:19.664488407 +0200
@@ -5,13 +5,14 @@
 #
 # In order to use, you need to:
 #	1) Download the windows driver with something like:
-#		wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
-#	2) Extract the file hcw85bda.sys from the zip into the current dir:
-#		unzip -j HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip Driver85/hcw85bda.sys
+#		wget http://www.twinhan.com/files/AW/BDA T/20080303_V1.0.6.7.zip
+#		or wget http://www.stefanringel.de/pub/20080303_V1.0.6.7.zip
+#	2) Extract the file UDXTTM6000.sys from the zip into the current dir:
+#		unzip -j 20080303_V1.0.6.7.zip 20080303_v1.0.6.7/UDXTTM6000.sys
 #	3) run the script:
 #		./extract_xc3028.pl
 #	4) copy the generated file:
-#		cp xc3028-v27.fw /lib/firmware
+#		cp tm6000-xc3028.fw /lib/firmware
 
 #use strict;
 use IO::Handle;
@@ -154,58 +155,58 @@
 	write_le16($nr_desc);
 
 	#
-	# Firmware 0, type: BASE FW   F8MHZ (0x0003), id: (), size: 8718
+	# Firmware 0, type: BASE FW   F8MHZ (0x0003), id: (), size: 6635
 	#
 
 	write_le32(0x0003);			# Type
 	write_le64(0x, 0x);	# ID
-	write_le32(8718);			# Size
-	write_hunk_fix_endian(813432, 8718);
+	write_le32(6635);			# Size
+	write_hunk_fix_endian(257752, 6635);
 
 	#
-	# Firmware 1, type: BASE FW   F8MHZ MTS (0x0007), id: (), size: 8712
+	# Firmware 1, type: BASE FW   F8MHZ MTS (0x0007), id: (), size: 6635
 	#
 
 	write_le32(0x0007);			# Type
 	write_le64(0x, 0x);	# ID
-	write_le32(8712);			# Size
-	write_hunk_fix_endian(822152, 8712);
+	write_le32(6635);			# Size
+	write_hunk_fix_endian(264392, 6635);
 
 	#
-	# Firmware 2, type: BASE FW   FM (0x0401), id: (), size: 8562
+	# Firmware 2, type: BASE FW   FM (0x0401), id: (), size: 6525
 	#
 
 	write_le32(0x0401);			# Type
 	write_le64(0x, 0x);	# ID
-	write_le32(8562);			# Size
-	write_hunk_fix_endian(830872, 8562);
+	write_le32(6525);			# Size
+	write_hunk_fix_endian(271040, 6525);
 
 	#
-	# 

Re: tm6000: firmware

2010-04-15 Thread Mauro Carvalho Chehab
Em 15-04-2010 07:37, Stefan Ringel escreveu:
 Am 14.04.2010 23:06, schrieb Mauro Carvalho Chehab:
 Em 14-04-2010 11:41, Stefan Ringel escreveu:
   
 Am 14.04.2010 19:44, schrieb Mauro Carvalho Chehab:
 
 Hi Stefan,

 Em 14-04-2010 09:26, Stefan Ringel escreveu:
   
   
 Hi Mauro,

 Can you added these three firmwares? The third is into archive file,
 because I'm extracted for an user (Bee Hock Goh).
 
 
 Sorry, but for us to put the firmwares at the server and/or add them at 
 linux-firmware 
 git tree, we need to get the distribution rights from the manufacturer,
 as described on:

 http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches#Firmware_submission

 So, we need Xceive's ack, in order to add the firmware files somewhere. 
 That's why
 currently we're using the procedure described on the comments at the 
 extraction
 tool:
Documentation/video4linux/extract_xc3028.pl  

 Cheers,
 Mauro
   
   
 OK. In the archive is the modified extract_xc3028 tool for
 tm6000-xc3028.fw . Is that useful?
 
 Yes, but:

 1) Please, send it as a patch, with the proper SOB;

 2) From a diff I did here:

 -   my $sourcefile = UDXTTM6000.sys;
 -   my $hash = cb9deb5508a5e150af2880f5b0066d78;
 -   my $outfile = tm6000-xc3028.fw;
 +   my $sourcefile = hcw85bda.sys;
 +   my $hash = 0e44dbf63bb0169d57446aec21881ff2;
 +   my $outfile = xc3028-v27.fw;

 This version works with another *.sys file. The proper way is to
 check for the hash, and use the proper logic, based on the provided
 sys file;

 3) Please document where to get the UDXTTTM6000.sys file at the 
 comments;

 4) tm6000-xc3028.fw is a really bad name. It made sense only during
 the development of tuner-xc2028.c, since, on that time, it seemed that
 tm6000 had a different firmware version. In fact, the first devices
 appeared with v 1.e firmware. So, a proper name for that version
 would be xc3028-v1e.fw. We should rename it to be consistent.

   
 The firmware name is was you write in tm6000-card.c file and yes it can
 renamed. This firmware work in tm5600 and tm6000 sticks where the
 firmware v2.7 or v3.6 not works. The version isn't v1.e , it is v2.4 see
 log file from Bee Hock Goh (

Ok. then, please send me a patch renaming the firmware used by this card as
xc3028-v24.fw.

I won't be able to apply any patch until next week (I'm currently abroad for
the Collaboration Summit).

 http://www.mail-archive.com/linux-media@vger.kernel.org/msg17378.html ).
 It is not clear what version is provided with this version. Is it
 v3.6? On a few cases, we've seen some modified versions of XC3028 firmwares
 shipped with some specific board. Is it the case?

With respect to your patch, you need to add some logic to decide to generate
either v2.4 or v2.7, based on the *.sys checksum code. So, instead of just
renaming things, the proper solution is to create two sub-routines: one for
v2.7 and another for v2.4, and decide to use either one, based on the checksum
of the *.sys file.

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: tm6000: firmware

2010-04-15 Thread Stefan Ringel
Am 15.04.2010 19:14, schrieb Mauro Carvalho Chehab:
 Em 15-04-2010 07:37, Stefan Ringel escreveu:
   
 Am 14.04.2010 23:06, schrieb Mauro Carvalho Chehab:
 
 Em 14-04-2010 11:41, Stefan Ringel escreveu:
   
   
 Am 14.04.2010 19:44, schrieb Mauro Carvalho Chehab:
 
 
 Hi Stefan,

 Em 14-04-2010 09:26, Stefan Ringel escreveu:
   
   
   
 Hi Mauro,

 Can you added these three firmwares? The third is into archive file,
 because I'm extracted for an user (Bee Hock Goh).
 
 
 
 Sorry, but for us to put the firmwares at the server and/or add them at 
 linux-firmware 
 git tree, we need to get the distribution rights from the manufacturer,
 as described on:
   
 http://linuxtv.org/wiki/index.php/Development:_How_to_submit_patches#Firmware_submission

 So, we need Xceive's ack, in order to add the firmware files somewhere. 
 That's why
 currently we're using the procedure described on the comments at the 
 extraction
 tool:
   Documentation/video4linux/extract_xc3028.pl  

 Cheers,
 Mauro
   
   
   
 OK. In the archive is the modified extract_xc3028 tool for
 tm6000-xc3028.fw . Is that useful?
 
 
 Yes, but:

 1) Please, send it as a patch, with the proper SOB;

 2) From a diff I did here:

 -   my $sourcefile = UDXTTM6000.sys;
 -   my $hash = cb9deb5508a5e150af2880f5b0066d78;
 -   my $outfile = tm6000-xc3028.fw;
 +   my $sourcefile = hcw85bda.sys;
 +   my $hash = 0e44dbf63bb0169d57446aec21881ff2;
 +   my $outfile = xc3028-v27.fw;

 This version works with another *.sys file. The proper way is to
 check for the hash, and use the proper logic, based on the provided
 sys file;

 3) Please document where to get the UDXTTTM6000.sys file at the 
 comments;

 4) tm6000-xc3028.fw is a really bad name. It made sense only during
 the development of tuner-xc2028.c, since, on that time, it seemed that
 tm6000 had a different firmware version. In fact, the first devices
 appeared with v 1.e firmware. So, a proper name for that version
 would be xc3028-v1e.fw. We should rename it to be consistent.

   
   
 The firmware name is was you write in tm6000-card.c file and yes it can
 renamed. This firmware work in tm5600 and tm6000 sticks where the
 firmware v2.7 or v3.6 not works. The version isn't v1.e , it is v2.4 see
 log file from Bee Hock Goh (
 
 Ok. then, please send me a patch renaming the firmware used by this card as
 xc3028-v24.fw.

 I won't be able to apply any patch until next week (I'm currently abroad for
 the Collaboration Summit).

   
 http://www.mail-archive.com/linux-media@vger.kernel.org/msg17378.html ).
 
 It is not clear what version is provided with this version. Is it
 v3.6? On a few cases, we've seen some modified versions of XC3028 firmwares
 shipped with some specific board. Is it the case?
   
 With respect to your patch, you need to add some logic to decide to generate
 either v2.4 or v2.7, based on the *.sys checksum code. So, instead of just
 renaming things, the proper solution is to create two sub-routines: one for
 v2.7 and another for v2.4, and decide to use either one, based on the checksum
 of the *.sys file.

   
I have generated new the patch.

Cheers,
Stefan
 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
   


-- 
Stefan Ringel stefan.rin...@arcor.de

--- usr/src/src/tm6010/v4l-dvb/linux/Documentation/video4linux/extract_xc3028.pl	2010-03-27 13:14:22.215564668 +0100
+++ home/stefan/Downloads/tm6000-xc3028/extract_xc3028.pl	2010-04-15 21:24:18.546613323 +0200
@@ -5,12 +5,18 @@
 #
 # In order to use, you need to:
 #	1) Download the windows driver with something like:
+#	Version 2.4
+#		wget http://www.twinhan.com/files/AW/BDA T/20080303_V1.0.6.7.zip
+#		or wget http://www.stefanringel.de/pub/20080303_V1.0.6.7.zip
+#	Version 2.7
 #		wget http://www.steventoth.net/linux/xc5000/HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip
-#	2) Extract the file hcw85bda.sys from the zip into the current dir:
+#	2) Extract the files from the zip into the current dir:
+#		unzip -j 20080303_V1.0.6.7.zip 20080303_v1.0.6.7/UDXTTM6000.sys
 #		unzip -j HVR-12x0-14x0-17x0_1_25_25271_WHQL.zip Driver85/hcw85bda.sys
 #	3) run the script:
 #		./extract_xc3028.pl
-#	4) copy the generated file:
+#	4) copy the generated files:
+#		cp xc3028-v24.fw /lib/firmware
 #		cp xc3028-v27.fw /lib/firmware
 
 #use strict;
@@ -135,7 +141,7 @@
 	}
 }
 
-sub main_firmware()
+sub main_firmware_24()
 {
 	my $out;
 	my $j=0;
@@ -146,8 +152,774 @@
 
 	for ($j = length($name); $j 32; $j++) {
 		$name = $name.chr(0);
+	}
+
+	open OUTFILE, $outfile;
+	syswrite(OUTFILE, $name);
+	write_le16($version);
+	write_le16($nr_desc);
+
+	#
+	# Firmware 0, type: BASE FW   F8MHZ (0x0003), id: (), size: 6635
+	#
+
+	write_le32(0x0003);			# Type
+	

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

2010-04-15 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 Apr 15 19:00:20 CEST 2010
path:http://www.linuxtv.org/hg/v4l-dvb
changeset:   14571:a95a93b29a94
git master:   f6760aa024199cfbce564311dc4bc4d47b6fb349
git media-master: 184b7c85f31583632ad00c062a295b622759eef3
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-armv5: OK
linux-2.6.34-rc1-armv5: OK
linux-2.6.32.6-armv5-davinci: OK
linux-2.6.33-armv5-davinci: OK
linux-2.6.34-rc1-armv5-davinci: OK
linux-2.6.32.6-armv5-ixp: OK
linux-2.6.33-armv5-ixp: OK
linux-2.6.34-rc1-armv5-ixp: OK
linux-2.6.32.6-armv5-omap2: OK
linux-2.6.33-armv5-omap2: OK
linux-2.6.34-rc1-armv5-omap2: OK
linux-2.6.22.19-i686: WARNINGS
linux-2.6.23.17-i686: WARNINGS
linux-2.6.24.7-i686: OK
linux-2.6.25.20-i686: OK
linux-2.6.26.8-i686: OK
linux-2.6.27.44-i686: OK
linux-2.6.28.10-i686: OK
linux-2.6.29.1-i686: WARNINGS
linux-2.6.30.10-i686: OK
linux-2.6.31.12-i686: OK
linux-2.6.32.6-i686: OK
linux-2.6.33-i686: OK
linux-2.6.34-rc1-i686: WARNINGS
linux-2.6.32.6-m32r: OK
linux-2.6.33-m32r: OK
linux-2.6.34-rc1-m32r: OK
linux-2.6.32.6-mips: OK
linux-2.6.33-mips: OK
linux-2.6.34-rc1-mips: OK
linux-2.6.32.6-powerpc64: OK
linux-2.6.33-powerpc64: OK
linux-2.6.34-rc1-powerpc64: WARNINGS
linux-2.6.22.19-x86_64: WARNINGS
linux-2.6.23.17-x86_64: WARNINGS
linux-2.6.24.7-x86_64: OK
linux-2.6.25.20-x86_64: OK
linux-2.6.26.8-x86_64: OK
linux-2.6.27.44-x86_64: OK
linux-2.6.28.10-x86_64: OK
linux-2.6.29.1-x86_64: WARNINGS
linux-2.6.30.10-x86_64: OK
linux-2.6.31.12-x86_64: OK
linux-2.6.32.6-x86_64: OK
linux-2.6.33-x86_64: OK
linux-2.6.34-rc1-x86_64: WARNINGS
linux-git-armv5: OK
linux-git-armv5-davinci: OK
linux-git-armv5-ixp: OK
linux-git-armv5-omap2: OK
linux-git-i686: WARNINGS
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-x86_64: WARNINGS
spec: ERRORS
spec-git: OK
sparse: ERRORS
linux-2.6.16.62-i686: WARNINGS
linux-2.6.17.14-i686: WARNINGS
linux-2.6.18.8-i686: WARNINGS
linux-2.6.19.7-i686: WARNINGS
linux-2.6.20.21-i686: WARNINGS
linux-2.6.21.7-i686: WARNINGS
linux-2.6.16.62-x86_64: WARNINGS
linux-2.6.17.14-x86_64: WARNINGS
linux-2.6.18.8-x86_64: WARNINGS
linux-2.6.19.7-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/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: [PATCH] Add FE_CAN_PSK_8 to allow apps to identify PSK_8 capable DVB devices

2010-04-15 Thread Manu Abraham
Hi Klaus,

On Sun, Apr 11, 2010 at 1:12 PM, Klaus Schmidinger
klaus.schmidin...@tvdr.de wrote:
 The enum fe_caps provides flags that allow an application to detect
 whether a device is capable of handling various modulation types etc.
 A flag for detecting PSK_8, however, is missing.
 This patch adds the flag FE_CAN_PSK_8 to frontend.h and implements
 it for the gp8psk-fe.c and cx24116.c driver (apparently the only ones
 with PSK_8). Only the gp8psk-fe.c has been explicitly tested, though.


The FE_CAN_PSK_8 is a misnomer. In fact what you are looking for is
FE_CAN_TURBO_FEC
FE_CAN_8PSK will be matched by any DVB-S2 capable frontend, so that
name is very likely to cause a very large confusion.

Another thing I am not entirely sure though ... The cx24116 requires a
separate firmware and maybe some necessary code changes (?) for Turbo
FEC to be supported, so I wonder whether applying the flag to the
cx24116 driver would be any relevant

With regards to the Genpix driver, i guess the flag would be necessary.

 Signed-off-by: Klaus Schmidinger klaus.schmidin...@tvdr.de
 Tested-by: Derek Kelly user@gmail.com

Other than for the naming of the Flag (which i suggest strongly to
update the patch) and the application to the cx24116 driver, it looks
appropriate;

Acked-by: Manu Abraham m...@linuxtv.org






 --- linux/include/linux/dvb/frontend.h.001      2010-04-05 16:13:08.0 
 +0200
 +++ linux/include/linux/dvb/frontend.h  2010-04-10 12:08:47.0 +0200
 @@ -62,6 +62,7 @@
        FE_CAN_8VSB                     = 0x20,
        FE_CAN_16VSB                    = 0x40,
        FE_HAS_EXTENDED_CAPS            = 0x80,   /* We need more bitspace 
 for newer APIs, indicate this. */
 +       FE_CAN_PSK_8                    = 0x800,  /* frontend supports 
 8psk modulation */
        FE_CAN_2G_MODULATION            = 0x1000, /* frontend supports 
 2nd generation modulation (DVB-S2) */
        FE_NEEDS_BENDING                = 0x2000, /* not supported 
 anymore, don't use (frontend requires frequency bending) */
        FE_CAN_RECOVER                  = 0x4000, /* frontend can recover 
 from a cable unplug automatically */
 --- linux/drivers/media/dvb/dvb-usb/gp8psk-fe.c.001     2010-04-05 
 16:13:08.0 +0200
 +++ linux/drivers/media/dvb/dvb-usb/gp8psk-fe.c 2010-04-10 12:18:37.0 
 +0200
 @@ -349,7 +349,7 @@
                         * FE_CAN_QAM_16 is for compatibility
                         * (Myth incorrectly detects Turbo-QPSK as plain 
 QAM-16)
                         */
 -                       FE_CAN_QPSK | FE_CAN_QAM_16
 +                       FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_PSK_8
        },

        .release = gp8psk_fe_release,
 --- linux/drivers/media/dvb/frontends/cx24116.c.001     2010-04-05 
 16:13:08.0 +0200
 +++ linux/drivers/media/dvb/frontends/cx24116.c 2010-04-10 13:40:32.0 
 +0200
 @@ -1496,7 +1496,7 @@
                        FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
                        FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
                        FE_CAN_2G_MODULATION |
 -                       FE_CAN_QPSK | FE_CAN_RECOVER
 +                       FE_CAN_QPSK | FE_CAN_RECOVER | FE_CAN_PSK_8
        },

        .release = cx24116_release,
 --
 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

--
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 0/8] Series short description

2010-04-15 Thread David Härdeman
The following series implements the suggested change to ir-core
to use a 1:31 struct for pulse/space durations, adds two new
raw decoders, converts two users of ir-functions to plain ir-core
and fixes a few small bugs in ir-core.

---

David Härdeman (8):
  ir-core: change duration to be coded as a u32 integer
  ir-core: Add JVC support to ir-core
  ir-core: Add Sony support to ir-core
  ir-core: remove ir-functions usage from dm1105
  ir-core: convert mantis from ir-functions.c
  ir-core: fix double spinlock init in drivers/media/IR/rc-map.c
  ir-core: fix table resize during keymap init
  ir-core: fix some confusing comments


 drivers/media/IR/Kconfig   |   18 ++
 drivers/media/IR/Makefile  |2 
 drivers/media/IR/ir-core-priv.h|   63 ---
 drivers/media/IR/ir-jvc-decoder.c  |  320 
 drivers/media/IR/ir-keytable.c |   12 +
 drivers/media/IR/ir-nec-decoder.c  |  120 --
 drivers/media/IR/ir-raw-event.c|   32 ++--
 drivers/media/IR/ir-rc5-decoder.c  |  105 ++--
 drivers/media/IR/ir-rc6-decoder.c  |  221 +
 drivers/media/IR/ir-sony-decoder.c |  312 +++
 drivers/media/IR/ir-sysfs.c|   12 +
 drivers/media/IR/rc-map.c  |5 -
 12 files changed, 955 insertions(+), 267 deletions(-)
 create mode 100644 drivers/media/IR/ir-jvc-decoder.c
 create mode 100644 drivers/media/IR/ir-sony-decoder.c

--
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/8] ir-core: change duration to be coded as a u32 integer

2010-04-15 Thread David Härdeman
This patch implements the agreed upon 1:31 integer encoded pulse/duration
struct for ir-core raw decoders. All decoders have been tested after the
change. Comments are welcome.

Signed-off-by: David Härdeman da...@hardeman.nu
---
 drivers/media/IR/ir-core-priv.h   |   49 
 drivers/media/IR/ir-nec-decoder.c |  120 +++-
 drivers/media/IR/ir-raw-event.c   |   30 +++--
 drivers/media/IR/ir-rc5-decoder.c |  105 --
 drivers/media/IR/ir-rc6-decoder.c |  221 +++--
 5 files changed, 271 insertions(+), 254 deletions(-)

diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h
index ef7f543..707beeb 100644
--- a/drivers/media/IR/ir-core-priv.h
+++ b/drivers/media/IR/ir-core-priv.h
@@ -21,7 +21,7 @@
 struct ir_raw_handler {
struct list_head list;
 
-   int (*decode)(struct input_dev *input_dev, s64 duration);
+   int (*decode)(struct input_dev *input_dev, struct ir_raw_event event);
int (*raw_register)(struct input_dev *input_dev);
int (*raw_unregister)(struct input_dev *input_dev);
 };
@@ -35,26 +35,28 @@ struct ir_raw_event_ctrl {
 };
 
 /* macros for IR decoders */
-#define PULSE(units)   ((units))
-#define SPACE(units)   (-(units))
-#define IS_RESET(duration) ((duration) == 0)
-#define IS_PULSE(duration) ((duration)  0)
-#define IS_SPACE(duration) ((duration)  0)
-#define DURATION(duration) (abs((duration)))
-#define IS_TRANSITION(x, y)((x) * (y)  0)
-#define DECREASE_DURATION(duration, amount)\
-   do {\
-   if (IS_SPACE(duration)) \
-   duration += (amount);   \
-   else if (IS_PULSE(duration))\
-   duration -= (amount);   \
-   } while (0)
-
-#define TO_UNITS(duration, unit_len)   \
-   ((int)((duration)  0 ? \
-   DIV_ROUND_CLOSEST(abs((duration)), (unit_len)) :\
-   -DIV_ROUND_CLOSEST(abs((duration)), (unit_len
-#define TO_US(duration)((int)TO_UNITS(duration, 1000))
+static inline bool geq_margin(unsigned d1, unsigned d2, unsigned margin) {
+   return d1  (d2 - margin);
+}
+
+static inline bool eq_margin(unsigned d1, unsigned d2, unsigned margin) {
+   return ((d1  (d2 - margin))  (d1  (d2 + margin)));
+}
+
+static inline bool is_transition(struct ir_raw_event *x, struct ir_raw_event 
*y) {
+   return x-pulse != y-pulse;
+}
+
+static inline void decrease_duration(struct ir_raw_event *ev, unsigned 
duration) {
+   if (duration  ev-duration)
+   ev-duration = 0;
+   else
+   ev-duration -= duration;
+}
+
+#define TO_US(duration)(((duration) + 500) / 1000)
+#define TO_STR(is_pulse)   ((is_pulse) ? pulse : space)
+#define IS_RESET(ev)   (ev.duration == 0)
 
 /*
  * Routines from ir-keytable.c to be used internally on ir-core and decoders
@@ -76,11 +78,6 @@ void ir_unregister_class(struct input_dev *input_dev);
  */
 int ir_raw_event_register(struct input_dev *input_dev);
 void ir_raw_event_unregister(struct input_dev *input_dev);
-static inline void ir_raw_event_reset(struct input_dev *input_dev)
-{
-   ir_raw_event_store(input_dev, 0);
-   ir_raw_event_handle(input_dev);
-}
 int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
 void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
 void ir_raw_init(void);
diff --git a/drivers/media/IR/ir-nec-decoder.c 
b/drivers/media/IR/ir-nec-decoder.c
index 14609d9..ba79233 100644
--- a/drivers/media/IR/ir-nec-decoder.c
+++ b/drivers/media/IR/ir-nec-decoder.c
@@ -17,13 +17,15 @@
 
 #define NEC_NBITS  32
 #define NEC_UNIT   562500  /* ns */
-#define NEC_HEADER_PULSE   PULSE(16)
-#define NECX_HEADER_PULSE  PULSE(8) /* Less common NEC variant */
-#define NEC_HEADER_SPACE   SPACE(8)
-#define NEC_REPEAT_SPACE   SPACE(4)
-#define NEC_BIT_PULSE  PULSE(1)
-#define NEC_BIT_0_SPACESPACE(1)
-#define NEC_BIT_1_SPACESPACE(3)
+#define NEC_HEADER_PULSE   (16 * NEC_UNIT)
+#define NECX_HEADER_PULSE  (8  * NEC_UNIT) /* Less common NEC variant */
+#define NEC_HEADER_SPACE   (8  * NEC_UNIT)
+#define NEC_REPEAT_SPACE   (8  * NEC_UNIT)
+#define NEC_BIT_PULSE  (1  * NEC_UNIT)
+#define NEC_BIT_0_SPACE(1  * NEC_UNIT)
+#define NEC_BIT_1_SPACE(3  * NEC_UNIT)
+#defineNEC_TRAILER_PULSE   (1  * NEC_UNIT)
+#defineNEC_TRAILER_SPACE   (10 * NEC_UNIT) /* even longer in 
reality */
 
 /* Used to register nec_decoder clients */
 

[PATCH 2/8] ir-core: Add JVC support to ir-core

2010-04-15 Thread David Härdeman
This patch adds a JVC decoder to ir-core.

Signed-off-by: David Härdeman da...@hardeman.nu
---
 drivers/media/IR/Kconfig  |9 +
 drivers/media/IR/Makefile |1 
 drivers/media/IR/ir-core-priv.h   |7 +
 drivers/media/IR/ir-jvc-decoder.c |  320 +
 drivers/media/IR/ir-raw-event.c   |1 
 drivers/media/IR/ir-sysfs.c   |4 
 6 files changed, 342 insertions(+), 0 deletions(-)
 create mode 100644 drivers/media/IR/ir-jvc-decoder.c

diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig
index ee66d16..179e4c3 100644
--- a/drivers/media/IR/Kconfig
+++ b/drivers/media/IR/Kconfig
@@ -36,3 +36,12 @@ config IR_RC6_DECODER
---help---
   Enable this option if you have an infrared remote control which
   uses the RC6 protocol, and you need software decoding support.
+
+config IR_JVC_DECODER
+   tristate Enable IR raw decoder for the JVC protocol
+   depends on IR_CORE
+   default y
+
+   ---help---
+  Enable this option if you have an infrared remote control which
+  uses the JVC protocol, and you need software decoding support.
diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile
index 792d9ca..8d0098f 100644
--- a/drivers/media/IR/Makefile
+++ b/drivers/media/IR/Makefile
@@ -8,3 +8,4 @@ obj-$(CONFIG_VIDEO_IR) += ir-common.o
 obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
 obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
 obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o
+obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o
diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h
index 707beeb..4b1a21d 100644
--- a/drivers/media/IR/ir-core-priv.h
+++ b/drivers/media/IR/ir-core-priv.h
@@ -111,4 +111,11 @@ void ir_raw_init(void);
 #define load_rc6_decode()  0
 #endif
 
+/* from ir-jvc-decoder.c */
+#ifdef CONFIG_IR_JVC_DECODER_MODULE
+#define load_jvc_decode()  request_module(ir-jvc-decoder)
+#else
+#define load_jvc_decode()  0
+#endif
+
 #endif /* _IR_RAW_EVENT */
diff --git a/drivers/media/IR/ir-jvc-decoder.c 
b/drivers/media/IR/ir-jvc-decoder.c
new file mode 100644
index 000..0b80494
--- /dev/null
+++ b/drivers/media/IR/ir-jvc-decoder.c
@@ -0,0 +1,320 @@
+/* ir-jvc-decoder.c - handle JVC IR Pulse/Space protocol
+ *
+ * Copyright (C) 2010 by David Härdeman da...@hardeman.nu
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * 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.
+ */
+
+#include linux/bitrev.h
+#include ir-core-priv.h
+
+#define JVC_NBITS  16  /* dev(8) + func(8) */
+#define JVC_UNIT   525000  /* ns */
+#define JVC_HEADER_PULSE   (16 * JVC_UNIT) /* lack of header - repeat */
+#define JVC_HEADER_SPACE   (8  * JVC_UNIT)
+#define JVC_BIT_PULSE  (1  * JVC_UNIT)
+#define JVC_BIT_0_SPACE(1  * JVC_UNIT)
+#define JVC_BIT_1_SPACE(3  * JVC_UNIT)
+#define JVC_TRAILER_PULSE  (1  * JVC_UNIT)
+#defineJVC_TRAILER_SPACE   (35 * JVC_UNIT)
+
+/* Used to register jvc_decoder clients */
+static LIST_HEAD(decoder_list);
+DEFINE_SPINLOCK(decoder_lock);
+
+enum jvc_state {
+   STATE_INACTIVE,
+   STATE_HEADER_SPACE,
+   STATE_BIT_PULSE,
+   STATE_BIT_SPACE,
+   STATE_TRAILER_PULSE,
+   STATE_TRAILER_SPACE,
+};
+
+struct decoder_data {
+   struct list_headlist;
+   struct ir_input_dev *ir_dev;
+   int enabled:1;
+
+   /* State machine control */
+   enum jvc_state  state;
+   u16 jvc_bits;
+   u16 jvc_old_bits;
+   unsignedcount;
+   boolfirst;
+   booltoggle;
+};
+
+
+/**
+ * get_decoder_data()  - gets decoder data
+ * @input_dev: input device
+ *
+ * Returns the struct decoder_data that corresponds to a device
+ */
+static struct decoder_data *get_decoder_data(struct  ir_input_dev *ir_dev)
+{
+   struct decoder_data *data = NULL;
+
+   spin_lock(decoder_lock);
+   list_for_each_entry(data, decoder_list, list) {
+   if (data-ir_dev == ir_dev)
+   break;
+   }
+   spin_unlock(decoder_lock);
+   return data;
+}
+
+static ssize_t store_enabled(struct device *d,
+struct device_attribute *mattr,
+const char *buf,
+size_t len)
+{
+   unsigned long value;
+   struct ir_input_dev *ir_dev = dev_get_drvdata(d);
+   struct decoder_data *data = 

[PATCH 3/8] ir-core: Add Sony support to ir-core

2010-04-15 Thread David Härdeman
This patch adds a Sony12/15/20 decoder to ir-core.

Signed-off-by: David Härdeman da...@hardeman.nu
---
 drivers/media/IR/Kconfig   |9 +
 drivers/media/IR/Makefile  |1 
 drivers/media/IR/ir-core-priv.h|7 +
 drivers/media/IR/ir-raw-event.c|1 
 drivers/media/IR/ir-sony-decoder.c |  312 
 drivers/media/IR/ir-sysfs.c|4 
 6 files changed, 334 insertions(+), 0 deletions(-)
 create mode 100644 drivers/media/IR/ir-sony-decoder.c

diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig
index 179e4c3..25e10b5 100644
--- a/drivers/media/IR/Kconfig
+++ b/drivers/media/IR/Kconfig
@@ -45,3 +45,12 @@ config IR_JVC_DECODER
---help---
   Enable this option if you have an infrared remote control which
   uses the JVC protocol, and you need software decoding support.
+
+config IR_SONY_DECODER
+   tristate Enable IR raw decoder for the Sony protocol
+   depends on IR_CORE
+   default y
+
+   ---help---
+  Enable this option if you have an infrared remote control which
+  uses the Sony protocol, and you need software decoding support.
diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile
index 8d0098f..a12ee37 100644
--- a/drivers/media/IR/Makefile
+++ b/drivers/media/IR/Makefile
@@ -9,3 +9,4 @@ obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
 obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
 obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o
 obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o
+obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o
diff --git a/drivers/media/IR/ir-core-priv.h b/drivers/media/IR/ir-core-priv.h
index 4b1a21d..04962a6 100644
--- a/drivers/media/IR/ir-core-priv.h
+++ b/drivers/media/IR/ir-core-priv.h
@@ -118,4 +118,11 @@ void ir_raw_init(void);
 #define load_jvc_decode()  0
 #endif
 
+/* from ir-sony-decoder.c */
+#ifdef CONFIG_IR_SONY_DECODER_MODULE
+#define load_sony_decode() request_module(ir-sony-decoder)
+#else
+#define load_sony_decode() 0
+#endif
+
 #endif /* _IR_RAW_EVENT */
diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c
index 7eef6bf..ea68a3f 100644
--- a/drivers/media/IR/ir-raw-event.c
+++ b/drivers/media/IR/ir-raw-event.c
@@ -234,6 +234,7 @@ static void init_decoders(struct work_struct *work)
load_rc5_decode();
load_rc6_decode();
load_jvc_decode();
+   load_sony_decode();
 
/* If needed, we may later add some init code. In this case,
   it is needed to change the CONFIG_MODULE test at ir-core.h
diff --git a/drivers/media/IR/ir-sony-decoder.c 
b/drivers/media/IR/ir-sony-decoder.c
new file mode 100644
index 000..9f440c5
--- /dev/null
+++ b/drivers/media/IR/ir-sony-decoder.c
@@ -0,0 +1,312 @@
+/* ir-sony-decoder.c - handle Sony IR Pulse/Space protocol
+ *
+ * Copyright (C) 2010 by David Härdeman da...@hardeman.nu
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation version 2 of the License.
+ *
+ * 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.
+ */
+
+#include linux/bitrev.h
+#include ir-core-priv.h
+
+#define SONY_UNIT  60 /* ns */
+#define SONY_HEADER_PULSE  (4 * SONY_UNIT)
+#defineSONY_HEADER_SPACE   (1 * SONY_UNIT)
+#define SONY_BIT_0_PULSE   (1 * SONY_UNIT)
+#define SONY_BIT_1_PULSE   (2 * SONY_UNIT)
+#define SONY_BIT_SPACE (1 * SONY_UNIT)
+#define SONY_TRAILER_SPACE (10 * SONY_UNIT) /* minimum */
+
+/* Used to register sony_decoder clients */
+static LIST_HEAD(decoder_list);
+static DEFINE_SPINLOCK(decoder_lock);
+
+enum sony_state {
+   STATE_INACTIVE,
+   STATE_HEADER_SPACE,
+   STATE_BIT_PULSE,
+   STATE_BIT_SPACE,
+   STATE_FINISHED,
+};
+
+struct decoder_data {
+   struct list_headlist;
+   struct ir_input_dev *ir_dev;
+   int enabled:1;
+
+   /* State machine control */
+   enum sony_state state;
+   u32 sony_bits;
+   unsignedcount;
+};
+
+
+/**
+ * get_decoder_data()  - gets decoder data
+ * @input_dev: input device
+ *
+ * Returns the struct decoder_data that corresponds to a device
+ */
+static struct decoder_data *get_decoder_data(struct  ir_input_dev *ir_dev)
+{
+   struct decoder_data *data = NULL;
+
+   spin_lock(decoder_lock);
+   list_for_each_entry(data, decoder_list, list) {
+   if (data-ir_dev == ir_dev)
+   break;
+   }
+   spin_unlock(decoder_lock);
+   return data;
+}
+
+static ssize_t store_enabled(struct device *d,
+struct 

[PATCH 4/8] ir-core: remove ir-functions usage from dm1105

2010-04-15 Thread David Härdeman
Convert drivers/media/dvb/dm1105/dm1105.c to not rely on
ir-functions.c.

Signed-off-by: David Härdeman da...@hardeman.nu
---
 0 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dm1105/dm1105.c 
b/drivers/media/dvb/dm1105/dm1105.c
index 333d7b1..89f1eca 100644
--- a/drivers/media/dvb/dm1105/dm1105.c
+++ b/drivers/media/dvb/dm1105/dm1105.c
@@ -27,7 +27,7 @@
 #include linux/pci.h
 #include linux/dma-mapping.h
 #include linux/input.h
-#include media/ir-common.h
+#include media/ir-core.h
 
 #include demux.h
 #include dmxdev.h
@@ -266,7 +266,6 @@ static void dm1105_card_list(struct pci_dev *pci)
 /* infrared remote control */
 struct infrared {
struct input_dev*input_dev;
-   struct ir_input_state   ir;
charinput_phys[32];
struct work_struct  work;
u32 ir_command;
@@ -532,8 +531,7 @@ static void dm1105_emit_key(struct work_struct *work)
 
data = (ircom  8)  0x7f;
 
-   ir_input_keydown(ir-input_dev, ir-ir, data);
-   ir_input_nokey(ir-input_dev, ir-ir);
+   ir_keydown(ir-input_dev, data, 0);
 }
 
 /* work handler */
@@ -596,7 +594,6 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
 {
struct input_dev *input_dev;
char *ir_codes = NULL;
-   u64 ir_type = IR_TYPE_OTHER;
int err = -ENOMEM;
 
input_dev = input_allocate_device();
@@ -607,12 +604,6 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
snprintf(dm1105-ir.input_phys, sizeof(dm1105-ir.input_phys),
pci-%s/ir0, pci_name(dm1105-pdev));
 
-   err = ir_input_init(input_dev, dm1105-ir.ir, ir_type);
-   if (err  0) {
-   input_free_device(input_dev);
-   return err;
-   }
-
input_dev-name = DVB on-card IR receiver;
input_dev-phys = dm1105-ir.input_phys;
input_dev-id.bustype = BUS_PCI;
@@ -630,8 +621,12 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105)
INIT_WORK(dm1105-ir.work, dm1105_emit_key);
 
err = ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME);
+   if (err  0) {
+   input_free_device(input_dev);
+   return err;
+   }
 
-   return err;
+   return 0;
 }
 
 void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105)

--
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 5/8] ir-core: convert mantis from ir-functions.c

2010-04-15 Thread David Härdeman
Convert drivers/media/dvb/mantis/mantis_input.c to not use ir-functions.c
(The driver is anyway not complete enough to actually use the subsystem yet).

Signed-off-by: David Härdeman da...@hardeman.nu
---
 0 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/mantis/mantis_input.c 
b/drivers/media/dvb/mantis/mantis_input.c
index 3d4e466..a99489b 100644
--- a/drivers/media/dvb/mantis/mantis_input.c
+++ b/drivers/media/dvb/mantis/mantis_input.c
@@ -19,7 +19,7 @@
 */
 
 #include linux/input.h
-#include media/ir-common.h
+#include media/ir-core.h
 #include linux/pci.h
 
 #include dmxdev.h
@@ -104,7 +104,6 @@ EXPORT_SYMBOL_GPL(ir_mantis);
 int mantis_input_init(struct mantis_pci *mantis)
 {
struct input_dev *rc;
-   struct ir_input_state rc_state;
char name[80], dev[80];
int err;
 
@@ -120,8 +119,6 @@ int mantis_input_init(struct mantis_pci *mantis)
rc-name = name;
rc-phys = dev;
 
-   ir_input_init(rc, rc_state, IR_TYPE_OTHER);
-
rc-id.bustype  = BUS_PCI;
rc-id.vendor   = mantis-vendor_id;
rc-id.product  = mantis-device_id;

--
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 6/8] ir-core: fix double spinlock init in drivers/media/IR/rc-map.c

2010-04-15 Thread David Härdeman
Fix a double initialization of the same spinlock in drivers/media/IR/rc-map.c.

Signed-off-by: David Härdeman da...@hardeman.nu
---
 drivers/media/IR/ir-sysfs.c |2 --
 drivers/media/IR/rc-map.c   |5 -
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c
index dfd45fa..876baae 100644
--- a/drivers/media/IR/ir-sysfs.c
+++ b/drivers/media/IR/ir-sysfs.c
@@ -294,8 +294,6 @@ static int __init ir_core_init(void)
 
/* Initialize/load the decoders/keymap code that will be used */
ir_raw_init();
-   rc_map_init();
-
 
return 0;
 }
diff --git a/drivers/media/IR/rc-map.c b/drivers/media/IR/rc-map.c
index 1a3f4b1..caf6a27 100644
--- a/drivers/media/IR/rc-map.c
+++ b/drivers/media/IR/rc-map.c
@@ -81,8 +81,3 @@ void ir_unregister_map(struct rc_keymap *map)
 }
 EXPORT_SYMBOL_GPL(ir_unregister_map);
 
-void rc_map_init(void)
-{
-   spin_lock_init(rc_map_lock);
-
-}

--
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 7/8] ir-core: fix table resize during keymap init

2010-04-15 Thread David Härdeman
drivers/media/IR/ir-keytable.c would alloc a suitably sized keymap table
only to have it resized as it is populated with the initial keymap.

Signed-off-by: David Härdeman da...@hardeman.nu
---
 drivers/media/IR/ir-keytable.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 01bddc4..b8baf8f 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -77,6 +77,7 @@ static int ir_resize_table(struct ir_scancode_table *rc_tab)
  * @rc_tab:the struct ir_scancode_table to set the keycode in
  * @scancode:  the scancode for the ir command
  * @keycode:   the keycode for the ir command
+ * @resize:whether the keytable may be shrunk
  * @return:-EINVAL if the keycode could not be inserted, otherwise zero.
  *
  * This routine is used internally to manipulate the scancode-keycode table.
@@ -84,7 +85,8 @@ static int ir_resize_table(struct ir_scancode_table *rc_tab)
  */
 static int ir_do_setkeycode(struct input_dev *dev,
struct ir_scancode_table *rc_tab,
-   int scancode, int keycode)
+   int scancode, int keycode,
+   bool resize)
 {
unsigned int i;
int old_keycode = KEY_RESERVED;
@@ -128,7 +130,7 @@ static int ir_do_setkeycode(struct input_dev *dev,
 
if (old_keycode == KEY_RESERVED) {
/* No previous mapping found, we might need to grow the table */
-   if (ir_resize_table(rc_tab))
+   if (resize  ir_resize_table(rc_tab))
return -ENOMEM;
 
IR_dprintk(1, #%d: New scan 0x%04x with key 0x%04x\n,
@@ -176,7 +178,7 @@ static int ir_setkeycode(struct input_dev *dev,
struct ir_scancode_table *rc_tab = ir_dev-rc_tab;
 
spin_lock_irqsave(rc_tab-lock, flags);
-   rc = ir_do_setkeycode(dev, rc_tab, scancode, keycode);
+   rc = ir_do_setkeycode(dev, rc_tab, scancode, keycode, true);
spin_unlock_irqrestore(rc_tab-lock, flags);
return rc;
 }
@@ -203,7 +205,7 @@ static int ir_setkeytable(struct input_dev *dev,
spin_lock_irqsave(rc_tab-lock, flags);
for (i = 0; i  from-size; i++) {
rc = ir_do_setkeycode(dev, to, from-scan[i].scancode,
- from-scan[i].keycode);
+ from-scan[i].keycode, false);
if (rc)
break;
}

--
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 8/8] ir-core: fix some confusing comments

2010-04-15 Thread David Härdeman
Fix some confusing comments in drivers/media/IR/*

Signed-off-by: David Härdeman da...@hardeman.nu
---
 drivers/media/IR/ir-keytable.c |2 +-
 drivers/media/IR/ir-sysfs.c|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index b8baf8f..de923fc 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -1,4 +1,4 @@
-/* ir-register.c - handle IR scancode-keycode tables
+/* ir-keytable.c - handle IR scancode-keycode tables
  *
  * Copyright (C) 2009 by Mauro Carvalho Chehab mche...@redhat.com
  *
diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c
index 876baae..501dc2f 100644
--- a/drivers/media/IR/ir-sysfs.c
+++ b/drivers/media/IR/ir-sysfs.c
@@ -1,4 +1,4 @@
-/* ir-register.c - handle IR scancode-keycode tables
+/* ir-sysfs.c - sysfs interface for RC devices (/sys/class/rc)
  *
  * Copyright (C) 2009-2010 by Mauro Carvalho Chehab mche...@redhat.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 0/8] Series short description

2010-04-15 Thread David Härdeman
On Thu, Apr 15, 2010 at 11:45:55PM +0200, David Härdeman wrote:
 The following series implements the suggested change to ir-core
 to use a 1:31 struct for pulse/space durations, adds two new
 raw decoders, converts two users of ir-functions to plain ir-core
 and fixes a few small bugs in ir-core.

Sorry about the subject of this mail...missed filling in that field :)

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


s2255drv: V4L2_MODE_HIGHQUALITY correction

2010-04-15 Thread sensoray-dev
# HG changeset patch
# User Dean Anderson linux-...@sensoray.com
# Date 1271371256 25200
# Node ID f12b3074bb02dbb9b9d5af3aa816bd53e6b61dd1
# Parent  bffdebcb994ce8c7e493524087f601f7f1134f09
s2255drv: fix for V4L2_MODE_HIGHQUALITY

From: Dean Anderson linux-...@sensoray.com

V4L2 high quality mode not being saved
comments about experimental API removed

Priority: normal

Signed-off-by: Dean Anderson linux-...@sensoray.com

diff -r bffdebcb994c -r f12b3074bb02 linux/drivers/media/video/s2255drv.c
--- a/linux/drivers/media/video/s2255drv.c  Thu Apr 15 08:48:31 2010 -0700
+++ b/linux/drivers/media/video/s2255drv.c  Thu Apr 15 15:40:56 2010 -0700
@@ -23,8 +23,6 @@
  *
  * -full size, color mode YUYV or YUV422P 1/2 frame rate: all 4 channels
  *  at once.
- *  (TODO: Incorporate videodev2 frame rate(FR) enumeration,
- *  which is currently experimental.)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -127,7 +125,7 @@
 #define MASK_COLOR   0x00ff
 #define MASK_JPG_QUALITY 0xff00
 #define MASK_INPUT_TYPE  0x000f
-/* frame decimation. Not implemented by V4L yet(experimental in V4L) */
+/* frame decimation. */
 #define FDEC_1 1   /* capture every frame. default */
 #define FDEC_2 2   /* capture every 2nd frame */
 #define FDEC_3 3   /* capture every 3rd frame */
@@ -1662,6 +1660,7 @@
}
mode.fdec = fdec;
sp-parm.capture.timeperframe.denominator = def_dem;
+   stream-cap_parm = sp-parm.capture;
s2255_set_mode(channel, mode);
dprintk(4, %s capture mode, %d timeperframe %d/%d, fdec %d\n,
__func__,

--
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 5/8] ir-core: convert mantis from ir-functions.c

2010-04-15 Thread Manu Abraham
On Fri, Apr 16, 2010 at 1:46 AM, David Härdeman da...@hardeman.nu wrote:
 Convert drivers/media/dvb/mantis/mantis_input.c to not use ir-functions.c
 (The driver is anyway not complete enough to actually use the subsystem yet).

Huh ? I don't follow what you imply here ..
--
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


s2255drv: V4L2_MODE_HIGHQUALITY fix

2010-04-15 Thread sensoray-dev
# HG changeset patch
# User Dean Anderson linux-...@sensoray.com
# Date 1271371685 25200
# Node ID fae20d178e2cc96d75a43c50e0f84140022091a3
# Parent  f12b3074bb02dbb9b9d5af3aa816bd53e6b61dd1
s2255drv: V4L2 mode high quality fix

From: Dean Anderson linux-...@sensoray.com

fix for last patch in case it is applied. submitted incorrect patch 
(channel/stream).

Priority: high

Signed-off-by: Dean Anderson linux-...@sensoray.com

diff -r f12b3074bb02 -r fae20d178e2c linux/drivers/media/video/s2255drv.c
--- a/linux/drivers/media/video/s2255drv.c  Thu Apr 15 15:40:56 2010 -0700
+++ b/linux/drivers/media/video/s2255drv.c  Thu Apr 15 15:48:05 2010 -0700
@@ -1660,7 +1660,7 @@
}
mode.fdec = fdec;
sp-parm.capture.timeperframe.denominator = def_dem;
-   stream-cap_parm = sp-parm.capture;
+   channel-cap_parm = sp-parm.capture;
s2255_set_mode(channel, mode);
dprintk(4, %s capture mode, %d timeperframe %d/%d, fdec %d\n,
__func__,

--
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: Kworld Plus TV Hybrid PCI (DVB-T 210SE)

2010-04-15 Thread hermann pitton
Hi Peter,

Am Donnerstag, den 15.04.2010, 23:30 +1000 schrieb 0123pe...@gmail.com:
 on Thu, 15 Apr 2010 01:32 pm
 in the Usenet newsgroup gmane.linux.drivers.video-input-infrastructure
 hermann pitton wrote:
 
  Hi,
  
  to be honest, there is a little too much delay on those reports.
 
 I have been very slow, sorry.  

no problem, but it becomes also a little hard to me to recap the issues.

As said, Hartmut had the best pointers I guess.

   did not even notice a problem with Trent's prior patch.
   The same is also at vivi.
   
   Should I have a file called /etc/modprobe.d/TVanywhereAD 
   that contains the line, 
   
   options saa7134 card=94 gpio_tracking i2c_debug=1
   
   and then watch the command line output of kaffeine?  
  
  I've found a GUI that allows tweaking lots of module parameters 
  that I have never heard of.  Card=94 in the config file, 
  gpio_tracking and i2c_debug are set to 1 in the GUI.  
  
  Strange things are appearing in dmesg and syslog.  I assume that 
  [snip]
  saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  i2c-adapter i2c-0: Invalid 7-bit address 0x7a
  saa7133[0]: i2c xfer:  8e ERROR: NO_DEVICE
  [snip]
  is significant.  
  
  No, not at all for my knowledge.
 
 Unsurprisingly, that just highlights my ignorance.  
 
   If you want to produce debug output for failing firmware loading from
   file after a cold boot, yes, you might eventually be able to see that
   failing tuner initialization brings down i2c.
   
   If it is a additional new regression, then mercurial bisect can find the
   patch in question fairly quick.
  
  That sounds like something that I should be able to do, if only 
  I'd read the instructions.  
  
  It is totally up to you and all others with that hardware.
 
 Can you provide a like for where to start reading?

README.patches.  

 Part III - Best Practices
1. Community best practices
2. Mercurial specific procedures
3. Knowing about newer patches committed at the development repositories
4. Patch submission from the community
5. Identifying regressions with Mercurial

  Since already in some multiple broken conditions, never working without
  flaws previously, I would suggest not to wait any longer, until some
  sort of hadron collider is available ...
 
 Now I'm discouraged.  It might be a better use of my time to do 
 something else - anything else.  Maybe I'll just put it in a box 
 for a year and see what happens.  

I (un)fortunately ;) don't have such hardware and Hartmut did not have
any at that time either.

Don't just wait, also no need to hurry on next day.

If the problem is described well, someone can take it as a challenge to
work on it. We indeed had people from CERN fixing tuners.

Trying to recap.

You have been interested to add the card to auto detection, but firmware
load was only successful in one of three cases only already that time
and we have not been aware of that flaw in the beginning.

Hartmut assumed later, on such a card is some locking protection needed
during the firmware load, and my guess is the longish tuner
initialization sequence gets corrupted, because of that missing locking,
and all goes doom. (at least well known on all of such before any
support for the tda8275a)

Now, improved, only one of ten tries loads the firmware and keeps the
card in a responding state. That is of course also very unpleasant for
using mercurial bisect, I really do admit.

Also, as reported too now, with two of such kind of cards in one
machine, likely better don't try at all.

OTOH, the m$ driver obviously does manage to load the firmware even for
multiple such cards. (but maybe breaks all others ...)

Which doesn't help us, since rebooting after that only hides our
problem.

Those cards following the Philips/NXP/Trident reference designs do not
have it, but I don't test per day anymore. (we have problems with
different cards with the same PCI subsystem IDs and different LNAs too,
introduced by OEMs)

So, on some first thought, which is only as random as the card's
behavior, debug logs from the time it was added might be useful.
(i2c works/works not)

That it is now even worse, is still a chance to find out something more
and not only a improved regression on something never working properly.

If the hardware is not going out of specs by will, excluding others, OEM
engineers, having more details, can still help to improve it for us too.

Anyway, we should have start with some #ifdef 0 on it.

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


[RFC] saa7134 with many MPEG devices

2010-04-15 Thread Dmitri Belimov
Hi All

Now saa7134 can work only with one MPEG device. For our new TV card
need support two or many.

I think we can rework this part.

Rework struct saa7134_mpeg_ops as duble linked list
add pointers to next and previose mops pointer.

Add special function for call this devices.

What you thinbk about it??

With my best regards, Dmitry.
--
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