kern/81180: bktr(4) driver cannot capture both audio and video simultaneously

Mario Sergio Fujikawa Ferreira lioux at FreeBSD.org
Wed May 18 03:30:12 GMT 2005


>Number:         81180
>Category:       kern
>Synopsis:       bktr(4) driver cannot capture both audio and video simultaneously
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 18 03:30:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Mario Sergio Fujikawa Ferreira
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD exxodus.fedaykin.here 5.4-STABLE FreeBSD 5.4-STABLE #3: Sun May 8 10:28:48 BRT 2005 lioux at exxodus:/usr/obj/usr/src/sys/LIOUX i386

Copyright (c) 1992-2005 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 5.4-STABLE #3: Sun May  8 10:28:48 BRT 2005
    lioux at exxodus:/usr/obj/usr/src/sys/LIOUX
ACPI APIC Table: <A M I  OEMAPIC >
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) XP 2600+ (1917.81-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x6a0  Stepping = 0
  Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
  AMD Features=0xc0400000<AMIE,DSP,3DNow!>
real memory  = 2146697216 (2047 MB)
avail memory = 2099429376 (2002 MB)
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0 <Version 0.3> irqs 0-23 on motherboard
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <A M I OEMRSDT> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
cpu0: <ACPI CPU> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <VIA KT880 host to PCI bridge> mem 0xe0000000-0xefffffff at device 0.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
drm0: <Matrox G400/G450 (AGP)> mem 0xfe000000-0xfe7fffff,0xfeafc000-0xfeafffff,0xfa000000-0xfbffffff irq 16 at device 0.0 on pci1
info: [drm] AGP at 0xe0000000 256MB
info: [drm] Initialized mga 3.1.0 20021029 on minor 0
bktr0: <BrookTree 878> mem 0xfd9fe000-0xfd9fefff irq 19 at device 7.0 on pci0
smbus0: <System Management Bus> on bktr0
iicbb0: <I2C bit-banging driver> on bktr0
iicbus0: <Philips I2C bus> on iicbb0 master-only
iicsmb0: <SMBus over I2C bridge> on iicbus0
smbus1: <System Management Bus> on iicsmb0
bktr0: Hauppauge Model 44001 C110
bktr0: Hauppauge WinCast/TV.
pci0: <multimedia> at device 7.1 (no driver attached)
fxp0: <Intel 82550 Pro/100 Ethernet> port 0xb800-0xb83f mem 0xfebc0000-0xfebdffff,0xfebfe000-0xfebfefff irq 18 at device 8.0 on pci0
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:02:b3:2d:b2:de
emu10kx0: <Creative Audigy (Unknow model) [SB????]> port 0xbc00-0xbc3f irq 17 at device 10.0 on pci0
pcm0: <EMU10Kx PCM Interface> on emu10kx0
pcm0: <SigmaTel STAC9721/23 AC97 Codec>
pci0: <input device> at device 10.1 (no driver attached)
pci0: <serial bus, FireWire> at device 10.2 (no driver attached)
atapci0: <VIA 6420 SATA150 controller> port 0xc800-0xc80f,0xcc00-0xcc03,0xd000-0xd007,0xd400-0xd403,0xd800-0xd807 irq 20 at device 15.0 on pci0
ata2: channel #0 on atapci0
ata3: channel #1 on atapci0
atapci1: <VIA 8237 UDMA133 controller> port 0xfc00-0xfc0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 15.1 on pci0
ata0: channel #0 on atapci1
ata1: channel #1 on atapci1
uhci0: <VIA 83C572 USB controller> port 0xdc00-0xdc1f irq 21 at device 16.0 on pci0
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xe000-0xe01f irq 21 at device 16.1 on pci0
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <VIA 83C572 USB controller> port 0xe400-0xe41f irq 21 at device 16.2 on pci0
usb2: <VIA 83C572 USB controller> on uhci2
usb2: USB revision 1.0
uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3: <VIA 83C572 USB controller> port 0xe800-0xe81f irq 21 at device 16.3 on pci0
usb3: <VIA 83C572 USB controller> on uhci3
usb3: USB revision 1.0
uhub3: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
pci0: <serial bus, USB> at device 16.4 (no driver attached)
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model MouseMan+, device ID 0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
fdc0: <floppy drive controller (FDE)> port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc8800-0xc9fff,0xc0000-0xc87ff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
fb0 at vga0
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
ppc0: parallel port not found.
Timecounter "TSC" frequency 1917812916 Hz quality 800
Timecounters tick every 0.868 msec
IP Filter: v3.4.35 initialized.  Default = pass all, Logging = disabled
ipfw2 initialized, divert disabled, rule-based forwarding disabled, default to accept, logging disabled
acd0: DVDR <HL-DT-ST DVDRAM GSA-4120B/A115> at ata0-master UDMA33
acd1: CDRW <HL-DT-ST GCE-8525B/1.02> at ata0-slave UDMA33
ad2: 152627MB <ST3160021A/3.06> [310101/16/63] at ata1-master UDMA100
cd0 at ata0 bus 0 target 0 lun 0
cd0: <HL-DT-ST DVDRAM GSA-4120B A115> Removable CD-ROM SCSI-0 device 
cd0: 33.000MB/s transfers
cd0: cd present [1759104 x 2048 byte records]
cd1 at ata0 bus 0 target 1 lun 0
cd1: <HL-DT-ST CD-RW GCE-8525B 1.02> Removable CD-ROM SCSI-0 device 
cd1: 33.000MB/s transfers
cd1: cd present [1 x 2048 byte records]
Mounting root from ufs:/dev/ad2s4a
acd0: FAILURE - unknown CMD (0xe3) status=51<READY,DSC,ERROR> error=4<ABORTED>
acd0: FAILURE - unknown CMD (0xe2) status=51<READY,DSC,ERROR> error=4<ABORTED>

>Description:

urrently, bktr(4) driver cannot capture both audio and video
simultaneously. Try watching video with port multimedia/mplayer.
Video works without audio with

$ mplayer -tv driver=bsdbt848:width=640:height=480:input=0:norm=ntsc tv://
MPlayer 1.0pre7-3.4.2 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE


Playing tv://.
Cache fill:  0.00% (0 bytes)    TV detected! ;-)
Selected driver: bsdbt848
 name: Brooktree848 Support
 author: Charles Henrich
 comment: in development
