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