Bug #1068
closedDVD playback not working
Added by corecode over 16 years ago. Updated over 16 years ago.
0%
Description
Hey,
Yesterday night I tried to play a DVD. No luck. I tried with Ubuntu,
no luck either until I installed libdvdcss. So my drive works, but
DragonFly has no means of playing a DVD.
That's pathetic.
A selection of error messages (all with libdvdcss installed):
ogle:
(from dmesg)
ata0: FAILURE - non aligned DMA transfer attempted
acd0: setting up DMA failed
mplayer:
(from dmesg):
ata0: FAILURE - non aligned DMA transfer attempted
acd0: setting up DMA failed
now hangs in wchan "ATA re"
pathetic.
Updated by mneumann over 16 years ago
Googling for "non aligned DMA transfer attempted" lead me to this page
(in German):
http://www.bsdforen.de/showthread.php?p=185404
So it seems FreeBSD (7.0) has the same problem. Someone suggests the
following:
natacontrol mode acd0 pio4
Regards,
Michael
Updated by steve over 16 years ago
On Sun, 13 Jul 2008 13:21:36 +0200
Michael Neumann <mneumann@ntecs.de> wrote:
This does work - at the cost of very high CPU utilisation
(especially when trying to read a DVD at high speed with dvdbackup etc).
This problem has been around a while - see "Reading DVD video broken in
recent current" in bugs@ from 11 Jan. It started between preview and
current at that time. I've made periodic attempts to track it down without
success.
Updated by steve over 16 years ago
Hi,
I found that compiling libdvdcss with CCVER=gcc34 makes encrypted
DVD reading work.
Updated by dillon over 16 years ago
: Hi,
:
: I found that compiling libdvdcss with CCVER=gcc34 makes encrypted
:DVD reading work.
:
Nice sleuthing! Sigh. What is with all of these linux-centric
programmers these days? Did you track down what in libdvdcss was
not being compiled properly with gcc-4?
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by corecode over 16 years ago
I think this is the same thing that I found several weeks ago (and
forgot to post): buffer alignment to page boundaries on read()/ioctl().
Or did we fix that already?
cheers
simon
Updated by dillon over 16 years ago
:Matthew Dillon wrote:
:> : I found that compiling libdvdcss with CCVER=gcc34 makes encrypted
:> :DVD reading work.
:> Nice sleuthing! Sigh. What is with all of these linux-centric
:> programmers these days? Did you track down what in libdvdcss was
:> not being compiled properly with gcc-4?
:
:I think this is the same thing that I found several weeks ago (and
:forgot to post): buffer alignment to page boundaries on read()/ioctl().
: Or did we fix that already?
:
:cheers
: simon
I don't think it has been fixed. I was hoping someone would take
up the charge :-) Its physio() that needs to deal with the
alignment issue.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by steve over 16 years ago
On Sat, 09 Aug 2008 18:22:13 +0100
"Simon 'corecode' Schubert" <corecode@fs.ei.tum.de> wrote:
Not unless it's been fixed between preview and current. I'd say it
is the same issue though.
Updated by steve over 16 years ago
On Sat, 9 Aug 2008 09:49:01 -0700 (PDT)
Matthew Dillon <dillon@apollo.backplane.com> wrote:
'fraid not - to be honest I'm not sure how to go about it.
Updated by steve over 16 years ago
On Sat, 9 Aug 2008 09:49:01 -0700 (PDT)
Matthew Dillon <dillon@apollo.backplane.com> wrote:
Is it because this sort of thing:
if( psz_cache )
{
uint8_t p_sector[DVDCSS_BLOCK_SIZE];
...
i_ret = dvdcss->pf_read( dvdcss, p_sector, 1 );
}
Can leave p_sector not aligned suitably for DMA in gcc-4 ? (pf_read
winds up calling read on the DVD device with p_sector as the buffer).
Updated by dillon over 16 years ago
: if( psz_cache )
: {
: uint8_t p_sector[DVDCSS_BLOCK_SIZE];
:...
: i_ret = dvdcss->pf_read( dvdcss, p_sector, 1 );
: }
:
: Can leave p_sector not aligned suitably for DMA in gcc-4 ? (pf_read
:winds up calling read on the DVD device with p_sector as the buffer).
It's a roll of dice, really. Neither gcc-3 nor gcc-4 guarantee any
sort of alignment for a char array, and our kernel's physio() doesn't
realign the data.
Well, I guess since nobody has bitten on fixing physio() I'll have to
do it myself :-). I'll do it today.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by dillon over 16 years ago
Ok, I have committed fixes to the kernel's physio() to HEAD. Please
test w/ a gcc-4 built DVD playback gizmo! If the tests work out
I will MFC the change to 2.0.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by steve over 16 years ago
On Sun, 10 Aug 2008 13:04:19 -0700 (PDT)
Matthew Dillon <dillon@apollo.backplane.com> wrote:
Works perfectly - thank you.
Updated by hasso over 16 years ago
Indeed it fixes the issue. Which makes me wonder what broke it as I'm sure
that I've been watching DVD's using DragonFly and gcc4 was default for
sure then.
Updated by steve over 16 years ago
On Mon, 11 Aug 2008 11:37:32 +0300
Hasso Tepper <hasso@estpak.ee> wrote:
It broke for me when I switched from an up to date preview to head
from 7 January.
Updated by dillon over 16 years ago
:> Indeed it fixes the issue. Which makes me wonder what broke it as I'm
:> sure that I've been watching DVD's using DragonFly and gcc4 was default
:> for sure then.
:
: It broke for me when I switched from an up to date preview to head
:from 7 January.
I think it was a complete luck of the draw prior to the physio fix,
whether that char buffer declared on the stack in the dvd library
happened to be properly aligned or not for DMA.
-Matt
Matthew Dillon
<dillon@backplane.com>
Updated by steve over 16 years ago
On Mon, 11 Aug 2008 08:22:19 -0700 (PDT)
Matthew Dillon <dillon@apollo.backplane.com> wrote:
It was better than that - I've been running DragonFly and playing
and backing up DVDs with it since early 2005, it was rock solid up until
that Jan 7 update (and before that in FreeBSD 4.x) it's never worked after
that until now.