Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jan 2001 02:40:48 +0000 (GMT)
From:      Andrew Gordon <arg@arg1.demon.co.uk>
To:        multimedia@freebsd.org
Cc:        sos@freebsd.org
Subject:   Bug in DVD ioctls
Message-ID:  <Pine.BSF.4.21.0101250235160.4180-100000@server.arg.sj.co.uk>

next in thread | raw e-mail | index | archive | help

It appears the  DVD_REPORT_RPC/DVD_SEND_RPC options for reading/setting
the drive's region settings are incomplete: they transfer all of the
parameters apart from the region code itself!  The patch below fixes this
for the ATAPI case; the SCSI code appears to have the same problem at a
quick glance, but I don't have any SCSI DVDs to test.

I have put a small program at http://www.arg1.demon.co.uk/freebsd.html
which exercises these calls: using it, I have successfully played DVDs on
a new drive that has never been in a Windows machine.


Index: atapi-cd.c
===================================================================
RCS file: /repository/src/sys/dev/ata/atapi-cd.c,v
retrieving revision 1.48.2.8
diff -c -r1.48.2.8 atapi-cd.c
*** atapi-cd.c	2001/01/07 16:55:20	1.48.2.8
--- atapi-cd.c	2001/01/25 02:30:08
***************
*** 1558,1563 ****
--- 1558,1565 ----
  	ai->reg_type = (d.data[0] >> 6);
  	ai->vend_rsts = (d.data[0] >> 3) & 0x7;
  	ai->user_rsts = d.data[0] & 0x7;
+ 	ai->region = d.data[1];
+ 	ai->rpc_scheme = d.data[2];
  	break;
      
      case DVD_INVALIDATE_AGID:
***************
*** 1594,1599 ****
--- 1596,1602 ----
  	break;
      
      case DVD_SEND_RPC:
+ 	d.data[0] = ai->region;
  	length = 8;
  	break;
  



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101250235160.4180-100000>