<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Refused to switch profile to headset_head_unit when trying to use bluetooth headset microphone"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93898#c21">Comment # 21</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Refused to switch profile to headset_head_unit when trying to use bluetooth headset microphone"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93898">bug 93898</a>
              from <span class="vcard"><a class="email" href="mailto:joakim.tjernlund@infinera.com" title="Joakim Tjernlund <joakim.tjernlund@infinera.com>"> <span class="fn">Joakim Tjernlund</span></a>
</span></b>
        <pre>(In reply to Tanu Kaskinen from <a href="show_bug.cgi?id=93898#c18">comment #18</a>)
<span class="quote">> I sent a patch to the mailing list:
> <a href="https://patchwork.freedesktop.org/patch/174918/">https://patchwork.freedesktop.org/patch/174918/</a>

> Could you test it?</span >

I was too quick saying it semi worked. I had had this applied:
--- a/lib/uuid.h.org    2017-08-22 22:19:36.605402339 +0200
+++ b/lib/uuid.h        2017-08-22 22:20:36.405090959 +0200
@@ -38,6 +38,7 @@

 #define HFP_HS_UUID            "0000111e-0000-1000-8000-00805f9b34fb"
 #define HFP_AG_UUID            "0000111f-0000-1000-8000-00805f9b34fb"
+#define HEADSET_HS_UUID                "00001131-0000-1000-8000-00805f9b34fb"

 #define ADVANCED_AUDIO_UUID    "0000110d-0000-1000-8000-00805f9b34fb"

--- a/src/device.c.org  2017-08-22 22:20:02.015269784 +0200
+++ b/src/device.c      2017-08-22 22:21:52.014699899 +0200
@@ -4392,6 +4392,18 @@
                        continue;
                }

+               /* Fix devices that report HEADSET_HS_UUID before HSP_HS_UUID,
+                * contrary to what Erratum #3507 says.
+                */
+               if ((bt_uuid_strcmp(profile_uuid, HEADSET_HS_UUID) == 0)) {
+                       free(profile_uuid);
+                       profile_uuid = g_strdup(HSP_HS_UUID);
+                       if (!profile_uuid) {
+                               sdp_list_free(svcclass, free);
+                               continue;
+                       }
+               }
+

With the removed, PA went back to earlier non working state. This can from the
log though:

( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: Alias: HS6000
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: Class: 2360324
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
00001108-0000-1000-8000-00805f9b34fb
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
0000111e-0000-1000-8000-00805f9b34fb
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
0000110b-0000-1000-8000-00805f9b34fb
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
0000110e-0000-1000-8000-00805f9b34fb
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
00001101-0000-1000-8000-00805f9b34fb
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: Adapter: /org/bluez/hci0
( 256.400|   0.000) D: [pulseaudio] bluez5-util.c: Unknown interface
org.freedesktop.DBus.Properties found, skipping
( 256.856|   0.456) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_C4_73_1E_60_0E_78
( 257.697|   0.840) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA
( 259.104|   1.406) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA
( 260.019|   0.915) D: [pulseaudio] bluez5-util.c: Unknown interface
org.bluez.MediaControl1 found, skipping
( 260.019|   0.000) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA
( 260.020|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
0000110c-0000-1000-8000-00805f9b34fb
( 260.020|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
00001131-0000-1000-8000-00805f9b34fb
( 260.020|   0.000) D: [pulseaudio] bluez5-util.c: UUIDs:
00001200-0000-1000-8000-00805f9b34fb
( 264.127|   4.107) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_C4_73_1E_60_0E_78
( 264.127|   0.000) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA
( 264.128|   0.000) D: [pulseaudio] bluez5-util.c: Properties changed in
adapter /org/bluez/hci0
( 264.181|   0.053) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA
( 301.822|  37.641) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA
( 310.271|   8.448) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA
( 310.344|   0.073) D: [pulseaudio] bluez5-util.c: dbus:
path=/MediaEndpoint/A2DPSource, interface=org.bluez.MediaEndpoint1,
member=SelectConfiguration
( 310.351|   0.006) D: [pulseaudio] bluez5-util.c: Unknown interface
org.freedesktop.DBus.Introspectable found, skipping
( 310.351|   0.000) D: [pulseaudio] bluez5-util.c: Unknown interface
org.bluez.MediaTransport1 found, skipping
( 310.351|   0.000) D: [pulseaudio] bluez5-util.c: Unknown interface
org.freedesktop.DBus.Properties found, skipping
( 310.351|   0.000) D: [pulseaudio] bluez5-util.c: dbus:
path=/MediaEndpoint/A2DPSource, interface=org.bluez.MediaEndpoint1,
member=SetConfiguration
( 310.351|   0.000) D: [pulseaudio] bluez5-util.c: Transport
/org/bluez/hci0/dev_41_00_00_00_22_DA/fd0 state: disconnected -> idle
( 310.351|   0.000) D: [pulseaudio] bluez5-util.c: Transport
/org/bluez/hci0/dev_41_00_00_00_22_DA/fd0 available for profile a2dp_sink
( 310.490|   0.139) D: [pulseaudio] bluez5-util.c: Properties changed in device
/org/bluez/hci0/dev_41_00_00_00_22_DA

PA still announces UUIDs: 00001108-0000-1000-8000-00805f9b34fb</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>