即使已连接,蓝牙耳机也没有声音

即使已连接,蓝牙耳机也没有声音

我目前正在尝试使 Sennheiser MM450-X 耳机与嵌入 Atmel SAMA5D2 xplained 评估板上的定制 Linux 配合使用。

我可以与其配对和连接,但当我尝试播放声音时,耳机中听不到任何声音。

我使用 blueZ v5 和pulseaudio v9

蓝牙守护进程启动日志

Jan  1 05:48:53 buildroot bluetoothd[204]: Bluetooth daemon 5.46
Jan  1 05:48:53 buildroot bluetoothd[204]: Unknown key PageTimeout in main.conf
Jan  1 05:48:53 buildroot bluetoothd[204]: Unknown key InitiallyPowered in main.conf
Jan  1 05:48:53 buildroot bluetoothd[204]: Unknown key RememberPowered in main.conf
Jan  1 05:48:53 buildroot bluetoothd[204]: Unknown key EnableGatt in main.conf
Jan  1 05:48:53 buildroot bluetoothd[204]: Starting SDP server
Jan  1 05:48:53 buildroot bluetoothd[204]: Bluetooth management interface 1.14 initialized
Jan  1 05:48:53 buildroot bluetoothd[204]: Sap driver initialization failed.
Jan  1 05:48:53 buildroot bluetoothd[204]: sap-server: Operation not permitted (1)
Jan  1 05:48:53 buildroot pulseaudio[174]: [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
Jan  1 05:48:53 buildroot bluetoothd[204]: Endpoint registered: sender=:1.0 path=/MediaEndpoint/A2DPSource
Jan  1 05:48:53 buildroot bluetoothd[204]: Endpoint registered: sender=:1.0 path=/MediaEndpoint/A2DPSink

当我连接到耳机时

Jan  1 05:51:51 buildroot bluetoothd[204]: Control: Refusing unexpected connect
Jan  1 05:51:52 buildroot kernel: input: 00:16:94:0B:90:02 as /devices/virtual/input/input1

所有蓝牙模块似乎都已加载

# pactl list short | grep blue
11  module-bluetooth-discover       
12  module-bluez5-discover      
13  module-bluez4-discover      
14  module-bluetooth-policy     
16  module-bluez5-device    path=/org/bluez/hci0/dev_00_16_94_0B_90_02  
2   bluez_sink.00_16_94_0B_90_02    module-bluez5-device.c  s16le 1ch 8000Hz    SUSPENDED
3   bluez_sink.00_16_94_0B_90_02.monitor    module-bluez5-device.c  s16le 1ch 8000Hz    SUSPENDED
4   bluez_source.00_16_94_0B_90_02  module-bluez5-device.c  s16le 1ch 8000Hz    SUSPENDED
2   bluez_card.00_16_94_0B_90_02    module-bluez5-device.c

并且耳机接收器已配置

# pactl list sinks
Sink #0
    State: SUSPENDED
    Name: alsa_output.platform-fc048000.classd.analog-stereo
    Description: CLASSD Analog Stereo
    Driver: module-alsa-card.c
    Sample Specification: s16le 2ch 44100Hz
    Channel Map: front-left,front-right
    Owner Module: 1
    Mute: no
    Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
            balance 0.00
    Base Volume: 65536 / 100% / 0.00 dB
    Monitor Source: alsa_output.platform-fc048000.classd.analog-stereo.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE DECIBEL_VOLUME LATENCY 
    Properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = ""
        alsa.id = "CLASSD PCM atmel-classd-hifi-0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "CLASSD"
        alsa.long_card_name = "CLASSD"
        device.bus_path = "platform-fc048000.classd"
        sysfs.path = "/devices/soc0/ahb/ahb:apb/fc048000.classd/sound/card0"
        device.string = "hw:0"
        device.buffering.buffer_size = "17632"
        device.buffering.fragment_size = "4408"
        device.access_mode = "mmap"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "CLASSD Analog Stereo"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card"
    Ports:
        analog-output: Analog Output (priority: 9900)
    Active Port: analog-output
    Formats:
        pcm

Sink #1
    State: SUSPENDED
    Name: bluez_sink.00_16_94_0B_90_02
    Description: Sennheiser MM450-X
    Driver: module-bluez5-device.c
    Sample Specification: s16le 1ch 8000Hz
    Channel Map: mono
    Owner Module: 15
    Mute: no
    Volume: mono: 65536 / 100%
            balance 0.00
    Base Volume: 65536 / 100%
    Monitor Source: bluez_sink.00_16_94_0B_90_02.monitor
    Latency: 0 usec, configured 0 usec
    Flags: HARDWARE HW_VOLUME_CTRL LATENCY 
    Properties:
        bluetooth.protocol = "headset_head_unit"
        device.intended_roles = "phone"
        device.description = "Sennheiser MM450-X"
        device.string = "00:16:94:0B:90:02"
        device.api = "bluez"
        device.class = "sound"
        device.bus = "bluetooth"
        device.form_factor = "headset"
        bluez.path = "/org/bluez/hci0/dev_00_16_94_0B_90_02"
        bluez.class = "0x240404"
        bluez.alias = "Sennheiser MM450-X"
        device.icon_name = "audio-headset-bluetooth"
    Ports:
        headset-output: Headset (priority: 0)
    Active Port: headset-output
    Formats:
        pcm

设置耳机接收器配置后,耳机输出不会播放声音

# pactl set-default-sink 1
# pactl set-sink-volume 1 65535
# aplay ChillingMusic.wav 
Playing WAVE 'ChillingMusic.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
#

我在 Debian 9 计算机上尝试了完全相同的配置,它使用几乎相同的日志消息

Oct 23 16:29:31 PC325 bluetoothd[31058]: Unable to connect Headset Voice gateway: connect: Device or resource busy (16)
Oct 23 16:29:31 PC325 bluetoothd[31058]: Connecting Headset Voice gateway failed: Input/output error
Oct 23 16:29:33 PC325 bluetoothd[31058]: Control: Refusing unexpected connect
Oct 23 16:29:35 PC325 bluetoothd[31058]: /org/bluez/hci0/dev_00_16_94_0B_90_02/fd3: fd(25) ready

我真的无法更进一步,我想知道是否有人已经添加了同样的问题。

我很高兴能得到一些建议来进一步调试。

答案1

我最终意识到问题出在使用aplay而不是paplay

我仍然无法解释为什么aplay在 Debian 主机上可以工作,而在目标 Linux 上却不行,但至少问题已经解决了。

相关内容