START
vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0.0" => local display)
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred csp: Packed UYVY)
VDec: using Packed UYVY as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Packed UYVY 
Selected video codec: [rawuyvy] vfm:raw (RAW UYVY)
==========================================================================
Audio: no sound
Starting playback...
V:   0.0 154/154 ??% ??% ??,?% 0 0 0%                                                                                          
Exiting... (Quit)

However, audio capture works if wavrec from audio/wavplay port

$ wavrec test.wav
$ ls -l test.wav 
-rw-------  1 lioux  lioux  441044 May 18 00:03 test.wav

The audio can be heard just fine.

Try using mplayer and wavrec simultaneously. mplayer will grab the video stream just fine but wavrec will complain

$ wavrec test.wav   
Device busy:
Opening audio device /dev/audio

The same symptoms can be reproduced with multimedia/ffmpeg. I can
use neither multimedia/xwatv nor multimedia/fxtv because both cause
my system to freeze. Randall Hopper <rhh at FreeBSD.org> who develops
fxtv says, and I quote (please forgive if I took it out of context):

"Mario Sergio Fujikawa Ferreira:
 |      I have been experiencing some lock up when trying port
 |fxtv-1.03_2. I start the application and the system freezes. No
 |responses, not even to the power button. I have to hit reset.
 
"Ouch.  When this has happened in the past, it's typically been
because the motherboard and/or video card isn't well supported by
FreeBSD.  Fxtv uses the very old trick of pointing the TV board
output to the memory-mapped linear frame buffer of the video card
"in the application".  Back when it was written there wasn't any
other option.  Now we have Xv and other methods, which are much
better and cleaner for TV apps to use.  Fxtv was just never revised
to use these."

Anyway, is this just an isolated issue or a bktr(4) driver problem?

>How-To-Repeat:

Try to capture both audio and video simultaneously using either
mplayer or mplayer/wavrec combo

>Fix:

MPlayer-1.0pre7/libmpdemux/tvi_bsdbt848.c seems to imply that mplayer
can simultaneously capture both audio and video with current NetBSD
brooktree drivers. Checking differences should be the 1st step.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list