dvddrivectl

DVD drive control utility

Syntax:

dvddrivectl -d device [-e] [-l] [-r region_code] [-v]

Runs on:

x86

Options:

-d device
The path to the ATAPI device; default is /dev/cd0.
-e
Eject the mediastore (disk) from the device.
-l
Load (retract) the mediastore in the device.
-r region_code
Set the region code for the device. Valid values are 1 to 8. See Setting the region code below.
-v
Enable verbosity levels. More vs increases the verbosity level, providing greater levels of detail.

Description:

The dvddrivectl command-line utility loads and ejects mediastores (disks) for the device specified by the -d option, and sets or changes the regional playback control (RPC) for that device, as requested.

Running dvddrivectl with only the -d device option lists the RPC information for the specified device. Running this utility with no arguments lists the RPC information for the default device: /dev/cd0.

RPC information

The list below describes the regional playback control values used by dvddrivectl:

TypeCode
The device region code status:
Vendor Resets Available
A counter indicating the number of times still available that the vendor may change the device region.
User Controlled Changes Available
A counter indicating the number of times still available that the user may change the device region.
Region Number
The current region number for the device.
Region Mask
A mask indicating the current region code. The position of the bit with a 0 value indicates the region code; for example, 0xfe indicates region 1.
RPC scheme
The RPC scheme used by the device:

Note: All values are bitmasks. Values can be combined and masked. For more information, see the ATAPI Multimedia Devices specifications.

Setting the region code

You can use the dvddrivectl utility's -r option to set an ATAPI DVD device's region code, provided that:

Please refer to the device manufacturer's documentation for device limitations and other device-specific information.

The dvddrivectl utility checks that the conditions listed above are met before attempting to set a device's region code. If these conditions are not met, dvddrivectl returns an error.


Caution:

The number of region code changes permitted for DVD devices is limited. If the TypeCode is 0x02, the present change is the final region code change you will be able to make on the device. You will not be able to change the region code again.


To set an ATAPI drive's region code, assuming that the conditions listed above are met:

  1. Start dvddrivectl, specifying:

Example 1: mediastore disk at default location

The example below shows the dvddrivectl response when it is started and a mediastore disk is present at /dev/cd0:

# ./dvddrivectl -d /dev/cd0

device path: /dev/cd0
DVD drive region code:1

Example 2: verbose mode

The example below shows the dvddrivectl response when it is started in verbose mode, and a mediastore disk is present at /dev/cd0:

# ./dvddrivectl -d /dev/cd0 -v

device path: /dev/cd0
DVD drive is ready
DVD drive region code:1
============================================
RPC state information
============================================
 RPC info                                : 0x64
   Type Code                             : 0x01 (00h none, 01h set, 02h last chance, 03h perm)
   # of Vendor Resets Available          : 0x00
   # of User Controlled Changes Available: 0x04
 Region Number                           : 1
 Region Mask                             : 0xfe
 RPC Scheme                              : 0x01 (00 unknown, 01 comply with ATAPI specs)

Example 3: setting the region code

The example below shows the command line input and the terminal display when setting the region code to 1 (one) for a device at the default location:

# ./dvddrivectl -r 1

device path: /dev/cd0
DVD drive is ready
DVD drive region code:0
============================================
RPC state information
============================================
 RPC info                                : 0x25
   Type Code                             : 0x00 (00h none, 01h set, 02h last chance, 03h perm)
   # of Vendor Resets Available          : 0x00
   # of User Controlled Changes Available: 0x05
 Region Number                           : 0
 Region Mask                             : 0xff
 RPC Scheme                              : 0x01 (00 unknown, 01 comply with ATAPI specs)
 please confirm region code change: 0->1
 enter 'y' to set, any other key to ignore :y

DVD drive region code:1
============================================
RPC state information
============================================
 RPC info                                : 0x64
   Type Code                             : 0x01 (00h none, 01h set, 02h last chance, 03h perm)
   # of Vendor Resets Available          : 0x00
   # of User Controlled Changes Available: 0x04
 Region Number                           : 1
 Region Mask                             : 0xfe
 RPC Scheme                              : 0x01 (00 unknown, 01 comply with ATAPI specs)

Example 4: region code already specified

The example below shows the command line input and the terminal display when the region code for the device at the spcified location is already set to the requested region code:

# ./dvddrivectl -d /dev/cd1 -r1

device path: /dev/cd1
DVD drive is ready
DVD drive region code:1
============================================
RPC state information
============================================
 RPC info                                : 0x64
   Type Code                             : 0x01 (00h none, 01h set, 02h last chance, 03h perm)
   # of Vendor Resets Available          : 0x00
   # of User Controlled Changes Available: 0x04
 Region Number                           : 1
 Region Mask                             : 0xfe
 RPC Scheme                              : 0x01 (00 unknown, 01 comply with ATAPI specs)
DVD drive region code is already set to 1

 

The example below shows an attempt to start dvddrivectl without a mediastore in the specified DVD drive:

# ./dvddrivectl
device path: /dev/cd0
 DVD drive is not ready; sense_code: 0x23a00
 Please insert mediastore and try again

Region codes

The table below lists current DVD RPC-2 codes:

Region Description
0 Region 0 is used informally to refer to disks that can be played anywhere; that is, they either have no flag set, or have flags set for regions 1 through 6.
1 Canada, the United States and its territories, and Bermuda
2 Western and Central Europe including the U.K., Western Asia, Israel, Iran, Egypt, Japan, South Africa, Swaziland, Lesotho, Turkey, and French overseas territories
3 Southeast Asia, South Korea, Taiwan, Hong Kong and Macau
4 Mexico, Central and South America, the Caribbean, Australia, New Zealand and Oceania
5 Ukraine, Belarus, Russia, Africa except countries listed as Region 2, Central and South Asia, Mongolia and North Korea
6 People's Republic of China
7 Reserved for future use, but currently found in use on some pre-release DVDs in Asia.
8 International venues such as aircraft and cruise ships
All flags The disk can be played on any player in any region.

See also:

dvdkeymgr, srv-dvdplayer, DVD-video player in the MME Developer's Guide chapter Playing and Managing Video and DVDs