summaryrefslogtreecommitdiffstats
path: root/Alsa-Plugin/_Alsa-Hal-plugin/README.md
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-10-24 23:33:43 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-10-24 23:33:43 +0200
commit4a17d7b114987d6f014e5041b122f9667057ca7f (patch)
tree598e2b0c04f98ce50583bdc6bbf1ff6d80c72adb /Alsa-Plugin/_Alsa-Hal-plugin/README.md
parent2fd0fa8c77dbaaf40ba0812e43b6637ff1d1d76e (diff)
Extracted from Global afb-audio repo
Diffstat (limited to 'Alsa-Plugin/_Alsa-Hal-plugin/README.md')
-rw-r--r--Alsa-Plugin/_Alsa-Hal-plugin/README.md44
1 files changed, 0 insertions, 44 deletions
diff --git a/Alsa-Plugin/_Alsa-Hal-plugin/README.md b/Alsa-Plugin/_Alsa-Hal-plugin/README.md
deleted file mode 100644
index a6fc90d..0000000
--- a/Alsa-Plugin/_Alsa-Hal-plugin/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-Hal-Plugin
-
-Object: Add virtual soft control to sound card
-Status: Proof of concept and not a usable product
-Author: Fulup Ar Foll
-Date : June-2017
-
-HAL-plugin allows:
- - to expose any existing NUMID under a customized label name, this is order to abstract sound card config.
- - to add non alsa NUMID supported through a callback mechanism (eg: volume rampdown, power off, ...)
-
-installation
- - Plugin should be placed where ever alsaplugins are located (typically: /usr/share/alsa-lib)
- - Callback sharelib directory should be declare in $LD_LIBRARY_PATH
-
-Config
-```
-cat ~/.asoundrc
- ctl.agl_hal {
- type afbhal
- devid "hw:4"
- cblib "afbhal_cb_sample.so"
- ctls {
- # ctlLabel {numid integer name "Alsa Ctl Name"}
- MasterSwitch { numid 4 name "My_First_Control" }
- MasterVol { numid 5 name "My_Second_Control" }
- CB_sample { ctlcb @AfbHalSampleCB name "My_Sample_Callback"}
- }
- pcm.agl_hal {
- type copy # Copy PCM
- slave "hw:4" # Slave name
- }
-```
-
-With such a config file
- - numid=4 from sndcard=hw:4 is renamed "My_First_Control"
- - numid=4 from sndcard=hw:4 is renamed "My_Second_Control"
- - numid=4 will call AfbHalSampleCB from afbhal_cb_sample.so
-
-Note: to really implement a usable HAL at minimum every ALSA call should be implemented and read/write of values should be normalised from 0 to 100% with a step of 1.
-
-Conclusion: This demonstrate that implementing a HAL that both abstract ALSA get/set and enable non ALSA support is possible at an acceptable cost
-without having to hack ALSA source code. The beauty of the model is than it is fully transparent to any ALSA application. The limit is that the plugin is loaded
-within every application context, thus interaction with an external event loop remains complete as well as conflict management in case of share resources.