From owner-freebsd-multimedia Wed Jan 24 18:41:18 2001 Delivered-To: freebsd-multimedia@freebsd.org Received: from arg1.demon.co.uk (arg1.demon.co.uk [194.222.34.166]) by hub.freebsd.org (Postfix) with ESMTP id 68ECC37B6A1; Wed, 24 Jan 2001 18:40:58 -0800 (PST) Received: by arg1.demon.co.uk (Postfix, from userid 300) id 8DDB69B24; Thu, 25 Jan 2001 02:40:48 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by arg1.demon.co.uk (Postfix) with ESMTP id 867B95D15; Thu, 25 Jan 2001 02:40:48 +0000 (GMT) Date: Thu, 25 Jan 2001 02:40:48 +0000 (GMT) From: Andrew Gordon X-Sender: arg@server.arg.sj.co.uk To: multimedia@freebsd.org Cc: sos@freebsd.org Subject: Bug in DVD ioctls Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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