我的蓝牙耳机(IFROGZ Toxix Wireless)支持耳机主机配置文件(headset_head_unit 或 HSP/HFP)和音频播放配置文件(a2dp_sink)。它与我的 Ubuntu 18.04 笔记本电脑成功配对并连接。但是,连接后,在“设置”>“声音”菜单中,它仅在“输出”下列出,而不在“输入”下列出(即无法识别麦克风)。
因此,我只能用它进行播放,而不能用作视频会议的耳机,这对我来说是一个很大的问题,因为我所有的工作都是在这台电脑上完成的。
我发现这是一个已知的错误: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1768625
有没有什么解决方法/途径/解决方案?
(使用 Ubunu 多年,但对于内部工作原理还是个菜鸟)
bluetoothctl
输出(注意它支持免提 HFP 但不支持耳机 HSP)
Device 61:21:34:24:4F:20 (public)
Name: IFROGZ Toxix Wireless
Alias: IFROGZ Toxix Wireless
Class: 0x00240404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
pacmd list-cards
输出(最后请注意,耳机输入有available: no
):
$ pacmd list-cards
2 card(s) available.
index: 0
name: <alsa_card.pci-0000_00_1f.3>
driver: <module-alsa-card.c>
owner module: 7
properties:
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xb1328000 irq 134"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1f.3"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "9d71"
device.product.name = "Sunrise Point-LP HD Audio"
device.form_factor = "internal"
device.string = "0"
device.description = "Built-in Audio"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
input:analog-stereo: Analog Stereo Input (priority 60, available: unknown)
output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: no)
output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (priority 5260, available: unknown)
output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: no)
output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: unknown)
output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: no)
output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: unknown)
output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: no)
output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (priority 5260, available: unknown)
output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: no)
output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: unknown)
output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: no)
output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: unknown)
output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5200, available: no)
output:hdmi-stereo-extra3+input:analog-stereo: Digital Stereo (HDMI 4) Output + Analog Stereo Input (priority 5260, available: unknown)
output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 100, available: no)
output:hdmi-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4) Output + Analog Stereo Input (priority 160, available: unknown)
output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 100, available: no)
output:hdmi-surround71-extra3+input:analog-stereo: Digital Surround 7.1 (HDMI 4) Output + Analog Stereo Input (priority 160, available: unknown)
output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5200, available: no)
output:hdmi-stereo-extra4+input:analog-stereo: Digital Stereo (HDMI 5) Output + Analog Stereo Input (priority 5260, available: unknown)
output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 100, available: no)
output:hdmi-surround-extra4+input:analog-stereo: Digital Surround 5.1 (HDMI 5) Output + Analog Stereo Input (priority 160, available: unknown)
output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 100, available: no)
output:hdmi-surround71-extra4+input:analog-stereo: Digital Surround 7.1 (HDMI 5) Output + Analog Stereo Input (priority 160, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <output:analog-stereo+input:analog-stereo>
sinks:
alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Built-in Audio Analog Stereo
sources:
alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
alsa_input.pci-0000_00_1f.3.analog-stereo/#1: Built-in Audio Analog Stereo
ports:
analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-input-microphone"
analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-input-microphone"
analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-speakers"
analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-headphones"
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
properties:
device.icon_name = "video-display"
device.product.name = "2429W"
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
index: 1
name: <bluez_card.61_21_34_24_4F_20>
driver: <module-bluez5-device.c>
owner module: 24
properties:
device.description = "IFROGZ Toxix Wireless"
device.string = "61:21:34:24:4F:20"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_61_21_34_24_4F_20"
bluez.class = "0x240404"
bluez.alias = "IFROGZ Toxix Wireless"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
profiles:
a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: unknown)
headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: no)
off: Off (priority 0, available: yes)
active profile: <a2dp_sink>
sinks:
bluez_sink.61_21_34_24_4F_20.a2dp_sink/#1: IFROGZ Toxix Wireless
sources:
bluez_sink.61_21_34_24_4F_20.a2dp_sink.monitor/#2: Monitor of IFROGZ Toxix Wireless
ports:
headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)
properties:
headset-input: Headset (priority 0, latency offset 0 usec, available: no)
properties:
答案1
我在使用 Oneplus Wireless Z Bass 版本时遇到了同样的问题。PulseAudio 无法检测到我的耳机麦克风,问题是我的耳机没有 HSP 配置文件,只有 HFP 配置文件。经过 2 天的尝试,我找到了解决方案,用 Pipewire 声音服务器替换 PulseAudio,它本身支持 HSP、HFP 和 A2DP。因此无需安装任何其他实用程序,例如ofono
。phonesim
另外,需要注意的是,即使按照所有步骤在 PulseAudio 中配置后,我的问题仍未解决ofono
。所以我想出了用 PipeWire 替换 PulseAudio 的步骤。
这是我写的解决此问题的详细文章,其中的步骤我也在这里添加。您可以按照它进行操作,很可能能够解决您的问题。
打开终端并执行以下步骤:
我们将使用 PPA 将 Pipewire 添加到 Ubuntu 20.04,该 PPA 会定期维护:
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
要更新系统中的 PPA 包,请执行以下操作:
sudo apt update
安装软件包:
sudo apt install pipewire
Pipewire 还需要安装依赖项,否则你将面临以下问题“安装 pipewire 后蓝牙耳机无法连接”. 通过以下方式安装依赖项:
sudo apt install libspa-0.2-bluetooth
现在,安装客户端库:
sudo apt install pipewire-audio-client-libraries
重新加载守护进程:
systemctl --user daemon-reload
禁用 PulseAudio:
systemctl --user --now disable pulseaudio.service pulseaudio.socket
如果你使用的是 Ubuntu 20.04,你还需要通过以下方式“屏蔽”PulseAudio:
systemctl --user mask pulseaudio
我不确定,但如果可能的话,您也可以尝试在其他版本上运行它。9
. 在 Pipewire 进行新更新后,您还需要启用pipewire-media-session-service
:
systemctl --user --now enable pipewire-media-session.service
您可以确保 Pipewire 目前正在运行:
pactl info
此命令将给出以下输出,您可以在服务器名称中看到:
PulseAudio (on PipeWire 0.3.28)
现在一切应该已经正常,您可以看到您的麦克风了。
如果没有出现,请尝试通过以下命令重新启动 Pipewire:
systemctl --user restart pipewire
如果仍然没有显示您的麦克风,您可以尝试重新启动一次,然后移除并再次配对您的蓝牙设备,以检查它是否正常工作。
我希望我已经帮助您解决了您的问题。
如果您想回滚我们所做的所有更改,您可以使用以下命令:
systemctl --user unmask pulseaudio
systemctl --user --now enable pulseaudio.service pulseaudio.socket
答案2
这里的问题是您的 IFROGZ Toxix Wireless 不支持耳机配置文件 (HSP)。它们仅支持免提配置文件 (HFP),如您的 bluetoothctl 输出中所示。另一方面,PulseAudio 不支持开箱即用的 HFP,如下所述:https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/
因此,您唯一的选择是安装 oFono 或自行修补和编译 PulseAudio。补丁可在此处获取:https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/94
答案3
HFP 配置文件不可用的主要原因是 Pulseaudio 驱动程序已取消对它的支持。任何蓝牙设备现在都只能通过不支持设备上麦克风的 A2DP 配置进行连接。我自己也遇到了同样的问题,花了大约一周的时间才找到一个没有太多麻烦的解决方案。您可以按照以下说明进行操作https://eternalgeek.in/index.php/2021/06/13/solving-mic-of-wireless-earbuds-not-working-on-ubuntu-20/
希望这对您有所帮助并节省时间!
答案4
我很久以来就面临同样的问题。经过研究,我通过这个命令修复了这个问题,因为我的系统上缺少多媒体附加插件。
sudo apt install ubuntu-restricted-extras
确保在此之后重新启动系统。此外,在尝试此操作之前,请务必进行一些研究,因为它可能对我有用,但可能对你不起作用。