You are not logged in.

#1 2021-05-11 09:34:10

ashic
Member
Registered: 2020-01-22
Posts: 68

[Solved] ARCH, XM4, Pipewire, no mSBC

I have a Sony XM4 headset, and am running kernel 5.12.1. I'm looking to get bidirectional high quality audio for calls, etc. I switched to pipewire from pulseaudio after reading the former has mSBC support. I've installed pipewire and pipewire-pulse. I've re-paired the headset. However, I only see the playback options, and there's no mic.

I've followed the wiki and turned off api.alsa.use-acp, and even turned on api.alsa.use-ucm, but pw-record --list-targets doesn't show a bluetooth microphone. The do see A2DP profiles for LDAC, SBC, AAC, and they work for playback.

I'm running bluez 5.58-1, and pipewire (and its plugins) at 0.3.27.

Is there anything I'm missing? Is there a better way to get high quality bidirectional bluetooth? Both my motherboard and headset support bluetooth 5, if that's relevant.

Mods: Please note this is in regards to an ARCH install, not Endeavour or Antergos. I did ask about Endeavour in a separate post. In Endeavour, I haven't got LDAC working yet. While trying that, I came across Pipewire, and its potential support for mSBC. I run Arch on a laptop where it uses the XM4 for audio and the laptop mic during calls. I was hoping to get mSBC support so that calls would use the headset mic on that installation. I do hope asking Arch questions is ok even though I run Endeavour and Antergos on *other* machines.

Last edited by ashic (2021-05-12 17:05:24)

Offline

#2 2021-05-11 12:49:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,990

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

Thanks for reaching out to me, this case is of course possible.

Regarding the question do you have no HSP/HFP profile at all? You'll want to select one of them and pipewire "should" use mSBC in that case as far as I can tell, what's your output for

pactl list cards

FWIW, the api alsa options are irrelevant on bluetooth devices so I'm not surprised they didn't help.

Offline

#3 2021-05-11 13:48:24

ashic
Member
Registered: 2020-01-22
Posts: 68

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

Since installing pipewire and pipewire-pulse, I don't see an HSP/HFP profile at all. The pactl list for the bluez card shows this:

	Name: bluez_card.94_DB_56_4F_31_A0
	Driver: module-bluez5-device.c
	Owner Module: n/a
	Properties:
		device.api = "bluez5"
		device.bus = "bluetooth"
		media.class = "Audio/Device"
		device.name = "bluez_card.94_DB_56_4F_31_A0"
		device.description = "WH-1000XM4"
		device.alias = "WH-1000XM4"
		device.form_factor = "headset"
		device.string = "94:DB:56:4F:31:A0"
		api.bluez5.icon = "audio-card"
		api.bluez5.path = "/org/bluez/hci0/dev_94_DB_56_4F_31_A0"
		api.bluez5.address = "94:DB:56:4F:31:A0"
		api.bluez5.device = ""
		api.bluez5.class = "0x240404"
		api.bluez5.connection = "connected"
		device.icon_name = "audio-headset-bluetooth"
		bluez5.auto-connect = "[ hfp_hf hsp_hs a2dp_sink ]"
		bluez5.msbc-support = "true"
		factory.id = "14"
		client.id = "30"
		object.id = "183"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		a2dp-sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 0, available: yes)
		a2dp-sink-sbc: High Fidelity Playback (A2DP Sink, codec SBC) (sinks: 1, sources: 0, priority: 0, available: yes)
		a2dp-sink-aac: High Fidelity Playback (A2DP Sink, codec AAC) (sinks: 1, sources: 0, priority: 0, available: yes)
		a2dp-sink-ldac: High Fidelity Playback (A2DP Sink, codec LDAC) (sinks: 1, sources: 0, priority: 0, available: yes)
	Active Profile: a2dp-sink-ldac
	Ports:
		headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
			Properties:
				port.type = "headset"
			Part of profile(s): a2dp-sink, a2dp-sink-sbc, a2dp-sink-aac, a2dp-sink-ldac

With pulseaudio and pulseaudio-modules-bt, there was definitely an hsp/hfp profile.

Offline

#4 2021-05-11 14:25:49

martinc2
Member
Registered: 2011-09-23
Posts: 64

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

To get mSBC working on a Sony XM2 all I had to do was enable mSBC, as per instructions in the wiki.  No other config changes were necessary, other than selecting an appropriate profile (in my case via plasma audio config).

