<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#c4">Comment # 4</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:gicmo@gnome.org" title="Christian Kellner <gicmo@gnome.org>"> <span class="fn">Christian Kellner</span></a>
</span></b>
        <pre>Thanks Tanu for the feedback, I looked at pa_device_init_priority() and indeed
it seems that the priorities listed there are almost inverted to what I would
think makes sense (I am curious what the initial reasoning was for that). I did
create a patch for it, tested it and it seems that this did indeed change the
priorities for the internal sound device ("<alsa_card.pci-0000_00_1f.3>") but
not for the bluetooth one ("bluez_card.04_52_C7_60_XX_XX>"). For the latter the
port priority stayed at '20' [a2dp_sink: High Fidelity Playback (A2DP Sink)
(priority 10, available: unknown)]. So after poking at the source for a while I
think the priority is hardcoded at
src/modules/bluetooth/module-bluez5-device.c:1808 (for A2DP source). For fun
and testing I cranked that value up to 100k and it did indeed select the
bluetooth headphones. It seems that the bluetooth module itself just sets the
prio for its ports to a low value as 20?!</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>