![Vlsi VS1005 Manual Download Page 54](http://html.mh-extra.com/html/vlsi/vs1005/vs1005_manual_1042919054.webp)
HH
VS1005 VSOS A
UDIO
S
UBSYSTEM
VS1005g
11.6
Fractional Sample Rates
For most audio drivers, setting the sample rate with an accuracy of 1 Hz is enough. How-
ever, some drivers are internally capable of setting the sample rate with better accuracy.
As an example the analog output driver AUODAC.DL3 can set the sample rate with an
accuracy of approximately 0.09 Hz. This makes a driver more useful when streaming
audio in slave mode, e.g. when using the AUXSYNCS.DL3 synchronization driver.
Because being able to set the sample rate with higher than 1 Hz accuracy was a new
VSOS feature for 2016, it was important to maintain compatibility with older software
that is incapable of setting the sample rate with sub-hertz accuracy.
To set a fractional sample rate, ioctl()’s IOCTL_AUDIO_SET_RATE_AND_BITS,
IOCTL_AUDIO_SET_IRATE, and IOCTL_AUDIO_SET_ORATE all can take their pa-
rameters in a 32-bit integer-compatible fractional representation, where bits 30:24 of
the sample rate parameter represent 1/128 Hz increments, as shown in the following
table.
32-bit fractional sample rate representation
Bits
Range
Description
31
0
Not used, set to 0
30:24
0..127
Sample rate fractions in 1/128 Hz
23:0
0..16777215
Sample rate integer part in Hz
32-bit fractional sample rate examples
Sample rate
Representation
44100 Hz
0x0000ac44
44100
1
128
Hz
0x0100ac44
44100.5 Hz
0x4000ac44
44100
127
128
Hz
0x7f00ac44
Audio drivers which are not interested in the sample rate’s fractional part, mask away
bits 30:24 from ioctl() sample rate setting parameters.
To maintain compatilibity with software unaware of the fractional sample rate presenta-
tion format, IOCTL_AUDIO_GET_IRATE and IOCTL_AUDIO_GET_ORATE only return
the integer portion of the sample rate.
Rev. 3.57
2019-04-10
Page