Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jan 2004 19:40:28 -0700
From:      Stacy Millions <stacy@Millions.Ca>
To:        freebsd-multimedia@freebsd.org, john@feith.com
Subject:   Re: Hauppauge PVR-[23]50 driver
Message-ID:  <4011DB1C.4070502@millions.ca>
In-Reply-To: <200401220647.i0M6lKW17352@jwlab.FEITH.COM>
References:  <200401220647.i0M6lKW17352@jwlab.FEITH.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------080000020801050200040405
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

John Wehle wrote:
>>So, I'm back to the freebsd driver. A quick hack job to make it
>>recognise the tuner (wild ass guess as to the type) and it bombs
>>on unknown audio decoder
> 
> 
> Patches for these two problems are included below.

And they work very nicely. Thanks.

>>(BTW, both of these errors cause a panic ... not nice).
> 
> 
> They shouldn't cause a panic on a properly configured FreeBSD 4.9
> machine.  What was the panic and the traceback?

I'm afraid savecore wasn't able to save a valid core if yo really
want a trace I will recompile the original modules and generate.
The message I had jotted down on a sticky note are:

cxm0: unknown tuner code 0x2c
cxm0: could not initialise tuner
iicbus0: detached
iicbb0: detached
panic: free: multiple frees

>>the driver hangs after a while, a while being => 30 minutes.
> 
> 
> What does dmesg display on boot up?  What does your hardware look
> like (motherboard, additional cards, memory, etc)?

for dmesg, see attached

MB is Asus CUSL2
P3/733
512 MB RAM
Adaptec 2940 SCSI
SMC Ethernet
Miro (now Pinnacle) DC20 - no driver loaded
PVR-350


>>The linux ivtv driver has problems with some Hauppauge cards and dma
> 
> 
> Details please.

Wish there were details to report. The last couple weeks there have been
a couple threads in the ivtv mailing list about the data stream
freezing. It has been attributed to DMA problems and so far the
main change has been to add some debug output to the driver.

>   2) Work correctly on FreeBSD 4.9 using a PVR-350.  Mike Tancsa
>      <mike@sentex.net> worked with me to get this supported.
>      Mike's machine did initially experience a hang which was
>      resolved by rearranging the boards.

I will try yanking out the other cards and see what happens.

>   4) Work incorrectly on FreeBSD 5.2 using a PVR-250 version 2 card.
>      Same problem as # 3.  Erik Moe <emoe@cox.net> did the port and
>      is working with me to resolve the video / audio sync issue.

Great, I look forward to seeing a 5.2 version.

I was testing your new patches and had the following results

First capture hung after about 5-10 minutes.

I ^Ced the capture, unloaded the modules and reloaded them and
got a panic

panicstr: page fault
panic messages:
---
dmesg: kvm_read: invalid address (c0815000)
---
#0  0xc01fc352 in dumpsys ()
(kgdb) backtrace
#0  0xc01fc352 in dumpsys ()
#1  0xc01fc123 in boot ()
#2  0xc01fc561 in panic ()
#3  0xc0372bdb in trap_fatal ()
#4  0xc0372889 in trap_pfault ()
#5  0xc0372403 in trap ()
#6  0xc020382e in devclass_delete_device ()
#7  0xc0203a71 in device_delete_child ()
#8  0xc0203a47 in device_delete_child ()
#9  0xc24b2be7 in ?? ()
#10 0xc012bf92 in DEVICE_DETACH ()
#11 0xc02041f8 in device_detach ()
#12 0xc0203a5b in device_delete_child ()
#13 0xc24b878c in ?? ()
#14 0xc012bf62 in DEVICE_ATTACH ()
#15 0xc0204153 in device_probe_and_attach ()
#16 0xc020510c in bus_generic_driver_added ()
#17 0xc012c171 in BUS_DRIVER_ADDED ()
#18 0xc0203426 in devclass_add_driver ()
#19 0xc020550f in driver_module_handler ()
#20 0xc01eb42b in module_register_init ()
#21 0xc01eb9f7 in linker_file_sysinit ()
#22 0xc01ebb78 in linker_load_file ()
#23 0xc01ec3c2 in kldload ()
#24 0xc0372e91 in syscall2 ()
#25 0xc0363085 in Xint0x80_syscall ()

rebooted

Next capture 30 minutes no problem
Next capture 30 minutes no problem
Next capture 90 minutes no problem

at that point I tried

mplayer -cache 8192 /dev/bktr0

