src.bluetooth_sig.registry.core.coding_format

Coding Format registry for Bluetooth SIG audio codec definitions.

Used during LE Audio codec negotiation to identify codec types (LC3, mSBC, etc.) in capability exchange and stream configuration.

Attributes

Name

Description

coding_format_registry

logger

Classes

Name

Description

CodingFormatRegistry

Registry for Bluetooth audio coding formats with lazy loading.

Module Contents

class src.bluetooth_sig.registry.core.coding_format.CodingFormatRegistry

Bases: bluetooth_sig.registry.base.BaseGenericRegistry[bluetooth_sig.types.registry.coding_format.CodingFormatInfo]

Registry for Bluetooth audio coding formats with lazy loading.

This registry loads coding format definitions from the official Bluetooth SIG assigned_numbers YAML file, providing codec identification for LE Audio and Classic Audio profiles.

Examples

>>> from bluetooth_sig.registry.core.coding_format import coding_format_registry
>>> info = coding_format_registry.get_coding_format_info(0x06)
>>> info.name
'LC3'
get_all_coding_formats() dict[int, bluetooth_sig.types.registry.coding_format.CodingFormatInfo]

Get all registered coding formats (lazy loads on first call).

Returns:

Dictionary mapping coding format values to CodingFormatInfo objects

get_coding_format_by_name(name: str) bluetooth_sig.types.registry.coding_format.CodingFormatInfo | None

Get coding format info by name (lazy loads on first call).

Parameters:

name – Coding format name (case-insensitive, e.g., “LC3”, “mSBC”)

Returns:

CodingFormatInfo object, or None if not found

get_coding_format_info(value: int) bluetooth_sig.types.registry.coding_format.CodingFormatInfo | None

Get coding format info by value (lazy loads on first call).

Parameters:

value – The coding format value (e.g., 0x06 for LC3)

Returns:

CodingFormatInfo object, or None if not found

is_known_coding_format(value: int) bool

Check if coding format is known (lazy loads on first call).

Parameters:

value – The coding format value to check

Returns:

True if the coding format is registered, False otherwise

src.bluetooth_sig.registry.core.coding_format.coding_format_registry
src.bluetooth_sig.registry.core.coding_format.logger