0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ubuntu 20.04 の QjackCtl の ALSA を bluetooth に接続

Posted at

試しにやろうとしたら、手こずったので、載せておきます。
bluealsa をインストールした上で動作させる前に、 PlusAudio の module-bluetooth-discover をアンロードする必要があります。

システム
Intel® Core™ i7-8700 CPU @ 3.20GHz × 12
NVIDIA Corporation TU104 [GeForce RTX 2080]
Ubuntu 20.04.2 LTS
bluetoothスピーカー BOSE mini Ⅱ SoundLink
アプリ
QjackCtl 0.9.3 : url 最新をメイクしました。
MusE 4.0 : url .AppImageを使用しました。
bluez-alsa : url 最新をメイクしました。
* bluez-alsa のインストールについては、たくさん出てますが、[ココのREADME.md](https://github.com/Arkq/bluez-alsa) の通りで動きました。 ## 作業内容 ・bluetoothスピーカーが「切断」されていることを確認。 ・PlusAudio の module-bluetooth-discover をアンロードする。
この操作はOSやアプリの状態で、固まってしまう場合がありますので、PlusAudio と pacmdコマンドを理解した上で作業してください。: PlusAudio : PlusAudioのモジュール
cmd
pacmd unload-module module-bluetooth-discover

・aplay コマンドで、デバイスの存在をを確認。

cmd
aplay -L | grep bluealsa

・bluealsa を実行。(デーモンで動かす場合は、wiki 参照)

cmd
sudo bluealsa -p a2dp-source

・ループに入ったら、bluetoothスピーカーを接続。
ここで、bluealsa: D: ../../src/bluez.c:1004: Adding new Stream End-Point: xx:xx:xx:xx:xx:xx: SBC と表示されればOK、ダメな場合は、「not Available」とかと出てくる。
なお、xx:xx:xx:xx:xx:xxは、bluetoothctl devicesで出てきます。(コマンドの詳細は、ココ

・テスト

cmd
aplay -D bluealsa:DEV=xx:xx:xx:xx:xx:xx hogehoge.wav

xx:xx:xx:xx:xx:xxは、上記の通り。

・QjackCtl を起動し「設定」の「出力デバイス」に先程 aplay コマンドで確認したbluealsaというデバイス名を設定して、おわり。

・終了後は、module-bluetooth-discover をロードし、PlusAudioをもとに戻しておいてください。
pacmd load-module module-bluetooth-discover

最後に

実用的に使うには、ボリューム調整や接続切断検知など、手を加える必要があります。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?