This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TAS2505: Some Questions About Audio Clipping

Part Number: TAS2505

Tool/software:

Hello,

I would like to test if there's any sound clipping from TAS2505's DAC, and after studying the reference guide, I noticed there's a clipping flag bit on P0 R39. However, what I don't quite understand is exactly when I should read this bit. Since I am sending a piece of continuous audio, and there could be clipping at any point, should I stop this continuous audio once in a while to read the flag? Or can I just read this flag once after the entire audio is sent?

Besides, I was wondering if there's a way to detect if there's any sound distortion/clipping from adjusting the speaker driver gain (P1 R48) as well?

All the best,

Jiahe Liu

  • Hi Jiahe,

    I'll review your questions and get back to you with further information tomorrow by end of day.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Ivan, thanks for your reply! Just to provide more context on the audio clipping part from the speaker drivers, this is what our oscilloscope capture looks like, where the yellow wave represents SPKP signal, pink wave represents SPKM signal, and blue wave represents the difference between SPKP and SPKM. Is there a way to tell if my audio is clipped or not, either from the individual SPKP/M wave or the difference waveform?

    In addition, after capturing the SPKP and SPKM waveforms, it seems like these two highly overlap and in sync. Although they're out-of-phase a tiny bit after zooming in, I was still wondering if this waveform looks normal to you.

    P.S. I moved down the blue line manually on the screen so that it doesn't overlap with the yellow and pink waves visually,  just in case you're confused.

  • Hi Jiahe,

    What you see there is the Class-D PWM switching while not playing audio. If you start playing something you should see the PWM signals increasing/decreasing the duty cycle inverse to each other. That's the normal operation of the Class-D, it's not clipping.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Ivan, thanks for your reply! I will check if the oscilloscope capture is for when no audio is played. Maybe that's the reason why the waveform looks abnormal.

    In addition, I would like to test if there's any sound clipping from TAS2505's DAC, and after studying the reference guide, I noticed there's a clipping flag bit on P0 R39. However, what I don't quite understand is exactly when I should read this bit. Since I am sending a piece of continuous audio, and there could be clipping at any point, should I stop this continuous audio once in a while to read the flag? Or can I just read this flag once after the entire audio is sent?

  • Hi Jiahe,

    Unfortunately, the details on register 39 were not included in the register map section. My guess is that this is a latched register so you can read it any time and it should remain active after any clipping event.
    I'll double check this using an EVM, as it is actually not clear if the feature is available or not.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Jiahe,

    The document mention of register 39 is an error and will be removed in the next document revision. This register function is not described in the register map.
    Similar functionality is available in DAC overflow status register 42/43.

    Best regards,
    -Ivan Salazar
    Applications Engineer

  • Hi Ivan, thanks for your reply! Although register 42/43 seems like the flags to identify if the digital input will be clipped or not. However, we would like to test if the analog audio after the DAC processing is clipped or not so as to check if there's any potential sound distortion from adjusting the digital gain. I was wondering if there's any way to do that?

    We would also like to see if the final speaker output is distorted or not, after adjusting the speaker attenuation and driver gain. Any suggestions how to do that as well? 

  • Hi Jiahe,

    There's no clipping detection on the analog side of the amplifier.

    You may only ensure there's no clipping by fine tuning the different gain controls in the device, eg.

    • Set DAC digital volume and volume attenuation to 0dB.
    • Set Class-D gain to 12dB (I don't think there's clipping at all with 6dB gain).
    • Play full-scale (0dBFS) sinewave tone.
    • Adjust either DAC digital volume or volume attenuation such that output does not clip.
    • Any other playback content should have the same peak level, so clipping should not happen.

    Best regards,
    -Ivan Salazar
    Applications Engineer