summaryrefslogtreecommitdiffstats
path: root/doc/pulseaudio.dox
blob: 2ac19a967fd2090ebb31fd53377f76e723fe79e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/** \page page_pulseaudio PulseAudio Compatibility

# Internals - Mapping Between ALSA and Streams

This explains the mapping between alsa cards and streams and session manager
objects.

## ALSA Cards

An ALSA card is exposed as a PipeWire device.

## Streams

Each ALSA PCM is opened and a node is created for each PCM stream.


# Session Manager

## ALSA UCM

The mapping of the PipeWire object hierarchy to the ALSA object hierarchy is the following:

One PipeWire device is created for every ALSA card.

- For each UCM verb, a node is created for the associated PCM devices.
- For each UCM verb, an endpoint is created.

In a first step: For each available combination of UCM device and modifier,
a stream is created. Streams are marked with compatible other streams.

Streams with the same modifier and mutually exclusive devices are grouped
into one stream and the UCM devices are exposed on the endpoint as destinations.

## ALSA Fallback

Each PCM stream (node) becomes an endpoint. The endpoint references the
ALSA device ID.

Each endpoint has one stream (for now) called HiFi Playback / HiFi Capture.

More streams can be created depending on the format of the node.

## ALSA Pulse UCM

Using the ALSA backend of PulseAudio we can create the following streams.

## ALSA Pulse Fallback

The pulse ALSA backend will use the mixer controls and some probing to
create the following nodes and endpoints.


# PulseAudio

PulseAudio uses the session manager API to construct cards with profiles
and sink/source with ports.

If an endpoint references a device, a card object is created for the device.

Each endpoint becomes a sink/source.

Each Stream in the endpoint becomes a profile on the PulseAudio card. Because
only one profile is selected on the device, only one stream is visible on
the endpoint. This clashes with the notion that multiple streams can be
active at the same time but is a PulseAudio limitation.

Each Endpoint destination becomes a port on the sink/source.

*/