2024年11月24日星期日 上午9:59:02

bluetooth speaker is silent Checklist

2 年 前
#3713 引用
Success Case:


#pacmd




>>> list-sinks
2 sink(s) available.
    index: 0
  name: <alsa_output.platform-soc_audio.stereo-fallback>
  driver: <module-alsa-card.c>
  flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
  state: SUSPENDED
  suspend cause: IDLE
  priority: 9000
  volume: front-left: 64217 /  98% / -0.53 dB,   front-right: 64217 /  98% / -0.53 dB
          balance 0.00
  base volume: 56210 /  86% / -4.00 dB
  volume steps: 65537
  muted: no
  current latency: 0.00 ms
  max request: 0 KiB
  max rewind: 0 KiB
  monitor source: 0
  sample spec: s16le 2ch 44100Hz
  channel map: front-left,front-right
               立体声
  used by: 0
  linked by: 0
  configured latency: 0.00 ms; range is 0.50 .. 743.04 ms
  card: 0 <alsa_card.platform-soc_audio>
  module: 6
  properties:
    alsa.resolution_bits = "16"
    device.api = "alsa"
    device.class = "sound"
    alsa.class = "generic"
    alsa.subclass = "generic-mix"
    alsa.name = "bcm2835 ALSA"
    alsa.id = "bcm2835 ALSA"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "0"
    alsa.card = "0"
    alsa.card_name = "bcm2835 ALSA"
    alsa.long_card_name = "bcm2835 ALSA"
    alsa.driver_name = "snd_bcm2835"
    device.bus_path = "platform-soc:audio"
    sysfs.path = "/devices/platform/soc/soc:audio/sound/card0"
    device.form_factor = "internal"
    device.string = "hw:0"
    device.buffering.buffer_size = "131072"
    device.buffering.fragment_size = "131072"
    device.access_mode = "mmap+timer"
    device.profile.name = "stereo-fallback"
    device.profile.description = "立体声"
    device.description = "内置音频 立体声"
    module-udev-detect.discovered = "1"
    device.icon_name = "audio-card"
  ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
      properties:
        
  active port: <analog-output>
  * index: 1
  name: <bluez_sink.9A_07_65_B4_21_EC.a2dp_sink>
  driver: <module-bluez5-device.c>
  flags: HARDWARE DECIBEL_VOLUME LATENCY
  state: SUSPENDED
  suspend cause: IDLE
  priority: 9050
  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
  volume steps: 65537
  muted: no
  current latency: 0.00 ms
  max request: 4 KiB
  max rewind: 0 KiB
  monitor source: 1
  sample spec: s16le 2ch 48000Hz
  channel map: front-left,front-right
               立体声
  used by: 0
  linked by: 0
  fixed latency: 46.33 ms
  card: 1 <bluez_card.9A_07_65_B4_21_EC>
  module: 21
  properties:
    bluetooth.protocol = "a2dp_sink"
    device.description = "BT73"
    device.string = "9A:07:65:B4:21:EC"
    device.api = "bluez"
    device.class = "sound"
    device.bus = "bluetooth"
    device.form_factor = "headset"
    bluez.path = "/org/bluez/hci0/dev_9A_07_65_B4_21_EC"
    bluez.class = "0x240404"
    bluez.alias = "BT73"
    device.icon_name = "audio-headset-bluetooth"
    device.intended_roles = "phone"
  ports:
    headset-output: 耳机 (priority 0, latency offset 0 usec, available: unknown)
      properties:
        
  active port: <headset-output>


0
2 年 前
#3714 引用
#pacmd

failure Case:


