我已成功连接蓝牙扬声器,但 Pulseaudio 显然无法将它们识别为音频设备。根据 NixOS Wiki 上的建议,我现在在我的 configuration.nix 中添加了以下内容:
sound.enable = true;
hardware = {
pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
bluetooth = {
enable = true;
extraConfig = "
[General]
Enable=Source,Sink,Media,Socket
";
};
};
我还需要什么吗?
我看到的错误journalctl
是:
Nov 17 23:33:45 jon-laptop pulseaudio[4563]: E: [pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist
Nov 17 23:33:45 jon-laptop pulseaudio[4563]: E: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
答案1
我设法通过首先连接设备(bluethoothctl)然后重新启动pulseaudio来使其工作systemctl --user restart pulseaudio
。
最后A2DP
使用 pavucontrol 将音频设备设置为更好的质量。