Audio Unit
The audio unit is identified in the Configuration ROM as a Unit Directory with Unit Specification ID 0x000A27 and Unit Software Version 0x000010. Like the video unit, the audio unit is controlled by a register file. The base address of the register file is specified in the Unit Directory of the audio unit. The register file is organized as shown in “Table 1-6.”
Table 1-6 The audio unit register fileOffset | Name | Description |
0x000 | AudioEnable | Write 0x80000000 to enable audio transmission (or 0 to disable) |
0x204 | Default Audio Gain | Read-only |
0x210 | Gain: Raw Start | Read-only Scale factor for Gain (at 0x500) |
0x214 | Gain: Raw End | Read-only Scale factor for Gain (at 0x500) |
0x218 | Gain: Decibels Start | Read-only Signed 32-bit value |
0x21C | Gain: Decibels End | Read-only Signed 32-bit value |
0x280 | Sample Rate Inquiry | Read-only (see 0x400) |
0x300 | Isochronous TX Config | Isoch Channel + (Speed << 16) |
0x400 | Sample Rate | Write 0x80000000 to select 48K samples/sec |
0x500 | Gain | Read/Write values within range given by Raw Start/Raw End registers |
0x504 | Mute | Write any non-zero value to mute audio without stopping isochronous stream |
Audio is sent in large chunks during gaps in the video, according to the format shown in “Table 1-7.” As explained in the “Introduction,” an audio packet will never be sent in the same isochronous cycle as a video packet. When 640 x 480 YUV 4:1:1 30 fps video is selected, the audio packets will be about twice as large (and half as numerous) as in any other video mode.
Table 1-7 Format of audio chunksByte Offset | Name | Description of Quadlet value |
0x000 | 1394 Packet Header | See 1394 Chapter 6; Length and Channel # |
0x004 | 1394 Header CRC* | CRC for header quadlet only |
0x008 | Audio Sample Count | Count of audio samples in this packet |
0x00C | Audio Signature | ASCII “sght” (0x73676874) |
0x010 | Audio Sample Total | Total count of all previous samples |
0x014 | Reserved | Reserved |
0x018-0xNNN | Audio Data | Two-channel audio data (see “Table 1-8”). Up to 1900 bytes (depending on video format) |
0xNNN+4 | 1394 Data CRC* | CRC for payload quadlets |
* Most Link hardware (such as OHCI) removes these CRCs as the packet is received |
Each audio sample is a four-byte value containing two signed 16-bit samples. Viewed on 1394, the sample is structured as shown in “Table 1-8.”
Table 1-8 Audio sample structuresByte 0 (bits 0-7) | Byte 1 (bits 8-15) | Byte 2 (bits 16-23) | Byte 3 (bits 24-31) |
16-bit audio sample (Front/”Left”) | 16-bit audio sample (Rear/”Right”) |