<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ouput sound is not switched automatically to bluetooth headset"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99222#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ouput sound is not switched automatically to bluetooth headset"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99222">bug 99222</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 Christian Kellner from <a href="show_bug.cgi?id=99222#c2">comment #2</a>)
<span class="quote">> Just to clarify the problem: Connecting wired headphones will automatically
> select these as default sink (source) for sound. Connecting bluetooth
> headphones will not. I see no reason why the latter should be treated
> differently then the former. Happy to help with this bug (info, debugging,
> coding).</span >

Coding help would be welcome.

The problem is probably very simple: the bluetooth sink just has a lower
priority than the analog output sink. The sink priorities are set in
pa_device_init_priority(). That function seems to assign weird priorities (the
form factor and bus attributes seem to get ranked in the exact opposite order
than what I'd think would make sense), so you can probably fix the bug simply
by adjusting the priorities to be more sane.

In the future the sink priorities will probably be replaced by port priorities,
but I don't think you need to worry about that at this point. I've submitted a
patch for that, but it's stuck in the review process. (I can't review my own
patches, but if you submit a patch, I can review that.)</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>