Welcome, Guest
Username: Password: Remember me

NOTE: This is a "Community" forum. Please be mindful that community members are here to help as part of a community effort. We therefore appreciate your effort in keeping this forum a happy place!

If you have a specific issue (e.g. hardware, failure) and want help from our support team, please use our tech support portal (Support menu - > Contact Us).
Thanks a lot of your help in making a better community.
  • Page:
  • 1

TOPIC:

Variable input sample rate with MCHStreamer 4 months 2 weeks ago #63965

  • julienp94
  • julienp94's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
Hi,

I'm new to the DSP space. I have a MCHStreamer with TOSLINK audio in from a streaming device, TOSLINK audio out to a DAC.
The MCHStreamer's firmware is the default one (I2S_TOSLINK I believe)
I'd like to pass the audio signal through some DSP software on my server (CamillaDSP), for room equalization and audio compression, as follows: 

MCHStreamer TOSLINK INPUT (2ch) -> DSP software -> MCHStreamer TOSLINK OUTPUT (2ch)

In the case of a known fixed sample rate, I use JACK at the desired sample rate on my server to route the audio, and things seem to work.

However, the audio input sample rate is variable (it's output from a chromecast). In my original understanding, I thought the MCHStreamer did ASRC, and would convert the input rate to whatever I set. However, this seems to not be the case. My second thought was that setting the MCHStreamer clock source to the TOSLINK clock would mean the unit can detect the input sample rate, and the only capture sample advertised to the server over USB would be the input rate. Again, this doesn't seem to be the case, as I can still select any capture sample rate on my server, and thus I still need to know the original audio's sample rate. 

I had a couple questions:

(1) Can the MCHStreamer do what I want it to do ? I don't necessarily need ASRC, I would just like for the USB interface to be "aware" of the input sample rate so I don't need to know the sample rate in advance. I don't mind tinkering, or using SPDIF for the input/output instead if that helps. 
(2) Is it even possible to determine the input sample rate of a TOSLINK input ? I2S has a LRCLK line that conveys the audio's sample rate, SPDIF encodes the word clock in the signal, I thought TOSLINK does the same but maybe not.
(3) I noticed something odd. If I select the internal clock, and set JACK with the correct sample rate, then all works as expected. But if I select the TOSLINK clock, regardless of the sample rate I set with JACK, the effective sample rate is the last one I set the internal clock to.
So for instance, if I have an audio input at 44.1khz, and I select the internal clock, I hear the intended audio when I set the rate at 44.1khz. But then, if I switch to the TOSLINK clock, regardless of the sample rate I select with JACK, the audio sounds the same, like if the card was performing ASRC. However, if I go back and select the internal clock, and set a wrong sample rate (like 48k), then when I switch to the TOSLINK clock, the audio sounds off even if I select the correct sample rate. 
It seems like the TOSLINK clock always defaults to the previously selected internal clock, and then the board performs rate conversion to whatever is set on the USB device. 

Thanks for your help ! 
Julien
 

Please Log in or Create an account to join the conversation.

Last edit: by julienp94.
  • Page:
  • 1
Moderators: devteam