[Deprecated] [TESTING] Bluetooth audio streaming (A2DP)

Hmm, the first time I encountered the wrong Class: 0x0c041c I tested with OSMC running on a PI 3B+ (internal bluetooth adapter). Yesterday I tested with OSMC running on a PI Zero W (internal bluetooth adapter) and that gave the same result.

I wonder if an USB bluetooth dongle will make any change?

Best wishes
Vibe

This is not a rant but a question …

When will Bluetooth output to headphones work reliably on the Vero4k. This is hardly a niche requirement these days.

I’d understand it if we were playing around with home brew hobby kit but this is a commercial piece of hardware that is advertised with the Bluetooth logo.

Bluetooth on vero has been experimental for years The faff to make it work is unreasonable , especially the step 3 in fzinken post relating to headsets.

It probably won’t be in OSMC by default for another year or two.

There’s not a clean solution for support on Linux currently

Of course - Bluetooth functionality works for other purposes, such as keyboards and nice. The functionality isn’t experimental. The audio package is.

You can also install the A2DP package for experimental BT audio support and provide feedback on this thread.

That’s news to me. I don’t believe we’ve stated that A2DP is anything but experimental either.

Sam

2 Likes

Hi
I would like to point out a marketing opportunity you may not have thought of before. It may be small but will be growing quickly. Most newer hearing aids are now supporting streaming via bluetooth.

I have not tried bluetooth in a long time and look forward to trying it again. I dread having to read all 843 replies to get up to speed on this.

Thanks for your and the teams hard work!

The first post covers everything you need.

Sam

Thanks. Seems like a multi step changing of settings is needed. It would help us old farts if after initial setup it could be added to the “audio settings” page.

Will try later.
Thanks

It would be nice if something like this could be installed and uninstalled via MyOSMC if you included some kind of beta category in there.
That way you wouldn’t have to do anything via commandline, though you probably want to weed out those who don’t use the commandline for features that arent ready yet.

Sam’s post above clearly spells out why it’s not ready for this yet…

Hi there,
I’m setting up a OSMC box for my daughter and found she wanted bluetooth streaming.
I followed the inscrutions in the first post of this topic and wanted to give some feedback:

  • Hardware is Raspberry Pi 3 Model B+ with Hifiberry AMP2 and a 12V/6A AC adapter
  • OSMC November 19, fully updated, 4.19.55-6-osmc
  • dtoverlay=hifiberry-dacplus-overlay in /boot/config.txt
  • skin estouchy
  • setup was not obvious after installing a2dp-app-osmc: how and where to connect?
  • found bluetooth settings in My OSMC app (never used bluetooth on OSMC before)
  • after fiddeling around connected my phone
  • and now it just works

Currently listening to bluetooth stream from android phone without any stutter! On the phone HD-Audio is disabled.

What I expected was something like a now playing screen, but when playing via bluetooth starts nothing happens. Is this skin dependend?

Great experience so far, thanks a lot!

We implemented BTPlayer some time ago to show playback status, but it’s no longer supported / maintained

Oh, what a pity :frowning:
Is there any work planed on the general A2DP features? Make it available in one of the next releases?

We don’t have anything planned, but we will revisit it at some point in the future.

Sam

1 Like

Maybe you want to check if streaming via Yatse instead of Bluetooth gives you more information

Thanks for the hint, I’ll try that!

Hi,

I would like to buy HIFIBerry DAC plus and use it on my RPI with OSMC. I would like to use HIFIBerry output to play music files, video files and also to stream from my phone to HIFIBerry output (A2DP).

Now, I was able to set A2DP on my RPI and pair my phone via command line (I tried in My OSMC but with no luck). I can stream music from my phone to RPI via phone jack (didn’t test with HDMI).

If I change analog audio output in My OSMC to some HIFIBerry, I can not hear sound from my phone, but I hear sound from OSMC (play music file from USB stick). This is not an issue for my current setting.

My questions are:

  1. If I would set HIFIBerry as output audio device in My OSMC, will also play music stream from my phone (A2DP)? Did anyone try this?

  2. I would also like to user alsamixer. Will alsamixer works with HIFIBerry for all audio (also files that are stream from my phone)?

Thanks for help.

It doesn’t work on Jan 2020 release. Sometimes eadphones connect, but no sound!

Found these in dmesg:

[  346.786169] Bluetooth: hci0 command 0x1001 tx timeout
[  348.786108] Bluetooth: hci0 command 0x1009 tx timeout
[  354.785941] Bluetooth: hci0 command 0x1003 tx timeout
[  356.785895] Bluetooth: hci0 command 0x1001 tx timeout
[  358.785841] Bluetooth: hci0 command 0x1009 tx timeout

