piCorePlayer 6.x.x - Bluetooth

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • paul-
    Senior Member
    • Jan 2013
    • 5675

    #31
    Only source for binary content is there. It's mostly kernel related stuff. https://github.com/piCorePlayer

    Our development git for the web interface is not public.....
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

    Comment

    • StevenEllis
      Member
      • Mar 2020
      • 47

      #32
      Just re-tested on a clean install with pcp-streamer, latest patches and bluetooth support.

      Running analog audio and device = hw:CARD=ALSA I can stream from my phone as a player or streamer, to headphones connected to the RasPi.

      On my other Pi I've disabled analog audio as I'm just running a USB-DAC - see device details below.


      Code:
      # aplay -L
      null
          Discard all samples (playback) or generate zero samples (capture)
      default
      plugequal
      equal
      sysdefault:CARD=VX1
          VX1, USB Audio
          Default Audio Device
      front:CARD=VX1,DEV=0
          VX1, USB Audio
          Front speakers
      surround21:CARD=VX1,DEV=0
          VX1, USB Audio
          2.1 Surround output to Front and Subwoofer speakers
      surround40:CARD=VX1,DEV=0
          VX1, USB Audio
          4.0 Surround output to Front and Rear speakers
      surround41:CARD=VX1,DEV=0
          VX1, USB Audio
          4.1 Surround output to Front, Rear and Subwoofer speakers
      surround50:CARD=VX1,DEV=0
          VX1, USB Audio
          5.0 Surround output to Front, Center and Rear speakers
      surround51:CARD=VX1,DEV=0
          VX1, USB Audio
          5.1 Surround output to Front, Center, Rear and Subwoofer speakers
      surround71:CARD=VX1,DEV=0
          VX1, USB Audio
          7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
      iec958:CARD=VX1,DEV=0
          VX1, USB Audio
          IEC958 (S/PDIF) Digital Audio Output
      dmix:CARD=VX1,DEV=0
          VX1, USB Audio
          Direct sample mixing device
      dsnoop:CARD=VX1,DEV=0
          VX1, USB Audio
          Direct sample snooping device
      hw:CARD=VX1,DEV=0
          VX1, USB Audio
          Direct hardware device without any conversions
      plughw:CARD=VX1,DEV=0
          VX1, USB Audio
          Hardware device with all software conversions
      Under squeezeplay the card is specified as "hw:CARD=VX1,DEV=0" and I've confirmed this device works via

      Code:
      speaker-test -c  2 -dhw:CARD=VX1,DEV=0
      I can play audio via LMS, but I can't stream Bluetooth audo to the USB DAC

      Working bluetooth logs with analog audio

      Code:
      04-20 13:39 NZST INFO     ------------Starting pCP BT Speaker Daemon v6.0.0.0010------------
      04-20 13:39 NZST INFO     Resetting asound.conf.
      04-20 13:39 NZST INFO        Removing bt_ from asound.conf
      04-20 13:39 NZST INFO     Current contents of /usr/local/etc/pcp/pcp-bt.conf.
      04-20 13:39 NZST INFO        F0:D7:AA:C3:XX:XX#My Moto G5#10000#2
      04-20 13:39 NZST DEBUG    PCM Devices found dbus.Dictionary({dbus.ObjectPath('/org/bluealsa/hci0/dev_F0_D7_AA_C3_XX_XX/a2dpsnk/source'): dbus.Dictionary({dbus.String('Device'): dbus.ObjectPath('/org/bluez/hci0/dev_F0_D7_AA_C3_XX_XX', variant_level=1), dbus.String('Transport'): dbus.String('A2DP-sink', variant_level=1), dbus.String('Mode'): dbus.String('source', variant_level=1), dbus.String('Format'): dbus.UInt16(32784, variant_level=1), dbus.String('Channels'): dbus.Byte(2, variant_level=1), dbus.String('Sampling'): dbus.UInt32(44100, variant_level=1), dbus.String('Codec'): dbus.UInt16(0, variant_level=1), dbus.String('Delay'): dbus.UInt16(150, variant_level=1), dbus.String('SoftVolume'): dbus.Boolean(False, variant_level=1), dbus.String('Volume'): dbus.UInt16(17476, variant_level=1)}, signature=dbus.Signature('sv'))}, signature=dbus.Signature('oa{sv}'))
      04-20 13:39 NZST DEBUG    A2DP devices found A2DP-sink.
      04-20 13:39 NZST INFO     Found a2dp sink F0:D7:AA:C3:XX:XX connected.
      04-20 13:39 NZST INFO     No bluealsa-aplay process for device F0:D7:AA:C3:XX:XX.  Starting......
      04-20 13:39 NZST DEBUG       pCP OUTPUT="hw:CARD=ALSA"
      04-20 13:39 NZST DEBUG       pCP ALSAVOLUME=""
      04-20 13:39 NZST DEBUG       pCP Card Conf:"Analog.conf"
      04-20 13:39 NZST DEBUG       pCP SSET="PCM"
      04-20 13:39 NZST INFO        Starting player:"My Moto G5" bluetooth, alsa device:"hw:CARD=ALSA", volume:"PCM".
      04-20 13:39 NZST INFO     Starting connection signal handlers
      Problem logs with no USB Audio
      Code:
      04-19 15:35 NZST INFO     Resetting asound.conf.
      04-19 15:35 NZST INFO        Removing bt_ from asound.conf
      04-19 15:35 NZST INFO     Current contents of /usr/local/etc/pcp/pcp-bt.conf.
      04-19 15:35 NZST INFO        
      04-19 15:35 NZST INFO        B8:D5:0B:47:9A:F5#SRS-XB30#10000#1
      04-19 15:35 NZST INFO        F0:D7:AA:C3:XX:XX#My Moto G5#10000#2
      04-19 15:35 NZST DEBUG    PCM Devices found dbus.Dictionary({dbus.ObjectPath('/org/bluealsa/hci0/dev_F0_D7_AA_C3_XX_XX/a2dpsnk/source'): dbus.Dictionary({dbus.String('Device'): dbus.ObjectPath('/org/bluez/hci0/dev_F0_D7_AA_C3_XX_XX', variant_level=1), dbus.String('Transport'): dbus.String('A2DP-sink', variant_level=1), dbus.String('Mode'): dbus.String('source', variant_level=1), dbus.String('Format'): dbus.UInt16(32784, variant_level=1), dbus.String('Channels'): dbus.Byte(2, variant_level=1), dbus.String('Sampling'): dbus.UInt32(44100, variant_level=1), dbus.String('Codec'): dbus.UInt16(0, variant_level=1), dbus.String('Delay'): dbus.UInt16(150, variant_level=1), dbus.String('SoftVolume'): dbus.Boolean(False, variant_level=1), dbus.String('Volume'): dbus.UInt16(32639, variant_level=1)}, signature=dbus.Signature('sv'))}, signature=dbus.Signature('oa{sv}'))
      04-19 15:35 NZST DEBUG    A2DP devices found A2DP-sink.
      04-19 15:35 NZST INFO     Found a2dp sink F0:D7:AA:C3:XX:XX connected.
      04-19 15:35 NZST INFO     No bluealsa-aplay process for device F0:D7:AA:C3:XX:XX.  Starting......
      04-19 15:35 NZST DEBUG       pCP OUTPUT="hw:CARD=VX1,DEV=0"
      04-19 15:35 NZST DEBUG       pCP ALSAVOLUME=""
      04-19 15:35 NZST DEBUG       pCP Card Conf:"USB.conf"
      04-19 15:35 NZST INFO        Starting player:"My Moto G5" bluetooth, alsa device:"hw:CARD=VX1,DEV=0", volume:"".
      Any ideas on additional debugging steps?

      Comment

      • paul-
        Senior Member
        • Jan 2013
        • 5675

        #33
        This line is what is printed with the audio should be getting linked.

        "Starting player:"My Moto G5" bluetooth, alsa device:"hw:CARD=VX1,DEV=0", volume:""."

        Can you ssh in and see if there is a bluealsa-aplay process running with this command.

        ps ax | grep bluealsa
        piCorePlayer a small player for the Raspberry Pi in RAM.
        Homepage: https://www.picoreplayer.org

        Please donate if you like the piCorePlayer

        Comment

        • StevenEllis
          Member
          • Mar 2020
          • 47

          #34
          Originally posted by paul-
          This line is what is printed with the audio should be getting linked.

          "Starting player:"My Moto G5" bluetooth, alsa device:"hw:CARD=VX1,DEV=0", volume:""."

          Can you ssh in and see if there is a bluealsa-aplay process running with this command.

          ps ax | grep bluealsa
          Here is the output showing before and after making the connection

          Code:
          root@Homeoffice:/home/tc# tc@Homeoffice:~$ ps -eaf | grep blu
           1080 root      0:01 /usr/local/lib/bluetooth/bluetoothd --experimental
           1201 root      0:09 /usr/local/bin/bluealsa --profile=a2dp-source --profile=a2dp-sink --profile=hsp-ag --profile=hfp-ag --a2dp-volume
           1205 root      0:15 python3 /usr/local/bin/pcp-pairing-agent.py --agent --wait_for_bluez
          16572 tc        0:00 grep blu
          tc@Homeoffice:~$ ps -eaf | grep blu
           1080 root      0:01 /usr/local/lib/bluetooth/bluetoothd --experimental
           1201 root      0:09 /usr/local/bin/bluealsa --profile=a2dp-source --profile=a2dp-sink --profile=hsp-ag --profile=hfp-ag --a2dp-volume
           1205 root      0:15 python3 /usr/local/bin/pcp-pairing-agent.py --agent --wait_for_bluez
          17676 root      0:00 /usr/local/bin/bluealsa-aplay -D hw:CARD=VX1,DEV=0 F0:D7:AA:C3:XX:XX
          I also confirmed the speakers at working via
          Code:
          speaker-test -c 2 -dhw:CARD=VX1,DEV=0

          Comment

          • paul-
            Senior Member
            • Jan 2013
            • 5675

            #35
            Well that looks good, Try this device

            front:CARD=VX1,DEV=0

            Or

            plughw:CARD=VX1,DEV=0

            Or

            iec958:CARD=VX1,DEV=0
            piCorePlayer a small player for the Raspberry Pi in RAM.
            Homepage: https://www.picoreplayer.org

            Please donate if you like the piCorePlayer

            Comment

            • StevenEllis
              Member
              • Mar 2020
              • 47

              #36
              Interesting. It is working now with - plughw:CARD=VX1,DEV=0

              Android Phone -> piCore works great

              Fedora Lapto -> piCore is a bit clippy. feels like a bluetooth issues. Investigating.

              Comment

              • fsger
                Member
                • Mar 2008
                • 36

                #37
                Originally posted by paul-
                There is no link between playing a bluetooth speaker and hardware connected to the player. Infact you can play both at the same time. (I'm doing that now) Bluetooth speakers and USB DAC. You can even sync them together. The only possible link I can think of is that enabling bluetooth uses more power....and potentially you are not supplying enough power to the USB DAC.

                What I would recommend is play music to your USB dac, as you go through the process of installing bluetooth.....see at what point things go awry.
                Before trying with BT again, I cloned my SD-CARD so I would not have to reinstall everything. I then reinstalled BT (but did not have USB playing). It connected fine to my BT headphones but then USB sound was again very low. Thinking I would go back to the cloned SD-CARD and get the sound again, I then then got reduced volume happening again, even on this installation where I have never had BT. The only common denominators are the PI4 itself, LMS running on my NAS and my DAC. In all cases, I have the player output volume fixed at 100%. I restarted LMS on the NAS but that did not change anything. Powered everything off and on. Still the same. Very strange.

                Comment

                • fsger
                  Member
                  • Mar 2008
                  • 36

                  #38
                  USB Output Volume Drops after Bluetooth Install

                  Originally posted by fsger
                  Before trying with BT again, I cloned my SD-CARD so I would not have to reinstall everything. I then reinstalled BT (but did not have USB playing). It connected fine to my BT headphones but then USB sound was again very low. Thinking I would go back to the cloned SD-CARD and get the sound again, I then then got reduced volume happening again, even on this installation where I have never had BT. The only common denominators are the PI4 itself, LMS running on my NAS and my DAC. In all cases, I have the player output volume fixed at 100%. I restarted LMS on the NAS but that did not change anything. Powered everything off and on. Still the same. Very strange.
                  I installed BT onto 6.0.0 audio version with USB audio playing. The installation was OK but the speaker daemon was not running and would not start so I rebooted. It was at this point that the USB volume dropped. Uninstalling BT, turning it off and doing an in-situ update made no difference. I powered down the RPI, inserted an SD-Card I knew to be working (6.0.0 audio, no BT) but still the USB volume was low. I then turned-off my DAC (Caiman SEG) and the RPI restarted them again. Voila, the USB sound came back on that card. I then tried the card where I had installed BT. Again the USB sound came back. Clearly, whatever is going on is affecting the settings of the USB device(s).

                  To see if this is a "one-off" after installation of the BT extension and if the USB sound would come back after turning everything off, I reinstalled BT again. Same story - loss of sound after reboot and also after powering everything down. I then disabled BT (but did not uninstall) and rebooted, same story. I tried powering down/up-again, but no difference. Finally, uninstalled the BT extension, powered everything down and then restarted... no difference, low USB sound.

                  So in summary, the USB sound is lost after installing the extension, turning on the RPI BT and then rebooting. This persist on an SD-Card even when BT isu turned off and the extension uninstalled, even if everything is powered down and restarted. It also persists even with a working SD-Card unless everything is powered-down and restarted.

                  I hope that all helps to point to the source of the problem...

                  Comment

                  • paul-
                    Senior Member
                    • Jan 2013
                    • 5675

                    #39
                    As my USB DACs work just fine.

                    I would run alsamixer from an ssh session to see what mixer is getting reset.
                    piCorePlayer a small player for the Raspberry Pi in RAM.
                    Homepage: https://www.picoreplayer.org

                    Please donate if you like the piCorePlayer

                    Comment

                    • fsger
                      Member
                      • Mar 2008
                      • 36

                      #40
                      Originally posted by paul-
                      As my USB DACs work just fine.

                      I would run alsamixer from an ssh session to see what mixer is getting reset.
                      Thanks, I'll give that a go when I get a chance.

                      Comment

                      • giorgosperi
                        Junior Member
                        • May 2020
                        • 3

                        #41
                        connection

                        the bluetooth each time that i connect it i need to go to bluetooth section and hit save to start playing. any idea?

                        Comment

                        • paul-
                          Senior Member
                          • Jan 2013
                          • 5675

                          #42
                          Post a Bluetooth log please.
                          piCorePlayer a small player for the Raspberry Pi in RAM.
                          Homepage: https://www.picoreplayer.org

                          Please donate if you like the piCorePlayer

                          Comment

                          • Kuseng
                            Junior Member
                            • May 2020
                            • 2

                            #43
                            No sound output, connect is working

                            Hello,
                            i have the same problem like pulpitculprit in post #2. When I try to play music via LMS, the piCorePlayer works fine and i get audio output. Now I tried to use the pCp as a bluetooth speaker. I installed the bluetooth extensions and in the bluetooth config, my paired bluetooth device is listed. But sound is not working.
                            I set the -C command to 5 like suggested a few threads before.
                            I updated to the latest version. I also disabled the Raspberry Pi Built-in Audio

                            My hardware setup:

                            RPI Zero W
                            Hifiberry Mini AMP

                            My bluetooth log:
                            Code:
                            pCP Bluetooth extension build:0010
                            Starting BT Controller
                            bcm43xx_init
                            Flash firmware /lib/firmware/brcm/BCM43430A1.hcd
                            Set BDADDR UART: b8:27:eb:a0:58:01
                            Set Controller UART speed to 3000000 bit/s
                            Device setup complete
                            RPi Bluetooth Hardware Address: B8:27:EB:A0:58:01
                            Starting pCP BT Pairing Agent
                            BT Controller Ready
                            05-09 20:38 CEST INFO     ------------Starting pCP BT Speaker Daemon v6.0.0.0010------------
                            05-09 20:38 CEST INFO     Resetting asound.conf.
                            05-09 20:38 CEST INFO        Removing bt_ from asound.conf
                            05-09 20:38 CEST INFO     Current contents of /usr/local/etc/pcp/pcp-bt.conf.
                            05-09 20:38 CEST INFO        4C:49:E3:AA:3D:79#Redmi#10000
                            05-09 20:38 CEST DEBUG    PCM Devices found dbus.Dictionary({}, signature=dbus.Signature('oa{sv}'))
                            05-09 20:38 CEST INFO     Starting connection signal handlers.
                            05-09 20:38 CEST INFO     ---- Caught Connect signal ----
                            05-09 20:38 CEST DEBUG    /org/bluealsa/hci0/dev_4C_49_E3_AA_3D_79/a2dpsnk/source
                            05-09 20:38 CEST DEBUG       HCI:hci0
                            05-09 20:38 CEST INFO        MAC:4C:49:E3:AA:3D:79
                            05-09 20:38 CEST INFO        TRANSPORT:a2dpsnk
                            05-09 20:39 CEST INFO     ---- Caught Disconnect signal ----
                            05-09 20:39 CEST DEBUG       HCI:hci0
                            05-09 20:39 CEST INFO        MAC:4C:49:E3:AA:3D:79
                            05-09 20:39 CEST INFO        TRANSPORT:a2dpsnk
                            05-09 20:45 CEST INFO     ---- Caught Connect signal ----
                            05-09 20:45 CEST DEBUG    /org/bluealsa/hci0/dev_4C_49_E3_AA_3D_79/a2dpsnk/source
                            05-09 20:45 CEST DEBUG       HCI:hci0
                            05-09 20:45 CEST INFO        MAC:4C:49:E3:AA:3D:79
                            05-09 20:45 CEST INFO        TRANSPORT:a2dpsnk
                            05-09 20:46 CEST INFO     ---- Caught Disconnect signal ----
                            05-09 20:46 CEST DEBUG       HCI:hci0
                            05-09 20:46 CEST INFO        MAC:4C:49:E3:AA:3D:79
                            05-09 20:46 CEST INFO        TRANSPORT:a2dpsnk
                            05-09 20:56 CEST INFO     ---- Caught Connect signal ----
                            05-09 20:56 CEST DEBUG    /org/bluealsa/hci0/dev_4C_49_E3_AA_3D_79/a2dpsnk/source
                            05-09 20:56 CEST DEBUG       HCI:hci0
                            05-09 20:56 CEST INFO        MAC:4C:49:E3:AA:3D:79
                            05-09 20:56 CEST INFO        TRANSPORT:a2dpsnk
                            Thanks in advance

                            Comment

                            • paul-
                              Senior Member
                              • Jan 2013
                              • 5675

                              #44
                              Did you set the device type on the Bluetooth web page?
                              piCorePlayer a small player for the Raspberry Pi in RAM.
                              Homepage: https://www.picoreplayer.org

                              Please donate if you like the piCorePlayer

                              Comment

                              • Kuseng
                                Junior Member
                                • May 2020
                                • 2

                                #45
                                No sound output, connect is working

                                Shame on me...
                                I didnt see, that this dropdown menu was existing. Set it to "player" and everything is working now. Many thanks!

                                Comment

                                Working...