From: Ralph Ronnquist Date: Sat, 29 Apr 2023 07:10:49 +0000 (+1000) Subject: skip distributing the lsp file as such X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=c1a953379adc1e1491aad330d675608b9f2d15b0;p=rrq%2Fnewlisp%2Falsa-dispatcher.git skip distributing the lsp file as such --- diff --git a/Makefile b/Makefile index 658b7c7..9d91011 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ clean:: rm -f alsa-dispatcher alsa-dispatcher.8.gz # Installation building -BINS = alsa-dispatcher alsa-dispatcher.lsp +BINS = alsa-dispatcher MANS = alsa-dispatcher.8.gz CFG = 51-alsa-dispatcher.conf diff --git a/alsa-dispatcher.8.adoc b/alsa-dispatcher.8.adoc index 43c28a9..0ea690b 100644 --- a/alsa-dispatcher.8.adoc +++ b/alsa-dispatcher.8.adoc @@ -9,36 +9,35 @@ endpoints. == SYNOPSIS -*alsa-dispatcher.lsp* +*alsa-dispatcher* == DESCRIPTION -*alsa-dispatcher.lsp* is an ALSA utility that handles dispatch of -audio playback via a priority list of possible endpoints. The dispatch -logic works through the list trying to open each ALSA PCM device in -order until one succeeds, and thereafter *alsa-dispatcher.lsp* simply +*alsa-dispatcher* is an ALSA utility that handles dispatch of audio +playback via a priority list of possible endpoints. The dispatch logic +works through the list trying to open each ALSA PCM device in order +until one succeeds, and thereafter *alsa-dispatcher* simply channels the playback audio stream from its standard input to the successfully opened PCM playback device. -The program is a _newlisp_ script of manageable size which links up -with _libasound.so_ for ALSA API actions. - -The setup for using *alsa-dispatcher.lsp* includes two configuration +The setup for using *alsa-dispatcher* includes two configuration aspects: 1. The ALSA configuration needs to be augmented with a _pcm_ block - that directs playback to *alsa-dispatcher.lsp* and capture from, say, + that directs playback to *alsa-dispatcher* and capture from, say, _plughw_ (i.e., the primary sound card). - 2. The priority list of possible endpoints for *alsa-dispatcher.lsp* + 2. The priority list of possible endpoints for *alsa-dispatcher* is a text file named _$HOME/.alsa-dispatcher_. === ALSA configuration (e.g. $HOME/.asoundrc) The ALSA configuration collection needs to include a declaration for *alsa-dispatcher* as an ALSA PCM by means of a short declaration in -the user's _$HOME/.asoundrc_ file or system-wide in -_/etc/asoundrc.conf_ The following is an example _$HOME/.asoundrc_. +the user's _$HOME/.asoundrc_ file or system-wide (e.g +_/etc/asoundrc.conf_ or _/etc/alsa/conf.d/51-alsa-dispatcher.conf_) + +The following is an example _$HOME/.asoundrc_. ---- pcm.!default dispatch @@ -49,7 +48,7 @@ pcm.dispatch { pcm { type plug slave { - pcm "file:|exec /usr/bin/alsa-dispatcher.lsp" + pcm "file:|exec /usr/bin/alsa-dispatcher" format S16_LE; channels 2; rate 48000; } } @@ -62,19 +61,19 @@ The first line in the example asserts that "dispatch" is the default PCM. I.e. that playback directed to "default" should be passed on to "dispatch". -The lines below that declares the "dispatch" PCM to have its playback -stream directed to the command _/usr/local/bin/alsa-dispatcher.lsp_ -via a pipe (that is where *alsa-dispatcher.lsp* is for this example), +The lines below declares the "dispatch" PCM to have its playback +stream directed to the command _/usr/local/bin/alsa-dispatcher_ +via a pipe (that is where *alsa-dispatcher* is for this example), and the "dispatch" PCM capture stream is sourced from _plughw_ (i.e. the default sound card). Note that the playback PCM explicitly declares the stream characteristica (format, channels and rate) used up by -*alsa-dispatcher.lsp*. +*alsa-dispatcher*. === About $HOME/.alsa-dispatcher -The endpoints are enumerated for *alsa-dispatcher.lsp* in a text file +The endpoints are enumerated for *alsa-dispatcher* in a text file _$HOME/.alsa-dispatcher_ with one line for each PCM device. The line contains PCM name and optionally setting variations for that device, in the form of _key=value_. Currently only _latency_ may be varied. @@ -95,20 +94,23 @@ should have priority when in use, next a USB sound card _usb_ as secondary option when in use, and thirdly the default sound card _plughw_. -Thus, *alsa-dispatcher.lsp* will try to direct playback to _bt_ first. -If that is not in use *alsa-dispatcher.lsp* tries to direct playback -to _usb_ and if the is not in use either, then *alsa-dispatcher.lsp* -directs playback to _plughw_ (i.e. the default sound card). +Thus, *alsa-dispatcher* will try to direct playback to _bt_ first. If +that is not in use *alsa-dispatcher* tries to direct playback to _usb_ +and if the is not in use either, then *alsa-dispatcher* directs +playback to _plughw_ (i.e. the default sound card). == NOTES -*alsa-dispatcher.lsp* keeps playback channeling to a selected endpoint -as long as that is available. If the endpoint goes away, or the -*alsa-dispatcher.lsp* program is killed, that channeling is -interrupted. Then the original sound source (eg a browser) may -establish a new playback sink, which would caue a new -*alsa-dispatcher.lsp* to run through the priority list again to pick -the first option available in the then current audio context. +*alsa-dispatcher* keeps playback channeling to a selected endpoint as +long as that is available. If the endpoint goes away, or the +*alsa-dispatcher* program is killed, that channeling is interrupted. +Then the original sound source (eg a browser) may establish a new +playback sink, which would caue a new *alsa-dispatcher* to run through +the priority list again to pick the first option available in the then +current audio context. + +The program is an embedded _newlisp_ script of manageable size that +links up with _libasound.so_ for ALSA API actions. == SEE ALSO diff --git a/debian/alsa-dispatcher.links b/debian/alsa-dispatcher.links deleted file mode 100644 index 38846c4..0000000 --- a/debian/alsa-dispatcher.links +++ /dev/null @@ -1 +0,0 @@ - alsa-dispatcher.8.gz usr/share/man/man8/alsa-dispatcher.lsp.8.gz