76 Responses

  1. Philippe Vaille-Brunet at | | Reply

    Hello
    Sorry but I get troubles with the Bose SLIII
    here is the description :
    pacmd list-cards
    2 card(s) available.
    index: 1
    name:
    driver:
    owner module: 7
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Mono analogique Output (priority 200, available: unknown)
    output:analog-stereo: Stéréo analogique Output (priority 6000, available: unknown)
    off: Éteint (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Stéréo analogique
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#1: Monitor of bcm2835 ALSA Stéréo analogique
    ports:
    analog-output: Sortie analogique (priority 9900, latency offset 70000 usec, available: unknown)
    properties:

    index: 6
    name:
    driver:
    owner module: 32
    properties:
    device.description = “Bose SLIII”
    device.string = “08:DF:1F:4D:1E:59”
    device.api = “bluez”
    device.class = “sound”
    device.bus = “bluetooth”
    device.form_factor = “hifi”
    bluez.path = “/org/bluez/hci0/dev_08_DF_1F_4D_1E_59”
    bluez.class = “0x240428”
    bluez.alias = “Bose SLIII”
    device.icon_name = “audio-card-bluetooth”
    profiles:
    a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: yes)
    off: Éteint (priority 0, available: yes)
    active profile:
    sinks:
    bluez_sink.08_DF_1F_4D_1E_59.a2dp_sink/#4: Bose SLIII
    sources:
    bluez_sink.08_DF_1F_4D_1E_59.a2dp_sink.monitor/#6: Monitor of Bose SLIII
    ports:
    hifi-output: HiFi (priority 0, latency offset 0 usec, available: yes)
    properties:

    hifi-input: HiFi (priority 0, latency offset 0 usec, available: no)
    properties:
    only a2dp_sink gives an answer, else headset is unknown
    the main difference is to priority and latency which are quite different from the alsa jack output
    when reading of the .ogg file is set , there is reading but any sound out from the bose
    I set the hcitool but I don’t know what ’s for.

    When I tried bluez in terminal mode, I got a message : frame isn’t transmitted approximatively
    I noted than the pulseaudio (pavucontrol ) never gives information about the bose in output devices
    Any suggestion will be readen attentivily.
    Thanks a lot by Philippe

  2. Larry at | | Reply

    Youness,
    Tried your instructions but cannot get set profile and sink. Errors on each.
    I have a headphone unit working well on a2dp but have been unable to get speaker working.
    When trying the speaker it pairs and connects but there is no card listed for the unit.
    As a sidenote….i tried a completely clean system (using stretch) and couldn’t get either unit to output sound. Headphones pair and connect and show as card1 but have been unable to activate profile. Speaker pairs and connects but do not even show as card. I have been reading all your efforts and will continue to monitor your site. Thanks for all your hard work.
    Larry

  3. Larry at | | Reply

    Hi Youness, didn’t expect such a quick reply…..thanks.
    Buth units work well with android and ios hardware.
    I did turn off bluesalsa and noticed that the profile was turned off in pavuaudio so i rebooted and turned the profile on.
    I will be busy with other things today but will try to capture some info when i get a chance.
    Seems like all works well in your guide until I check cards as explained above. And seems odd that i can get a card for the headphones and can connect bit cannot get audio to output. Both units appear to suppory a2dp and hfp.

  4. Jan at | | Reply

    Hey Guys,

    I thought I’d highjack the comment section of your post, Youness, and ask for help in a similar setup I’m trying to get working: In my case I have an USB audio interface with in- and outputs connected to a Raspberry Pi Zero. I want the Pi to connect to another device (pc, ipad…) registering as a bluetooth headset (using hsp). So far following a mixture of your tutorial and this link (https://didier.io/post/raspberrypi-stream-sound-over-bluetooth) I managed to configure the pi as a bluetooth speaker. But I can not get it to send the microphone input of the audio-interface over bluetooth… Any ideas? I tried different values for the Class parameter in /etc/bluetooth/main.conf .. So far without success.

    Any help or ideas would be greatly appreciated!
    Jan

  5. Philippe Vaille-Brunet at | | Reply

    Hi to everyone
    A lot of responses
    some progress today
    1 to youness
    the bose SLIII is only made for playing music
    and I want to run it in my home without connection to the Pi3 except by bluetooth
    2 to Larry and youness
    this afternoon, after some trials with terminal and gui nothing get
    but just now afer restarting the Pi3
    I start the Bose
    I click on bluetooth : make discoverable, add device and wait for bose, paired it
    and
    suprise : in a terminal I just killer the bluealsa
    and in pulseaudio gui I got the Bose in output device
    in Bluemindo I started playing a music
    go back to every sourdine button in audio, pulseaudio output and playing
    now it’s running nearly well.

    Is the main progress would be stop the bluealsa service in console?
    I’ll try later, for instance I listen with pleasure.
    Thanks a lot.
    Philippe

  6. Philippe Vaille-Brunet at | | Reply

    Sorry youness
    but 45mn after the starting , I lost the stream on the bose
    I try to restart but nothing for instance.
    A new pi restarting give me a bose instance
    how :
    1 turn on the bluetooth by clicking on its icon
    2 click on the audio speaker to connect the bose if exists; if not add …
    3 the bose answers by a bip
    4 open a terminal and kill the bluealsa service
    5 go to bluetooth, verify bose is connected
    6 then start the music player ( bluemindo for me )
    7 choice the file to play
    seriously it’s fine
    The question : it’s little complex
    Philippe

  7. Connor at | | Reply

    Hello Youness,

    Thank you! This has been frustrating me for the last two weeks!

    I’m so close, yet so far! I’m getting the error you mention in the article:
    Failed to set card profile to ‘headset_head_unit’.

    I’ve restarted and re-synced the bluetooth device: (https://www.amazon.co.uk/gp/product/B076HRH34T/ref=oh_aui_detailpage_o03_s00?ie=UTF8&th=1)

    But, I still seem to get that error every time. I’ve tried a couple of things I found digging through some old forum posts, but nothing seems to fix the problem.

    I’m not sure what to try next, I was hoping you may know? Here’s the pacmd card listing: https://gist.github.com/anonymous/6fd573116eb37fcf1a917301ebfe8725

    The profile headset_head_unit does appear in the listed profiles, but I can’t set it as the active profile for some reason, I can set it to a2dp and off however.

    Could it possibly be because the listed protocol is (HSP/HFP) as opposed to being solely HSP?

    Thanks for any help and for all the effort you’ve put into solving this problem so far!

    1. Connor at | | Reply

      So, in the pacmd card listing it denotes that both a2dp_sink and headset_head_unit are both ‘unknown’ to be available:

      headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown)
      a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: unknown)

      However, I am able to switch the card profile and default-sink to a2dp_sink and play the audio file. But again when I try to switch the profile to headset_head_unit it fails with the above error.

      1. Connor at | | Reply

        Oops! We seem to have posted replies simultaneously.

        So, I just tried connecting it to my computer and managed to both play and record audio when it’s connected. I’ve also just tried this on my phone and managed to do the same, both without requiring a passcode or any authentication step. The device simply connects.

        What I’ve tried in terms of removing the device is to open bluetoothctl and remove the device from there. Is this what you’re referring to?

  8. Philippe Vaille-Brunet at | | Reply

    Hi youness
    the problem continues with my bose
    this evening it’s impossible to connect or remove the bose. I get error message about tre gdbus
    May I send you a scrennshot about errors
    The messages texts are :
    remove device : removal failed – GDBus.Error:org.bluez.Error.NotReady: Ressource Not Ready
    The other one:
    Connecting Audio Device: Failed to connect to device-
    GDBus.Error:org.bluez.Error.NotReady: Ressource Not Ready. Try to connect again..
    But I tried for one and half hour.
    Is it a bug?

  9. Philippe Vaille-Brunet at | | Reply

    Hi youness
    me again, sorry. But I’ld to understand how it’s work
    My last trial :
    I made the bluetooth script as above, I got an error about the LSB tags when I run the update.rc command
    I start again the Pi3 and connection to bose started immediatly
    I get rid of bluemindo and install aqualung
    I run aqualung on a Music directory
    But the pavucontrol doesn’t see the connected bose, so any music out in my ears
    if I use the wire between the jack connector’pi and the bose’jack, I got audible music.
    Do you know how we could get the bose-bluetooth line in the output-pavucontrol as soon as we have connected bose in the audio icon and in the bluetooth icon on the taskbar?
    Sorry for such disturbing elements
    Thanks a lot for any response.
    Philippe

  10. Eirik at | | Reply

    Thanks for this article. I actually had this working “right out of the box”, which makes the problems even more annoying. I had jessie running, and the only thing I did was to bluetoothctl pair and connect my Bluetooth speaker, and it connected, and STAYED connected. I could play mp3s of the command line, and use text-to-speech which was part of the project.

    Then suddenly, while testing, the audio stuck and repeated (broken record, extremely fast), and I had to turn off the Bluetooth speaker. Since then, I have not been able to pair again using the default alsa. I since upraded to stretch, it only worked using pulseaudio, but sound is very choppy. It sure would have been nice to have a simple and working A2DP and HSP.

  11. Philippe Vaille-Brunet at | | Reply

    Hi youness
    Thanks a lot for all your answers
    The bose is now running, how?
    using what you say by console.
    I uninstall bluealsa… may be a bad idea for another app?
    If I try to resume
    switch on the bose
    start bluetoothctl and the steps power on agent on default-agent : we wait for yes
    scan on sees the bose in some seconds, pair, trust and connect even if we havn’t answers «on» with pair and trust, connect has to get connected in any case.
    open pavucontrol
    in parallel : pacmd list-cards in which we wait the bose recognition
    and the 2 other commands
    pavu reacts to the pacmd commands
    If we start pulseaudio in console, the streaming flow is bad because the console prints out the levels of the streaming and creates interruptions.
    Running good for 3 hours, fine! The dream!
    For me, an improvement in order to click on something once would be better for start recognition and real connection of the bose. I can wait now I learned the console steps.
    Bye! Pleasure to meet you!
    Philippe

  12. Fabrizio at | | Reply

    Dear Youness, first of all i want to express my gratitude for sharing your knowledge/time with us.
    i have read all your project since the begin and applied to my situation.
    every tink whent ok and i was able to pair and connect the device in both protocol (hsp a2dp), i succeded to record and play a recorded audio…great…
    i would like to automate the connection after reboot , and i saw some indication that you suggested and i’ll try to applicate.
    what is not very clear to me is what in the procedure is permanent and what must be automated at reboot.
    for example, this command should be repeated at every boot?: sudo hcitool cmd 0x3F 0x01C 0x01 0x02 0x00 0x01 0x01

    i try to explane my project that is now in the first step and maybe i’ll get some suggestion.
    we are a group of motorcycle bikers, we ride in goup and we all have bluetooth devices in the helmets connected to the smartphone and some of us are also connected in intercom from bike to bike.
    the range of the bluetooth in certain condition is not enough so we want to use rtx radios (uhf/pmr).
    The project is to connect a common two way radio with the the bluetooth installed in the helmet.
    the idea is to connect via bluetooth a raspberry to the interphone (done, to be automated) and than to physically connect the raspberry (probably wit an extra audio dongle) to the mic/spk connector of the radio.
    when i am talking into the Helmet’s microphone, the audio should exit from a connector and enter in the mic connector of the radio.
    what the radio receive a signal, the audio getting out from the spk connector should enter in the raspberry and streamed into the helmet.

    Any suggestion? ……Tks in advance

  13. Randy T at | | Reply

    Minor nit
    For the install pulse audio commands, this looks incorrect:
    sudo apt-get install pulseaudio pulseaudio-module-bluetoot

    I think it should be bluetooth at the end, instead of bluetoot

    Also, I would disable the internal bluetooth interface on the pi3
    cd /boot
    sudo nano config.txt

    Add to config.txt:
    #disable the internal bluetooth
    dtoverlay=pi3-disable-bt

    You may also need to do this (I haven’t tried it yet)
    sudo systemctl disable hciuart.service

    I just bought an asus bluetooth module, and plan to try your instructions to install it, thanks.

  14. JK at | | Reply

    Hello,

    Yes, I have the same issue with distorted audio.
    I believe the problem may be caused by a sample format mismatch.
    I can hear it when I loopback the audio.

    What exactly is the following command in the final solution supposed to do?
    “sudo hcitool cmd 0x3F 0x01C 0x01 0x02 0x00 0x01 0x01”

    Is there a byte-for-byte breakdown?
    Is the sample format encoded in there somewhere?

    -Cheers

    JK

  15. Theodore Stavropoulos at | | Reply

    Will this work with an external bluetooth adapter such as

    http://www.lemosint.com/bluetooth/bluetooth_serial_adapter_details.php?itemID=612

    Im thinking about putting this in the office and hooking up my Dre PowerBeat3’s to it and running google home on the Pi. This way ive got Google home hooked up playing audio through my headphones and listening to commands from me on the attached mic

  16. SouSouleBarbu at | | Reply

    Hi Youness,

    I’m facing a weird situation: I have followed all the steps and I didn’t get any error. I got the sound when I types paplay /tmp/h2g2;ogg on A2DP, but no sound on HSP.

    I tried to remove, reconnect, reboot… multiple time, but I doesn’t change a thing…
    That’s really weird because I didn’t got any error…

    Config, RP3 with doss soundbox.

    Thanks a lot!

  17. Phil171 at | | Reply

    Hi,
    Same problem as SouSouleBarbu. I followed all the tutorial, can hear h2G2.ogg, but cannot hear an MP4.
    When I want to change in Blueman-Manager the audio profile to A2DP Sink, it return “Failed to change profile to a2dp_sink”.
    But even on Headset Head Unit (HSP/HPF), on my Philips SHB7000 head set, no sound.
    Best Regards from France,
    Philippe

  18. TheodoreStav at | | Reply

    Hey Youness,

    Ive given it multiple trys but keep getting the “failed to set card profile to ‘headset_head_unit’ ive removed the device and rebooted i can hear audio but cant record.. Any other suggestions ? these are powerbeat 3’s im trying with a pi 3

    index: 1
    name:
    driver:
    owner module: 24
    properties:
    device.description = “Theobeats”
    device.string = “2C:33:61:D8:BC:B4”
    device.api = “bluez”
    device.class = “sound”
    device.bus = “bluetooth”
    device.form_factor = “headphone”
    bluez.path = “/org/bluez/hci0/dev_2C_33_61_D8_BC_B4”
    bluez.class = “0x240418”
    bluez.alias = “Theobeats³”
    device.icon_name = “audio-headphones-bluetooth”
    profiles:
    a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: unknown)
    headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: no)
    off: Off (priority 0, available: yes)
    active profile:
    ports:
    headphone-output: Headphone (priority 0, latency offset 0 usec, available: unknown)
    properties:

    headphone-input: Bluetooth Input (priority 0, latency offset 0 usec, available: no)
    properties:

  19. TheodoreStav at | | Reply

    more to add to my post above…

    pi@raspberrypi:~ $ systemctl status bluetooth
    ● bluetooth.service – Bluetooth service
    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
    Active: active (running) since Sat 2018-03-10 23:13:26 UTC; 28min ago
    Docs: man:bluetoothd(8)
    Main PID: 524 (bluetoothd)
    Status: “Running”
    CGroup: /system.slice/bluetooth.service
    └─524 /usr/lib/bluetooth/bluetoothd

    Mar 10 23:13:26 raspberrypi bluetoothd[524]: Endpoint registered: sender=:1.9 path=/A2DP/SBC/Source/1
    Mar 10 23:13:26 raspberrypi bluetoothd[524]: Endpoint registered: sender=:1.9 path=/A2DP/SBC/Sink/1
    Mar 10 23:13:32 raspberrypi bluetoothd[524]: Endpoint registered: sender=:1.17 path=/MediaEndpoint/A2DPSource
    Mar 10 23:13:32 raspberrypi bluetoothd[524]: Endpoint registered: sender=:1.17 path=/MediaEndpoint/A2DPSink
    Mar 10 23:13:32 raspberrypi bluetoothd[524]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
    Mar 10 23:13:38 raspberrypi bluetoothd[524]: /org/bluez/hci0/dev_2C_33_61_D8_BC_B4/fd0: fd(29) ready
    Mar 10 23:17:04 raspberrypi bluetoothd[524]: Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
    Mar 10 23:17:33 raspberrypi bluetoothd[524]: /org/bluez/hci0/dev_2C_33_61_D8_BC_B4/fd1: fd(29) ready
    Mar 10 23:26:24 raspberrypi bluetoothd[524]: Endpoint unregistered: sender=:1.9 path=/A2DP/SBC/Source/1
    Mar 10 23:26:24 raspberrypi bluetoothd[524]: Endpoint unregistered: sender=:1.9 path=/A2DP/SBC/Sink/1

  20. simalto at | | Reply

    I am using raspberry pi zero w. with PA 10.0 and Bluez 5.43.
    I have manage to use my headset in A2DP mode without problem.
    But when I change to HSP profile no sound heard or mic record.
    by using the hcitool command(sudo hcitool cmd 0x3F 0x01C 0x01 0x02 0x00 0x01 0x01),
    I was able to hear sound and record.
    But my problem is that the sound is very bad and slow like motion.

    I am suspecting it has something to do with the pi zero w chip(BCM2835)
    according to this link:https://www.raspberrypi.org/magpi/pi-zero-w/

    can anyone help me with relevant hcitool command for this chip?
    Thanks in advance!

  21. Bastian at | | Reply

    Thank you for the real good work. I only required the A2D2P-support and due to your post it works the first time without sticking around for me. Using Raspberry pi zero w with Riva Turbo X on Raspbian Stretch. I issued the sound beeing slow motion alike, too. Hope to fix it in this weekend.

  22. alex at | | Reply

    I still don’t get sound on Bluetooth speaker/headset. I do get connected.
    After giving command (one of the first steps described): ‘sudo killall bluealsa’, I get ‘Invalid Command’
    So can not follow your Tutorial any further..
    Also ‘pacmd list-cards’ or further ‘pacmd’ are not recognized and I get ‘Invalid Command’

    http://youness.net/raspberry-pi/how-to-connect-bluetooth-headset-or-speaker-to-raspberry-pi-3

  23. alex at | | Reply

    Hi,
    Got a bit further, but now get (where: ’90:1F:F1:3C:AF:41′ is my Bluetooth speaker ‘S10’):
    pi@raspberrypi:~ $ pa is too loncmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.

    ===
    pi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)pi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd pi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.pi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd pi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:pi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmpi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.pi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmpi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    anapi@raspberrypi:~ $ pacmd list-cards
    1 card(s) available.
    index: 0
    name:
    driver:
    owner module: 6
    properties:
    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.string = “0”
    device.description = “bcm2835 ALSA”
    module-udev-detect.discovered = “1”
    device.icon_name = “audio-card”
    profiles:
    output:analog-mono: Analog Mono Output (priority 200, available: unknown)
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.d set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.d set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card fopi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card fpi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.ound by this name or index.pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.und by this name or index.
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm2835 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberpi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.rypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offsepi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card foupi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.nd by this name or index.pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.t 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offsepi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.t 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card foupi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.nd by this name or index.set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.log-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.
    output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
    off: Off (priority 0, available: unknown)
    active profile:
    sinks:
    alsa_output.platform-soc_audio.analog-stereo/#0: bcm2835 ALSA Analog Stereo
    sources:
    alsa_output.platform-soc_audio.analog-stereo.monitor/#0: Monitor of bcm28pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.35 ALSA Analog Stereo
    ports:
    analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
    properties:

    pi@raspberrypi:~ $ pacmd set-card-profile bluez_card.90:1F:F1:3C:AF:41 a2dp_sink
    No card found by this name or index.

  24. Salim at | | Reply

    Hi Youness,

    any updates about this ? The profile Headset Head Unit is always not available for me, no matter how many time i reset.

    I did a xargs grep on the whole system and this line (headset_head_unit) is referred in two files :

    Binary file /usr/lib/pulse-10.0/modules/libbluez5-util.so matches
    Binary file /usr/lib/pulse-10.0/modules/module-bluetooth-policy.so matches

    Hope this helps.

    I have been looking myself in the file but nothing there that i modified impacted the behavior of pulseaudio

    Salim

  25. Salim at | | Reply

    Changes at a glance

    Support for newer AirPlay hardware
    USB and bluetooth devices preferred over internal sound cards
    The default sink and source configuration is remembered better
    Bluetooth HSP headset role implemented
    Bluetooth HFP audio gateway role implemented (requires oFono)
    Bluetooth HSP audio gateway and HFP hands-free unit roles can be enabled simultaneously
    Upmixing can now be disabled without bad side effects
    Avoid having unavailable sinks or sources as the default
    Option to avoid resampling more often
    Option to automatically switch bluetooth profile to HSP more often
    Better latency regulation in module-loopback
    Changed module argument names in module-ladspa-sink and module-virtual-surround-sink
    Fixed input device handling on Windows
    Improved bluetooth MTU configuration (warning! this causes some hardware to not work any more, see the details below for how to fix it)
    GNU Hurd support
    Applications can request LADSPA or virtual surround filtering for their streams
    Support for 32-bit applications on 64-bit systems in padsp

    https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/11.0/

    Those are for 11.0, 11.1 is out atm.

    Please let me know if you need more help, ill keep probing here.

  26. Salim at | | Reply

    I managed to update to 11.1 Pulseaudio, i will let you know tonight any changes.

  27. Salim at | | Reply

    Youness,

    Sorry to bother you that much. If the bluetooth firmware is the problem, here is https://github.com/seemoo-lab/nexmon

    If you know someone that can modify the firmware and inject it using that tool would be great ( if of course the firmware is in fault)

  28. Nirav Patel at | | Reply

    Hi Yonuness,

    I have tried with your steps many times with out any success. i am trying to connect MI bluetooth speaker (http://www.mi.com/in/mi-bluetooth-speaker-basic2-white/) using HSP. not able to set headset_head_unit profile. any kind of help/suggestions will be appreciated.

    Thanks

  29. Filozof71 at | | Reply

    Hello. I performed this configuration on my Raspberry Pi Zero W (with newest updates and upgrades) with two headsets and the result is the same. The record voice is somehow overdriven and digitized – just unrecognizable. So for the one hand it works for me – for the other – no.

  30. John Zawodniak at | | Reply

    Excellent instructions.
    They helped me solve my problem were the bluetooth adapter was not showing up in the card list.

    one recommendation.
    these instructions could be a little clearer. When killing the bluealsa we need to use the “exit” command to exit the shell or move to another terminal window. If exiting the shell we need to re-enter with “bluetoothctl” and exit again prior to the pacmd list-cards cmd… It lost me for a few minutes.

    ……
    Start the scan:
    scan on

    After some seconds, you will see the headset name and MAC address (xx:xx:xx:xx:xx:xx)
    While scanning, we will kill Bluealsa, and start PulseAudio:
    sudo killall bluealsa
    pulseaudio –start

    Go back to Bluetoothctl: Pair, trust and connect your device:
    pair xx:xx:xx:xx:xx:xx

    Again, overall excellent work.
    John

Please comment with your real name using good manners.

Leave a Reply