<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - module-echo-cancel: should reduce noise even if nothing is being played"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83557">83557</a>
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>module-echo-cancel: should reduce noise even if nothing is being played
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>patrakov@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>modules
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr></table>
      <p>
        <div>
        <pre>module-echo-cancel, surprisingly, not only does echo cancellation, but also
other useful effects, like automatic gain control and noise reduction. However,
these effects are only applied when something is being played through the
echo-cancelled sink. I think this is wrong: these effects should be always
applied, because they are useful for voice-recorder applications.

To demonstrate the bug:

1. Load the module:

pacmd load-module module-echo-cancel

In my case, it attaches to the analog output of my onboard soundcard and to my
webcam's microphone.

2. Copy (for monitoring purposes) the output of the echo canceller to the
headphones, in a way that the echo canceller does not see this loopback:

pacat --record --device
alsa_input.usb-046d_0821_39BD2FC0-00-U0x46d0x821.analog-stereo.echo-cancel |
pacat --playback --device alsa_output.pci-0000_00_1b.0.analog-stereo

At this point, you should hear room noise and microphone hiss. The same hiss
would be recorded if you use parec to record the sound into a wav file.

Microphone hiss is exactly this bug.

3. Now open a new terminal and play silence through the echo canceller:

pacat --playback --device
alsa_output.pci-0000_00_1b.0.analog-stereo.echo-cancel /dev/zero

Result: no more microphone hiss! I want this without the need to create a dummy
stream.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>