<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Module restore restores volume and mute settings from wrong sink input"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93855#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Module restore restores volume and mute settings from wrong sink input"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93855">bug 93855</a>
              from <span class="vcard"><a class="email" href="mailto:tanuk@iki.fi" title="Tanu Kaskinen <tanuk@iki.fi>"> <span class="fn">Tanu Kaskinen</span></a>
</span></b>
        <pre>(In reply to Leonard den Ottolander from <a href="show_bug.cgi?id=93855#c5">comment #5</a>)
<span class="quote">> > The intended behaviour is that when you set volume for mpg123,
> > the volume of all future instances of mpg123 will get that same volume

> I am setting the volume for individual streams which all happen to be mpg123
> instances. This causes all three sink inputs to be identified with the same
> identifier string, the application name in this case.

> As you can see from my example, the three streams all have different volume
> settings. At a certain point I set the volume for si 11664 to 9%. A little
> while later si 12022 gets restored as 12023. But instead of setting the
> volume to the 33% which was the setting on si 12022, si 12023 now takes its
> volume from si 11664, the one that was last modified.</span >

Your proposal of using the pid as the identifier would not restore 12022's
volume for 12023 either, because there would be nothing linking 12023 back to
12022.

It's working as designed. However, I disagree with the design in one thing:
when you set the volume for 11664, I think the volume should be updated for all
streams in the group. That is, 11484 and 12022 should change to 9% volume too.
It should be pretty easy to make a patch to change this, but somehow I haven't
got around to doing that...

<span class="quote">> This behaviour is not limited to the volume setting, but also to the mute
> setting. This means that on restoration streams get muted and unmuted
> spontaneously. If you argue this is intended behaviour I'm stumped.

> Perhaps a mechanism that can both identify a stream as part of a group /and/
> individually is desired.</span >

There are many possible ways to group streams, and I agree that we lack a good
mechanism to configure the grouping. It's very much hard-coded currently. Using
the PULSE_PROP environment variable to set module-stream-restore.id is a
flexible way to configure the grouping, but not user friendly at all.

<span class="quote">> But on sink input restoration I expect the restored
> stream to use the same volume and mute setting and not suddenly take on the
> settings of a random other stream that happens to use the same application
> name...</span >

If all current streams in a group would update their volumes when you set the
volume of one stream, this source of confusion would disappear.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>