<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I've often thought about attempting to write an enhanced version of
    sockaudio.py with AGC functionality.  I'm not well versed on the
    various algorithms though, and haven't yet found any suitable code
    samples online that can be readily repurposed.  If anyone has any
    pointers I'd be open to looking at it.<br>
    <br>
    Graham<br>
    <br>
    <div class="moz-cite-prefix">On 12/28/18 8:52 AM,
      <a class="moz-txt-link-abbreviated" href="mailto:wllmbecks@gmail.com">wllmbecks@gmail.com</a> [op25-dev] wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:000001d49eb4$89e364f0$9daa2ed0$@gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <span style="display:none"> </span>
      <!--~-|**|PrettyHtmlStartT|**|-~-->
      <div id="ygrp-mlmsg" style="position:relative;">
        <div id="ygrp-msg" style="z-index: 1;">
          <!--~-|**|PrettyHtmlEndT|**|-~-->
          <div id="ygrp-text">
            <!--~-|**|PrettyHtmlStart|**|-~--> <span
              style="font-weight: 700; font-size: 12px; display: block;
              margin-bottom: 20px;">[<a style="text-decoration: none;"
                href="#TopText" moz-do-not-send="true">Attachment(s)</a>
              from <a class="moz-txt-link-abbreviated" href="mailto:wllmbecks@gmail.com">wllmbecks@gmail.com</a> included below]</span>
            <!--~-|**|PrettyHtmlEnd|**|-~-->
            <div class="WordSection1">
              <p class="MsoNormal">Here are a couple of additional
                thoughts/comments…..<o></o></p>
              <p class="MsoNormal"><o> </o></p>
              <p class="MsoNormal">You don’t necessarily have to run
                Icecast on the RPi.  You can just a easily configure
                darkice to push the <o></o></p>
              <p class="MsoNormal">audio stream to a preconfigured mount
                point on a remote server.<o></o></p>
              <p class="MsoNormal"><o> </o></p>
              <p class="MsoNormal">One of the unfortunate aspects with
                digital audio (p25) is that few radio technicians
                understand how to setup proper microphone or console
                audio levels.  On analog system they were used to
                looking at the deviation scope/meter on their service
                monitor and cranking the mic gain to achieve rated
                system deviation.   However, this is not the case in P25
                or other digital modes.  The ones and zeros hit specific
                deviation targets (symbols) that don’t care how high or
                how low the actual audio is.    <o></o></p>
              <p class="MsoNormal"><o> </o></p>
              <p class="MsoNormal">Graham Norbury has added a feature to
                his boatbod fork of op25 that give you the option on the
                rx.py command line to adjust the recovered audio
                level.   I’ve found that in my location that on some
                systems some additional gain is helpful and have
                specified <b>-x 2</b> on my rx.py command line to
                increase the gain.    You may want to vary this value
                experimentally as needed to compensate for local
                conditions.<o></o></p>
              <p class="MsoNormal">I don’t know what the limits are but
                at some point you are likely to start clipping and then
                you’ll know the upper limit.  Perhaps Graham will chime
                in with addition information on this subject.<o></o></p>
              <p class="MsoNormal"><o> </o></p>
              <p class="MsoNormal">On the subject of P25 audio.   I
                won’t go into methods I’ve used to set and measuring
                digital audio levels, but I am attaching <b>apco_ref.wav</b>,
                an audio test tone file crated and calibrated for use
                with the op25 on the Raspberry Pi to produce a test tone
                equivalent in level to that reproduced if you were to
                connect a service monitor up  to your Pi’s SDR modulated
                with a standard P25 1011 (tone) test pattern.  I did
                this because of a need to setup audio levels with
                external devices.   One such example is where I break
                out the audio from the RPi and send it through an
                automatic gain control (AGC) amplifier before sending it
                on to darkice for conversion to an mp3 stream to level
                out p25 system/user levels.<o></o></p>
              <p class="MsoNormal"><o> </o></p>
              <p class="MsoNormal">Bill, WA8WG<o></o></p>
              <p class="MsoNormal"> <o></o></p>
              <p class="MsoNormal"><o> </o></p>
              <p class="MsoNormal"><o> </o></p>
              <p class="MsoNormal"><o> </o></p>
              <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>