SPDIF receiver with dynamically changing sample rate
Hi,
I want to do the following: write an application that has its input fed from an SPDIF receiver without using sample rate conversion. The sample rate must not be set by the application but must be defined by the SPDIF receiver's PLL.
Is it possible to run the application continously with ALSA even if the sample rate changes? If yes, how can the application notice the change in sample rate?
Regards
Sam
Quoted 3 lines · Sam Hawkens
I want to do the following: write an application that has its input fed from an SPDIF receiver without using sample rate conversion. The sample rate must not be set by the application but must be defined by the SPDIF receiver's PLL.
Most S/PDIF inputs do not resample, but this depends on the hardware.
Quoted 2 lines
Is it possible to run the application continously with ALSA even if the sample rate changes?
Most drivers ignore the rate requested by the application and return the samples as they come from the input. Only the AK411* drivers monitor the rate and stop the stream on changes.
Quoted 1 line
If yes, how can the application notice the change in sample rate?
This is usually not possible without measuring the rate at which samples arrive. However, you could check the declared rate of the sender by monitoring the channel status bits.
Regards,
Clemens
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Sam Hawkens
Some SPDIF receivers have an interrupt output that can be configured to be asserted when sample rate changes.
If the driver supports this, it will notify you of changes of the mixer control that contains the status bits.
Regards,
Clemens