[PATCH] drivers/media/video/saa7134: Add support for Leadtek Winfast TV2100 FM card

2010-01-10 Thread dz-tor
Added support for Leadtek Winfast TV2100 FM card. Support for remote 
control is missing.


Signed-off-by: Darek Zielski dz-...@wp.pl
---
diff -r dd3338c55018 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.cSun Jan 10 
10:20:28 2010 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.cSun Jan 10 
21:42:27 2010 +0100

@@ -5359,6 +5359,43 @@
 .vmux = 8,
 } },
 },
+[SAA7134_BOARD_LEADTEK_WINFAST_TV2100_FM] = {
+.name   = Leadtek Winfast 2100 FM,
+.audio_clock= 0x00187de7,
+.tuner_type = TUNER_TNF_5335MF,
+.radio_type = UNSET,
+.tuner_addr= ADDR_UNSET,
+.radio_addr= ADDR_UNSET,
+
+.gpiomask   = 0x0d,
+.inputs = {{
+.name = name_tv,
+.vmux = 1,
+.amux = LINE1,
+.gpio = 0x00,
+.tv   = 1,
+}, {
+.name = name_comp1,
+.vmux = 3,
+.amux = LINE2,
+.gpio = 0x08,
+}, {
+.name = name_svideo,
+.vmux = 8,
+.amux = LINE2,
+.gpio = 0x08,
+} },
+.radio = {
+.name = name_radio,
+.amux = LINE1,
+.gpio = 0x04,
+},
+.mute = {
+.name = name_mute,
+.amux = LINE1,
+.gpio = 0x08,
+},
+},

 };

@@ -6510,6 +6547,12 @@
 .subdevice= 0x6655,
 .driver_data  = SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S,
 }, {
+.vendor   = PCI_VENDOR_ID_PHILIPS,
+.device   = PCI_DEVICE_ID_PHILIPS_SAA7130,
+.subvendor= 0x107d,
+.subdevice= 0x6f3a,
+.driver_data  = SAA7134_BOARD_LEADTEK_WINFAST_TV2100_FM,
+}, {
 /* --- boards without eeprom + subsystem ID --- */
 .vendor   = PCI_VENDOR_ID_PHILIPS,
 .device   = PCI_DEVICE_ID_PHILIPS_SAA7134,
diff -r dd3338c55018 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.hSun Jan 10 10:20:28 
2010 -0200
+++ b/linux/drivers/media/video/saa7134/saa7134.hSun Jan 10 21:42:27 
2010 +0100

@@ -300,6 +300,7 @@
 #define SAA7134_BOARD_ZOLID_HYBRID_PCI173
 #define SAA7134_BOARD_ASUS_EUROPA_HYBRID174
 #define SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S 175
+#define SAA7134_BOARD_LEADTEK_WINFAST_TV2100_FM 176

 #define SAA7134_MAXBOARDS 32
 #define SAA7134_INPUT_MAX 8


--
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: Leadtek Winfast TV2100

2010-01-10 Thread dz-tor

Hi,

On 09.01.2010 18:14, hermann pitton wrote:

Hi,

Am Samstag, den 09.01.2010, 17:23 +0100 schrieb dz-tor:
   

Hi Pavle,

On 09.01.2010 15:46, Pavle Predic wrote:
 

Hey Darek,

Great job of making the card work. I was really thrilled when I saw
your post. However, I am a total newbie, so I couldn't apply the
changes you wrote about. Could you please be a bit more specific? What
I did is downloaded the driver from here:
http://dl.bytesex.org/releases/video4linux/saa7134-0.2.12.tar.gz and
made the changes to those two files, as described. But I have no clue
how to compile it. I installed linux-headers for my kernel version and
tried to run make, but I'm getting an error. Are there any
configuration options that I need to set in Makefile or Make.config?
   

I'm not sure whether downloading and compiling driver is good idea. v4l
drivers (which includes saa7134) are included in mainline kernel, so
compiling kernel is what you have to do. From what I know, in Debian
there should be package in repositories with kernel sources
(linux-source or similar) - this option you should use if you want to
stick to the kernel version provided by your distribution. Another
option is to download kernel sources from kernel.org and use them (I've
done so - I'm using latest stable release). Here you have link to how-to
about kernel compiling:
https://help.ubuntu.com/6.10/ubuntu/installation-guide/i386/kernel-baking.html.
It's for Ubuntu, but for you it should be also applicable (on bottom
there is also link to Debian documentation).

Before compilation you should make changes which I gave earlier. All
files which should be modified are in
kernel_src_path/drivers/media/video/saa7134/ directory. Have in mind
that what I've done is that I've changed existing card configuration -
it's not proper solution. When I'll manage remote control to work, I'll
try to prepare patch with new card configuration. You can apply my
changes now or wait until I'll prepare the patch.

Regards,
Darek
 

Great!

So Pavle's regspy results and following my instructions did the trick.

Patches must go to LMMLlinux-media@vger.kernel.org  and be against
latest v4l-dvb master at linuxtv.org.
   

Done

You can use what I prepared already yesterday for testing and is
attached. You have only to change the clock and use LINE1 for external
audio input. I suggest to use also LINE1 for mute then, gpio 0x08 is
that input anyway.

We can send that modified patch already and add IR support later.

You must find the up/down gpio and with mask_keycode = 0x00
all the other gpios which do change on keypresses and create unique
keycodes. Then you either need to add a new keytable or can use an
already existing one.
   
I understand what have to be done to get support for remote control - 
problem lays somewhere else. Later I'll send more details with code and 
outputs from dmesg and description of the problem.


Regards,
Darek

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