Skip to contentSkip to conversation

saa7134: Fix IR support of some ASUS TV-FM 7135 variants

PATCH In review Jean Delvare 4 participants 22 messages Jan 27, 2010 – Feb 25, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 saa7134: Fix IR support of some ASUS TV-FM 7135 variants

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type.

We also have to move the initialization of IR until after the card number has been changed. I hope that this won't cause any problem.

---
This needs testing, both from ASUS TV-FM 7135 users, and from other users of the saa7134 driver. I don't have any supported device so I couldn't test this change.

 linux/drivers/media/video/saa7134/saa7134-cards.c |    1 +
 linux/drivers/media/video/saa7134/saa7134-core.c  |    2 +-
 linux/drivers/media/video/saa7134/saa7134-input.c |    2 +-
 linux/drivers/media/video/saa7134/saa7134.h       |    2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
linux/drivers/media/video/saa7134/saa7134-cards.c +1 -0
@@ -7299,6 +7299,7 @@ int saa7134_board_init2(struct saa7134_d
 		       printk(KERN_INFO "%s: P7131 analog only, using "
 						       "entry of %s\n",
 		       dev->name, saa7134_boards[dev->board].name);
+			dev->has_remote = SAA7134_REMOTE_GPIO;
 	       }
 	       break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1150:
