editorial
[rrq/newlisp/alsa-dispatcher.git] / README.adoc
1 = alsa-dispatcher
2 :author: Ralph Ronnquist
3 :revdate: Sun, 30 Apr 2023 19:33:59 +1000
4
5 This project implements a dispatcher for ALSA playback for dynamic
6 selection of output device. The idea is to direct playback when it
7 starts to the first output from the user's priority list that is
8 available at that time.
9
10 For instances, you might have three different output devices sometimes
11 available:
12
13   1. a bluetooth headset
14   2. a USB soundcard for wall speakers, and
15   3. a built-in soundcard for desktop speakers.
16
17 and want them to selected in that priority order. I.e. playback should
18 be directed to the bluetooth headset, if connected; otherwise to the
19 USB soundcard, if plugged in; and otherwise to the built-in soundcard.
20
21 Ordinarily it will take some editing of ~/.asoundrc to explicitly
22 select output device for a program before it starts, and them that
23 program will keep using that setup onwards.
24
25 *alsa-dispatcher* provides that dynamic selection based on the user's
26 priority list without need of editing or playback program restart. By
27 this solution, there is a dynamic link in the playback chain that
28 applies the dispatch logic whenever a program starts playback anew.
29 Thus, the output device is decided depending on what is available when
30 the playback starts, or more specifically whenever a program opens an
31 output sink to start or to continue playback.
32