Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Sample that can be analyzed for digital clipping (Read 3810 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Sample that can be analyzed for digital clipping

My Android device has a Qualcomm SOC whose DSP configuration can be easily altered by editing text files in a folder. One possibility is adjusting the digital gain (at an unknown stage in the playback chain) of different playback modes (different gains for the headphone output during calls, FM and media playback).

What I'm asking for is if a specific tone or sample can be used to determine the existence of clipping after recording the sample's playback through a computer's line input so I can set the gain as high as possible without excessive clipping.

Sample that can be analyzed for digital clipping

Reply #1
My Android device has a Qualcomm SOC whose DSP configuration can be easily altered by editing text files in a folder. One possibility is adjusting the digital gain (at an unknown stage in the playback chain) of different playback modes (different gains for the headphone output during calls, FM and media playback).


Thats actually analog gain.

What I'm asking for is if a specific tone or sample can be used to determine the existence of clipping after recording the sample's playback through a computer's line input so I can set the gain as high as possible without excessive clipping.


You can use any test tone normalized to just below peak.  However, RMAA may be a better choice for this, as it will generate its own tones and extract the nonlinear part of the playback.

FWIW, you may actually want to set the gain high enough to audibly clip.  This is actually fairly common, as it allows you to playback files which are not peak normalized at higher volume than would otherwise be possible, and has no downsides so long as you don't listen regularly at the highest gain setting.

Sample that can be analyzed for digital clipping

Reply #2
Quote
Thats actually analog gain.


Code: [Select]
SectionDevice
    Name "Headphones"
    Comment "Headset Rx device"

    EnableSequence
        'SLIM_0_RX Channels':0:Two
        'RX1 MIX1 INP1':0:RX1
        'RX1 MIX1 INP2':0:RX6
        'RX2 MIX1 INP1':0:RX2
        'RX2 MIX1 INP2':0:RX7
        'HPHL DAC Switch':1:1
        'HPHR DAC Switch':1:1
        'HPHL Volume':1:80
        'HPHR Volume':1:80
        'SLIM TX3 MUX':0:RMIX1
        'SLIM TX5 MUX':0:RMIX2
    EndSequence


I'm talking about the "HPHL/HPHR Volume" lines. Are they really analog gain? In any case, I already tried using RMAA but even with the original values it complains about clipping no matter the Volume setting on Android. It could be a strange interaction between my onboard audio and the headphone output of the phone, or it could be that my Samsung device has a borked analog audio path.

Sample that can be analyzed for digital clipping

Reply #3
Yes those are almost certainly analog gain. Having a setting for digital gain would be odd.

The clipping warning in rmaa refers to your PC, not the device you are testing.

Sample that can be analyzed for digital clipping

Reply #4
The clipping warning in rmaa refers to your PC, not the device you are testing.


I'm not so sure about this after all. During loopback testing (line-out to line-in) I have no issues calibrating the system. I had a hunch and I decided to play the calibration signal on my PC. It sounds completely different to the calibration signal heard during loopback testing. Opening it in Audacity reveals that its a square wave for some reason while the loopback calibration signal heard through the speakers sounds like a proper sine wave. I've uploaded the calibration signal here: http://www.hydrogenaud.io/forums/index.php?showtopic=106101 . In my experience it shouldn't be like that.

Sample that can be analyzed for digital clipping

Reply #5
Yes, that test signal is clipped and also phase delayed relative to a normal test sample.  Random guess:  you have an EQ that applies gain to audio through direct sound?

Sample that can be analyzed for digital clipping

Reply #6
Yes, that test signal is clipped and also phase delayed relative to a normal test sample.  Random guess:  you have an EQ that applies gain to audio through direct sound?


This is the file saved by RMAA when you click the "Generate WAV" button. It's not a recording of it, its the untouched file itself.

Sample that can be analyzed for digital clipping

Reply #7
Yes, that test signal is clipped and also phase delayed relative to a normal test sample.  Random guess:  you have an EQ that applies gain to audio through direct sound?


This is the file saved by RMAA when you click the "Generate WAV" button. It's not a recording of it, its the untouched file itself.


Yes I know that.  However, its appears to have been passed through some DSP effect on your PC.

Sample that can be analyzed for digital clipping

Reply #8
I'm not sure about that. I use the stock Microsoft drivers on my ALC892-based onboard audio and all effects in the Playback device's properties are disabled. But it's surprising that the WAV generation passes audio through Windows. I'll have to fiddle with levels a bit.