T4 - can MQS be used at the same time as I2S

Status
Not open for further replies.

mmalex

Member
hi,
with teensy 4.0 I've been looking around for some docs on the 'medium quality sound' pins. I've got 2 questions -
1) if I was planning to use the first I2S channel with a codec like the SGTL5000 / the breakout board, for 2 channels of 'hi quality' sound, could I also simultaneously use the MQS pins? looking in output_mqs.cpp, it looks like it's configuring something to do with I2S, even for MQS... so I was unsure if there would be some kind of conflict if I wanted to use the audio breakout at the same time as the MQS pins. (for 4 channels of output). I realise I could use two codecs or a 4 channel codec, but I was curious about the reduced part count of mixed quality - 2 hi, 2 medium channels basically.

2) I'm curious what kind of waveform they output? is it kinda a 1 bit sigma-delta DAC thing? the datasheet / nxp site seems quiet on the topic. in particular, is the noise more spread-spectrum than you'd get from naive PWM on a pin?

thanks! excited to receive my T4 ... en route with DHL as I type.
 
Hi!

it seems it does not work properly with the library as it is at the moment.

I used the SGTL5000 audio board, connected it to the T4.0 and used the guitar example. Additionally to the original example I added the following:

Code:
AudioOutputMQS           mqs1; 
AudioConnection          patchCord10(mixer2, 0, mqs1, 0);
AudioConnection          patchCord11(mixer2, 0, mqs1, 1);

A small loudspeaker was connected via a 470µF series capacitor to pin 12 (or pin 10), the other end of the loudspeaker went to ground.

The sound was nice with either the MQS object alone or using the I2S object.

Connecting both resulted in good I2S output sound and muffled and detuned MQS sound with occasional clicks.

Just my first observation, maybe this can be made to run simultaneously, but at the moment it does not work properly together.

P.S.: it also seems that I2S input together with MQS output (PassThroughStereo example modified for MQS output) does not work properly together, the sound is corrupted
 
Last edited:
thanks so much for taking the time to do a thorough investigation! my t4s have arrived but i haven't had a chance to try them out yet.

it does seem odd that the mqs code includes a bunch of i2s config; perhaps it needs the mclk internally to clock the mqs or something? or perhaps it was just copy paste...
 
If I read correctly page 2068 of the reference manual, the MQS is an add-on block to the SAI-3 and the latter requires naturally an I2S configuration to serve the MQS.
 
Status
Not open for further replies.
Back
Top