[alsa-devel] SPDIF receiver with dynamically changing sample rate
Sam.Hawkens at freenet.de
Sun Nov 13 04:53:13 CET 2011
Am 12.11.2011 16:36, schrieb Clemens Ladisch:
> 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.
OK, so that should work.
>> 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.
OK, so this could be a solution as long as the SPDIF stream carries correct channel stauts information (which is not alway the case). Still a good idea.
Some SPDIF receivers have an interrupt output that can be configured to be asserted when sample rate changes. With a custom hardware design that's another option in addition to the available ALSA features.
Thanx a lot for the good advice!
More information about the Alsa-devel