<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-loopback ignores latency_msec option"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=80770">80770</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-loopback ignores latency_msec option
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </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>My latency using module-loopback is unacceptable for playing video games
through it (video game hardware connected to analog input). After I couldn't
get any better using the module's latency_msec option, I dinked around all that
I could with possible priority problems, realtime problems... Now, though, I
see that my latency is exactly the same whether I set latency_msec=1 or
latency_msec=2000, and 'pactl list sink-inputs' reflects that:

[david@delphinium pulse]$ pactl load-module module-loopback latency_msec=1   
38
[david@delphinium pulse]$ pactl list sink-inputs
Sink Input #10
    Driver: module-loopback.c
    Owner Module: 38
    Client: n/a
    Sink: 0
    Sample Specification: s16le 2ch 44011Hz
    Channel Map: front-left,front-right
    Format: pcm
    Corked: no
    Mute: no
    Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% /
0.00 dB
            balance 0.00
    Buffer Latency: 200767 usec
    Sink Latency: 99891 usec
    Resample method: speex-float-1
    Properties:
        media.role = "abstract"
        module-stream-restore.id = "sink-input-by-media-role:abstract"
        media.name = "Loopback from CMI8788 [Oxygen HD Audio] (Virtuoso 100
(Xonar DX)) Analog Stereo"
[david@delphinium pulse]$ pactl unload-module module-loopback
[david@delphinium pulse]$ pactl load-module module-loopback latency_msec=2000
39
[david@delphinium pulse]$ pactl list sink-inputs
Sink Input #11
    Driver: module-loopback.c
    Owner Module: 39
    Client: n/a
    Sink: 0
    Sample Specification: s16le 2ch 44011Hz
    Channel Map: front-left,front-right
    Format: pcm
    Corked: no
    Mute: no
    Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% /
0.00 dB
            balance 0.00
    Buffer Latency: 197905 usec
    Sink Latency: 99844 usec
    Resample method: speex-float-1
    Properties:
        media.role = "abstract"
        module-stream-restore.id = "sink-input-by-media-role:abstract"
        media.name = "Loopback from CMI8788 [Oxygen HD Audio] (Virtuoso 100
(Xonar DX)) Analog Stereo"

No matter what I set latency_msec to, 'Buffer Latency' is ~200ms, which is
latency_msec's default value. It appears that this option is being ignored,
which is a huge pain, obviously.</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>