Long story short ...

I am opening a USB S/PDIF capture device as "plughw:<card>,0" and using snd_pcm_readi to read frames of data. I'm setting the capture as 48 KHz stereo. As long as I feed 48 KHz into the device I can get good audio out. If I, instead, feed 44.1 KHz  into the device my capture is really capturing 44.1 KHz audio out.

That seems normal ... mostly ...

However, how would I be able to detect a change in input to know that my sample rate has been adjusted? Also, if I get some compressed audio (AC-3, DTS) I assume I need to carefully inquire in the byte stream to check for embedded compressed audio. That's the next on my list.

So, detecting hot-plugged sample rates?

- Paul Braman