
USB Audio Design Guide 17/61
The first operation the interrupt handler does is to send back a word acknowledging
the request (if there was a change of sample frequency a control token would
instead be sent—the audio system uses a testct() to inspect for this case).
Sample transfer may now take place. First the audio subsystem transfers samples
destined for the host, then the decouple core sends samples from the host to
device. These transfers always take place in channel count sized chunks (i.e.
NUM_USB_CHAN_OUT
and
NUM_USB_CHAN_IN
). That is, if the device has 10 output
channels and 8 input channels, 10 samples are sent from the decouple core and 8
received every interrupt.
The complete communication scheme is shown in the table below (for non sample
frequency change case):
Decouple Audio System Note
outuint() Audio system requests sample exchange
inuint() Interrupt fires and inuint performed
outuint() Decouple sends ack
testct() Checks for CT indicating SF change
inuint() Word indication ACK input (No SF change)
inuint() Sample transfer (Device to Host)
inuint()
inuint()
...
outuint() Sample transfer (Host to Device)
outuint()
outuint()
outuint()
...
Figure 8:
Decouple/Audio
System
Channel Com-
munication
3.6.4.1 Aysnc Feedback
The device uses a feedback endpoint to report the rate at which audio is output/in-
put to/from external audio interfaces/devices. This feedback is in accordance with
the USB Audio Class 2.0 specification.
After each received USB SOF token, the buffering core takes a timestamp from
a port clocked off the master clock. By subtracting the timestamp taken at the
previous SOF, the number of master clock ticks since the last SOF is calculated.
From this the number of samples (as a fixed point number) between SOFs can be
calculated. This count is aggregated over 128 SOFs and used as a basis for the
feedback value.
The sending of feedback to the host is also handled in the USB buffering core.
REV 6.1
Comentários a estes Manuais