Documentation/userspace-api/ioctl/cdrom.rst
Source file repositories/reference/linux-study-clean/Documentation/userspace-api/ioctl/cdrom.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/userspace-api/ioctl/cdrom.rst- Extension
.rst- Size
- 20562 bytes
- Lines
- 1243
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
============================
Summary of CDROM ioctl calls
============================
- Edward A. Falk <efalk@google.com>
November, 2004
This document attempts to describe the ioctl(2) calls supported by
the CDROM layer. These are by-and-large implemented (as of Linux 2.6)
in drivers/cdrom/cdrom.c and drivers/block/scsi_ioctl.c
ioctl values are listed in <linux/cdrom.h>. As of this writing, they
are as follows:
======================== ===============================================
CDROMPAUSE Pause Audio Operation
CDROMRESUME Resume paused Audio Operation
CDROMPLAYMSF Play Audio MSF (struct cdrom_msf)
CDROMPLAYTRKIND Play Audio Track/index (struct cdrom_ti)
CDROMREADTOCHDR Read TOC header (struct cdrom_tochdr)
CDROMREADTOCENTRY Read TOC entry (struct cdrom_tocentry)
CDROMSTOP Stop the cdrom drive
CDROMSTART Start the cdrom drive
CDROMEJECT Ejects the cdrom media
CDROMVOLCTRL Control output volume (struct cdrom_volctrl)
CDROMSUBCHNL Read subchannel data (struct cdrom_subchnl)
CDROMREADMODE2 Read CDROM mode 2 data (2336 Bytes)
(struct cdrom_read)
CDROMREADMODE1 Read CDROM mode 1 data (2048 Bytes)
(struct cdrom_read)
CDROMREADAUDIO (struct cdrom_read_audio)
CDROMEJECT_SW enable(1)/disable(0) auto-ejecting
CDROMMULTISESSION Obtain the start-of-last-session
address of multi session disks
(struct cdrom_multisession)
CDROM_GET_MCN Obtain the "Universal Product Code"
if available (struct cdrom_mcn)
CDROM_GET_UPC Deprecated, use CDROM_GET_MCN instead.
CDROMRESET hard-reset the drive
CDROMVOLREAD Get the drive's volume setting
(struct cdrom_volctrl)
CDROMREADRAW read data in raw mode (2352 Bytes)
(struct cdrom_read)
CDROMREADCOOKED read data in cooked mode
CDROMSEEK seek msf address
CDROMPLAYBLK scsi-cd only, (struct cdrom_blk)
CDROMREADALL read all 2646 bytes
CDROMGETSPINDOWN return 4-bit spindown value
CDROMSETSPINDOWN set 4-bit spindown value
CDROMCLOSETRAY pendant of CDROMEJECT
CDROM_SET_OPTIONS Set behavior options
CDROM_CLEAR_OPTIONS Clear behavior options
CDROM_SELECT_SPEED Set the CD-ROM speed
CDROM_SELECT_DISC Select disc (for juke-boxes)
CDROM_MEDIA_CHANGED Check is media changed
CDROM_TIMED_MEDIA_CHANGE Check if media changed
since given time
(struct cdrom_timed_media_change_info)
CDROM_DRIVE_STATUS Get tray position, etc.
CDROM_DISC_STATUS Get disc type, etc.
CDROM_CHANGER_NSLOTS Get number of slots
CDROM_LOCKDOOR lock or unlock door
CDROM_DEBUG Turn debug messages on/off
CDROM_GET_CAPABILITY get capabilities
CDROMAUDIOBUFSIZ set the audio buffer size
DVD_READ_STRUCT Read structure
DVD_WRITE_STRUCT Write structure
DVD_AUTH Authentication
CDROM_SEND_PACKET send a packet to the drive
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.