linux/drivers/media/video/saa7134/saa7134-core.c +1 -1
@@ -735,7 +735,6 @@ static int saa7134_hwinit1(struct saa713
 	saa7134_vbi_init1(dev);
 	if (card_has_mpeg(dev))
 		saa7134_ts_init1(dev);
-	saa7134_input_init1(dev);
 
 	saa7134_hw_enable1(dev);
 
@@ -781,6 +780,7 @@ static int saa7134_hwinit2(struct saa713
 
 	dprintk("hwinit2\n");
 
+	saa7134_input_init2(dev);
 	saa7134_video_init2(dev);
 	saa7134_tvaudio_init2(dev);
 
linux/drivers/media/video/saa7134/saa7134-input.c +1 -1
@@ -506,7 +506,7 @@ void saa7134_ir_stop(struct saa7134_dev
 		del_timer_sync(&dev->remote->timer);
 }
 
-int saa7134_input_init1(struct saa7134_dev *dev)
+int saa7134_input_init2(struct saa7134_dev *dev)
 {
 	struct card_ir *ir;
 	struct input_dev *input_dev;
linux/drivers/media/video/saa7134/saa7134.h +1 -1
@@ -812,7 +812,7 @@ void saa7134_irq_oss_done(struct saa7134
 /* ----------------------------------------------------------- */
 /* saa7134-input.c                                             */
 
-int  saa7134_input_init1(struct saa7134_dev *dev);
+int  saa7134_input_init2(struct saa7134_dev *dev);
 void saa7134_input_fini(struct saa7134_dev *dev);
 void saa7134_input_irq(struct saa7134_dev *dev);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 10 lines · Jean Delvare

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type.

We also have to move the initialization of IR until after the card number has been changed. I hope that this won't cause any problem.

Hi Jean,

Moving the initialization will likely cause regressions. The reason why there are two init codes there were due to the way the old i2c code used to work. This got fixed after the i2c rework, but it caused regressions on that time.

The proper way would be to just muve the IR initialization on this board from init1 to init2, instead of changing it for all other devices.

cheers,
Mauro

#2 lore raw

Hi,

Am Freitag, den 29.01.2010, 13:40 -0200 schrieb Mauro Carvalho Chehab:

Quoted 18 lines
Quoted 10 lines · Jean Delvare

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type.

We also have to move the initialization of IR until after the card number has been changed. I hope that this won't cause any problem.

Hi Jean,

Moving the initialization will likely cause regressions. The reason why there are two init codes there were due to the way the old i2c code used to work. This got fixed after the i2c rework, but it caused regressions on that time.

Quoted 5 lines

The proper way would be to just muve the IR initialization on this board from init1 to init2, instead of changing it for all other devices.

cheers,
Mauro

Mauro, I do agree with you that it is likely better to go a way with minimum chances for regressions, also given the current testing base and that only this single card is involved..

Do we end up with something card specific in core code here? After all, we know this is a no go.

Hartmut and me thought back and forth on how to deal with it for quite some while, unfortunately Hartmut is not present currently on the list, but he voted for to have a separate entry for that card finally too.

What we seem to have now is:

1. We don't know, if Jean's patch really would cause regressions, but it is likely hard to get all the testing done. No problems with a FlyVideo3000 gpio remote at the time Roman suggested it, but I had not any i2c remote that time ...

2. The previous situation was, that this analog only card did use the entry of the Ausus P7131 Dual forcing card=78 without problems, but getting fake support for DVB-T announced and printing results of some fall through.

3. If we agree, that unique PCI subsystems should have highest priority for auto detection, in such a case, we likely could also set the PC-39 remote for the older card with USB remote. IIRC, that should survive the later change of the card caused by the work around eeprom detection later, and disable IR based on eeprom for the older then.

To be honest, as pointed to already in the other thread around this, we should not try to become better than all others on m$ previously for some very small gain.

We are already much, much better than drivers there, excluding each others, don't follow Philips/NXP eeprom rules and so on.

We could just print something like use card=number to get the remote up too, if people, not reading the lists ;), hope to rely on auto detection in vain ...

About all the LNA and IR mess we have for other manufactures, nobody talks about anymore ...

Given what is also in the cruft for bttv, I would not care too much for that single card on that now also ancient driver, just print what the user can do to escape and any google would find it quickly too. For Asus it is a unique problem on that driver so far.

I should have some time on Sunday afternoon for testing, if we should go that way.

Cheers,
Hermann

#3 lore raw

Hi Mauro, Hermann,

Quoted 18 lines · hermann pitton

Am Freitag, den 29.01.2010, 13:40 -0200 schrieb Mauro Carvalho Chehab:

Quoted 17 lines
Quoted 10 lines · Jean Delvare

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type.

We also have to move the initialization of IR until after the card number has been changed. I hope that this won't cause any problem.

Hi Jean,

Moving the initialization will likely cause regressions. The reason why there are two init codes there were due to the way the old i2c code used to work. This got fixed after the i2c rework, but it caused regressions on that time.

I don't think there is any problem with having two init sequences. You need the EEPROM to identify some devices, you need I2C support to access the EEPROM, and you need some initialization to get I2C operational.

This doesn't mean that some adjustments to the exact sequence aren't possible. In particular, I don't see what else can depend on IR being initialized, so I can't really see what harm can be done in moving IR init code _later_ in the sequence. Looking at saa7134_input_init1(), I see that it is essentially setting up software parameters in the saa7134_dev structure, there is almost no hardware access. Only for a few cards, we change a couple bits in registers GPIO_GPMODE* and GPIO_GPSTATUS*. I honestly can't see how doing this _later_ in the init sequence could be a problem.

Quoted 2 lines
Quoted 2 lines

The proper way would be to just muve the IR initialization on this board from init1 to init2, instead of changing it for all other devices.

Hmm, OK. I think it's wrong, but I'm not the one to decide. Patch below.

Quoted 3 lines

Mauro, I do agree with you that it is likely better to go a way with minimum chances for regressions, also given the current testing base and that only this single card is involved..

I admit I am very surprised that we apparently can't get anyone to test changes to a driver that supports 176 different models of TV cards :(

Quoted 7 lines

Do we end up with something card specific in core code here? After all, we know this is a no go.

Hartmut and me thought back and forth on how to deal with it for quite some while, unfortunately Hartmut is not present currently on the list, but he voted for to have a separate entry for that card finally too.

Quoted 6 lines

What we seem to have now is:

1. We don't know, if Jean's patch really would cause regressions, but it is likely hard to get all the testing done. No problems with a FlyVideo3000 gpio remote at the time Roman suggested it, but I had not any i2c remote that time ...

I doubt it matters, given that saa7134_input_init1() only cares about GPIO-based IR:

int saa7134_input_init1(struct saa7134_dev *dev)

{
	(...)
	if (dev->has_remote != SAA7134_REMOTE_GPIO)
		return -ENODEV;

So the moving the call to this function should have no effect on boards with I2C-based IR.

Quoted 5 lines

(...)
Given what is also in the cruft for bttv, I would not care too much for that single card on that now also ancient driver, just print what the user can do to escape and any google would find it quickly too. For Asus it is a unique problem on that driver so far.

This isn't how we're going to make Linux popular.

Quoted 2 lines

I should have some time on Sunday afternoon for testing, if we should go that way.

Any testing you can provide is very welcome, thanks.

* * * * *

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type, and run saa7134_input_init1().

---
 linux/drivers/media/video/saa7134/saa7134-cards.c |    5 +++++
 1 file changed, 5 insertions(+)
linux/drivers/media/video/saa7134/saa7134-cards.c +5 -0
@@ -7299,6 +7299,11 @@ int saa7134_board_init2(struct saa7134_d
 		       printk(KERN_INFO "%s: P7131 analog only, using "
 						       "entry of %s\n",
 		       dev->name, saa7134_boards[dev->board].name);
+
+			/* IR init has already happened for other cards, so
+			 * we have to catch up. */
+			dev->has_remote = SAA7134_REMOTE_GPIO;
+			saa7134_input_init1(dev);
 	       }
 	       break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1150:
Signature · 1 line
Jean Delvare
#4 lore raw

Hi all interested,

Am Samstag, den 30.01.2010, 11:56 +0100 schrieb Jean Delvare:

Quoted 111 lines

Hi Mauro, Hermann,

Quoted 18 lines · hermann pitton

Am Freitag, den 29.01.2010, 13:40 -0200 schrieb Mauro Carvalho Chehab:

Quoted 17 lines
Quoted 10 lines · Jean Delvare

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type.

We also have to move the initialization of IR until after the card number has been changed. I hope that this won't cause any problem.

Hi Jean,

Moving the initialization will likely cause regressions. The reason why there are two init codes there were due to the way the old i2c code used to work. This got fixed after the i2c rework, but it caused regressions on that time.

I don't think there is any problem with having two init sequences. You need the EEPROM to identify some devices, you need I2C support to access the EEPROM, and you need some initialization to get I2C operational.

This doesn't mean that some adjustments to the exact sequence aren't possible. In particular, I don't see what else can depend on IR being initialized, so I can't really see what harm can be done in moving IR init code _later_ in the sequence. Looking at saa7134_input_init1(), I see that it is essentially setting up software parameters in the saa7134_dev structure, there is almost no hardware access. Only for a few cards, we change a couple bits in registers GPIO_GPMODE* and GPIO_GPSTATUS*. I honestly can't see how doing this _later_ in the init sequence could be a problem.

Quoted 2 lines
Quoted 2 lines

The proper way would be to just muve the IR initialization on this board from init1 to init2, instead of changing it for all other devices.

Hmm, OK. I think it's wrong, but I'm not the one to decide. Patch below.

Quoted 3 lines

Mauro, I do agree with you that it is likely better to go a way with minimum chances for regressions, also given the current testing base and that only this single card is involved..

I admit I am very surprised that we apparently can't get anyone to test changes to a driver that supports 176 different models of TV cards :(

Quoted 7 lines

Do we end up with something card specific in core code here? After all, we know this is a no go.

Hartmut and me thought back and forth on how to deal with it for quite some while, unfortunately Hartmut is not present currently on the list, but he voted for to have a separate entry for that card finally too.

Quoted 6 lines

What we seem to have now is:

1. We don't know, if Jean's patch really would cause regressions, but it is likely hard to get all the testing done. No problems with a FlyVideo3000 gpio remote at the time Roman suggested it, but I had not any i2c remote that time ...

I doubt it matters, given that saa7134_input_init1() only cares about GPIO-based IR:

int saa7134_input_init1(struct saa7134_dev *dev)

{
	(...)
	if (dev->has_remote != SAA7134_REMOTE_GPIO)
		return -ENODEV;

So the moving the call to this function should have no effect on boards with I2C-based IR.

Quoted 5 lines

(...)
Given what is also in the cruft for bttv, I would not care too much for that single card on that now also ancient driver, just print what the user can do to escape and any google would find it quickly too. For Asus it is a unique problem on that driver so far.

This isn't how we're going to make Linux popular.

Quoted 2 lines

I should have some time on Sunday afternoon for testing, if we should go that way.

Any testing you can provide is very welcome, thanks.

* * * * *

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type, and run saa7134_input_init1().

---
 linux/drivers/media/video/saa7134/saa7134-cards.c |    5 +++++
 1 file changed, 5 insertions(+)
linux/drivers/media/video/saa7134/saa7134-cards.c +0 -0
@@ -7299,6 +7299,11 @@ int saa7134_board_init2(struct saa7134_d
 		       printk(KERN_INFO "%s: P7131 analog only, using "

linux/drivers/media/video/saa7134/saa7134-cards.c int saa7134_board_init2(struct saa7134_d · line 7309

Quoted 10 lines
linux/drivers/media/video/saa7134/saa7134-cards.c +5 -0
 						       "entry of %s\n",
 		       dev->name, saa7134_boards[dev->board].name);
+
+			/* IR init has already happened for other cards, so
+			 * we have to catch up. */
+			dev->has_remote = SAA7134_REMOTE_GPIO;
+			saa7134_input_init1(dev);
 	       }
 	       break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1150:

we had more than 50cm of snow within the last two days and it is still going on. The garden is already good for some ski jumping ...

For now, I only faked a P7131 Dual with a broken IR receiver on a 2.6.29 with recent, you can see that gpio 0x40000 doesn't go high, but your patch should enable the remote on that P7131 analog only.

Seems Daro is on the list, please test it too for _auto detection_ on the real device..

We must keep drivers simple enough to be maintainable, so, since Mauro does maintain the saa7134 finally too these times, we should start here.

I'm open for all other possible improvements, but we should only implement them, if real hardware is really in need of.

Cheers,
Hermann

saa7134[0] Tuner type is 63
tuner 2-0043: chip found @ 0x86 (saa7134[0])
tda9887 2-0043: creating new instance
tda9887 2-0043: tda988[5/6/7] found
tuner 2-0043: type set to tda9887
tuner 2-0043: tv freq set to 0.00
tuner 2-0043: TV freq (0.00) out of range (44-958)
tuner 2-0043: saa7134[0] tuner I2C addr 0x86 with type 74 used for 0x0e
tuner 2-0061: Setting mode_mask to 0x0e
tuner 2-0061: chip found @ 0xc2 (saa7134[0])
tuner 2-0061: tuner 0x61: Tuner type absent
tuner 2-0043: Calling set_type_addr for type=63, addr=0xff, mode=0x0e, config=0x00 tuner 2-0043: set addr discarded for type 74, mask e. Asked to change tuner at addr 0xff, with mask e tuner 2-0061: Calling set_type_addr for type=63, addr=0xff, mode=0x0e, config=0x00 tuner 2-0061: defining GPIO callback
tuner-simple 2-0061: creating new instance
tuner-simple 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
tuner 2-0061: type set to Philips FMD1216ME MK3 Hybrid Tuner
tuner 2-0061: tv freq set to 400.00
tuner 2-0061: saa7134[0] tuner I2C addr 0xc2 with type 63 used for 0x0e
tuner 2-0043: switching to v4l2
tuner 2-0061: switching to v4l2
tuner 2-0061: tv freq set to 400.00
tuner 2-0061: tv freq set to 400.00
tuner 2-0043: Putting tuner to sleep
tuner 2-0043: Cmd s_power accepted for analog TV
tuner 2-0061: Putting tuner to sleep
tuner 2-0061: Cmd s_power accepted for analog TV
saa7134[0]: registered device video0 [v4l2]
saa7134[0]: registered device vbi0
saa7134[0]: registered device radio0
saa7133[1]: setting pci latency timer to 64
saa7133[1]: found at 0000:01:08.0, rev: 208, irq: 18, latency: 64, mmio: 0xe8001000 saa7133[1]: subsystem: 1043:4862, board: ASUSTeK P7131 Dual [card=78,autodetected] saa7133[1]: board init: gpio is 0
IRQ 18/saa7133[1]: IRQF_DISABLED is not guaranteed on shared IRQs
saa7133[1]: i2c eeprom 00: 43 10 62 48 54 20 1c 00 43 43 a9 1c 55 d2 b2 92 saa7133[1]: i2c eeprom 10: 00 01 20 00 ff 20 ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom 20: 01 40 01 02 03 01 01 03 08 ff 00 d6 ff ff ff ff saa7133[1]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom 40: ff 21 00 c2 96 10 03 32 15 00 ff ff ff ff ff ff saa7133[1]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[1]: P7131 analog only, using entry of ASUSTeK P7131 Analog
input: saa7134 IR (ASUSTeK P7131 Analo as /class/input/input8
Creating IR device irrcv0
tuner 3-004b: tda829x detected
tuner 3-004b: Setting mode_mask to 0x0e
tuner 3-004b: chip found @ 0x96 (saa7133[1])
tuner 3-004b: tuner 0x4b: Tuner type absent
tuner 3-004b: Calling set_type_addr for type=54, addr=0xff, mode=0x0e, config=0x00 tuner 3-004b: defining GPIO callback
tda829x 3-004b: setting tuner address to 61
tda829x 3-004b: type set to tda8290+75a
tuner 3-004b: type set to tda8290+75a
tuner 3-004b: tv freq set to 400.00
tuner 3-004b: saa7133[1] tuner I2C addr 0x96 with type 54 used for 0x0e
tuner 3-004b: switching to v4l2
tuner 3-004b: tv freq set to 400.00
tuner 3-004b: tv freq set to 400.00
tuner 3-004b: Putting tuner to sleep
tuner 3-004b: Cmd s_power accepted for analog TV
saa7133[1]: registered device video1 [v4l2]
saa7133[1]: registered device vbi1
saa7133[1]: registered device radio1
saa7133[2]: setting pci latency timer to 64
saa7133[2]: found at 0000:01:09.0, rev: 209, irq: 17, latency: 64, mmio: 0xe8002000 saa7133[2]: subsystem: 16be:0010, board: Medion/Creatix CTX953 Hybrid [card=134,autodetected] saa7133[2]: board init: gpio is 0
IRQ 17/saa7133[2]: IRQF_DISABLED is not guaranteed on shared IRQs
saa7133[2]: i2c eeprom 00: be 16 10 00 54 20 1c 00 43 43 a9 1c 55 d2 b2 92 saa7133[2]: i2c eeprom 10: 00 ff 86 0f ff 20 ff 00 01 50 32 79 01 3c ca 50 saa7133[2]: i2c eeprom 20: 01 40 01 02 02 03 01 00 06 ff 00 2c 02 51 96 2b saa7133[2]: i2c eeprom 30: a7 58 7a 1f 03 8e 84 5e da 7a 04 b3 05 87 b2 3c saa7133[2]: i2c eeprom 40: ff 21 00 c0 96 10 03 22 15 00 fd 79 44 9f c2 8f saa7133[2]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[2]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
tuner 4-004b: tda829x detected
tuner 4-004b: Setting mode_mask to 0x0e
tuner 4-004b: chip found @ 0x96 (saa7133[2])
tuner 4-004b: tuner 0x4b: Tuner type absent
tuner 4-004b: Calling set_type_addr for type=54, addr=0xff, mode=0x0e, config=0x00 tuner 4-004b: defining GPIO callback
tda829x 4-004b: setting tuner address to 60
tda829x 4-004b: type set to tda8290+75a
tuner 4-004b: type set to tda8290+75a
tuner 4-004b: tv freq set to 400.00
tuner 4-004b: saa7133[2] tuner I2C addr 0x96 with type 54 used for 0x0e
tuner 4-004b: switching to v4l2
tuner 4-004b: tv freq set to 400.00
tuner 4-004b: tv freq set to 400.00
tuner 4-004b: Putting tuner to sleep
tuner 4-004b: Cmd s_power accepted for analog TV
saa7133[2]: registered device video2 [v4l2]
saa7133[2]: registered device vbi2
saa7134[3]: setting pci latency timer to 64
saa7134[3]: found at 0000:01:0a.0, rev: 1, irq: 16, latency: 64, mmio: 0xe8003000 saa7134[3]: subsystem: 5168:0138, board: LifeView FlyVIDEO3000 [card=2,autodetected] saa7134[3]: board init: gpio is 39000
saa7134[3]: there are different flyvideo cards with different tuners
saa7134[3]: out there, you might have to use the tuner=<nr> insmod
saa7134[3]: option to override the default value.
input: saa7134 IR (LifeView FlyVIDEO30 as /class/input/input9
Creating IR device irrcv1
IRQ 16/saa7134[3]: IRQF_DISABLED is not guaranteed on shared IRQs
saa7134[3]: i2c eeprom 00: 68 51 38 01 10 28 ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7134[3]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
tuner 5-0061: Setting mode_mask to 0x0e
tuner 5-0061: chip found @ 0xc2 (saa7134[3])
tuner 5-0061: tuner 0x61: Tuner type absent
tuner 5-0061: Calling set_type_addr for type=5, addr=0xff, mode=0x0e, config=0x00 tuner 5-0061: defining GPIO callback
tuner-simple 5-0061: creating new instance
tuner-simple 5-0061: type set to 5 (Philips PAL_BG (FI1216 and compatibles))
tuner 5-0061: type set to Philips PAL_BG (FI1216 and compatibles)
tuner 5-0061: tv freq set to 400.00
tuner 5-0061: saa7134[3] tuner I2C addr 0xc2 with type 5 used for 0x0e
tuner 5-0061: switching to v4l2
tuner 5-0061: tv freq set to 400.00
tuner 5-0061: tv freq set to 400.00
tuner 5-0061: Putting tuner to sleep
tuner 5-0061: Cmd s_power accepted for analog TV
saa7134[3]: registered device video3 [v4l2]
saa7134[3]: registered device vbi3
saa7134[3]: registered device radio2
dvb_init() allocating 1 frontend
tuner-simple 2-0061: attaching existing instance
tuner-simple 2-0061: type set to 63 (Philips FMD1216ME MK3 Hybrid Tuner)
DVB: registering new adapter (saa7134[0])
DVB: registering adapter 0 frontend 0 (Philips TDA10046H DVB-T)...
tda1004x: setting up plls for 53MHz sampling clock
tda1004x: found firmware revision 26 -- ok
dvb_init() allocating 1 frontend
DVB: registering new adapter (saa7133[2])
DVB: registering adapter 1 frontend 0 (Philips TDA10046H DVB-T)...
tda1004x: setting up plls for 48MHz sampling clock
tda1004x: found firmware revision 26 -- ok

#5 lore raw

Hi Hermann,

Quoted 3 lines · hermann pitton

For now, I only faked a P7131 Dual with a broken IR receiver on a 2.6.29 with recent, you can see that gpio 0x40000 doesn't go high, but your patch should enable the remote on that P7131 analog only.

I'm not sure why you had to fake anything? What I'd like to know is simply if my first patch had any negative effect on other cards.

Signature · 1 line
Jean Delvare
#6 lore raw

Hi Jean,

Am Montag, den 01.02.2010, 10:56 +0100 schrieb Jean Delvare:

Quoted 9 lines

Hi Hermann,

Quoted 3 lines · hermann pitton

For now, I only faked a P7131 Dual with a broken IR receiver on a 2.6.29 with recent, you can see that gpio 0x40000 doesn't go high, but your patch should enable the remote on that P7131 analog only.

I'm not sure why you had to fake anything? What I'd like to know is simply if my first patch had any negative effect on other cards.

because I simply don't have that Asus My Cinema analog only in question.

To recap, you previously announced a patch, tested by Daro, claiming to get the remote up under auto detection for that device and I told you having some doubts on it.

Mauro prefers to have a fix for that single card in need for now.

Since nobody else cares, "For now", see above, I can confirm that your last patch for that single device should work to get IR up with auto detection in delay after we change the card such late with eeprom detection.

The meaning of that byte in use here is unknown to me, we should avoid such as much we can! It can turn out to be only some pseudo service.

If your call for testers on your previous attempt, really reaches some for some reason, I'm with you, but for now I have to keep the car operable within all such snow.

Cheers,
Hermann

#7 lore raw

Hi Hermann,

Quoted 10 lines · hermann pitton

Hi Jean,

Am Montag, den 01.02.2010, 10:56 +0100 schrieb Jean Delvare:

Quoted 7 lines

Hi Hermann,

Quoted 3 lines · hermann pitton

For now, I only faked a P7131 Dual with a broken IR receiver on a 2.6.29 with recent, you can see that gpio 0x40000 doesn't go high, but your patch should enable the remote on that P7131 analog only.

Quoted 8 lines
Quoted 2 lines

I'm not sure why you had to fake anything? What I'd like to know is simply if my first patch had any negative effect on other cards.

because I simply don't have that Asus My Cinema analog only in question.

To recap, you previously announced a patch, tested by Daro, claiming to get the remote up under auto detection for that device and I told you having some doubts on it.

My first patch was not actually tested by Daro. What he tested was loading the driver with card=146. At first I thought it was equivalent, but since then I have realized it wasn't. That's the reason why the "Tested-by:" was turned into a mere "Cc:" on my second and third patches.

Quoted 7 lines

Mauro prefers to have a fix for that single card in need for now.

Since nobody else cares, "For now", see above, I can confirm that your last patch for that single device should work to get IR up with auto detection in delay after we change the card such late with eeprom detection.

Quoted 6 lines

The meaning of that byte in use here is unknown to me, we should avoid such as much we can! It can turn out to be only some pseudo service.

If your call for testers on your previous attempt, really reaches some for some reason, I'm with you, but for now I have to keep the car operable within all such snow.

That I understand. What I don't understand is: if you have a SAA7134-based card, why don't you test my second patch (the one moving the call to saa7134_input_init1 to saa7134_hwinit2) on it, without faking anything? This would be a first, useful data point.

Thanks,

Signature · 1 line
Jean Delvare
#8 lore raw
Quoted 36 lines · Jean Delvare

Hi Hermann,

Quoted 9 lines · hermann pitton

Hi Jean,

Am Montag, den 01.02.2010, 10:56 +0100 schrieb Jean Delvare:

Quoted 6 lines

Hi Hermann,

Quoted 3 lines · hermann pitton

For now, I only faked a P7131 Dual with a broken IR receiver on a 2.6.29 with recent, you can see that gpio 0x40000 doesn't go high, but your patch should enable the remote on that P7131 analog only.

Quoted 7 lines
Quoted 2 lines

I'm not sure why you had to fake anything? What I'd like to know is simply if my first patch had any negative effect on other cards.

because I simply don't have that Asus My Cinema analog only in question.

To recap, you previously announced a patch, tested by Daro, claiming to get the remote up under auto detection for that device and I told you having some doubts on it.

My first patch was not actually tested by Daro. What he tested was loading the driver with card=146. At first I thought it was equivalent, but since then I have realized it wasn't. That's the reason why the "Tested-by:" was turned into a mere "Cc:" on my second and third patches.

Quoted 10 lines

Mauro prefers to have a fix for that single card in need for now.

Since nobody else cares, "For now", see above, I can confirm that your last patch for that single device should work to get IR up with auto detection in delay after we change the card such late with eeprom detection.

The meaning of that byte in use here is unknown to me, we should avoid such as much we can! It can turn out to be only some pseudo service.

Quoted 8 lines
Quoted 3 lines

If your call for testers on your previous attempt, really reaches some for some reason, I'm with you, but for now I have to keep the car operable within all such snow.

That I understand. What I don't understand is: if you have a SAA7134-based card, why don't you test my second patch (the one moving the call to saa7134_input_init1 to saa7134_hwinit2) on it, without faking anything? This would be a first, useful data point.

The init1 code has 107 boards listed:

SAA7134_BOARD_10MOONSTVMASTER3
SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331
SAA7134_BOARD_ASUST
SAA7134_BOARD_AVACSSMARTTV
SAA7134_BOARD_AVERMEDIA_305
SAA7134_BOARD_AVERMEDIA_307
SAA7134_BOARD_AVERMEDIA_777
SAA7134_BOARD_AVERMEDIA_A169_B
SAA7134_BOARD_AVERMEDIA_A16AR
SAA7134_BOARD_AVERMEDIA_A16D
SAA7134_BOARD_AVERMEDIA_A700_HYBRID
SAA7134_BOARD_AVERMEDIA_A700_PRO
SAA7134_BOARD_AVERMEDIA_CARDBUS
SAA7134_BOARD_AVERMEDIA_CARDBUS_501
SAA7134_BOARD_AVERMEDIA_CARDBUS_506
SAA7134_BOARD_AVERMEDIA_GO_007_FM
SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS
SAA7134_BOARD_AVERMEDIA_M102
SAA7134_BOARD_AVERMEDIA_M103
SAA7134_BOARD_AVERMEDIA_M115
SAA7134_BOARD_AVERMEDIA_M135A
SAA7134_BOARD_AVERMEDIA_STUDIO_305
SAA7134_BOARD_AVERMEDIA_STUDIO_307
SAA7134_BOARD_AVERMEDIA_STUDIO_505
SAA7134_BOARD_AVERMEDIA_STUDIO_507
SAA7134_BOARD_BEHOLD_401
SAA7134_BOARD_BEHOLD_403
SAA7134_BOARD_BEHOLD_403FM
SAA7134_BOARD_BEHOLD_405
SAA7134_BOARD_BEHOLD_405FM
SAA7134_BOARD_BEHOLD_407
SAA7134_BOARD_BEHOLD_407FM
SAA7134_BOARD_BEHOLD_409
SAA7134_BOARD_BEHOLD_409FM
SAA7134_BOARD_BEHOLD_505FM
SAA7134_BOARD_BEHOLD_505RDS_MK3
SAA7134_BOARD_BEHOLD_505RDS_MK5
SAA7134_BOARD_BEHOLD_507_9FM
SAA7134_BOARD_BEHOLD_507RDS_MK3
SAA7134_BOARD_BEHOLD_507RDS_MK5
SAA7134_BOARD_BEHOLD_607FM_MK3
SAA7134_BOARD_BEHOLD_607FM_MK5
SAA7134_BOARD_BEHOLD_607RDS_MK3
SAA7134_BOARD_BEHOLD_607RDS_MK5
SAA7134_BOARD_BEHOLD_609FM_MK3
SAA7134_BOARD_BEHOLD_609FM_MK5
SAA7134_BOARD_BEHOLD_609RDS_MK3
SAA7134_BOARD_BEHOLD_609RDS_MK5
SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM
SAA7134_BOARD_BEHOLD_H6
SAA7134_BOARD_BEHOLD_M6
SAA7134_BOARD_BEHOLD_M63
SAA7134_BOARD_BEHOLD_M6_EXTRA
SAA7134_BOARD_BEHOLD_X7
SAA7134_BOARD_CINERGY400
SAA7134_BOARD_CINERGY400_CARDBUS
SAA7134_BOARD_CINERGY600
SAA7134_BOARD_CINERGY600_MK3
SAA7134_BOARD_ECS_TVP3XP
SAA7134_BOARD_ECS_TVP3XP_4CB5
SAA7134_BOARD_ECS_TVP3XP_4CB6
SAA7134_BOARD_ENCORE_ENLTV
SAA7134_BOARD_ENCORE_ENLTV_FM
SAA7134_BOARD_ENCORE_ENLTV_FM53
SAA7134_BOARD_FLYDVBS_LR300
SAA7134_BOARD_FLYDVBTDUO
SAA7134_BOARD_FLYDVBT_DUO_CARDBUS
SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS
SAA7134_BOARD_FLYDVBT_LR301
SAA7134_BOARD_FLYTVPLATINUM_FM
SAA7134_BOARD_FLYTVPLATINUM_MINI2
SAA7134_BOARD_FLYVIDEO2000
SAA7134_BOARD_FLYVIDEO3000
SAA7134_BOARD_FLYVIDEO3000_NTSC
SAA7134_BOARD_GENIUS_TVGO_A11MCE
SAA7134_BOARD_GOTVIEW_7135
SAA7134_BOARD_HAUPPAUGE_HVR1110
SAA7134_BOARD_HAUPPAUGE_HVR1120
SAA7134_BOARD_HAUPPAUGE_HVR1150
SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG
SAA7134_BOARD_KWORLD_TERMINATOR
SAA7134_BOARD_KWORLD_VSTREAM_XPERT
SAA7134_BOARD_KWORLD_XPERT
SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S
SAA7134_BOARD_MANLI_MTV001
SAA7134_BOARD_MANLI_MTV002
SAA7134_BOARD_MD2819
SAA7134_BOARD_MD5044
SAA7134_BOARD_MONSTERTV_MOBILE
SAA7134_BOARD_MSI_TVATANYWHERE_PLUS
SAA7134_BOARD_PINNACLE_300I_DVBT_PAL
SAA7134_BOARD_PINNACLE_PCTV_110
SAA7134_BOARD_PINNACLE_PCTV_310
SAA7134_BOARD_PROTEUS_2309
SAA7134_BOARD_REAL_ANGEL_220
SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM
SAA7134_BOARD_RTD_VFG7350
SAA7134_BOARD_SABRENT_SBTTVFM
SAA7134_BOARD_SEDNA_PC_TV_CARDBUS
SAA7134_BOARD_UPMOST_PURPLE_TV
SAA7134_BOARD_VIDEOMATE_DVBT_200
SAA7134_BOARD_VIDEOMATE_DVBT_200A
SAA7134_BOARD_VIDEOMATE_DVBT_300
SAA7134_BOARD_VIDEOMATE_GOLD_PLUS
SAA7134_BOARD_VIDEOMATE_S350
SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII
SAA7134_BOARD_VIDEOMATE_TV_PVR

The init2 code has 32 boards listed:

SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331
SAA7134_BOARD_ADS_INSTANT_HDTV_PCI
SAA7134_BOARD_ASUS_EUROPA2_HYBRID
SAA7134_BOARD_ASUS_EUROPA_HYBRID
SAA7134_BOARD_ASUST
SAA7134_BOARD_AVERMEDIA_CARDBUS_501
SAA7134_BOARD_AVERMEDIA_SUPER_007
SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM
SAA7134_BOARD_BMK_MPEX_NOTUNER
SAA7134_BOARD_BMK_MPEX_TUNER
SAA7134_BOARD_CINERGY_HT_PCI
SAA7134_BOARD_CINERGY_HT_PCMCIA
SAA7134_BOARD_CREATIX_CTX953
SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS
SAA7134_BOARD_FLYDVB_TRIO
SAA7134_BOARD_HAUPPAUGE_HVR1110
SAA7134_BOARD_HAUPPAUGE_HVR1120
SAA7134_BOARD_HAUPPAUGE_HVR1150
SAA7134_BOARD_KWORLD_ATSC110
SAA7134_BOARD_KWORLD_DVBT_210
SAA7134_BOARD_MD7134
SAA7134_BOARD_MEDION_MD8800_QUADRO
SAA7134_BOARD_PHILIPS_EUROPA
SAA7134_BOARD_PHILIPS_SNAKE
SAA7134_BOARD_PHILIPS_TIGER
SAA7134_BOARD_PHILIPS_TIGER_S
SAA7134_BOARD_PINNACLE_PCTV_310
SAA7134_BOARD_TEVION_DVBT_220RF
SAA7134_BOARD_TWINHAN_DTV_DVB_3056
SAA7134_BOARD_VIDEOMATE_DVBT_200
SAA7134_BOARD_VIDEOMATE_DVBT_200A
SAA7134_BOARD_VIDEOMATE_DVBT_300

Quoted 1 line

From all those entries, there are 15 boards that are listed on both init1 and init2:

SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331
SAA7134_BOARD_ASUST
SAA7134_BOARD_AVERMEDIA_CARDBUS_501
SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM
SAA7134_BOARD_BMK_MPEX_NOTUNER
SAA7134_BOARD_BMK_MPEX_TUNER
SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS
SAA7134_BOARD_HAUPPAUGE_HVR1110
SAA7134_BOARD_HAUPPAUGE_HVR1120
SAA7134_BOARD_HAUPPAUGE_HVR1150
SAA7134_BOARD_PHILIPS_TIGER_S
SAA7134_BOARD_PINNACLE_PCTV_310
SAA7134_BOARD_VIDEOMATE_DVBT_200
SAA7134_BOARD_VIDEOMATE_DVBT_200A
SAA7134_BOARD_VIDEOMATE_DVBT_300

So, there are a large set of boards that will be affected by this change.

Your premise that the init1 only cares about GPIO IR is not true. It does contain the GPIO initializations to reset, turn on devices and enable i2c bridges for those devices. Eventually, on a few boards, the gpio's are only due to IR, but this is an exception.

The current code does that:

        saa7134_board_init1(dev);
        saa7134_hwinit1(dev);
        msleep(100);
        saa7134_i2c_register(dev);
        saa7134_board_init2(dev);
        saa7134_hwinit2(dev);

What happens is that the saa7134_board_init1(dev) code has lots of gpio codes, and most of those code is needed in order to enable i2c bridges or to turn on/reset some chips that would otherwise be on OFF or undefined state. Without the gpio code, done by init1, you may not be able to read eeprom or to detect the devices as needed by saa7134_board_init2().

That's why I'm saying that, if in the specific case of the board you're dealing with, you're sure that an unknown GPIO state won't affect the code at saa7134_hwinit1() and at saa7134_i2c_register(), then you can move the GPIO code for this board to init2.

Moving things between init1 and init2 are very tricky and requires testing on all the affected boards. So a change like what your patch proposed would require a test of all the 107 boards that are on init1. I bet you'll break several of them with this change.

Signature · 2 lines
Cheers,
Mauro
#9 lore raw

Hi Mauro,

Sorry for the late answer. I'm tracking so many things in parallel...

Quoted 179 lines · Mauro Carvalho Chehab

The init1 code has 107 boards listed:

SAA7134_BOARD_10MOONSTVMASTER3
SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331
SAA7134_BOARD_ASUST
SAA7134_BOARD_AVACSSMARTTV
SAA7134_BOARD_AVERMEDIA_305
SAA7134_BOARD_AVERMEDIA_307
SAA7134_BOARD_AVERMEDIA_777
SAA7134_BOARD_AVERMEDIA_A169_B
SAA7134_BOARD_AVERMEDIA_A16AR
SAA7134_BOARD_AVERMEDIA_A16D
SAA7134_BOARD_AVERMEDIA_A700_HYBRID
SAA7134_BOARD_AVERMEDIA_A700_PRO
SAA7134_BOARD_AVERMEDIA_CARDBUS
SAA7134_BOARD_AVERMEDIA_CARDBUS_501
SAA7134_BOARD_AVERMEDIA_CARDBUS_506
SAA7134_BOARD_AVERMEDIA_GO_007_FM
SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS
SAA7134_BOARD_AVERMEDIA_M102
SAA7134_BOARD_AVERMEDIA_M103
SAA7134_BOARD_AVERMEDIA_M115
SAA7134_BOARD_AVERMEDIA_M135A
SAA7134_BOARD_AVERMEDIA_STUDIO_305
SAA7134_BOARD_AVERMEDIA_STUDIO_307
SAA7134_BOARD_AVERMEDIA_STUDIO_505
SAA7134_BOARD_AVERMEDIA_STUDIO_507
SAA7134_BOARD_BEHOLD_401
SAA7134_BOARD_BEHOLD_403
SAA7134_BOARD_BEHOLD_403FM
SAA7134_BOARD_BEHOLD_405
SAA7134_BOARD_BEHOLD_405FM
SAA7134_BOARD_BEHOLD_407
SAA7134_BOARD_BEHOLD_407FM
SAA7134_BOARD_BEHOLD_409
SAA7134_BOARD_BEHOLD_409FM
SAA7134_BOARD_BEHOLD_505FM
SAA7134_BOARD_BEHOLD_505RDS_MK3
SAA7134_BOARD_BEHOLD_505RDS_MK5
SAA7134_BOARD_BEHOLD_507_9FM
SAA7134_BOARD_BEHOLD_507RDS_MK3
SAA7134_BOARD_BEHOLD_507RDS_MK5
SAA7134_BOARD_BEHOLD_607FM_MK3
SAA7134_BOARD_BEHOLD_607FM_MK5
SAA7134_BOARD_BEHOLD_607RDS_MK3
SAA7134_BOARD_BEHOLD_607RDS_MK5
SAA7134_BOARD_BEHOLD_609FM_MK3
SAA7134_BOARD_BEHOLD_609FM_MK5
SAA7134_BOARD_BEHOLD_609RDS_MK3
SAA7134_BOARD_BEHOLD_609RDS_MK5
SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM
SAA7134_BOARD_BEHOLD_H6
SAA7134_BOARD_BEHOLD_M6
SAA7134_BOARD_BEHOLD_M63
SAA7134_BOARD_BEHOLD_M6_EXTRA
SAA7134_BOARD_BEHOLD_X7
SAA7134_BOARD_CINERGY400
SAA7134_BOARD_CINERGY400_CARDBUS
SAA7134_BOARD_CINERGY600
SAA7134_BOARD_CINERGY600_MK3
SAA7134_BOARD_ECS_TVP3XP
SAA7134_BOARD_ECS_TVP3XP_4CB5
SAA7134_BOARD_ECS_TVP3XP_4CB6
SAA7134_BOARD_ENCORE_ENLTV
SAA7134_BOARD_ENCORE_ENLTV_FM
SAA7134_BOARD_ENCORE_ENLTV_FM53
SAA7134_BOARD_FLYDVBS_LR300
SAA7134_BOARD_FLYDVBTDUO
SAA7134_BOARD_FLYDVBT_DUO_CARDBUS
SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS
SAA7134_BOARD_FLYDVBT_LR301
SAA7134_BOARD_FLYTVPLATINUM_FM
SAA7134_BOARD_FLYTVPLATINUM_MINI2
SAA7134_BOARD_FLYVIDEO2000
SAA7134_BOARD_FLYVIDEO3000
SAA7134_BOARD_FLYVIDEO3000_NTSC
SAA7134_BOARD_GENIUS_TVGO_A11MCE
SAA7134_BOARD_GOTVIEW_7135
SAA7134_BOARD_HAUPPAUGE_HVR1110
SAA7134_BOARD_HAUPPAUGE_HVR1120
SAA7134_BOARD_HAUPPAUGE_HVR1150
SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG
SAA7134_BOARD_KWORLD_TERMINATOR
SAA7134_BOARD_KWORLD_VSTREAM_XPERT
SAA7134_BOARD_KWORLD_XPERT
SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S
SAA7134_BOARD_MANLI_MTV001
SAA7134_BOARD_MANLI_MTV002
SAA7134_BOARD_MD2819
SAA7134_BOARD_MD5044
SAA7134_BOARD_MONSTERTV_MOBILE
SAA7134_BOARD_MSI_TVATANYWHERE_PLUS
SAA7134_BOARD_PINNACLE_300I_DVBT_PAL
SAA7134_BOARD_PINNACLE_PCTV_110
SAA7134_BOARD_PINNACLE_PCTV_310
SAA7134_BOARD_PROTEUS_2309
SAA7134_BOARD_REAL_ANGEL_220
SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM
SAA7134_BOARD_RTD_VFG7350
SAA7134_BOARD_SABRENT_SBTTVFM
SAA7134_BOARD_SEDNA_PC_TV_CARDBUS
SAA7134_BOARD_UPMOST_PURPLE_TV
SAA7134_BOARD_VIDEOMATE_DVBT_200
SAA7134_BOARD_VIDEOMATE_DVBT_200A
SAA7134_BOARD_VIDEOMATE_DVBT_300
SAA7134_BOARD_VIDEOMATE_GOLD_PLUS
SAA7134_BOARD_VIDEOMATE_S350
SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII
SAA7134_BOARD_VIDEOMATE_TV_PVR

The init2 code has 32 boards listed:

SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331
SAA7134_BOARD_ADS_INSTANT_HDTV_PCI
SAA7134_BOARD_ASUS_EUROPA2_HYBRID
SAA7134_BOARD_ASUS_EUROPA_HYBRID
SAA7134_BOARD_ASUST
SAA7134_BOARD_AVERMEDIA_CARDBUS_501
SAA7134_BOARD_AVERMEDIA_SUPER_007
SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM
SAA7134_BOARD_BMK_MPEX_NOTUNER
SAA7134_BOARD_BMK_MPEX_TUNER
SAA7134_BOARD_CINERGY_HT_PCI
SAA7134_BOARD_CINERGY_HT_PCMCIA
SAA7134_BOARD_CREATIX_CTX953
SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS
SAA7134_BOARD_FLYDVB_TRIO
SAA7134_BOARD_HAUPPAUGE_HVR1110
SAA7134_BOARD_HAUPPAUGE_HVR1120
SAA7134_BOARD_HAUPPAUGE_HVR1150
SAA7134_BOARD_KWORLD_ATSC110
SAA7134_BOARD_KWORLD_DVBT_210
SAA7134_BOARD_MD7134
SAA7134_BOARD_MEDION_MD8800_QUADRO
SAA7134_BOARD_PHILIPS_EUROPA
SAA7134_BOARD_PHILIPS_SNAKE
SAA7134_BOARD_PHILIPS_TIGER
SAA7134_BOARD_PHILIPS_TIGER_S
SAA7134_BOARD_PINNACLE_PCTV_310
SAA7134_BOARD_TEVION_DVBT_220RF
SAA7134_BOARD_TWINHAN_DTV_DVB_3056
SAA7134_BOARD_VIDEOMATE_DVBT_200
SAA7134_BOARD_VIDEOMATE_DVBT_200A
SAA7134_BOARD_VIDEOMATE_DVBT_300

From all those entries, there are 15 boards that are listed on both init1 and init2:

SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331
SAA7134_BOARD_ASUST
SAA7134_BOARD_AVERMEDIA_CARDBUS_501
SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM
SAA7134_BOARD_BMK_MPEX_NOTUNER
SAA7134_BOARD_BMK_MPEX_TUNER
SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS
SAA7134_BOARD_HAUPPAUGE_HVR1110
SAA7134_BOARD_HAUPPAUGE_HVR1120
SAA7134_BOARD_HAUPPAUGE_HVR1150
SAA7134_BOARD_PHILIPS_TIGER_S
SAA7134_BOARD_PINNACLE_PCTV_310
SAA7134_BOARD_VIDEOMATE_DVBT_200
SAA7134_BOARD_VIDEOMATE_DVBT_200A
SAA7134_BOARD_VIDEOMATE_DVBT_300

So, there are a large set of boards that will be affected by this change.

Your premise that the init1 only cares about GPIO IR is not true. It does contain the GPIO initializations to reset, turn on devices and enable i2c bridges for those devices. Eventually, on a few boards, the gpio's are only due to IR, but this is an exception.

The current code does that:

        saa7134_board_init1(dev);
        saa7134_hwinit1(dev);
        msleep(100);
        saa7134_i2c_register(dev);
        saa7134_board_init2(dev);
        saa7134_hwinit2(dev);
Quoted 5 lines

What happens is that the saa7134_board_init1(dev) code has lots of gpio codes, and most of those code is needed in order to enable i2c bridges or to turn on/reset some chips that would otherwise be on OFF or undefined state. Without the gpio code, done by init1, you may not be able to read eeprom or to detect the devices as needed by saa7134_board_init2().

I don't think I ever said otherwise. I never said that init1 as a whole only cared about GPIO IR. That's what I said of function saa7134_input_init1() and only this function!

My first proposed patch didn't move all of init1 to init2. It was only moving saa7134_input_init1 (which doesn't yet have a counterpart in init2), and it is moving it from the end of init1 to the beginning of init2, so the movement isn't as big as it may sound. The steps saa7134_input_init1() is moving over are, in order:
* saa7134_hw_enable1
* request_irq
* saa7134_i2c_register

So my point was that none of these 3 functions seemed to be dependent on saa7134_input_init1() having been called beforehand. Which is why I strongly question the fact that moving saa7134_input_init1() _after_ these 3 other initialization steps can have any negative effect. I wouldn't have claimed that moving saa7134_input_init1() _earlier_ in the init sequence would be safe, because there's nothing obvious about that. But moving it forward where I had put it did not seem terrific.

I really would like a few users of this driver to just give it a try and report, because it seems a much more elegant fix to the bug at hand, than the workaround you'd accept instead.

Quoted 7 lines

That's why I'm saying that, if in the specific case of the board you're dealing with, you're sure that an unknown GPIO state won't affect the code at saa7134_hwinit1() and at saa7134_i2c_register(), then you can move the GPIO code for this board to init2.

Moving things between init1 and init2 are very tricky and requires testing on all the affected boards. So a change like what your patch proposed would require a test of all the 107 boards that are on init1. I bet you'll break several of them with this change.

Under the assumption that saa7134_hwinit1() only touches GPIOs connected to IR receivers (and it certainly looks like this to me) I fail to see how these pins not being initialized could have any effect on non-IR code.

Now, please don't get me wrong. I don't have any of these devices. I've posted that patch because a user incidentally pointed me to a problem and I had an idea how it could be fixed. I prefer my initial proposal because it looks better in the long run. If you don't like it and prefer the second proposal even though I think it's more of a workaround than a proper fix, it's really up to you. You're maintaining the subsystem and I am not, so you're the one deciding.

Thanks,

Signature · 1 line
Jean Delvare
#10 lore raw
Quoted 3 lines · Jean Delvare

Hi Mauro,

Sorry for the late answer. I'm tracking so many things in parallel...

No problem.

Quoted 9 lines
Quoted 5 lines

What happens is that the saa7134_board_init1(dev) code has lots of gpio codes, and most of those code is needed in order to enable i2c bridges or to turn on/reset some chips that would otherwise be on OFF or undefined state. Without the gpio code, done by init1, you may not be able to read eeprom or to detect the devices as needed by saa7134_board_init2().

I don't think I ever said otherwise. I never said that init1 as a whole only cared about GPIO IR. That's what I said of function saa7134_input_init1() and only this function!

Ah, ok. I suspect I miss-understood when you talked about "init1", since 99% of the patches about init1 are related to board init, and not to input init.

Quoted 9 lines

My first proposed patch didn't move all of init1 to init2. It was only moving saa7134_input_init1 (which doesn't yet have a counterpart in init2), and it is moving it from the end of init1 to the beginning of init2, so the movement isn't as big as it may sound. The steps saa7134_input_init1() is moving over are, in order:
* saa7134_hw_enable1
* request_irq
* saa7134_i2c_register

Quoted 7 lines

So my point was that none of these 3 functions seemed to be dependent on saa7134_input_init1() having been called beforehand. Which is why I strongly question the fact that moving saa7134_input_init1() _after_ these 3 other initialization steps can have any negative effect. I wouldn't have claimed that moving saa7134_input_init1() _earlier_ in the init sequence would be safe, because there's nothing obvious about that. But moving it forward where I had put it did not seem terrific.

I agree. In thesis, after board-specific init1 and init2, the device should be in good health and all the needs for IR should already be available. The only point that requires a double check is at the suspend function (as someone may try to suspend the machine in the middle of the board setup).

Quoted 3 lines

I really would like a few users of this driver to just give it a try and report, because it seems a much more elegant fix to the bug at hand, than the workaround you'd accept instead.

Seems fair to me.

Quoted 4 lines
Quoted 4 lines

That's why I'm saying that, if in the specific case of the board you're dealing with, you're sure that an unknown GPIO state won't affect the code at saa7134_hwinit1() and at saa7134_i2c_register(), then you can move the GPIO code for this board to init2.

Quoted 8 lines
Quoted 3 lines

Moving things between init1 and init2 are very tricky and requires testing on all the affected boards. So a change like what your patch proposed would require a test of all the 107 boards that are on init1. I bet you'll break several of them with this change.

Under the assumption that saa7134_hwinit1() only touches GPIOs connected to IR receivers (and it certainly looks like this to me) I fail to see how these pins not being initialized could have any effect on non-IR code.

Now, i suspect that you're messing things again: are you referring to saa7134_hwinit1() or to saa7134_input_init1()?

I suspect that you're talking about moving saa7134_input_init1(), since saa7134_hwinit1() has the muted and spinlock inits. It also has the setups for video, vbi and mpeg. So, moving it require more care.

(btw, IMO all those *init1/*init2 names were a terrible choice)

Quoted 7 lines

Now, please don't get me wrong. I don't have any of these devices. I've posted that patch because a user incidentally pointed me to a problem and I had an idea how it could be fixed. I prefer my initial proposal because it looks better in the long run. If you don't like it and prefer the second proposal even though I think it's more of a workaround than a proper fix, it's really up to you. You're maintaining the subsystem and I am not, so you're the one deciding.

Please, don't excuse yourself. You're right proposing a patch to help the user. Thanks for that.

Quoted 1 line

From my side, I just want to make sure that we won't add any regressions with other boards.

Experience shows that touching at those init sequences (especially at the board init1/init2) cause lots of problem. For example, before the i2c redesign, there were several GPIO's inside init2. Due to that, if the i2c module got loaded before init2, several boards would fail. On those boards, people were required to load the modules on an specific order with some boards (and sometimes unload/reload an i2c driver), to be sure that the i2c devices would get properly initialized. Due to that, several boards didn't work if the drivers were compiled builtin. Also, there are some cases where it were impossible to have all saa7134 devices working on a machine with multiple saa7134 devices.

During the time the i2c changes got merged, those GPIO sequences were moved to init1, but this broke several devices, and the init sequences needed to be manually adjusted for those. I don't doubt that are there still a few broken. At least now, the driver has not an intermittent behavior.

Signature · 2 lines
Cheers,
Mauro
#11 lore raw
Quoted 6 lines · Mauro Carvalho Chehab
Quoted 4 lines · Jean Delvare

Under the assumption that saa7134_hwinit1() only touches GPIOs connected to IR receivers (and it certainly looks like this to me) I fail to see how these pins not being initialized could have any effect on non-IR code.

Quoted 6 lines

Now, i suspect that you're messing things again: are you referring to saa7134_hwinit1() or to saa7134_input_init1()?

I suspect that you're talking about moving saa7134_input_init1(), since saa7134_hwinit1() has the muted and spinlock inits. It also has the setups for video, vbi and mpeg. So, moving it require more care.

Err, you're right, I meant saa7134_input_init1() and not saa7134_hwinit1(), copy-and-paste error. Sorry for adding more confusion where it really wasn't needed...

Signature · 1 line
Jean Delvare
#12 lore raw

Hi,

Am Mittwoch, den 10.02.2010, 20:36 +0100 schrieb Jean Delvare:

Quoted 10 lines · Mauro Carvalho Chehab
Quoted 9 lines
Quoted 4 lines · Jean Delvare

Under the assumption that saa7134_hwinit1() only touches GPIOs connected to IR receivers (and it certainly looks like this to me) I fail to see how these pins not being initialized could have any effect on non-IR code.

Now, i suspect that you're messing things again: are you referring to saa7134_hwinit1() or to saa7134_input_init1()?

Quoted 8 lines
Quoted 3 lines

I suspect that you're talking about moving saa7134_input_init1(), since saa7134_hwinit1() has the muted and spinlock inits. It also has the setups for video, vbi and mpeg. So, moving it require more care.

Err, you're right, I meant saa7134_input_init1() and not saa7134_hwinit1(), copy-and-paste error. Sorry for adding more confusion where it really wasn't needed...

both attempts of Jean will work.

If we are only talking about moving input_init, only that Jean did suggest initially, it should work, since only some GPIOs for enabling remote chips are affected.

I can give the crappy tester, but don't have such a remote, but should not be a problem to trigger the GPIOs later.

Cheers,
Hermann

#13 lore raw

Am Donnerstag, den 11.02.2010, 01:58 +0100 schrieb hermann pitton:

Quoted 28 lines

Hi,

Am Mittwoch, den 10.02.2010, 20:36 +0100 schrieb Jean Delvare:

Quoted 10 lines · Mauro Carvalho Chehab
Quoted 9 lines
Quoted 4 lines · Jean Delvare

Under the assumption that saa7134_hwinit1() only touches GPIOs connected to IR receivers (and it certainly looks like this to me) I fail to see how these pins not being initialized could have any effect on non-IR code.

Now, i suspect that you're messing things again: are you referring to saa7134_hwinit1() or to saa7134_input_init1()?

Quoted 8 lines
Quoted 3 lines

I suspect that you're talking about moving saa7134_input_init1(), since saa7134_hwinit1() has the muted and spinlock inits. It also has the setups for video, vbi and mpeg. So, moving it require more care.

Err, you're right, I meant saa7134_input_init1() and not saa7134_hwinit1(), copy-and-paste error. Sorry for adding more confusion where it really wasn't needed...

both attempts of Jean will work.

If we are only talking about moving input_init, only that Jean did suggest initially, it should work, since only some GPIOs for enabling remote chips are affected.

Quoted 6 lines

I can give the crappy tester, but don't have such a remote, but should not be a problem to trigger the GPIOs later.

Cheers,
Hermann

Hi Jean,

I did test your patch, only following Roman's initial patch already known, on eight different cards for now, also with three slightly different remotes and it does not have any negative impact.

Please consider, that it is only about that single card for now and a per card solution is enough.

I strongly remind, that we should not rely on unknown eeprom bytes, as told previously and should not expand such into any direction.

If we make progress there, we should change it for all cards, but again, what had happened on the m$ drivers previously is not encouraging to do it without any need.

To do it per card in need for now seems enough "service" to me.

If more such should come, unlikely on that driver, I would at first deny auto detection support, since they are breaking rules.

The problem likely will time out very soon.

Cheers,
Hermann

#14 lore raw

Am Montag, den 15.02.2010, 06:31 +0100 schrieb hermann pitton:

Quoted 54 lines

Am Donnerstag, den 11.02.2010, 01:58 +0100 schrieb hermann pitton:

Quoted 28 lines

Hi,

Am Mittwoch, den 10.02.2010, 20:36 +0100 schrieb Jean Delvare:

Quoted 10 lines · Mauro Carvalho Chehab
Quoted 9 lines
Quoted 4 lines · Jean Delvare

Under the assumption that saa7134_hwinit1() only touches GPIOs connected to IR receivers (and it certainly looks like this to me) I fail to see how these pins not being initialized could have any effect on non-IR code.

Now, i suspect that you're messing things again: are you referring to saa7134_hwinit1() or to saa7134_input_init1()?

Quoted 8 lines
Quoted 3 lines

I suspect that you're talking about moving saa7134_input_init1(), since saa7134_hwinit1() has the muted and spinlock inits. It also has the setups for video, vbi and mpeg. So, moving it require more care.

Err, you're right, I meant saa7134_input_init1() and not saa7134_hwinit1(), copy-and-paste error. Sorry for adding more confusion where it really wasn't needed...

both attempts of Jean will work.

If we are only talking about moving input_init, only that Jean did suggest initially, it should work, since only some GPIOs for enabling remote chips are affected.

Quoted 6 lines

I can give the crappy tester, but don't have such a remote, but should not be a problem to trigger the GPIOs later.

Cheers,
Hermann

Hi Jean,

I did test your patch, only following Roman's initial patch already known, on eight different cards for now, also with three slightly different remotes and it does not have any negative impact.

Please consider, that it is only about that single card for now and a per card solution is enough.

I strongly remind, that we should not rely on unknown eeprom bytes, as told previously and should not expand such into any direction.

If we make progress there, we should change it for all cards, but again, what had happened on the m$ drivers previously is not encouraging to do it without any need.

To do it per card in need for now seems enough "service" to me.

Quoted 7 lines

If more such should come, unlikely on that driver, I would at first deny auto detection support, since they are breaking rules.

The problem likely will time out very soon.

Cheers,
Hermann

Jean, a slight ping.

Are you still waiting for Daro's report?

As said, I would prefer to see all OEMs _not_ following Philips/NXP eeprom rules running into their own trash on GNU/Linux too.

Then we have facts.

That is much better than to provide a golden cloud for them. At least I won't help to debug such later ...

If you did not manage to decipher all OEM eeprom content already, just let's go with the per card solution for now.

Are you aware, that my intention is _not_ to spread the use of random and potentially invalid eeprom content for some sort of such auto detection?

The other solution is not lost and in mind, if we should need to come back to it and are in details. Preferably the OEMs should take the responsibility for such.

We can see, that even those always doing best on it, can't provide the missing informations for different LNA stuff after the Hauppauge/Pinnacle merge until now.

If you claim to know it better, please share with us.

Cheers,
Hermann

#15 lore raw
Quoted 1 line · hermann pitton

Are you still waiting for Daro's report?

Yes, I am still waiting. Unfortunately neither Daro nor Roman reported any test result so far. Now, if we go for my second patch, I guess we might as well apply it right now. It only affects this one card (Asus P7131 analog), and it was broken so far, so I don't think my patch can do any bad.

Quoted 19 lines

As said, I would prefer to see all OEMs _not_ following Philips/NXP eeprom rules running into their own trash on GNU/Linux too.

Then we have facts.

That is much better than to provide a golden cloud for them. At least I won't help to debug such later ...

If you did not manage to decipher all OEM eeprom content already, just let's go with the per card solution for now.

Are you aware, that my intention is _not_ to spread the use of random and potentially invalid eeprom content for some sort of such auto detection?

The other solution is not lost and in mind, if we should need to come back to it and are in details. Preferably the OEMs should take the responsibility for such.

Quoted 5 lines

We can see, that even those always doing best on it, can't provide the missing informations for different LNA stuff after the Hauppauge/Pinnacle merge until now.

If you claim to know it better, please share with us.

I'm not claiming anything, and to be honest, I have no idea what you're talking about.

Signature · 1 line
Jean Delvare
#16 lore raw

Hi Jean,

Am Donnerstag, den 25.02.2010, 14:12 +0100 schrieb Jean Delvare:

Quoted 8 lines · hermann pitton
Quoted 1 line

Are you still waiting for Daro's report?

Yes, I am still waiting. Unfortunately neither Daro nor Roman reported any test result so far. Now, if we go for my second patch, I guess we might as well apply it right now. It only affects this one card (Asus P7131 analog), and it was broken so far, so I don't think my patch can do any bad.

yes, we can go for your second patch without any risk.

It even will work, but I'm wondering if I would have to buy such card, to get it through. Thanks for your time to review that.

Quoted 19 lines
Quoted 19 lines

As said, I would prefer to see all OEMs _not_ following Philips/NXP eeprom rules running into their own trash on GNU/Linux too.

Then we have facts.

That is much better than to provide a golden cloud for them. At least I won't help to debug such later ...

If you did not manage to decipher all OEM eeprom content already, just let's go with the per card solution for now.

Are you aware, that my intention is _not_ to spread the use of random and potentially invalid eeprom content for some sort of such auto detection?

The other solution is not lost and in mind, if we should need to come back to it and are in details. Preferably the OEMs should take the responsibility for such.

Quoted 8 lines
Quoted 5 lines

We can see, that even those always doing best on it, can't provide the missing informations for different LNA stuff after the Hauppauge/Pinnacle merge until now.

If you claim to know it better, please share with us.

I'm not claiming anything, and to be honest, I have no idea what you're talking about.

Never mind. I'll keep you posted when it comes to further progress on such and input_init2 is the needed better solution.

We have a whole chain of previously latest different Asus cards supported by PCI subsystem identification, only this single one fails on it and needs eeprom bogus detection.

On the Pinnacle stuff we have a complete mess, concerning LNAs, likely even different LNAs, no LNA at all, different remotes etc., all with the same PCI subsystem.

You can't even detect the LNA type, if you would know the meaning of the complete eeprom content, since some to us unknown check-sums are in use for that.

That I try to tell.

You are welcome,

Hermann

#17 lore raw
In reply to Jean Delvare

Hi Jean, Mauro and all,

Am Dienstag, den 02.02.2010, 08:54 +0100 schrieb Jean Delvare:

Quoted 38 lines

Hi Hermann,

Quoted 10 lines · hermann pitton

Hi Jean,

Am Montag, den 01.02.2010, 10:56 +0100 schrieb Jean Delvare:

Quoted 7 lines

Hi Hermann,

Quoted 3 lines · hermann pitton

For now, I only faked a P7131 Dual with a broken IR receiver on a 2.6.29 with recent, you can see that gpio 0x40000 doesn't go high, but your patch should enable the remote on that P7131 analog only.

Quoted 8 lines
Quoted 2 lines

I'm not sure why you had to fake anything? What I'd like to know is simply if my first patch had any negative effect on other cards.

because I simply don't have that Asus My Cinema analog only in question.

To recap, you previously announced a patch, tested by Daro, claiming to get the remote up under auto detection for that device and I told you having some doubts on it.

My first patch was not actually tested by Daro. What he tested was loading the driver with card=146. At first I thought it was equivalent, but since then I have realized it wasn't. That's the reason why the "Tested-by:" was turned into a mere "Cc:" on my second and third patches.

Quoted 10 lines

Mauro prefers to have a fix for that single card in need for now.

Since nobody else cares, "For now", see above, I can confirm that your last patch for that single device should work to get IR up with auto detection in delay after we change the card such late with eeprom detection.

The meaning of that byte in use here is unknown to me, we should avoid such as much we can! It can turn out to be only some pseudo service.

Quoted 9 lines
Quoted 3 lines

If your call for testers on your previous attempt, really reaches some for some reason, I'm with you, but for now I have to keep the car operable within all such snow.

That I understand. What I don't understand is: if you have a SAA7134-based card, why don't you test my second patch (the one moving the call to saa7134_input_init1 to saa7134_hwinit2) on it, without faking anything? This would be a first, useful data point.

sorry, the snow fall did not stop and we will need trucks next day to get it out of town. No place left.

I did not reread any single line of code until now, but told you that Roman has tested a equivalent patch on his P7131_ANALOG already and I can confirm that it also had no side effects on a FlyVideo3000 card=2.

For now, I would at least need some time to see, if input_init can be decoupled from all other hardware init, what you seem to suggest, and looking closer to Mauro's concerns.

Thought you are asking for some test with a i2c remote next to confirm your analysis there. No such card in any machine currently, but can be done.

Cheers,
Hermann

#18 lore raw

W dniu 03.02.2010 00:32, hermann pitton pisze:

Quoted 67 lines

Hi Jean, Mauro and all,

Am Dienstag, den 02.02.2010, 08:54 +0100 schrieb Jean Delvare:

Quoted 42 lines

Hi Hermann,

Quoted 12 lines · hermann pitton

Hi Jean,

Am Montag, den 01.02.2010, 10:56 +0100 schrieb Jean Delvare:

Quoted 8 lines

Hi Hermann,

Quoted 4 lines · hermann pitton

For now, I only faked a P7131 Dual with a broken IR receiver on a 2.6.29 with recent, you can see that gpio 0x40000 doesn't go high, but your patch should enable the remote on that P7131 analog only.

Quoted 9 lines
Quoted 3 lines

I'm not sure why you had to fake anything? What I'd like to know is simply if my first patch had any negative effect on other cards.

because I simply don't have that Asus My Cinema analog only in question.

To recap, you previously announced a patch, tested by Daro, claiming to get the remote up under auto detection for that device and I told you having some doubts on it.

My first patch was not actually tested by Daro. What he tested was loading the driver with card=146. At first I thought it was equivalent, but since then I have realized it wasn't. That's the reason why the "Tested-by:" was turned into a mere "Cc:" on my second and third patches.

Quoted 10 lines

Mauro prefers to have a fix for that single card in need for now.

Since nobody else cares, "For now", see above, I can confirm that your last patch for that single device should work to get IR up with auto detection in delay after we change the card such late with eeprom detection.

The meaning of that byte in use here is unknown to me, we should avoid such as much we can! It can turn out to be only some pseudo service.

Quoted 10 lines
Quoted 4 lines

If your call for testers on your previous attempt, really reaches some for some reason, I'm with you, but for now I have to keep the car operable within all such snow.

That I understand. What I don't understand is: if you have a SAA7134-based card, why don't you test my second patch (the one moving the call to saa7134_input_init1 to saa7134_hwinit2) on it, without faking anything? This would be a first, useful data point.

sorry, the snow fall did not stop and we will need trucks next day to get it out of town. No place left.

I did not reread any single line of code until now, but told you that Roman has tested a equivalent patch on his P7131_ANALOG already and I can confirm that it also had no side effects on a FlyVideo3000 card=2.

For now, I would at least need some time to see, if input_init can be decoupled from all other hardware init, what you seem to suggest, and looking closer to Mauro's concerns.

Quoted 11 lines

Thought you are asking for some test with a i2c remote next to confirm your analysis there. No such card in any machine currently, but can be done.

Cheers,
Hermann

Hi All,

If some tests on my machine could be helpfull just let me know.

Best regards
Darek

#19 lore raw

Hi Daro,

Quoted 1 line · Daro

If some tests on my machine could be helpfull just let me know.

Definitely. If you could please test both patches I sent (first one on 2010-01-27, second one on 2010-01-30, both should be in your mailbox) and confirm that they both work for you (so you no longer need to pass card=146 to the driver), that would be great.

Mauro doesn't seem to be willing to apply the first patch, but for future reference I would still be interested to know if it would work at least in your case. The second patch is what Mauro is likely to apply, so it would be good to make sure it fixes your problem before actually applying it.

Thanks!

Signature · 1 line
Jean Delvare
#20 lore raw
In reply to Jean Delvare

Hi Jean,

Quoted 20 lines

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type, and run saa7134_input_init1().

---
 linux/drivers/media/video/saa7134/saa7134-cards.c |    5 +++++
 1 file changed, 5 insertions(+)
linux/drivers/media/video/saa7134/saa7134-cards.c +0 -0
@@ -7299,6 +7299,11 @@ int saa7134_board_init2(struct saa7134_d
 		       printk(KERN_INFO "%s: P7131 analog only, using "

linux/drivers/media/video/saa7134/saa7134-cards.c int saa7134_board_init2(struct saa7134_d · line 7309

Quoted 10 lines
linux/drivers/media/video/saa7134/saa7134-cards.c +5 -0
 						       "entry of %s\n",
 		       dev->name, saa7134_boards[dev->board].name);
+
+			/* IR init has already happened for other cards, so
+			 * we have to catch up. */
+			dev->has_remote = SAA7134_REMOTE_GPIO;
+			saa7134_input_init1(dev);
 	       }
 	       break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1150:

This version of your patch makes sense to me.

This logic will only apply for board SAA7134_BOARD_ASUSTeK_P7131_ANALOG, so, provided that someone with this board test it, I'm OK with it.

Had Roman or Daro already test it?

Signature · 2 lines
Cheers,
Mauro
#21 lore raw

Hi Mauro,

Quoted 33 lines · Mauro Carvalho Chehab
Quoted 20 lines

From: Jean Delvare <[email protected]>
Subject: saa7134: Fix IR support of some ASUS TV-FM 7135 variants

Some variants of the ASUS TV-FM 7135 are handled as the ASUSTeK P7131 Analog (card=146). However, by the time we find out, some card-specific initialization is missed. In particular, the fact that the IR is GPIO-based. Set it when we change the card type, and run saa7134_input_init1().

---
 linux/drivers/media/video/saa7134/saa7134-cards.c |    5 +++++
 1 file changed, 5 insertions(+)
linux/drivers/media/video/saa7134/saa7134-cards.c +0 -0
@@ -7299,6 +7299,11 @@ int saa7134_board_init2(struct saa7134_d
 		       printk(KERN_INFO "%s: P7131 analog only, using "

linux/drivers/media/video/saa7134/saa7134-cards.c int saa7134_board_init2(struct saa7134_d · line 7309

Quoted 10 lines
linux/drivers/media/video/saa7134/saa7134-cards.c +5 -0
 						       "entry of %s\n",
 		       dev->name, saa7134_boards[dev->board].name);
+
+			/* IR init has already happened for other cards, so
+			 * we have to catch up. */
+			dev->has_remote = SAA7134_REMOTE_GPIO;
+			saa7134_input_init1(dev);
 	       }
 	       break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1150:

This version of your patch makes sense to me.

Quoted 4 lines

This logic will only apply for board SAA7134_BOARD_ASUSTeK_P7131_ANALOG, so, provided that someone with this board test it, I'm OK with it.

Had Roman or Daro already test it?

Not yet, but Daro just volunteered to do so... let's give him/her some time to proceed.

Signature · 1 line
Jean Delvare