summaryrefslogtreecommitdiff
path: root/alsaucm/go.sh
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2021-12-11 10:45:43 -0800
committerJaroslav Kysela <perex@perex.cz>2021-12-19 20:32:38 +0100
commit90f59671784a7e47b40485095cd66892d4840ed7 (patch)
tree6b41e771048ed344b02b07f7a6959a6628f81bc2 /alsaucm/go.sh
parent8e71fba810b87c48600191f4e2e13d0e351f73bc (diff)
downloadalsa-utils-90f59671784a7e47b40485095cd66892d4840ed7.tar.gz
topology: pre-processor: Move the call to expand variables
Remove the call to snd_config_expand_custom() to expand the top-level input config. And replace it with calls to snd_config_evaluate_string() for each non-compound config while processing individual objects. This will allow retreving variable definitions from object attribute values and global definitions. Add a new field "current_obj_cfg" to hold the current object config being pre-processed. This will facilitate adding simple math expressions for computing attribute values for objects based on other attributes. For ex: we can set the expression for buffer size as follows: buffer_size "$[($in_channels * 48) * 4]" The buffer_size attribute value will be computed with the attribute value "in_channels" based on the expression above. So if $in_channels = 2, buffer_size will be evaluated to 384. Additionally this change also permits computing attribute values based on previously computed values. For example: buffer_size "$[($in_channels * 48) * 4]" dma_buffer_size "$[$buffer_size * 2]" dma_buffer_size will be computed as 768. Note that the order of definitions for buffer_size and dma_buffer_size matters because the evaluation for dma_buffer_size depends on the evaluation of buffer_size. In order to conform to this, the tplg_object_copy_and_add_param() is modified to add attribute configs from class config to an object using snd_config_before() instead of snd_config_add(). With this change, we no longer need to set the auto_attr_updater for buffer type widget objects. So remove it. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'alsaucm/go.sh')
-rwxr-xr-xalsaucm/go.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/alsaucm/go.sh b/alsaucm/go.sh
index 1754fa2..8f1b93b 100755
--- a/alsaucm/go.sh
+++ b/alsaucm/go.sh
@@ -3,9 +3,13 @@
#GDB="gdb --args"
#GDB="strace"
#GDB="valgrind --leak-check=yes --show-reachable=yes"
-GDB="perf stat"
+#GDB="perf stat"
+PROG=./alsaucm
+PROG=/home/perex/git/pipewire/builddir/spa/plugins/alsa/spa-acp-tool
+PROG="$HOME/git/pulseaudio/build/src/daemon/pulseaudio -n -F $HOME/git/pulseaudio/build/src/daemon/default.pa -p $HOME/git/pulseaudio/build/src/modules/"
+#PROG=pulseaudio
#ALSA_CONFIG_UCM="$HOME/alsa/alsa-ucm-conf/ucm" \
ALSA_CONFIG_UCM2="$HOME/alsa/alsa-ucm-conf/ucm2" \
LD_PRELOAD="$HOME/alsa/alsa-lib/src/.libs/libasound.so" \
-$GDB ./alsaucm "$@"
+$GDB $PROG "$@"