>>> list-sinks
1 sink(s) available.
  * index: 0
  name: <alsa_output.platform-soc_audio.stereo-fallback>
  driver: <module-alsa-card.c>
  flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
  state: SUSPENDED
  suspend cause: IDLE
  priority: 9000
  volume: front-left: 64217 /  98% / -0.53 dB,   front-right: 64217 /  98% / -0.53 dB
          balance 0.00
  base volume: 56210 /  86% / -4.00 dB
  volume steps: 65537
  muted: no
  current latency: 0.00 ms
  max request: 0 KiB
  max rewind: 0 KiB
  monitor source: 0
  sample spec: s16le 2ch 44100Hz
  channel map: front-left,front-right
               立体声
  used by: 0
  linked by: 0
  configured latency: 0.00 ms; range is 0.50 .. 743.04 ms
  card: 0 <alsa_card.platform-soc_audio>
  module: 6
  properties:
    alsa.resolution_bits = "16"
    device.api = "alsa"
    device.class = "sound"
    alsa.class = "generic"
    alsa.subclass = "generic-mix"
    alsa.name = "bcm2835 ALSA"
    alsa.id = "bcm2835 ALSA"
    alsa.subdevice = "0"
    alsa.subdevice_name = "subdevice #0"
    alsa.device = "0"
    alsa.card = "0"
    alsa.card_name = "bcm2835 ALSA"
    alsa.long_card_name = "bcm2835 ALSA"
    alsa.driver_name = "snd_bcm2835"
    device.bus_path = "platform-soc:audio"
    sysfs.path = "/devices/platform/soc/soc:audio/sound/card0"
    device.form_factor = "internal"
    device.string = "hw:0"
    device.buffering.buffer_size = "131072"
    device.buffering.fragment_size = "131072"
    device.access_mode = "mmap+timer"
    device.profile.name = "stereo-fallback"
    device.profile.description = "立体声"
    device.description = "内置音频 立体声"
    module-udev-detect.discovered = "1"
    device.icon_name = "audio-card"
  ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
      properties:
        
  active port: <analog-output>



[b]


0
2 年 前
#3715 引用
connect ?



0
2 年 前
#3716 引用


列出 PulseAudio 检测到的音频设备名称:


$ pacmd list-sinks short | grep -e 'name:'

    name: <alsa_output.platform-soc_audio.analog-mono>
    name: <bluez_sink.FC_58_FA_F4_67_33.headset_head_unit>

0
2 年 前
#3717 引用

使用 pactl 命令将蓝牙耳机作为默认的音频设备:
$ pactl set-default-sink bluez_sink.FC_58_FA_F4_67_33.headset_head_unit
0
2 年 前
#3718 引用
自己对当前的音频配置有点混乱了。。。可以使用如下命令重置:
$ sudo /etc/init.d/alsa-utils reset
0
2 年 前
#3719 引用
树莓派3B的蓝牙不能和UART串口同时使用,需要先使用sudo raspi-config关闭UART串口才能正常使用蓝牙

,应该考虑是不是硬件上的问题了,或是你的固件问题。

树莓派自带的蓝牙是可以用的,只是强度不够,建议可以加一个额外的USB蓝牙模块

树莓派的蓝牙和wifi是一体芯片,并且都是2.4G波段,建议蓝牙通信时wifi关掉,减少干扰,这样再试试看。
0
2 年 前
#3720 引用
树莓派开启蓝牙默认是不可见的,即手机搜索不到,这时候需要点击右上角的蓝牙图标 > Make Discoverable 将其设置为可见。

是,如果长时间没有设备连接树莓派的话,它会自动关闭,而我需要的是它总是可见,让用户随时可以搜的出来。

https://www.cnblogs.com/bugSource/archive/2021/05/21/14793536.html

Aways  visble

1.Is your system starting bluetoothd at boot? If yes, then you should check its configuration: it might be overriding the settings you make with hciconfig as it starts up.

For example, the [Policy] section of my /etc/bluetooth/main.conf has an AutoEnable setting, which defaults to false. If you set it to true, then all Bluetooth interfaces get activated automatically by bluetoothd

2.with systemd unit, create for example /usr/lib/systemd/system/bluetooth-audio.service and add After=bluetooth.target, in order to make the unit start right after bluetooth.target had been reached and BindsTo=bluetooth.target to make it fail when bluetooth.target had failed:

#!/bin/sh
[Unit]
Description=Bluetooth Audio Connect
ConditionPathIsDirectory=/sys/class/bluetooth
After=bluetooth.target
BindsTo=bluetooth.target

[Service]
ExecStart=/home/scripts/bluetooth_connect.sh
Type=simple
systemctl daemon-reload and systemctl start bluetooth-audio.service bring the unit up. the problem is, that running scripts from udev is pretty useless, while there is no bluetooth yet. here are the corresponding (my) bluetooth_connect and bluetooth_disconnect shell scripts.


0
2 年 前
#3724 引用
1
0
2 年 前
#3725 引用
2
0