Skip to contentSkip to conversation

SPDIF receiver with dynamically changing sample rate

DISCUSSION Sam Hawkens 1 participant 1 message Nov 13, 2011

lore
Share & tools
lore
#0 lore raw

Am 12.11.2011 16:36, schrieb Clemens Ladisch:

Quoted 3 lines

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.

Quoted 4 lines
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.

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!

Regards,
Sam