it was working. I exited mplayer, changed channels tried again.
Repeated that a few times (OK, I'm easily amused :-) I decided
to leave mplayer running and go to bed. When I checked on it
in the morning, I saw the following message from mplayer:

-----
Too many audio packets in the buffer: (4096 in 8257536 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.

[repeated 4 or 5 times]

Exiting... (End of file)
-----

I checked /var/log/messages for kernel output and found

Jan 22 22:00:29 /kernel: cxm0: encoder dma not enough buffer space free
Jan 22 22:01:03 last message repeated 106 times
Jan 22 22:01:03 last message repeated 2 times
Jan 23 01:47:10 /kernel: cxm0: encoder dma not enough buffer space free
Jan 23 01:47:30 last message repeated 170 times
Jan 23 01:48:37 last message repeated 20 times


the 'not enough buffer space' messages would have started about a half
hour after I went to bed.

-stacy

--------------080000020801050200040405
Content-Type: text/plain;
 name="dmesg.boot"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="dmesg.boot"

Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 4.9-STABLE #11: Sun Jan  4 20:16:26 MST 2004
    stacy@maple.millions.ca:/usr/obj/usr/src/sys/maple
Timecounter "i8254"  frequency 1193182 Hz
CPU: Intel Pentium III (737.02-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x683  Stepping = 3
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 535736320 (523180K bytes)
config> enable apm
avail memory = 515973120 (503880K bytes)
Preloaded elf kernel "kernel" at 0xc0529000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc05290a8.
Preloaded elf module "snd_emu10k1.ko" at 0xc05290f8.
Preloaded elf module "snd_pcm.ko" at 0xc052919c.
Preloaded elf module "agp.ko" at 0xc052923c.
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 10 entries at 0xc00f1310
apm0: <APM BIOS> on motherboard
apm0: found APM BIOS v1.2, connected at v1.2
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
agp0: <Intel 82815 (i815 GMCH) SVGA controller> mem 0xef800000-0xef87ffff,0xf8000000-0xfbffffff irq 11 at device 2.0 on pci0
pcib1: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
pci1: <PCI bus> on pcib1
ahc0: <Adaptec 2940 SCSI adapter> port 0xd800-0xd8ff mem 0xef000000-0xef000fff irq 9 at device 9.0 on pci1
aic7870: Single Channel A, SCSI Id=7, 16/253 SCBs
rl0: <Accton MPX 5030/5038 10/100BaseTX> port 0xd400-0xd4ff mem 0xee800000-0xee8000ff irq 9 at device 10.0 on pci1
rl0: Ethernet address: 00:04:e2:06:7a:8f
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcm0: <Creative EMU10K1> port 0xd000-0xd01f irq 9 at device 11.0 on pci1
pcm0: <TriTech TR28602 AC97 Codec>
pci1: <unknown card> (vendor=0x11de, dev=0x6057) at 12.0 irq 9
pci1: <unknown card> (vendor=0x4444, dev=0x0803) at 14.0 irq 5
isab0: <Intel 82801BA/BAM (ICH2) PCI to LPC bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 ATA100 controller> port 0xa800-0xa80f at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> port 0xa400-0xa41f irq 9 at device 31.2 on pci0
usb0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
pci0: <unknown card> (vendor=0x8086, dev=0x2443) at 31.3 irq 10
uhci1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> port 0xa000-0xa01f irq 9 at device 31.4 on pci0
usb1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhub2: ALCOR Generic USB Hub, class 9/0, rev 1.10/1.00, addr 2
uhub2: 4 ports with 4 removable, self powered
orm0: <Option ROMs> at iomem 0xc0000-0xcbfff,0xcc000-0xcc7ff on isa0
pmtimer0 on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model IntelliMouse, device ID 3
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/9 bytes threshold
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ad0: 58644MB <Maxtor 5T060H6> [119150/16/63] at ata0-master UDMA100
acd0: DVD-R <HL-DT-ST DVDRAM GSA-4040B> at ata1-master PIO4
Waiting 15 seconds for SCSI devices to settle
sa0 at ahc0 bus 0 target 2 lun 0
sa0: <ARCHIVE Python 28388-XXX 4.98> Removable Sequential Access SCSI-2 device 
sa0: 5.000MB/s transfers (5.000MHz, offset 15)
Mounting root from ufs:/dev/ad0s2a
cd0 at ata1 bus 0 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GSA-4040B A104> Removable CD-ROM SCSI-0 device 
cd0: 16.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
WARNING: / was not properly dismounted

--------------080000020801050200040405--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4011DB1C.4070502>