Skip to content

Commit

Permalink
Rename BlueALSA system service to bluealsad
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Aug 13, 2024
1 parent 7f3cf24 commit 0d17990
Show file tree
Hide file tree
Showing 33 changed files with 210 additions and 198 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/1-bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ title:
### Reproduction steps

> Provide a minimal example of how to reproduce the problem. State `bluealsa`
> Provide a minimal example of how to reproduce the problem. State `bluealsad`
> command line arguments and the content of .asoundrc file (if PCM alias with
> "type bluealsa" was added to that file).
### Setup

> - the OS distribution and version
> - the version of BlueALSA (`bluealsa --version`)
> - the version of BlueALSA (`bluealsad --version`)
> - the version of BlueZ (`bluetoothd --version`)
> - the version of ALSA (`aplay --version`)
> - if self-built from source, please state the branch and commit
Expand All @@ -31,6 +31,6 @@ title:
### Additional context

> Add any other context about the problem here, e.g. log messages printed by
> `bluealsa` and/or client application.
> `bluealsad` and/or client application.
>
> Please delete instructions prefixed with '>' to prove you have read them.
1 change: 1 addition & 0 deletions .github/spellcheck-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ BCS
bdaddr
bfr
bluealsa
bluealsad
BlueALSA's
bluetoothctl
bluetoothd
Expand Down
12 changes: 6 additions & 6 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ See the [systemd integration][] wiki page for more information.

[systemd integration]: https://github.com/arkq/bluez-alsa/wiki/Systemd-integration

If intending to run the `bluealsa` daemon as a non-root user then it is
recommended to use the `--with-bluealsauser=USER` option as this will configure
If intending to run the `bluealsad` daemon as a non-root user then it is
recommended to use the `--with-bluealsaduser=USER` option as this will configure
the BlueALSA D-Bus policy file with correct permissions for that user account,
and also include that user in the systemd service unit file when used in
combination with `--enable-systemd`.
Expand Down Expand Up @@ -135,9 +135,9 @@ the `bluealsa.service` unit at runtime. If not using `systemd`, or if the
necessary to manually create the directory used by BlueALSA for persistent
state storage. This directory should be called `bluealsa` and be located under
the system local state directory, which is normally `/var/lib`. The directory
owner must be the user account that the `bluealsa` daemon is run under, and
owner must be the user account that the `bluealsad` daemon is run under, and
to prevent accidental corruption of the state files the permissions should be
`rwx------`. For example, on a standard file hierarchy, with the `bluealsa`
`rwx------`. For example, on a standard file hierarchy, with the `bluealsad`
daemon running as user `bluealsa`:

