0 Replies Latest reply on Jun 5, 2016 6:08 PM by jcjc

    Input volumes - what are they? (preamp / post-ADC)




      The "Use Case" scripts for recording refer to 3 volumes (see appended) - "IN3L Volume" and the "IN3R Volume" companion. The  values here can be [0,31]-> meaning 0-31 dB gain, I believe.  Is this in an analog preamp, or have we already ADCd the signal?  Later we encounter "IN3L Digital Volume' (and it's companion IN3R), which takes values 0-191 representing -64dB to +32dB in 0.5dB steps. So indeed, as the comment says, 128 is 0dB.  How does this differ from the ones above?  Things then get routed through a high pass filter, with coefficients representing - what?  240Hz?  and 3dB roll-off ? (per decade?, per octave?).


      Finally, we find AIF1TX1 Input 1 Volume, set to 32 meaning 0dB (from the comments).  I haven't played with this one.


      So: in what order should one fiddle with these three to get the desired volume of recordings through arecord?  My policy (so far) has been to max them out in the order listed above, in the assumption that "gain earlier in the pipe is better".    Anyone have any experience or pointers?


      For what it's worth, my defaults are (for the Primo EM172 microphone plugged into pink linein socket, with micbias on), IN3L Volume=32 (max), IN3L Digital Volume=152 (24dB gain).  That gives nice levels for outdoor environmental stuff, but clips a bit if you shout at close range.


      And I've been doing a bit of shouting recently.   Am I the only one who can't middle-click to paste into this sodding editor?  But then it looks like I have qualified as a membership level "volta", so that's good.  I think.







      # $1 added to support 1st line argument. i.e. "./Record_from_linein.sh -q" will stop all the control information being displayed on screen
      #Record from onboard Line Input to AP
      # +8dB input PGA gain
      amixer $1 -Dhw:sndrpiwsp cset name='IN3L Volume' 8
      amixer $1 -Dhw:sndrpiwsp cset name='IN3R Volume' 8
      # better THD in normal mode vs lower noise floor in high performance
      amixer $1 -Dhw:sndrpiwsp cset name='IN3 High Performance Switch' on
      # Configure the input path for 0dB Gain, HPF with a low cut off for DC removal
      amixer $1 -Dhw:sndrpiwsp cset name='IN3L Digital Volume' 128
      amixer $1 -Dhw:sndrpiwsp cset name='IN3R Digital Volume' 128
      amixer $1 -Dhw:sndrpiwsp cset name='LHPF1 Input 1' IN3L
      amixer $1 -Dhw:sndrpiwsp cset name='LHPF2 Input 1' IN3R
      amixer $1 -Dhw:sndrpiwsp cset name='LHPF1 Mode' High-pass
      amixer $1 -Dhw:sndrpiwsp cset name='LHPF2 Mode' High-pass
      amixer $1 -Dhw:sndrpiwsp cset name='LHPF1 Coefficients' 240,3
      amixer $1 -Dhw:sndrpiwsp cset name='LHPF2 Coefficients' 240,3
      # Configure the Audio Interface and volume 0dB
      amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX1 Input 1' LHPF1
      amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX1 Input 1 Volume' 32
      amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX2 Input 1' LHPF2
      amixer $1 -Dhw:sndrpiwsp cset name='AIF1TX2 Input 1 Volume' 32
      # The following command should be used to test
      # arecord -Dhw:sndrpiwsp -r 44100 -c 2 -f S32_LE <file>