summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release v1.2.7v1.2.7Jaroslav Kysela2022-05-311-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: nhlt plugin: second attempt to fix the .so linkingJaroslav Kysela2022-05-311-0/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: nhlt plugin: fix the .so linkingJaroslav Kysela2022-05-311-2/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsamixer: add alsamixer.rc.example fileJaroslav Kysela2022-05-312-1/+193
| | | | | | Fixes: https://github.com/alsa-project/alsa-utils/issues/112 From: Bertram Felgenhauer / int-e / github Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: plugins: nhlt: fix intel dmic mode calculationJaska Uimonen2022-05-311-4/+4
| | | | | | | | | | | Dmic find_modes function was used with same sampling rate for both fifo a and b parameter calculations. This bug was found in testing two simultaneous dmic dais in topology. Fix this by introducing a sampling rate argument for find_modes. Fixes: https://github.com/alsa-project/alsa-utils/pull/148 Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* aplay: Fix for arecord recording ghost dataAmadeusz Sławiński2022-05-312-4/+4
| | | | | | | | | | When recording we should only write the amount of data read to output file instead of copying whole buffer. This fixes glitches appearing at the end of recorded file, when stopping recording. Fixes: https://github.com/alsa-project/alsa-utils/pull/150 Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsactl: implement 'info' commandJaroslav Kysela2022-05-105-1/+273
| | | | | | | It may be useful to collect the basic sound card information. The output is in the YAML structured syntax (human and machine readable). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: add missing nhlt headers to Makefile.amJaroslav Kysela2022-05-031-0/+14
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: add missing pre-process-external.h to Makefile.amJaroslav Kysela2022-05-031-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* github workflow: add libtoolize call for alsa-utilsJaroslav Kysela2022-05-031-0/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* aplay: fix a typo in warning (inaudiable -> inaudible)Matthias Braun2022-05-031-1/+1
| | | | | | From: Matthias Braun (https://github.com/mb720) Fixes: https://github.com/alsa-project/alsa-utils/pull/143 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: do not pass pre_processor_defs to pre_process_plugins()Jaroslav Kysela2022-05-031-5/+4
| | | | | | | This parameter is not used. Link: https://github.com/alsa-project/alsa-utils/pull/129 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: plugins - add Intel nhlt encoder pluginJaska Uimonen2022-05-0326-2/+5369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Intel nhlt acpi table encoder plugin into topology2.0 processing. Nhlt internal structure is defined in: https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf Nhlt acpi table contain vendor specific binary data blobs that are used in some Intel dsp platforms for configuring the dmic and ssp hardware. The function of this code is mainly to generate the vendor specific binary blobs, but as there is existing nhlt parser code and header in kernel there's no point of re-inventing the container: just use the existing nhlt acpi table format. Basically this code is creating similar nhlt acpi table that you would get from: cat /sys/firmware/acpi/tables/NHLT This code will have implementation for dmic and ssp endpoints. Thus the code will translate the topology dai tokens into vendor specific binary blobs and pack them into nhlt acpi table. Ssp and dmic code is lifted from Sound Open Firmware (sof) code base, thus it will have BSD-3 license. This plugin can be enabled from command line with: alsatplg -DPREPROCESS_PLUGINS="nhlt" -c foo.conf -p -o bar.tplg You can also dump the nhlt binary into a file with additional define: -DNHLT_BIN="nhlt.bin" Link: https://github.com/alsa-project/alsa-utils/pull/129 Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: add simple topology plugin mechanismJaska Uimonen2022-05-033-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple plugin interface for processing the topology tree. There can be cases where parts of the topology need to be translated from the original format into something else. For example one could calculate some kind of filter coefficients from filter parameters or some other binary interface parameters from plain text topology tokens. Mechanism is similar as in alsa-plugins and in the plugin there should be only 1 function exported of the form: int _snd_topology_##pluginname##_process (snd_config_t *input, snd_config_t *output) Input and output parameters are snd_config tree before and after topology2 pre-processing. So the plugin can modify both if needed. There are cases where the plugin may need to get information from input tree, but make modifications to the output. The plugins to be used can be defined in command line with: alsatplg -DPREPROCESS_PLUGINS="foobar" -c topology.conf -p -o topology.tplg Multiple plugins should be separated by ":". Plugins to be used can also be defined with "Define" clause inside the topology file (but command line takes precedence): Define { PREPROCESS_PLUGINS "foobar" } Link: https://github.com/alsa-project/alsa-utils/pull/129 Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsactl: add locking for per-card initializationJaroslav Kysela2022-02-026-12/+79
| | | | | | | | | | | Introduce the -K,--lock-dir parameter to specify the locking directory. If the locking is active, files card<NUM>.lock are used to serialize the multiple initialization requests (udev, service). Allow the relative -O,--lock-file argument (it's default now). Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsactl: lock - use alarm signal and F_SETLKW rather pollingJaroslav Kysela2022-02-011-7/+34
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsactl: remove unused argument for state_lock_()Jaroslav Kysela2022-02-011-3/+3
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsactl: add dbg() prints to init_ucm()Jaroslav Kysela2022-02-011-1/+6
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: pre-processor: fix seg fault when there no command line definesRanjani Sridharan2022-01-281-11/+14
| | | | | | | | | In case there are not command line definitions, there is nothing to merge or delete. Fixes: https://github.com/alsa-project/alsa-utils/pull/141 Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: use a copy of the command line definesJaroslav Kysela2022-01-281-11/+17
| | | | | Fixes: a9b3525 ("topology: don't fail when Define section is missing in the included file") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: don't fail when Define section is missing in the included fileJaroslav Kysela2022-01-281-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: create Define subtree for command line defines onlyJaroslav Kysela2022-01-281-0/+7
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: the includes should be deleted not removedJaroslav Kysela2022-01-281-2/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsamixer: Revert has_mouse() checkTakashi Iwai2022-01-281-1/+2
| | | | | | | | | has_mouse() function of ncurses doesn't seem working reliably. Revert the previous change for addressing the regressions. Fixes: 31820c5f239f ("alsamixer: Check the availability of mouse") BugLink: https://github.com/alsa-project/alsa-utils/issues/139 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: use cached Define subtree in pre_process_includes()Jaroslav Kysela2022-01-281-6/+5
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: fix the define section merge from the included filesJaroslav Kysela2022-01-281-26/+37
| | | | | | | | | | | The bellow commit assumed that the merge of the included file is to the main configuration tree, but it's for the subtree. The Define compound from the included file must be handled separately. Link: https://github.com/alsa-project/alsa-utils/pull/140 Fixes: e1a0711 ("topology: fix the command line define merge for new includes") Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: fix the comment for improved -D optionJaroslav Kysela2022-01-281-0/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: add support for multiple -D argumentsJaroslav Kysela2022-01-271-2/+22
| | | | | | It may be useful in the makefile rules for example. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: pre-process-object: expand variables before validating attributesRanjani Sridharan2022-01-271-25/+100
| | | | | | | | | | | | With the introduction of variables in the topology files, validation of attributes values must be done after they are expanded to their defined values. Also, since valid values for attributes in the class definition can also be variables, they need to be expanded as well. So, first expand the attribute values and then check them against expanded valid values. Fixes: https://github.com/alsa-project/alsa-utils/pull/138 Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* speaker-test: remove sample_map.csv from MakefileJaroslav Kysela2022-01-271-5/+0
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: rename function free_pre_preprocessor to free_pre_processorJaroslav Kysela2022-01-273-5/+5
| | | | | | Line up this name with others. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: optimization for pre_processor_defs parsingJaroslav Kysela2022-01-272-39/+66
| | | | | | | | | | Parse the configuration tree only one time and then reuse it for the merge. Also, do not pass inc_path to all functions - add it to the pre-processor structure. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: merge the pre-processor call to one functionJaroslav Kysela2022-01-271-22/+29
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: fix the command line define merge for new includesJaroslav Kysela2022-01-272-13/+21
| | | | | | | | The defines from the command line must overwrite the defines from the included configuration files forcefully. Link: https://github.com/alsa-project/alsa-utils/pull/129 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsactl: flush stdout for monitor commandAlex Xu (Hello71)2022-01-271-0/+1
| | | | | | | | It may be useful to pipe the output to another program. Fixes: https://github.com/alsa-project/alsa-utils/pull/109 Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsactl: fix typo in comment in 00mainJaroslav Kysela2022-01-271-1/+1
| | | | | Fixes: https://github.com/alsa-project/alsa-utils/issues/132 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* speaker-test: remove sample_map.csvJaroslav Kysela2022-01-271-2/+0
| | | | | | | | | | The CSV file is not used. The .wav file names are fixed in the source code, but the directory may be specified using --wavdir. Remove this file until there's a demand for the more precise .wav file mapping. Fixes: https://github.com/alsa-project/alsa-utils/issues/133 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: don't allow to mix verbose level and output to stdoutJaroslav Kysela2022-01-271-0/+6
| | | | | Fixes: https://github.com/alsa-project/alsa-utils/issues/131 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* alsamixer: Fix regression in color setupTakashi Iwai2022-01-204-7/+18
| | | | | | | | | | The recent change to add the background config broke the color setup via the config file due. Fix the regression by restoring the initialization order back again, and changing the logic for the default background color to be re-initializing color pairs instead. Link: https://github.com/alsa-project/alsa-utils/issues/137 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* alsactl: fix the error path in set_controls()Jaroslav Kysela2022-01-031-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: pre-processor: Move the call to expand variablesRanjani Sridharan2021-12-197-179/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* topology: fix the file permissions for the generated filesJaroslav Kysela2021-12-121-1/+1
| | | | | | | | The owner r/w file permissions are too restrictive. Let umask do it's work and set the r/w permissions to any. Fixes: https://github.com/alsa-project/alsa-utils/issues/126 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: define -I option only for alsa-lib 1.2.6+Jaroslav Kysela2021-12-081-2/+6
| | | | | Link: https://github.com/alsa-project/alsa-utils/pull/125 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: Add option to pass include path for conditional includesRanjani Sridharan2021-12-081-7/+17
| | | | | | | | | The include path passed with -I option will override the relative include path based on the source file. Fixes: https://github.com/alsa-project/alsa-utils/pull/125 Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: fix the include path parsingJaroslav Kysela2021-12-071-2/+6
| | | | | | | When the last '/' is not found use '.' as the source path. Fixes: https://github.com/alsa-project/alsa-utils/issues/123 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Release v1.2.6v1.2.6Jaroslav Kysela2021-12-061-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* amidi: remove unused variableJaroslav Kysela2021-12-061-1/+0
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: fix compilation for older alsa-libJaroslav Kysela2021-12-062-2/+18
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: change include pathJaroslav Kysela2021-12-063-25/+42
| | | | | | | | | | | Add support for relative (based on the path from the parsed configuration file) and absolute include path without ALSA_CONFIG_DIR environment variable usage. The dependency on the alsa-lib config tree may be added on demand. Link: https://github.com/alsa-project/alsa-utils/pull/117 Link: https://github.com/alsa-project/alsa-utils/issues/118 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* topology: pre-processor: Add support for conditional includesRanjani Sridharan2021-12-061-0/+210
| | | | | | | | | | | | | | | | Add a new keyword "IncludeByKey" that will be used to conditional include configuration files based on the argument value supplied during build time. For example: IncludeByKey.DMIC_CH_COUNT { "[1-4]" "include/platform/intel/dmic-generic.conf" } The above config will include the dmic-generic.conf file if the argument value for DMIC_CH_COUNT is between 1 and 4. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>