```sh
Expand All @@ -152,11 +152,11 @@ The BlueALSA installation does not create any user accounts.

### D-Bus policy

A D-Bus policy file is required to enable the `bluealsa` daemon to register
A D-Bus policy file is required to enable the `bluealsad` daemon to register
with D-Bus as a service. The default policy file created by the BlueALSA
installation enables `root` to register the service `org.bluealsa` and enables
members of the group `audio` to use BlueALSA PCMs and the BlueALSA mixer. If
the option `--with-bluealsauser=USER` was used when configuring then the
the option `--with-bluealsaduser=USER` was used when configuring then the
policy file enables user USER instead of `root` to register the `org.bluealsa`
service. If that option was not used, then it is necessary to edit the policy
file to grant permission to a non-root user. The policy file is located at
Expand Down
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
unreleased
==========

- renamed bluealsa-cli to bluealsactl (no backward compatibility)
- renamed bluealsa to bluealsad (no backward compatibility)
- renamed bluealsa.conf to org.bluealsa.conf (no backward compatibility)
- renamed bluealsa-cli to bluealsactl (no backward compatibility)

bluez-alsa v4.3.0 (2024-08-13)
==============================
Expand Down
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Bluetooth Audio ALSA Backend

> [!WARNING]
> The latest source uses new names for some core components:
>
> * The `bluealsa` daemon is now called `bluealsad`
> * The `bluealsa-cli` utility is now called `bluealsactl`
>
> See the wiki guide [Migrating from release 4.3.0 or earlier](https://github.com/arkq/bluez-alsa/wiki/Migrating-from-release-4.3.0-or-earlier)
> for more information.
[![Build Status](https://github.com/arkq/bluez-alsa/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/arkq/bluez-alsa/actions/workflows/build-and-test.yaml)
[![Code Coverage](https://codecov.io/gh/arkq/bluez-alsa/branch/master/graph/badge.svg)](https://app.codecov.io/gh/arkq/bluez-alsa)

Expand Down Expand Up @@ -36,7 +45,7 @@ ALSA sound card support. Note this means that the applications are constrained
by the capabilities of the ALSA API, and the higher-level audio processing
features of audio servers such as PulseAudio and PipeWire are not available.

BlueALSA consists of the daemon `bluealsa`, ALSA plug-ins, and a number of
BlueALSA consists of the daemon `bluealsad`, ALSA plug-ins, and a number of
utilities. The basic context is shown in this diagram:

```mermaid
Expand All @@ -45,7 +54,7 @@ classDef external fill:#eee,stroke:#333,stroke-width:4px,color:black;
classDef bluealsa fill:#bbf,stroke:#333,stroke-width:4px,color:black;
A[Bluetooth Adapter] <--> B((bluetoothd\ndaemon))
A <--> C((bluealsa daemon))
A <--> C((bluealsad daemon))
B <--> C
C <--> D((bluealsa-aplay))
D --> E([ALSA libasound])
Expand All @@ -63,7 +72,7 @@ class A,B,E,H,I,J,K,L,M,N external;
class C,D,F,G bluealsa;
```

The heart of BlueALSA is the daemon `bluealsa` which interfaces with the BlueZ
The heart of BlueALSA is the daemon `bluealsad` which interfaces with the BlueZ
Bluetooth daemon `bluetoothd` and the local Bluetooth adapter. It handles the
profile connection and configuration logic for A2DP, HFP and HSP and presents
the resulting audio streams to applications via D-Bus.
Expand Down Expand Up @@ -99,23 +108,23 @@ Build and install instructions are included in the file

## Usage

### bluealsa daemon
### bluealsad daemon

The main component of BlueALSA is a program called `bluealsa`. By default, this
program shall be run as a root during system startup. It will register
The main component of BlueALSA is a program called `bluealsad`. By default,
this program shall be run as a root during system startup. It will register
`org.bluealsa` service in the D-Bus system bus, which can be used for accessing
configured audio devices. In general, BlueALSA acts as a proxy between BlueZ
and ALSA.

The `bluealsa` daemon must be running in order to pair, connect, and use
The `bluealsad` daemon must be running in order to pair, connect, and use
remote Bluetooth audio devices. In order to stream audio to e.g. a Bluetooth
headset, firstly one has to connect the device. If you are not familiar with
the Bluetooth pairing and connecting procedures on Linux, there is a basic
guide in the wiki:
[Bluetooth pairing and connecting](https://github.com/arkq/bluez-alsa/wiki/Bluetooth-Pairing-And-Connecting).

For details of command-line options to `bluealsa`, consult the [bluealsa manual
page](doc/bluealsa.8.rst).
For details of command-line options to `bluealsad`, consult the [bluealsad
manual page](doc/bluealsad.8.rst).

### ALSA plug-ins

Expand All @@ -140,8 +149,8 @@ the [ALSA Kernel proc interface][].
[ALSA software PCM I/O plug-in]: https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_external_plugins.html
[ALSA Kernel proc interface]: https://www.kernel.org/doc/html/latest/sound/designs/procfile.html

Setup parameters of the bluealsa PCM device can be set in the local `.asoundrc`
configuration file like this:
Setup parameters of the `bluealsa` PCM device can be set in the local
`.asoundrc` configuration file like this:

```sh
cat ~/.asoundrc
Expand Down
14 changes: 7 additions & 7 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ name `bluealsa` in addition to being able to run as `root`:
- Another instance of the BlueALSA service is already running.\
To run a second instance of the BlueALSA service, it must use a different
well-known service name. This will also require updating the BlueALSA D-Bus
policy file. See the manual page [bluealsa(8)][] for more information and an
example of running multiple `bluealsa` instances.
policy file. See the manual page [bluealsad(8)][] for more information and an
example of running multiple `bluealsad` instances.

