Showing changes from revision #1 to #2:
Added | Removed | Changed
Entry | |
---|---|
R0 | Flags: |
Bit 0: 0 => Return data in ‘raw’ form | |
1 => Return data in ‘friendly’ form | |
Bits 1+: Reserved, should be zero | |
R1 | Format code to start from (-1 for first) |
R2 | Enumeration token for format code (-1 to start at first entry) |
Exit | |
---|---|
R0 | Preserved |
R1 | Format code of this entry (-1 if no more entries) |
R2 | Enumeration token for this entry (-1 if no more entries) |
R3-R5 | Dependent on flags |
All other registers preserved |
For ‘raw’ results, R3-R5 are as follows:
Exit | |
---|---|
R3 | Max channels |
R4 | Audio short descriptor byte 2 |
R5 | Audio short descriptor byte 3 |
For ‘friendly’ results, R3-R5 are as follows:
Exit | |
---|---|
R3 | Max channels |
R4 | Sample rate, in units of 1/1024Hz |
R5 | For format code 1 (LPCM): Sample bit depth |
For format codes 2-8: Max bit rate in Hz |
This call provides a means for software to enumerate the audio formats that are supported by the connected monitor.
Enumeration can start at the first supported format (by specifying R1 and R2 as -1) or at a specific format (Set R1 to the required format code, and R2 to -1). On return R1 and R2 will indicate the validity of the data; for valid data they will both not be -1, and for invalid data they will both be -1. Only if valid data is indicated will R3-R5 be updated.
The format code specified in R1 corresponds to the format codes defined by CEA 861, e.g. basic LPCM audio is format code 1.
The audio formats can be enumerated in two modes: ‘raw’ mode and ‘friendly’ mode. ‘raw’ mode returns bytes 2 and 3 of the CEA short audio descriptor directly (byte 1 will have already been decoded to determine the values of R1 and R3). ‘friendly’ mode interprets the bytes and converts them to standard units – however this is currently only supported for format codes 1 through 8.
The results of the enumeration will be ordered by their format code, so if you are only interested in one format code you can simply begin enumeration with R1 set to that value and end enumeration when R1 deviates from that value.
Enumeration tokens used with ‘friendly’ mode are not compatible with enumeration tokens used with ‘raw’ mode.
For monitors with complex EDID, it is possible that the same format will be reported twice when enumerating in ‘friendly’ mode.
When dealing with multi-channel audio, ScreenModes_ReadInfo 1 2 can be used to determine which speakers are present on the monitor.