[mythtv-users] Help: issues in trying to enable DMA on hard drives for mythtv...

Robert McRostie RobertMc at laservision.com.au
Fri Jun 3 01:59:55 UTC 2005


Hello All,
	After a lot of work I have finally have my Mythtv box running. Thanks for all the great guides that are out there. Partically the one that was written by Jarod Wilson and Jani Talikka (for the Dvico HDTV digital card setup). I followed Jani Talikka's guide pretty closely to get my box running.

	One of the remaining problems that I have is the Live TV output is jerky. After searching the net I think this is related to me not being able to get the drives to use DMA. If I record anything the play back seems to be ok.

	So first up I will give a little info and see how we go.

When I do a lspci -v command I get this:
-------------------------------------------------------------------------
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 661FX/M661FX/M661MX Host (rev 11)
	Subsystem: Silicon Integrated Systems [SiS] 661FX/M661FX/M661MX Host
	Flags: bus master, medium devsel, latency 32
	Memory at d8000000 (32-bit, non-prefetchable) [size=64M]
	Capabilities: [c0] AGP version 3.5

00:01.0 PCI bridge: Silicon Integrated Systems [SiS]: Unknown device 0003 (prog-if 00 [Normal decode])
	Flags: bus master, 66Mhz, fast devsel, latency 64
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
	Memory behind bridge: dc000000-ddffffff
	Prefetchable memory behind bridge: d0000000-d7ffffff

00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS964 [MuTIOL Media IO] (rev 36)
	Flags: bus master, medium devsel, latency 0

00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 01) (prog-if 8a [Master SecP PriP])
	Subsystem: Giga-byte Technology: Unknown device 5002
	Flags: bus master, medium devsel, latency 128, IRQ 16
	I/O ports at <unassigned>
	I/O ports at <unassigned>
	I/O ports at <unassigned>
	I/O ports at <unassigned>
	I/O ports at f000 [size=16]

00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) (prog-if 10 [OHCI])
	Subsystem: Giga-byte Technology: Unknown device 5004
	Flags: bus master, medium devsel, latency 32, IRQ 20
	Memory at e1001000 (32-bit, non-prefetchable) [size=4K]

00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) (prog-if 10 [OHCI])
	Subsystem: Giga-byte Technology: Unknown device 5004
	Flags: bus master, medium devsel, latency 32, IRQ 21
	Memory at e1002000 (32-bit, non-prefetchable) [size=4K]

00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f) (prog-if 10 [OHCI])
	Subsystem: Giga-byte Technology: Unknown device 5004
	Flags: bus master, medium devsel, latency 32, IRQ 22
	Memory at e1004000 (32-bit, non-prefetchable) [size=4K]

00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller (prog-if 20 [EHCI])
	Subsystem: Giga-byte Technology: Unknown device 5004
	Flags: bus master, medium devsel, latency 32, IRQ 23
	Memory at e1000000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [50] Power Management version 2

00:09.0 Multimedia video controller: Conexant Winfast TV2000 XP (rev 05)
	Subsystem: DViCO Corporation: Unknown device db10
	Flags: bus master, medium devsel, latency 32, IRQ 17
	Memory at de000000 (32-bit, non-prefetchable) [size=16M]
	Capabilities: [44] Vital Product Data
	Capabilities: [4c] Power Management version 2

00:09.2 Multimedia controller: Conexant: Unknown device 8802 (rev 05)
	Subsystem: DViCO Corporation: Unknown device db10
	Flags: bus master, medium devsel, latency 32, IRQ 17
	Memory at df000000 (32-bit, non-prefetchable) [size=16M]
	Capabilities: [4c] Power Management version 2

00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
	Subsystem: Realtek Semiconductor Co., Ltd. RT8139
	Flags: bus master, medium devsel, latency 32, IRQ 18
	I/O ports at e000 [size=256]
	Memory at e1003000 (32-bit, non-prefetchable) [size=256]
	Capabilities: [50] Power Management version 2

00:0b.0 Multimedia audio controller: Creative Labs Ectiva EV1938
	Subsystem: Creative Labs: Unknown device 5938
	Flags: bus master, slow devsel, latency 32, IRQ 19
	I/O ports at e400 [size=64]
	I/O ports at e800 [size=32]
	Capabilities: [dc] Power Management version 2

01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1) (prog-if 00 [VGA])
	Subsystem: LeadTek Research Inc.: Unknown device 290f
	Flags: bus master, 66Mhz, medium devsel, latency 248, IRQ 16
	Memory at dc000000 (32-bit, non-prefetchable) [size=16M]
	Memory at d0000000 (32-bit, prefetchable) [size=128M]
	Capabilities: [60] Power Management version 2
	Capabilities: [44] AGP version 3.0

-------------------------------------------------------------------------

When I us hdparm -v /dev/hd? I get this

/dev/hda:

 Model=IC35L040AVVN07-0, FwRev=VA2OAF0C, SerialNo=VNP210B2GTKD0B
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=52
 BuffType=DualPortCache, BuffSize=1863kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=80416127
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 1: 

 * signifies the current active mode


/dev/hdb:

 Model=CB511D ATAPI COMBO, FwRev=VER 13SA, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=yes, tPIO={min:227,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 *udma2 
 AdvancedPM=no

 * signifies the current active mode


/dev/hdc:

 Model=WDC WD1600JB-00GVA0, FwRev=08.02D08, SerialNo=WD-WCAL92351843
 Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
 RawCHS=16383/16/63, TrkSize=57600, SectSize=600, ECCbytes=74
 BuffType=DualPortCache, BuffSize=8192kB, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: device does not report version: 

 * signifies the current active mode
-------------------------------------------------------------------------

And also this


/dev/hda:
 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 65535/16/63, sectors = 41173057024, start = 0

/dev/hdb:
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)

/dev/hdc:
 multcount    = 16 (on)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 19457/255/63, sectors = 160040803840, start = 0

-------------------------------------------------------------------------

As can be seen I do not have DMA enabled. But I think UDMA is enabled??? I know from reading all the stuff on mythtv that DMA is needed for mythtv to work well. After searching for this on the internet I found the command hdparm -d1 /dev/hd? Which should enable dma access. But this does not work. I get an error stating

HID0_SET_DMA failed: Operation not permitted

I am running the command as root.

-------------------------------------------------------------------------

I also ran hdparm -tT /dev/hd? And I get this


/dev/hda:
 Timing cached reads:   1852 MB in  2.00 seconds = 924.29 MB/sec
 Timing buffered disk reads:    8 MB in  3.36 seconds =   2.38 MB/sec

/dev/hdb:
 Timing buffered disk reads:  
/dev/hdc:
 Timing cached reads:   1840 MB in  2.00 seconds = 920.14 MB/sec
 Timing buffered disk reads:    8 MB in  3.18 seconds =   2.51 MB/sec

Again from reading on the net the buffered disk reads are bad. Is this correct?


Anyway, I have recompiled the Kernel (which is 2.6.9 do to the custom driver for the DVICO card) to support the IDE controller and this did not make any difference. I am using a Gigabit mother board model GA-8S661FXM-775 with a p4 on it. A pretty quick machine for this task.

So any suggestions on what to try next?

Thanks in advance for any help.

Regards,
Robert McRostie.



More information about the mythtv-users mailing list