If the D-Bus policy file is edited, then it is necessary to refresh the D-Bus
service for the change to take effect. On most systems this can be achieved
Expand All @@ -67,13 +67,13 @@ with (as `root`) :
systemctl reload dbus.service
```

[bluealsa(8)]: doc/bluealsa.8.rst
[bluealsad(8)]: doc/bluealsad.8.rst

## 2. Couldn't get BlueALSA PCM: PCM not found

In contrast to standard ALSA sound cards, BlueALSA does not expose all PCMs
right away. In the first place it is required to connect remote Bluetooth
device with desired Bluetooth profile - run `bluealsa --help` for the list
device with desired Bluetooth profile - run `bluealsad --help` for the list
of available profiles. For querying currently connected audio profiles (and
connected devices), run `bluealsa-aplay --list-devices`. The common
misconception is an attempt to use A2DP playback device as a capture one in
Expand Down Expand Up @@ -135,9 +135,9 @@ On startup, the BlueALSA service will issue warnings if some other application
has already registered the Bluetooth Audio profiles:

```text
bluealsa: W: UUID already registered in BlueZ [hci0]: 0000110a-0000-1000-8000-00805f9b34fb
bluealsa: W: UUID already registered in BlueZ [hci0]: 0000110b-0000-1000-8000-00805f9b34fb
bluealsa: W: UUID already registered in BlueZ: 0000111f-0000-1000-8000-00805f9b34fb
bluealsad: W: UUID already registered in BlueZ [hci0]: 0000110a-0000-1000-8000-00805f9b34fb
bluealsad: W: UUID already registered in BlueZ [hci0]: 0000110b-0000-1000-8000-00805f9b34fb
bluealsad: W: UUID already registered in BlueZ: 0000111f-0000-1000-8000-00805f9b34fb
```

However, as it is normal practice to start BlueALSA at boot and to start
Expand Down
20 changes: 10 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,12 @@ AC_ARG_WITH([systemdsystemunitdir],
[systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])])
AC_SUBST([SYSTEMD_SYSTEM_UNIT_DIR], [$systemdsystemunitdir])

AC_ARG_WITH([systemdbluealsaargs],
AS_HELP_STRING([--with-systemdbluealsaargs=ARGS], [bluealsa arguments to be used in
AC_ARG_WITH([systemdbluealsadargs],
AS_HELP_STRING([--with-systemdbluealsadargs=ARGS], [bluealsad arguments to be used in
bluealsa.service, defaults to '-S -p a2dp-source -p a2dp-sink' if not specified]),
[systemdbluealsaargs="${withval}"],
[systemdbluealsaargs="-S -p a2dp-source -p a2dp-sink"])
AC_SUBST([SYSTEMD_BLUEALSA_ARGS], [$systemdbluealsaargs])
[systemdbluealsadargs="${withval}"],
[systemdbluealsadargs="-S -p a2dp-source -p a2dp-sink"])
AC_SUBST([SYSTEMD_BLUEALSAD_ARGS], [$systemdbluealsadargs])

AC_ARG_WITH([systemdbluealsaaplayargs],
AS_HELP_STRING([--with-systemdbluealsaaplayargs=ARGS], [bluealsa-aplay arguments to
Expand All @@ -422,13 +422,13 @@ AC_ARG_WITH([systemdbluealsaaplayargs],
[systemdbluealsaaplayargs="-S"])
AC_SUBST([SYSTEMD_BLUEALSA_APLAY_ARGS], [$systemdbluealsaaplayargs])

AC_ARG_WITH([bluealsauser],
AS_HELP_STRING([--with-bluealsauser=USER], [set up installation to run bluealsa as user
AC_ARG_WITH([bluealsaduser],
AS_HELP_STRING([--with-bluealsaduser=USER], [set up installation to run bluealsad as user
USER, defaults to root if not specified. When used with bluez <= 5.50, USER must be a
member of the "bluetooth" group.]),
[bluealsauser="${withval}"],
[bluealsauser="root"])
AC_SUBST([BLUEALSA_USER], [$bluealsauser])
[bluealsaduser="${withval}"],
[bluealsaduser="root"])
AC_SUBST([BLUEALSAD_USER], [$bluealsaduser])

AC_ARG_WITH([bluealsaaplayuser],
AS_HELP_STRING([--with-bluealsaaplayuser=USER], [set up installation to run bluealsa-aplay
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ man7_MANS = \
org.bluealsa.PCM1.7 \
org.bluealsa.RFCOMM1.7

man8_MANS = bluealsa.8
man8_MANS = bluealsad.8

if ENABLE_CTL
man1_MANS += bluealsactl.1
Expand Down
18 changes: 9 additions & 9 deletions doc/bluealsa-aplay.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ bluealsa-aplay
==============

------------------------
a simple bluealsa player
a simple BlueALSA player
------------------------

:Date: February 2024
:Date: August 2024
:Manual section: 1
:Manual group: General Commands Manual
:Version: $VERSION$
Expand All @@ -19,7 +19,7 @@ SYNOPSIS
DESCRIPTION
===========

Capture audio streams from Bluetooth devices (via ``bluealsa(8)``) and play
Capture audio streams from Bluetooth devices (via ``bluealsad(8)``) and play
them to an ALSA playback device.

By default **bluealsa-aplay** captures audio from all connected Bluetooth
Expand Down Expand Up @@ -68,7 +68,7 @@ OPTIONS

-B NAME, --dbus=NAME
BlueALSA service name suffix.
For more information see ``--dbus=NAME`` option of ``bluealsa(8)`` service
For more information see ``--dbus=NAME`` option of ``bluealsad(8)`` service
daemon.

-D NAME, --pcm=NAME
Expand Down Expand Up @@ -110,7 +110,7 @@ OPTIONS
in the conversion between period time and period size. This can have a
significant impact on synchronization "drift", especially with small period
sizes, and can also result in stream underruns (if the effective rate is
too fast) or dropped A2DP frames in the **bluealsa(8)** server (if the
too fast) or dropped A2DP frames in the **bluealsad(8)** server (if the
effective rate is too slow). This effect is avoided if the selected period
time results in an exact integer number of frames for both the source rate
(Bluetooth) and sink rate (hardware card). For example, in the case of
Expand Down Expand Up @@ -200,7 +200,7 @@ Volume control
--------------

If the Bluetooth PCM is using BlueALSA soft-volume volume control, then volume
adjustment will have been applied to the PCM stream within the **bluealsa**
adjustment will have been applied to the PCM stream within the **bluealsad**
daemon; so **bluealsa-aplay** does not operate the mixer control in this case.

When using ``--volume=none`` or ``--volume=software``, then the mixer options
Expand All @@ -220,7 +220,7 @@ BlueZ, which has not always been reliably implemented. It is recommended to use
BlueZ release 5.65 or later to be certain that native A2DP volume control will
always be available with those devices which provide it.

See ``bluealsa(8)`` for more information on native and soft-volume volume
See ``bluealsad(8)`` for more information on native and soft-volume volume
control.

dmix
Expand Down Expand Up @@ -301,14 +301,14 @@ element will be used as a hardware volume control knob.
COPYRIGHT
=========

Copyright (c) 2016-2023 Arkadiusz Bokowy.
Copyright (c) 2016-2024 Arkadiusz Bokowy.

The bluez-alsa project is licensed under the terms of the MIT license.

SEE ALSO
========

``amixer(1)``, ``aplay(1)``, ``bluealsa-rfcomm(1)``, ``bluealsa(8)``
``amixer(1)``, ``aplay(1)``, ``bluealsa-rfcomm(1)``, ``bluealsad(8)``

Project web site
https://github.com/arkq/bluez-alsa
Loading

0 comments on commit 0d17990

Please sign in to comment.