Offline

#5 2021-05-11 14:51:10

ashic
Member
Registered: 2020-01-22
Posts: 68

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

martinc2 wrote:

To get mSBC working on a Sony XM2 all I had to do was enable mSBC, as per instructions in the wiki.  No other config changes were necessary, other than selecting an appropriate profile (in my case via plasma audio config).

That's good to hear. Does mSBC show as an option in the profile selector? I think I can get access to an XM2, so can eliminate some stuff.

Offline

#6 2021-05-12 12:08:33

ashic
Member
Registered: 2020-01-22
Posts: 68

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

martinc2 wrote:

To get mSBC working on a Sony XM2 all I had to do was enable mSBC, as per instructions in the wiki.  No other config changes were necessary, other than selecting an appropriate profile (in my case via plasma audio config).

@martinc2 Would you be able to post the output of pactl list? It would really help me see where my issue is. Thanks.

Offline

#7 2021-05-12 14:28:32

ashic
Member
Registered: 2020-01-22
Posts: 68

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

Ok, I've now checked with a pair of Samsung Galaxy Buds Pro, and WF-1000XM3 earbuds. As with the XM4, I have no audio capture devices. With Pulseaudio, these all have the HSP/HSF profile. So there must be something wrong with my pipewire config. I've followed the wiki, and this is my /etc/pipewire/media-session.d/alsa-monitor.conf:

# ALSA monitor config file for PipeWire version "0.3.27" #
properties = {
    # Create a JACK device. This is not enabled by default because
    # it requires that the PipeWire JACK replacement libraries are
    # not used by the session manager, in order to be able to
    # connect to the real JACK server.
    #alsa.jack-device = false

    # Reserve devices.
    #alsa.reserve = true
}

rules = [
    {
        matches = [
            {
                device.name = "~alsa_card.*"
            }
        ]
        actions = {
            update-props = {
                # Use ALSA-Card-Profile devices. They use UCM or
                # the profile configuration to configure the device
                # and mixer settings.
                api.alsa.use-acp = false # tried with true

                # Use UCM instead of profile when available. Can be
                # disabled to skip trying to use the UCM profile.
                api.alsa.use-ucm = true # tried with false

                api.acp.auto-profile = false
                api.acp.auto-port = false
            }
        }
    }
    {
        matches = [
            {
                node.name = "~alsa_input.*"
            }
            {
                node.name = "~alsa_output.*"
            }
        ]
        actions = {
            update-props = {
                node.pause-on-idle      = false
            }
        }
    }
]

arecord -l doesn't show a capture device for the headset mic.

Any tips on how to proceed?

Offline

#8 2021-05-12 16:01:06

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

You should probably create a log for pipewire-bluez:
https://gitlab.freedesktop.org/pipewire … #bluetooth

If you have ofono installed and running you may have to remove it or set it up with phonesim.
https://gitlab.freedesktop.org/pipewire … ssues/1026

Something maybe related:
https://gitlab.freedesktop.org/pipewire … issues/810

Last edited by progandy (2021-05-12 16:19:57)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#9 2021-05-12 17:05:01

ashic
Member
Registered: 2020-01-22
Posts: 68

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

If you have ofono installed and running you may have to remove it or set it up with phonesim.
https://gitlab.freedesktop.org/pipewire … ssues/1026

That was it! I ditched ofono, installed phonesim from yay, and the msbc profile (and also the cvsd profile) appeared.

I can switch profiles in blueman, and via the command line. I'll try and get autoswitch based on recording app being present, but for now, this is working very well.

That said, on the XM4, the audio on LDAC is far far superior, and the audio on SBC is very good too. mSBC is better than cvsd, but audio quality really isn't anywhere near the a2dp codecs. Might just bite the bullet and get a separate mic. Still... this gets me to a point where the headset can make calls with minimal effort. Thanks smile

Offline

#10 2021-05-12 18:17:55

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

If you have removed ofono, then you can remove phonesim as well. You need either both packages or none of them.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#11 2021-05-14 08:37:58

ashic
Member
Registered: 2020-01-22
Posts: 68

Re: [Solved] ARCH, XM4, Pipewire, no mSBC

progandy wrote:

If you have removed ofono, then you can remove phonesim as well. You need either both packages or none of them.

Thanks... I removed phonesim as well, and it all works.

Offline

Board footer

Powered by FluxBB