Hold on... looks like the build dependencies are incomplete... I'm doing
a 'make clean' before each 'make' now, and it's clearly commit 3542 that
is the culprit. At least that can make sense ;-)
Now I have the head of 0.8 with commit 3542 undone (see attached patch),
and it loads ivtv_fb.ko again.
Probably that eeprom card detection code forgets to detect if it as
tvout or something of that sorts.
Maybe somebody can confirm/try?
Jelle.
timecop wrote:
> looks like the japanese patch backfired.
>
> -t
>
> On 11/12/06, Jelle <[EMAIL PROTECTED]> wrote:
>> I suddenly had that too... going through the various versions with 'svn
>> update -r', I found that commit r3539 consistenty broke it. It's weird
>> because the saa717x driver isn't even listed in lsmod (perhaps it gets
>> loaded, does something to screw things up, and then unloads? or perhaps
>> the r3537 version does some 'required' initialization and then unloads?)
>>
>> I can build the latest 0.8 that doesn't have the error, as long as I
>> take i2c-drivers/saa717x.c from r3537.
>>
>> Good luck...
>>
>> Jelle.
>>
>> Martin Dauskardt wrote:
>>> ivtv: ==================== START INIT IVTV ====================
>>> ivtv: version 0.8.1 (v4l-dvb + ivtv virtual merge) Revision: 3561 loading
>>> ivtv: Linux version: 2.6.18 preempt mod_unload 386 gcc-4.0
>>> ivtv: In case of problems please include the debug info between
>>> ivtv: the START INIT IVTV and END INIT IVTV lines, along with
>>> ivtv: any module options, when mailing the ivtv-users mailinglist.
>>> ivtv0: Autodetected Hauppauge card
>>> ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10
>>> PCI: setting IRQ 10 as level-triggered
>>> ACPI: PCI Interrupt 0000:00:0b.0[A] -> Link [LNKB] -> GSI 10 (level, low)
>>> -> IRQ 10
>>> ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
>>> ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
>>> ivtv0: loaded v4l-cx2341x-dec.fw firmware (262144 bytes)
>>> tuner 1-0043: chip found @ 0x86 (ivtv i2c driver #0)
>>> tda9887 1-0043: tda988[5/6/7] found @ 0x43 (tuner)
>>> tuner 1-0061: chip found @ 0xc2 (ivtv i2c driver #0)
>>> tveeprom 1-0050: Hauppauge model 48139, rev K257, serial# 7521224
>>> tveeprom 1-0050: tuner model is Philips FM1216 ME MK3 (idx 57, type 38)
>>> tveeprom 1-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K)
>>> (eeprom 0x74)
>>> tveeprom 1-0050: audio processor is MSP4418 (idx 25)
>>> tveeprom 1-0050: decoder processor is SAA7115 (idx 19)
>>> tveeprom 1-0050: has radio, has IR remote
>>> ivtv0: Autodetected Hauppauge WinTV PVR-350
>>> saa7115 1-0021: saa7115 found (1f7115d0e100000) @ 0x42 (ivtv i2c driver #0)
>>> saa7127 1-0044: saa7129 found @ 0x88 (ivtv i2c driver #0)
>>> msp3400 1-0040: MSP4418G-B3 found @ 0x80 (ivtv i2c driver #0)
>>> msp3400 1-0040: MSP4418G-B3 supports nicam and radio, mode is autodetect
>>> and autoselect
>>> ivtv0: Encoder revision: 0x02050032
>>> ivtv0: Decoder revision: 0x02020023
>>> ivtv0: Registered device video1 for encoder MPEG
>>> ivtv0: Registered device video32 for encoder YUV
>>> ivtv0: Registered device vbi1 for encoder VBI
>>> ivtv0: Registered device video24 for encoder PCM audio
>>> ivtv0: Registered device radio0 for encoder radio
>>> ivtv0: loaded v4l-cx2341x-init.mpg firmware (155648 bytes)
>>> tuner 1-0061: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3))
>>> ivtv0: Initialized Hauppauge WinTV PVR-350, card #0
>>> ivtv: ==================== END INIT IVTV ====================
>>> ivtv-osd: Specified card (id 0) is either not present or does not support
>>> TV out
>>> ivtv-osd: Specified card (id 0) is either not present or does not support
>>> TV out
>>> ivtv-osd: Specified card (id 0) is either not present or does not support
>>> TV out
>>> ivtv-osd: Specified card (id 0) is either not present or does not support
>>> TV out
>>>
>> _______________________________________________
>> ivtv-devel mailing list
>> [email protected]
>> http://ivtvdriver.org/mailman/listinfo/ivtv-devel
>>
>
> _______________________________________________
> ivtv-devel mailing list
> [email protected]
> http://ivtvdriver.org/mailman/listinfo/ivtv-devel
>
--- ivtv-cards.c 2006-11-11 14:46:11.000000000 -0500
+++ ivtv-cards.c 2006-11-11 14:59:22.000000000 -0500
@@ -50,7 +50,18 @@
/* Hauppauge PVR-250 cards */
-/* Note: for Hauppauge cards the tveeprom information is used instead of PCI
IDs */
+static const struct ivtv_card_pci_info ivtv_pci_pvr250[] = {
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x0001 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x0003 },
+ { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_HAUPPAUGE, 0x4001 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x4008 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x4009 },
+ { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_HAUPPAUGE, 0x4801 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x4801 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x4803 },
+ { 0, 0, 0 }
+};
+
static const struct ivtv_card ivtv_card_pvr250 = {
.type = IVTV_CARD_PVR_250,
.name = "Hauppauge WinTV PVR-250",
@@ -74,6 +85,7 @@
{ IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
},
.radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
+ .pci_list = ivtv_pci_pvr250,
};
/* ------------------------------------------------------------------------- */
@@ -103,6 +115,13 @@
}
};
+static const struct ivtv_card_pci_info ivtv_pci_pvr350[] = {
+ { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_HAUPPAUGE, 0x4000 },
+ { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_HAUPPAUGE, 0x4800 },
+ { PCI_DEVICE_ID_IVTV15, IVTV_PCI_ID_HAUPPAUGE, 0 },
+ { 0, 0, 0 }
+};
+
static const struct ivtv_card ivtv_card_pvr350 = {
.type = IVTV_CARD_PVR_350,
.name = "Hauppauge WinTV PVR-350",
@@ -128,6 +147,7 @@
{ IVTV_CARD_INPUT_LINE_IN2, MSP_SCART3 },
},
.radio_input = { IVTV_CARD_INPUT_AUD_TUNER, MSP_SCART2 },
+ .pci_list = ivtv_pci_pvr350,
};
/* PVR-350 V1 boards have a different audio tuner input and use a
@@ -165,6 +185,27 @@
/* Hauppauge PVR-150/PVR-500 cards */
+static const struct ivtv_card_pci_info ivtv_pci_pvr150[] = {
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x0009 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x0801 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x0807 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x17e7 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x17f7 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x37f1 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x37f3 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x8001 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x8003 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0x8801 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0xc801 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0xe807 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0xe817 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE, 0xf7f7 },
+ // Alternate Hauppauge vendor IDs
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE_ALT1, 0x0801 },
+ { PCI_DEVICE_ID_IVTV16, IVTV_PCI_ID_HAUPPAUGE_ALT2, 0x8801 },
+ { 0, 0, 0 }
+};
+
static const struct ivtv_card ivtv_card_pvr150 = {
.type = IVTV_CARD_PVR_150,
.name = "Hauppauge WinTV PVR-150",
@@ -194,6 +235,7 @@
CX25840_AUDIO_SERIAL, WM8775_AIN4 },
/* apparently needed for the IR blaster */
.gpio_init = { .direction = 0x1f01, .initial_value = 0x26f3 },
+ .pci_list = ivtv_pci_pvr150,
};
/* ------------------------------------------------------------------------- */
--- ivtv-driver.c 2006-11-11 14:46:21.000000000 -0500
+++ ivtv-driver.c 2006-11-11 14:59:22.000000000 -0500
@@ -146,7 +146,7 @@
int ivtv_debug = IVTV_DBGFLG_WARN;
-int newi2c = -1;
+int newi2c = 1;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
module_param(yuv_fixup, int, 0644);
@@ -333,8 +333,7 @@
MODULE_PARM_DESC(newi2c,
"Use new I2C implementation\n"
- "\t\t\t-1 is autodetect, 0 is off, 1 is on\n"
- "\t\t\tDefault is autodetect");
+ "\t\t\t default is 1 (yes)");
MODULE_PARM_DESC(ivtv_first_minor, "Set minor assigned to first card");
@@ -342,7 +341,7 @@
MODULE_DESCRIPTION("CX23415/CX23416 driver");
MODULE_SUPPORTED_DEVICE
("CX23415/CX23416 MPEG2 encoder (WinTV PVR-150/250/350/500,\n"
- "\t\t\tYuan MPG series and similar)");
+ "\t\t\t Yuan MPG series and similar)");
MODULE_LICENSE("GPL");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
@@ -444,38 +443,40 @@
static void ivtv_process_eeprom(struct ivtv *itv)
{
+ const struct ivtv_card *card = itv->card;
struct tveeprom tv;
- int pci_slot = PCI_SLOT(itv->dev->devfn);
ivtv_read_eeprom(itv, &tv);
- /* Many thanks to Steven Toth from Hauppauge for providing the
- model numbers */
+ /* if the model is a 23xxx (PVR500), and this is the 'PVR150' on
+ that card (subsystem device ID has bit 4 set), then the eeprom
+ reported incorrectly that a radio is present. A radio is only
+ available for the first 'PVR150'.
+
+ Many thanks to Hauppauge for providing this data. */
+ if (tv.model / 1000 == 23) {
+ int is_first = (itv->dev->subsystem_device & 0x0010) == 0;
+
+ IVTV_INFO("This is the %s unit of a PVR500\n",
+ is_first ? "first" : "second");
+ itv->card_name = is_first ? "WinTV PVR 500 (unit #1)" :
+ "WinTV PVR 500 (unit #2)";
+ if (!is_first) {
+ IVTV_INFO("Correcting tveeprom data: no radio present
on second unit\n");
+ tv.has_radio = 0;
+ }
+ }
+
switch (tv.model) {
// In a few cases the PCI subsystem IDs do not correctly
// identify the card. A better method is to check the
// model number from the eeprom instead.
- case 32000 ... 32999:
- case 48000 ... 48099: /* 48??? range are PVR250s with a
cx23415 */
- case 48400 ... 48599:
- itv->card = ivtv_get_card(IVTV_CARD_PVR_250);
- break;
- case 48100 ... 48399:
- case 48600 ... 48999:
- itv->card = ivtv_get_card(IVTV_CARD_PVR_350);
- break;
- case 23000 ... 23999: /* PVR500 */
- case 25000 ... 25999: /* Low profile PVR150 */
- case 26000 ... 26999: /* Regular PVR150 */
+ case 26000 ... 26199:
itv->card = ivtv_get_card(IVTV_CARD_PVR_150);
break;
- default:
- IVTV_ERR("Unknown model %d, defaulting to PVR-150\n",
tv.model);
- itv->card = ivtv_get_card(IVTV_CARD_PVR_150);
+ case 32000 ... 32099:
+ itv->card = ivtv_get_card(IVTV_CARD_PVR_250);
break;
- }
-
- switch (tv.model) {
/* Old style PVR350 (with an saa7114) uses this input for
the tuner. */
case 48254:
@@ -485,34 +486,11 @@
break;
}
- itv->card_name = itv->card->name;
-
- /* If this is a PVR500 then it should be possible to detect whether it
is the
- first or second unit by looking at the subsystem device ID: is bit 4
is
- set, then it is the second unit (according to info from Hauppauge).
-
- However, while this works for most cards, I have seen a few PVR500
cards
- where both units have the same subsystem ID.
-
- So instead I look at the reported 'PCI slot' (which is the slot on
the PVR500
- PCI bridge) and if it is 8, then it is assumed to be the first unit,
otherwise
- it is the second unit. It is possible that it is a different slot
when ivtv is
- used in Xen, in that case I ignore this card here. The worst that
can happen
- is that the card presents itself with a non-working radio device.
-
- This detection is needed since the eeprom reports incorrectly that a
radio is
- present on the second unit. */
- if (tv.model / 1000 == 23 && (pci_slot == 8 || pci_slot == 9)) {
- int is_first = (pci_slot & 1) == 0;
-
- itv->card_name = is_first ? "WinTV PVR 500 (unit #1)" :
- "WinTV PVR 500 (unit #2)";
- if (!is_first) {
- IVTV_INFO("Correcting tveeprom data: no radio present
on second unit\n");
- tv.has_radio = 0;
- }
- }
- IVTV_INFO("Autodetected %s\n", itv->card_name);
+ if (card != itv->card) {
+ itv->card_name = itv->card->name;
+ IVTV_INFO("Corrected autodetection from %s to %s\n",
+ card->name, itv->card_name);
+ }
switch (tv.tuner_hauppauge_model) {
case 85:
@@ -528,9 +506,6 @@
itv->options.tuner = tv.tuner_type;
if (itv->options.radio == -1)
itv->options.radio = (tv.has_radio != 0);
- /* only enable newi2c if an IR blaster is present */
- if (itv->options.newi2c == -1 && tv.has_ir != 2)
- itv->options.newi2c = (tv.has_ir & 2) ? 1 : 0;
if (itv->std != 0)
// user specified tuner standard
@@ -661,24 +636,15 @@
itv->options.dynbuf = ivtv_dynbuf;
itv->options.newi2c = newi2c;
- itv->std = ivtv_parse_std(itv);
itv->has_cx23415 = (itv->dev->device == PCI_DEVICE_ID_IVTV15);
chipname = itv->has_cx23415 ? "cx23415" : "cx23416";
if ((itv->card = ivtv_get_card(itv->options.cardtype - 1))) {
IVTV_INFO("User specified %s card (detected %s based chip)\n",
itv->card->name, chipname);
- } else if (itv->options.cardtype != 0) {
- IVTV_ERR("Unknown user specified type, trying to autodetect
card\n");
- }
- if (itv->card == NULL) {
- if (itv->dev->subsystem_vendor == IVTV_PCI_ID_HAUPPAUGE ||
- itv->dev->subsystem_vendor == IVTV_PCI_ID_HAUPPAUGE_ALT1 ||
- itv->dev->subsystem_vendor == IVTV_PCI_ID_HAUPPAUGE_ALT2) {
- itv->card = ivtv_get_card(IVTV_CARD_PVR_150);
- IVTV_INFO("Autodetected Hauppauge card\n");
- }
- }
- if (itv->card == NULL) {
+ } else {
+ if (itv->options.cardtype != 0) {
+ IVTV_ERR("Unknown user specified type, trying to
autodetect card\n");
+ }
for (i = 0; (itv->card = ivtv_get_card(i)); i++) {
if (itv->card->pci_list == NULL)
continue;
@@ -697,23 +663,24 @@
goto done;
}
}
- }
-done:
- if (itv->card == NULL) {
- itv->card = ivtv_get_card(IVTV_CARD_PVR_150);
- IVTV_ERR("Unknown card: vendor/device: %04x/%04x\n",
- itv->dev->vendor, itv->dev->device);
- IVTV_ERR(" subsystem vendor/device: %04x/%04x\n",
- itv->dev->subsystem_vendor, itv->dev->subsystem_device);
- IVTV_ERR(" %s based\n", chipname);
- IVTV_ERR("Defaulting to %s card\n", itv->card->name);
- IVTV_ERR("Please mail the vendor/device and subsystem
vendor/device IDs and what kind of\n");
- IVTV_ERR("card you have to the ivtv-devel mailinglist
(www.ivtvdriver.org)\n");
- IVTV_ERR("Prefix your subject line with [UNKNOWN CARD].\n");
+ done:
+ if (itv->card == NULL) {
+ itv->card = ivtv_get_card(IVTV_CARD_PVR_150);
+ IVTV_ERR("Unknown card: vendor/device: %04x/%04x\n",
+ itv->dev->vendor, itv->dev->device);
+ IVTV_ERR(" subsystem vendor/device:
%04x/%04x\n",
+ itv->dev->subsystem_vendor,
itv->dev->subsystem_device);
+ IVTV_ERR(" %s based\n", chipname);
+ IVTV_ERR("Defaulting to %s card\n", itv->card->name);
+ IVTV_ERR("Please mail the vendor/device and subsystem
vendor/device IDs and what kind of\n");
+ IVTV_ERR("card you have to the ivtv-devel mailinglist
(www.ivtvdriver.org)\n");
+ IVTV_ERR("Prefix your subject line with [UNKNOWN
CARD].\n");
+ }
}
itv->v4l2_cap = itv->card->v4l2_capabilities;
itv->card_name = itv->card->name;
+ itv->std = ivtv_parse_std(itv);
}
/* Precondition: the ivtv structure has been memset to 0. Only
--- ivtv-driver.h 2006-11-11 14:46:37.000000000 -0500
+++ ivtv-driver.h 2006-11-11 14:59:22.000000000 -0500
@@ -174,6 +174,7 @@
#define IVTV_PCI_ID_YUAN3 0xffab
#define IVTV_PCI_ID_YUAN4 0xfbab
#define IVTV_PCI_ID_DIAMONDMM 0xff92
+#define IVTV_PCI_ID_XTREME550 0x0070
#define IVTV_PCI_ID_IODATA 0x10fc
#define IVTV_PCI_ID_MELCO 0x1154
#define IVTV_PCI_ID_GOTVIEW 0xffac
--- ivtv-i2c.c 2006-11-11 14:46:44.000000000 -0500
+++ ivtv-i2c.c 2006-11-11 14:59:22.000000000 -0500
@@ -709,7 +709,7 @@
{
IVTV_DEBUG_I2C("i2c init\n");
- if (itv->options.newi2c > 0) {
+ if (itv->options.newi2c) {
memcpy(&itv->i2c_adap, &ivtv_i2c_adap_hw_template,
sizeof(struct i2c_adapter));
} else {
@@ -733,7 +733,7 @@
ivtv_setscl(itv, 1);
ivtv_setsda(itv, 1);
- if (itv->options.newi2c > 0)
+ if (itv->options.newi2c)
return i2c_add_adapter(&itv->i2c_adap);
else
return i2c_bit_add_bus(&itv->i2c_adap);
@@ -743,7 +743,7 @@
{
IVTV_DEBUG_I2C("i2c exit\n");
- if (itv->options.newi2c > 0) {
+ if (itv->options.newi2c) {
i2c_del_adapter(&itv->i2c_adap);
} else {
i2c_bit_del_bus(&itv->i2c_adap);
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel