Re: [pulseaudio-discuss] Make paired (but not connected) BT device available as sink?

2022-01-02 Thread Josef Wolf
On Sun, Jan 02, 2022 at 03:27:07PM +0100, Georg Chini wrote:
> There are some sync issues with the combine sink that should be fixed in
> current master.
> Do you have a chance to test it?
> https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/tree/master

Oh, that's interesting!

I never built libreelec by myself. I'll try it, but this will probably take a
while!

Thx!

-- 
Josef Wolf
j...@raven.inka.de


Re: [pulseaudio-discuss] Make paired (but not connected) BT device available as sink?

2022-01-02 Thread Georg Chini

On 02.01.22 15:18, Josef Wolf wrote:

On Sun, Jan 02, 2022 at 02:42:42PM +0100, Josef Wolf wrote:

On Sun, Jan 02, 2022 at 02:02:39PM +0100, Georg Chini wrote:

On 02.01.22 12:32, Josef Wolf wrote:

   pactl load-module module-udev-detect
   pactl load-module module-combine-sink 
slaves=alsa_output.0.hdmi-stereo,bluez_sink.A4_77_58_02_93_FB.a2dp_sink

if you load module-combine-sink without the slaves argument, it should
add newly appearing sinks automatically to the combine sink.

Ah!

Thanks for the hint, Georg! This works (as far as PA is concerned!)

Turns out that I mis-interpreted the cause of the problem. The real problem
seems to lie withhin the BT stack: the BT-speaker will not reconnect
automatically when libreelec is rebooted.

Adding

  systemctl start bluetooth
  (sleep 1; bluetoothctl connect "A4:77:58:02:93:FB") &

to the startup script solved the problem. Thanks!

But there are some noticeable sync-problems (one stream seems to be somewhat
delayed). Is this expected? I thought module-combine-sink would try to
syncronize?



There are some sync issues with the combine sink that should be fixed in 
current master.
Do you have a chance to test it? 
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/tree/master





Re: [pulseaudio-discuss] Make paired (but not connected) BT device available as sink?

2022-01-02 Thread Josef Wolf
On Sun, Jan 02, 2022 at 02:42:42PM +0100, Josef Wolf wrote:
> On Sun, Jan 02, 2022 at 02:02:39PM +0100, Georg Chini wrote:
> > On 02.01.22 12:32, Josef Wolf wrote:
> > >   pactl load-module module-udev-detect
> > >   pactl load-module module-combine-sink 
> > > slaves=alsa_output.0.hdmi-stereo,bluez_sink.A4_77_58_02_93_FB.a2dp_sink
> > 
> > if you load module-combine-sink without the slaves argument, it should
> > add newly appearing sinks automatically to the combine sink.
> 
> Ah!
> 
> Thanks for the hint, Georg! This works (as far as PA is concerned!)
> 
> Turns out that I mis-interpreted the cause of the problem. The real problem
> seems to lie withhin the BT stack: the BT-speaker will not reconnect
> automatically when libreelec is rebooted.

Adding

 systemctl start bluetooth
 (sleep 1; bluetoothctl connect "A4:77:58:02:93:FB") &

to the startup script solved the problem. Thanks!

But there are some noticeable sync-problems (one stream seems to be somewhat
delayed). Is this expected? I thought module-combine-sink would try to
syncronize?



-- 
Josef Wolf
j...@raven.inka.de


Re: [pulseaudio-discuss] Make paired (but not connected) BT device available as sink?

2022-01-02 Thread Josef Wolf
On Sun, Jan 02, 2022 at 02:02:39PM +0100, Georg Chini wrote:
> On 02.01.22 12:32, Josef Wolf wrote:
> >   pactl load-module module-udev-detect
> >   pactl load-module module-combine-sink 
> > slaves=alsa_output.0.hdmi-stereo,bluez_sink.A4_77_58_02_93_FB.a2dp_sink
> 
> if you load module-combine-sink without the slaves argument, it should
> add newly appearing sinks automatically to the combine sink.

Ah!

Thanks for the hint, Georg! This works (as far as PA is concerned!)

Turns out that I mis-interpreted the cause of the problem. The real problem
seems to lie withhin the BT stack: the BT-speaker will not reconnect
automatically when libreelec is rebooted.

-- 
Josef Wolf
j...@raven.inka.de


Re: [pulseaudio-discuss] Make paired (but not connected) BT device available as sink?

2022-01-02 Thread Georg Chini

On 02.01.22 12:32, Josef Wolf wrote:

Hello all,

is there any way to make paired (but currently not connected) BT devices
available as a sink? The autodetect finds only connected devices and the BT
modules don't seem to have any options to specifically create a sink e.g. by
its MAC address.

Background of the question: for Libreelec on RPi4, I want simultanous output
to HDMI-TV and to some BT-Speaker. I can achieve the desired behavior by
connecting the BT-speaker and then executing:

  pactl load-module module-udev-detect
  pactl load-module module-combine-sink 
slaves=alsa_output.0.hdmi-stereo,bluez_sink.A4_77_58_02_93_FB.a2dp_sink

Once those commands were successfully executed, I can switch the BT-speaker
off and on and PA catches up without any noticeable problems.

Unfortunately, those commands will NOT work from boot-scripts, since
module-combine-sink will error out complaining that the BT-sink is not
available.

Any ideas how to work around this?


Hi,

if you load module-combine-sink without the slaves argument, it should
add newly appearing sinks automatically to the combine sink.

Regards
   Georg



[pulseaudio-discuss] Make paired (but not connected) BT device available as sink?

2022-01-02 Thread Josef Wolf
Hello all,

is there any way to make paired (but currently not connected) BT devices
available as a sink? The autodetect finds only connected devices and the BT
modules don't seem to have any options to specifically create a sink e.g. by
its MAC address.

Background of the question: for Libreelec on RPi4, I want simultanous output
to HDMI-TV and to some BT-Speaker. I can achieve the desired behavior by
connecting the BT-speaker and then executing:

 pactl load-module module-udev-detect
 pactl load-module module-combine-sink 
slaves=alsa_output.0.hdmi-stereo,bluez_sink.A4_77_58_02_93_FB.a2dp_sink

Once those commands were successfully executed, I can switch the BT-speaker
off and on and PA catches up without any noticeable problems.

Unfortunately, those commands will NOT work from boot-scripts, since
module-combine-sink will error out complaining that the BT-sink is not
available.

Any ideas how to work around this?

-- 
Josef Wolf
j...@raven.inka.de