more complete dmesg after reboot:

[   11.660370] Sink is HDMI device
[   11.660382] hdmitx: system: packet: can't get vendor data
[   11.660389] hdmtix: setting audio 1
[   11.660393] hdmitx tx_aud_src = 0
[   11.660414] hdmitx: audio: Audio Type: PCM  Audio Channels: 2, Speaker layout: 0x0
[   11.660418] hdmitx: audio: Audio Output Channels set to: 0:0
[   11.660427] hdmitx: fs = 2, cd = 4, tmds_clk = 148500
[   11.660431] hdmitx aud_n_para = 6272
[   11.660449] hdmitx set channel status, sample rate 2
[   11.660540] hdmitx: video: VIC: 16 (16) 1920x1080p60hz
[   11.660550] hdmitx: video: Bit depth: 10-bit, Colour range RGB: limited, YCC: limited, Colourspace: YUV444
[   11.660554] hdmitx: video: PLL clock: 0xc000029a, Vid clock div 0x000b0000
[   11.660609] fb: osd current vmode=1080p60hz, cmd: 0x10000
[   11.675044] meson_uart c81004c0.serial: ttyS0 use xtal(8M) 24000000 change 115200 to 115200
[   11.675145] meson_uart c81004c0.serial: ttyS0 use xtal(8M) 24000000 change 115200 to 115200
[   11.680825] meson_uart c81004c0.serial: ttyS0 use xtal(8M) 24000000 change 115200 to 115200
[   11.680982] meson_uart c81004c0.serial: ttyS0 use xtal(8M) 24000000 change 115200 to 115200
[   11.826338] hdmitx: system: PHY Setting Done
[   15.844553] aml_snd_m8_card aml_m8_snd.46: I2S playback disable
[   15.844568] aml_snd_m8_card aml_m8_snd.46: IEC958 playback disable
[   16.159975] usb 1-2: DVB: adapter 0 frontend 0 frequency 0 out of range (174000000..862000000)
[   17.129340] audio_dsp: buf=0
[   17.129354] audio_dsp: IEC958_mode_raw=0
[   17.129390] audio_dsp: IEC958_mode_codec= 1, IEC958 type 2 CH PCM
[   17.129395] audio_dsp: last mode 1,now 1
[   17.129398] audio_dsp: putting chip back to PCM state
[   17.129468] hdmitx: config: audio_on
[   17.129477] hdmitx: audio: configure on
[   17.151676] i2s/958 same source - init spdif
[   17.151694] aml_spdif_dai: aml_hw_iec958_init,runtime->rate=44100, runtime->channels=2, same source mode(1), stream format=1
[   17.151701] aml_spdif_dai: set divider = 2 for i2s shared clock
[   17.151712] aml_audio_hw: IEC958 16bit
[   17.151718] hdmitx: audio: aout notify rate 44100
[   17.151722] hdmitx: audio: aout notify size 16
[   17.151727] hdmitx: audio: hdmi_ch: 0 speaker_layout: 0
[   17.151730] hdmitx: audio: no update
[   17.151912] i2s/958 same source - init spdif
[   17.151928] aml_spdif_dai: aml_hw_iec958_init,runtime->rate=44100, runtime->channels=2, same source mode(1), stream format=1
[   17.151935] aml_spdif_dai: set divider = 2 for i2s shared clock
[   17.151945] aml_audio_hw: IEC958 16bit
[   17.151951] hdmitx: audio: aout notify rate 44100
[   17.151954] hdmitx: audio: aout notify size 16
[   17.151958] hdmitx: audio: hdmi_ch: 0 speaker_layout: 0
[   17.151961] hdmitx: audio: no update
[   17.152309] aml_snd_m8_card aml_m8_snd.46: I2S playback enable
[   17.152323] aml_snd_m8_card aml_m8_snd.46: IEC958 playback enable
[   17.153519] sysfs set hdmi_ch to 0
[   52.574480] audio_dsp: buf=0
[   52.574493] audio_dsp: IEC958_mode_raw=0
[   52.574525] audio_dsp: IEC958_mode_codec= 1, IEC958 type 2 CH PCM
[   52.574529] audio_dsp: last mode 1,now 1
[   52.574532] audio_dsp: putting chip back to PCM state
[   52.574602] hdmitx: config: audio_on
[   52.574610] hdmitx: audio: configure on
[   52.580565] sysfs set hdmi_ch to 0
[   54.289424] BT_RADIO going: on
[   54.289438] BCM_BT: going ON
[   54.748160] meson_uart c11084c0.serial: ttyS1 use xtal(8M) 24000000 change 0 to 9600
[   54.748215] meson_uart c11084c0.serial: ttyS1 use xtal(8M) 24000000 change 9600 to 9600
[   54.748243] meson_uart c11084c0.serial: ttyS1 use xtal(8M) 24000000 change 9600 to 115200
[   60.049232] meson_uart c11084c0.serial: ttyS1 use xtal(8M) 24000000 change 115200 to 2000000
[   60.053101] Bluetooth: HCI UART driver ver 2.2
[   60.053111] Bluetooth: HCI H4 protocol initialized
[   60.053115] Bluetooth: HCI BCSP protocol initialized
[   60.053118] Bluetooth: HCILL protocol initialized
[   60.053121] Bluetooth: HCIATH3K protocol initialized
[   60.053124] Bluetooth: HCI Three-wire UART (H5) protocol initialized
[   60.177030] Bluetooth: RFCOMM TTY layer initialized
[   60.177062] Bluetooth: RFCOMM socket layer initialized
[   60.177083] Bluetooth: RFCOMM ver 1.11
[   60.654645] usb 1-2: dvb_usb_v2: 2nd usb_bulk_msg() failed=-71
[   60.654657] usb 1-2: dvb_usb_af9015: rc query failed=-71
[   60.854545] usb 1-2: dvb_usb_v2: 2nd usb_bulk_msg() failed=-71
[   60.854568] i2c i2c-1: af9013: i2c rd failed=-71 reg=d391 len=1
[   76.002610] aml_snd_m8_card aml_m8_snd.46: I2S playback disable
[   76.002624] aml_snd_m8_card aml_m8_snd.46: IEC958 playback disable
[  134.612669] audio_dsp: buf=0
[  134.612681] audio_dsp: IEC958_mode_raw=0
[  134.612714] audio_dsp: IEC958_mode_codec= 1, IEC958 type 2 CH PCM
[  134.612719] audio_dsp: last mode 1,now 1
[  134.612722] audio_dsp: putting chip back to PCM state
[  134.612796] hdmitx: config: audio_on
[  134.612803] hdmitx: audio: configure on
[  134.618763] i2s/958 same source - init spdif
[  134.618779] aml_spdif_dai: aml_hw_iec958_init,runtime->rate=44100, runtime->channels=2, same source mode(1), stream format=1
[  134.618785] aml_spdif_dai: set divider = 2 for i2s shared clock
[  134.618793] aml_audio_hw: IEC958 16bit
[  134.618800] hdmitx: audio: aout notify rate 44100
[  134.618803] hdmitx: audio: aout notify size 16
[  134.618808] hdmitx: audio: hdmi_ch: 0 speaker_layout: 0
[  134.618811] hdmitx: audio: no update
[  134.619144] i2s/958 same source - init spdif
[  134.619156] aml_spdif_dai: aml_hw_iec958_init,runtime->rate=44100, runtime->channels=2, same source mode(1), stream format=1
[  134.619161] aml_spdif_dai: set divider = 2 for i2s shared clock
[  134.619170] aml_audio_hw: IEC958 16bit
[  134.619176] hdmitx: audio: aout notify rate 44100
[  134.619179] hdmitx: audio: aout notify size 16
[  134.619183] hdmitx: audio: hdmi_ch: 0 speaker_layout: 0
[  134.619186] hdmitx: audio: no update
[  134.619733] aml_snd_m8_card aml_m8_snd.46: I2S playback enable
[  134.619746] aml_snd_m8_card aml_m8_snd.46: IEC958 playback enable
[  134.621216] sysfs set hdmi_ch to 0
[  153.899028] aml_snd_m8_card aml_m8_snd.46: I2S playback disable
[  153.899042] aml_snd_m8_card aml_m8_snd.46: IEC958 playback disable
[  157.281406] input: A4:77:58:73:4D:4C as /devices/virtual/input/input9

Did you check the posts about changing the audio sink for headsets?

No. But if you mean output device, there is no PCM there. Just PulseAudio and HDMI.

Check this thread

1 Like
osmc@vero:~$ pactl list sinks short
0	alsa_output.platform-aml_m8_snd.46.analog-stereo	module-alsa-card.c	s16le 2ch 44100Hz	SUSPENDED
2	bluez_sink.A4_77_58_73_4D_4C.headset_head_unit	module-bluez5-device.c	s16le 1ch 8000Hz	RUNNING
osmc@vero:~$ sudo pactl set-card-profile 2 a2dp_sink
Connection failure: Access denied