Skip to contentSkip to conversation

V4L: Link tuner before saa7134

PATCH New Brian Marete 3 participants 5 messages Jul 18, 2008 – Jul 21, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · hermann pitton

#1 users can't set thetunertype anymore,
but the few cases oftunerdetection from eeprom we have should work again for that price.

Hello,

Any patch yet for above issue? It seems to have made it into 2.6.26.

I use saa7134 with everything, including the tuner modules, compiled as a module. My card is detected as a flyvideo2000. The default tuner for that card (#37) allows me to tune into TV but not to FM Radio. I can access both functions (TV and FM Radio) if I override with tuner=69, which is what I usually do. That override does not work on 2.6.26.

Any suggestions?

Thanks,

Signature · 2 lines
B. Gitonga Marete
Tel: +254-722-151-590
#1 lore raw
Quoted 10 lines · Brian Marete
Quoted 4 lines · hermann pitton

#1 users can't set thetunertype anymore,
but the few cases oftunerdetection from eeprom we have should work again for that price.

Hello,

Any patch yet for above issue? It seems to have made it into 2.6.26.

Quoted 8 lines

I use saa7134 with everything, including the tuner modules, compiled as a module. My card is detected as a flyvideo2000. The default tuner for that card (#37) allows me to tune into TV but not to FM Radio. I can access both functions (TV and FM Radio) if I override with tuner=69, which is what I usually do. That override does not work on 2.6.26.

Any suggestions?

Modify saa7134_board_init2 so that the manual tuner type setting isn't ignored. The first thing it does is to overwrite the current value (set earlier from module parameter) with the static values... even before trying to autodetect it.

In saa7134-core.c saa7134_initdev:
dev->tuner_type = saa7134_boards[dev->board].tuner_type;
+dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;

In saa7134-cards.c saa7134_board_init2:
-dev->tuner_type = saa7134_boards[dev->board].tuner_type;
-dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;

I think that will fix it.

Quoted 12 lines

Thanks,

--
B. Gitonga Marete
Tel: +254-722-151-590
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 6 lines
Simon Arlott

_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Reviewed-by
#2 lore raw

Hi,

Am Freitag, den 18.07.2008, 12:51 +0100 schrieb Simon Arlott:

Quoted 33 lines · Brian Marete
Quoted 10 lines · hermann pitton
Quoted 4 lines

#1 users can't set thetunertype anymore,
but the few cases oftunerdetection from eeprom we have should work again for that price.

Hello,

Any patch yet for above issue? It seems to have made it into 2.6.26.

Quoted 8 lines

I use saa7134 with everything, including the tuner modules, compiled as a module. My card is detected as a flyvideo2000. The default tuner for that card (#37) allows me to tune into TV but not to FM Radio. I can access both functions (TV and FM Radio) if I override with tuner=69, which is what I usually do. That override does not work on 2.6.26.

Any suggestions?

Modify saa7134_board_init2 so that the manual tuner type setting isn't ignored. The first thing it does is to overwrite the current value (set earlier from module parameter) with the static values... even before trying to autodetect it.

In saa7134-core.c saa7134_initdev:
dev->tuner_type = saa7134_boards[dev->board].tuner_type;
+dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;

In saa7134-cards.c saa7134_board_init2:

(quoted diff) +0 -2
-dev->tuner_type   = saa7134_boards[dev->board].tuner_type;
-dev->tuner_addr   = saa7134_boards[dev->board].tuner_addr;
Quoted 2 lines

I think that will fix it.

this restores tuner behavior on the saa7134 driver.

I can't test XCeive tuners, which load different firmware dynamically. Mauro was on them.

Please send the patch to Mauro and/or provide your signed-off-by.

This must go to the stable team ASAP as well.

Many thanks!

Cheers,
Hermann

#3 lore raw

PATCH 1/1 saa7134: Copy tuner data earlier in init to avoid overwriting manual tuner type

When saa7134_board_init2 runs, it immediately overwrites the current value (set earlier from module parameter) of tuner_type with the static values, and then does autodetection. This patch moves the tuner_addr copy to earlier in saa7134_initdev and removes the tuner_type copy from saa7134_board_init2.

Autodetection could still potentially change to the wrong tuner type, but it is now possible to override the default type for the card again.

My card's tuner is configured with autodetection from eeprom, so I don't need to manually set the tuner. I've checked that the autodetection still works for my card.

---

Quoted 10 lines

this restores tuner behavior on the saa7134 driver.

I can't test XCeive tuners, which load different firmware dynamically. Mauro was on them.

Please send the patch to Mauro and/or provide your signed-off-by.

This must go to the stable team ASAP as well.

drivers/media/video/saa7134/saa7134-cards.c |    3 ---
drivers/media/video/saa7134/saa7134-core.c  |    5 +++--
2 files changed, 3 insertions(+), 5 deletions(-)
drivers/media/video/saa7134/saa7134-cards.c +0 -0
index 2618cfa..0227cf9 100644
@@ -5703,9 +5703,6 @@ int saa7134_board_init2(struct saa7134_dev *dev)
	unsigned char buf;
	int board;

- dev->tuner_type = saa7134_boards[dev->board].tuner_type;
- dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;
-

	switch (dev->board) {
	case SAA7134_BOARD_BMK_MPEX_NOTUNER:
	case SAA7134_BOARD_BMK_MPEX_TUNER:
drivers/media/video/saa7134/saa7134-core.c +0 -0
index 2c19cd0..69f340d 100644
@@ -946,11 +946,12 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
		dev->board = SAA7134_BOARD_UNKNOWN;
	}
	dev->autodetected = card[dev->nr] != dev->board;
-	dev->tuner_type   = saa7134_boards[dev->board].tuner_type;
+	dev->tuner_type = saa7134_boards[dev->board].tuner_type;
+	dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;
	dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf;
	if (UNSET != tuner[dev->nr])
		dev->tuner_type = tuner[dev->nr];
-		printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
+	printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
		dev->name,pci_dev->subsystem_vendor,
		pci_dev->subsystem_device,saa7134_boards[dev->board].name,
		dev->board, dev->autodetected ?
Signature · 4 lines
1.5.6.2

-- 
Simon Arlott
#4 lore raw
In reply to Simon Arlott
Quoted 34 lines · Simon Arlott
Quoted 10 lines · Brian Marete
Quoted 4 lines · hermann pitton

#1 users can't set thetunertype anymore,
but the few cases oftunerdetection from eeprom we have should work again for that price.

Hello,

Any patch yet for above issue? It seems to have made it into 2.6.26.

Quoted 8 lines

I use saa7134 with everything, including the tuner modules, compiled as a module. My card is detected as a flyvideo2000. The default tuner for that card (#37) allows me to tune into TV but not to FM Radio. I can access both functions (TV and FM Radio) if I override with tuner=69, which is what I usually do. That override does not work on 2.6.26.

Any suggestions?

Modify saa7134_board_init2 so that the manual tuner type setting isn't ignored. The first thing it does is to overwrite the current value (set earlier from module parameter) with the static values... even before trying to autodetect it.

In saa7134-core.c saa7134_initdev:
dev->tuner_type = saa7134_boards[dev->board].tuner_type;
+dev->tuner_addr = saa7134_boards[dev->board].tuner_addr;

In saa7134-cards.c saa7134_board_init2:

(quoted diff) +0 -2
-dev->tuner_type   = saa7134_boards[dev->board].tuner_type;
-dev->tuner_addr   = saa7134_boards[dev->board].tuner_addr;
Quoted 1 line

I think that will fix it.

And, indeed, it fixed it. I hope the patch will make it into the main-line.

Thanks.

Signature · 2 lines
B. Gitonga Marete
Tel: +254-722-151-590