ORG.BLUEALSA.PCM1(7)

πŸ“¦
version 4.3.1 Β· 2 versions
, in alpine 3.24, debian trixie, ubuntu questing

✨ org.bluealsa.PCM1 ✨

okay bestie, sit down, hydrate, and get comfy because we are reading the manual page for org.bluealsa.PCM1 β€” the Bluetooth Audio PCM D-Bus API πŸ’– it lives in section 7 of the manual, and it's basically the group chat between you and the bluealsa service. no cap, it's giving ✨interface✨.


🌸 SYNOPSIS 🌸

Service

org.bluealsa[.unique ID]

Interface

org.bluealsa.PCM1

Object path

[variable prefix]/{hci0,...}/dev_XX_XX_XX_XX_XX_XX/[type]/[mode]

πŸ¦‹ DESCRIPTION πŸ¦‹

so this page is all about the D-Bus PCM interface of the bluealsa(8) service 🫢 and like, what it does is give you access to the individual PCM objects that this service creates. one at a time, your own little baby PCM. iconic.

πŸŽ€ Methods πŸŽ€

  • fd, fd Open() β€” opens a BlueALSA PCM stream πŸ’… and it hands you back two file descriptors: the PCM stream PIPE and the PCM controller SEQPACKET socket. two for the price of one, we love a package deal.

Controller socket commands: "Drain", "Drop", "Pause", "Resume"

Possible Errors:

dbus.Error.InvalidArguments
dbus.Error.NotSupported
dbus.Error.Failed
  • array{string, dict} GetCodecs() β€” returns the array of additional PCM codecs 🌈 and you, the client, can switch to any one of them with the SelectCodec() D-Bus method call. choose your fighter.

The dictionary may contain the following properties:

  • array{byte} Capabilities β€” A2DP codec capabilities blob.
  • array{byte} SupportedChannels β€” List of supported number of audio channels.
  • array{uint32} SupportedSampling β€” List of supported sampling frequency.
  • void SelectCodec(string codec, dict props) β€” selects the PCM codec ⭐ okay so important thing: this call shall be made before the PCM stream is opened for the given transport type, otherwise the ongoing stream (or its PCM counterpart: sink, source) will be terminated. yes, terminated. πŸ’€ so do it in the right order, bestie, i'm begging.

For A2DP codecs, the client can override the built-in logic for selecting codec configuration by providing the configuration blob via the "Configuration" property. Provided configuration must be valid for the given codec in respect to BlueALSA and peer device capabilities. Otherwise, the call will fail. It is possible to override this validation by setting the "NonConformant" property to true. (chaotic. i respect it. πŸ™ˆ)

In case of codecs which support different number of audio channels or sampling frequencies, the client can select the desired configuration by providing the "Channels" and "Sampling" properties respectively. These properties take precedence over the provided codec configuration. they said "i'm the main character" and they meant it.

Possible Errors:

dbus.Error.InvalidArguments
dbus.Error.NotSupported
dbus.Error.Failed
  • void SetDelayAdjustment(string codec, int16 adjustment) β€” sets an arbitrary adjustment (+/-) to the reported Delay in 1/10 of millisecond for a specific codec πŸ•°οΈ this adjustment gets applied to the Delay property when that codec is selected, and it's there to compensate for devices that do not report accurate Delay values. some devices are just out here lying about time, smh.

Possible Errors:

dbus.Error.InvalidArguments
  • array{string, int16} GetDelayAdjustments() β€” returns the array of currently set delay adjustments πŸ’œ each entry of the array gives the name of a codec and the adjustment that the PCM will apply to the Delay property when that codec is selected. receipts, basically. 🧾

🌈 Properties 🌈

  • object Device [readonly] β€” BlueZ device object path.
  • uint32 Sequence [readonly] β€” this property indicates the sequence in which devices connected. the larger the value, the later the device was connected. so big number = late arrival, no judgment. 🐒
  • string Transport [readonly] β€” underlying Bluetooth transport type.

Possible values:

"A2DP-sink"
"A2DP-source"
"HFP-AG"
"HFP-HF"
"HSP-AG"
"HSP-HS"
  • string Mode [readonly] β€” PCM stream operation mode (direction).

Possible values:

"sink"
"source"
  • boolean Running [readonly] β€” this property is true when the Bluetooth transport for this PCM is acquired and able to transfer audio samples πŸ”₯ so like, it's awake, it's ready, it's serving.
  • uint16 Format [readonly] β€” stream format identifier πŸ‘‘ the highest two bits of the 16-bit identifier determine the signedness and the endianness. the next 6 bits determine the physical width of a sample in bytes. the lowest 8 bits are used to store the actual sample bit-width. bit math, my beloved.

Examples:

0x4210 - unsigned 16-bit 2 bytes big-endian
0x8418 - signed 24-bit 4 bytes little-endian
  • byte Channels [readonly] β€” number of audio channels.
  • uint32 Sampling [readonly] β€” sampling frequency.
  • string Codec [readonly] β€” Bluetooth transport codec. this property is available only when the transport codec is selected. no codec, no property, that's the rule. πŸ’…
  • array{byte} CodecConfiguration [readonly] β€” optional. Bluetooth transport codec configuration blob. this property is available only for transports which support codec configuration (e.g. A2DP).
  • uint16 Delay [readonly] β€” approximate PCM delay in 1/10 of millisecond.
  • int16 DelayAdjustment [readonly] β€” an adjustment (+/-) included within the reported Delay in 1/10 of millisecond to compensate for devices that do not report accurate delay values.
  • boolean SoftVolume [readwrite] β€” this property determines whether BlueALSA will make volume control internally, or will delegate this task to the BlueALSA PCM client or the connected Bluetooth device respectively for PCM sink or PCM source. who's holding the aux cord, essentially. 🎧
  • uint16 Volume [readwrite] β€” this property holds volume (loudness) value and mute information for channel 1 (left) and 2 (right). data for channel 1 is stored in the upper byte, channel 2 is stored in the lower byte. the highest bit of both bytes determines whether the channel is muted. 😭

Possible values:

A2DP: 0-127
SCO:  0-15

Copyright (c) 2016-2023 Arkadiusz Bokowy.

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


🫢 SEE ALSO 🫢

bluealsa-cli(1), bluealsa-plugins(5), bluealsa(8)

Project web site

<https://github.com/arkq/bluez-alsa>


and that's the whole page, bestie, you ate that πŸ’… this was BlueALSA v4.3.1, dated July 2024, signing off with a little kiss β€” go forth and open some PCM streams, but in the right order, okay? πŸŽ€βœ¨πŸŒΈ

πŸ“¦ where this page comes from