summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release v1.1.3v1.1.3baserock/v1.1.3Jaroslav Kysela2016-12-201-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* conf: don't install smixer.conf when python is not availableJaroslav Kysela2016-12-201-0/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm: fix get_stop_threshold alsa-lib 0.9 aliasRene Rebe2016-12-151-1/+1
| | | | | | | | resurrecting some decade old code I got some crashes and noticed a typo in an old 0.9 legacy symver alias. Signed-off-by: René Rebe <rene@exactcode.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: file: update linked hw_ptr and appl_ptrAndreas Pape2016-12-141-0/+8
| | | | | | | | | | | | | | | | | | Plugin file provides no private hw_ptr and appl_ptr but instead links them to the slave pcm. If the slave pcm itself changes its hw_ptr or app_prt this needs to be done in file plugin, too. Plugin 'plug' is such a candidate changing the hw_ptr and app_ptr in hw_params call dependent on the automatically inserted plugins. ALSA unfortunately has no support for automatically updating chained pointers. A notification on pointer change seems to be prepared inside the snd_pcm_set_ptr() routine via rbptr->changed(), but it is not (yet) implemented so that we need to care for it manually. Signed-off-by: Andreas Pape <apape@de.adit-jv.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm_rate: Do not discard slave reported delay in status result.Alan Young2016-12-141-6/+44
| | | | | | | | | | | | | | | snd_pcm_rate_status() gets the underlying status from the slave PCM. This may contain a delay value that includes elements such as codec and other transfer delays. Use this as the base for the returned delay value, adjusted for any frames buffered locally (within the rate plugin). Also update snd_pcm_rate_delay() similarly. [fixed some comments by tiwai] Signed-off-by: Alan Young <consult.awy@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: fix unused-variable warnings introduced to build_link()Takashi Sakamoto2016-12-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | A function with unused automatic variables was recently introduced to this library, then compiler generates below warnings. pcm.c: In function ‘build_link’: pcm.c:213:6: warning: unused variable ‘i’ [-Wunused-variable] int i, num_hw_configs = 0, err = 0; ^ pcm.c:210:43: warning: unused variable ‘cmpnt’ [-Wunused-variable] struct snd_soc_tplg_link_cmpnt *codec, *cmpnt; ^~~~~ pcm.c:210:35: warning: unused variable ‘codec’ [-Wunused-variable] struct snd_soc_tplg_link_cmpnt *codec, *cmpnt; ^~~~~ pcm.c:209:20: warning: unused variable ‘ref_elem’ [-Wunused-variable] struct tplg_elem *ref_elem = NULL; This commit removes them. Fixes: 53f7711769d4("topology: Define a function to build a single physical DAI link") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: fix wrong document references to PCM APIs which perform direct memory ↵Takashi Sakamoto2016-12-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | access with frame copying In a design of ALSA PCM interface, for PCM frame transmission to/from kernel space, applications can select from two options; direct memory access or ioctl(2). Available options are decided depending on device capacity and machine architecture. Applications can get available options by the first entry of 'struct snd_pcm_hw_params.masks'. When the mask includes 'SNDRV_PCM_ACCESS_MMAP_xxx', applications can use direct memory access. For this use case, userspace library has two types of PCM API. One is to expose a pointer over the memory to start reading/writing PCM frames. Another is to copy PCM frames between the memory and a given buffer. Current documentation includes wrong references to these APIs to describe their advantages/disadvantages. This confuses application developers because the references indicate PCM APIs to execute ioctl(2) operation to read/write PCM frames. This commit fixes the bug. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Execute sequence of component devicesMengdong Lin2016-12-022-1/+85
| | | | | | | | | | | | | | | | | | | | | A machine device's sequence can enable or disable a component device. So when executing a machine device's sequence, the enable or disable sequence of its component devices will also be excecuted. Components don't define card device cdev in their sequences. So before executing a component device sequence, UCM manager will - store cdev defined by the sequence of its parent, the machine device; - mark itself entering 'component domain'. Then this cdev will be used to excute the sequence of the component device. When UCM manager completes executing the sequence of the component device, it will leave 'compnent domain' and reset the saved cdev to NULL. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Parse sequence of component devicesMengdong Lin2016-12-023-1/+118
| | | | | | | | | | | | | | | | | | A machine device's sequence can enable or disable a component device by keyword 'enadev' and 'disdev' followed the name of the component device. UCM sequence parser will find the component device and mark if its enable or disable sequence is needed by the parent, the machine device. New element type and struct are defined for the sequence of a component device. Component devices will be removed from the machine device list 'device_list' of a verb, since we don't want to expose them to audio servers with original API to list devices for backward compatibility. A new list 'cmpt_device_list' is used for the component devices of a verb. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Skip component directories when scanning sound card configuration filesMengdong Lin2016-12-021-1/+46
| | | | | | | | | | | | | | | | | | | | | Cards are defined by machines. DSPs embedded in SoC and off-soc codecs can be taken as components for machines, and can be reused by different machines/cards. Codec and SoC vendors can define their own UCM config files. If a codec or DSP is used by a machine, the card configuration file can include the conf file of the codec and DSP. Later patches will complete support for this feature. Two new directories will be used to store the UCM configuration files for a specific codec or DSP firmware: - /usr/share/alsa/ucm/dsps ... for DSP embedded in SoC - /usr/share/alsa/ucm/codecs ... for off-soc codecs These two directories will be skipped when UCM manager scans the card directories under /usr/share/alsa/ucm. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: dmix: Do not discard slave reported delay in status resultTakashi Iwai2016-11-291-17/+28
| | | | | | | Like the change done for dshare plugin, we can calculate the delay more precisely from the slave PCM. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: Add the PCM state checks to pluginsTakashi Iwai2016-11-293-0/+50
| | | | | | | | | | | | | | | | | | | | | I noticed that some plugin codes have no proper PCM state checks and it results in expected outcomes. For example, when snd_pcm_drain() is called for a dmix PCM after calling snd_pcm_drop(), it stalls unexpectedly. It's just because its drain callback doesn't expect the SND_PCM_SETUP state. We can fix such a bug in each place one by one, but a safer way would be to filter out all such cases commonly in the PCM API functions themselves. This patch adds the PCM state sanity checks to major API functions so that they return -EBADFD when called in the unexpected PCM states. As well as for the thread-safety extension, it'd be a question of the performance; again at this time, the hw PCM is considered as an exception, and it has pcm->own_state_check flag set, which means that the common PCM state checks are skipped. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Revert "pcm: file: Add htimestamp operation in plugin file"Takashi Iwai2016-11-291-1/+0
| | | | | | | | | | This reverts commit f8d07a7354a3fee1e30073aa7ac2efb89ef4e782. The htimestamp field was already intiailized. It was just overlooked, sorry. Suggested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: file: Add htimestamp operation in plugin fileAndreas Pape2016-11-281-0/+1
| | | | | | | | | | PCM operation htimestamp is not implemented in plugin file. Calling snd_pcm_htimestamp() on a plugin file crashes. This scenario is considered now. Signed-off-by: Andreas Pape <apape@de.adit-jv.com> Signed-off-by: Joshua Frkuska <joshua_frkuska@mentor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: dshare: Fix endless playback of bufferAnant Agrawal2016-11-281-0/+1
| | | | | | | | | On snd_pcm_drain() the slave PCM driven via plugin DSHARE is not filled with silence. Result is endless playback of buffer content until pcm is closed. In ALSA pcm dshare plugin, called do_silence method to fix the issue. Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: direct: Protect from freeing semaphore when already in useJoshua Frkuska2016-11-283-9/+13
| | | | | | | | | | | | | | In the case of dshare, dsnoop, and dmix when a device is opened twice and fails the second time, the semaphore is completely discarded. This creates dangling semaphore data. This patch removes the possibility for the semaphore to be destroyed during a typical open failure by first checking if the shared memory can be destroyed or not. If the shared memory cannot be released it means both it and the semaphore are still in use and therefore the semaphore is just released. Signed-off-by: Joshua Frkuska <joshua_frkuska@mentor.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Update physical link configurations in Broadwell text conf fileMengdong Lin2016-11-251-0/+19
| | | | | | | | | To make this conf file a better example, add configurations for the physical link "Codec", same as that defined by Intel Broadwell upstream machine driver. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Store number of strings of a text sectionMengdong Lin2016-11-244-6/+14
| | | | | | | | | | | | | Enum controls may use text elements and need the number of strings. This patch adds a text child object for a generic element. When parsing a text section from the configuation file, store the text strings and number of strings (num_items) in the text child object of the element. Reported-by: G Kranthi <gudishax.kranthikumar@intel.com> Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Merge private data before embedded controls of a widgetMengdong Lin2016-11-241-7/+15
| | | | | | | | | | For a widget ABI object, its private data sits before the embedded controls, so we should merge the private data blocks at first, and then the embedded controls. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Revise document and comments for ABI v5Mengdong Lin2016-11-222-32/+15
| | | | | | | | | | | | | Revise the obsolete content in document and comments. Here are the major changes in implementation from early phase design: - PCM object is used to configure front end DAI & DAI links, not used by physical DAI or DAI links. - No longer use separate object for backend or codec<->codec links, but use physical links to cover them. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: ABI - Add voice wake up flag for DAI linksMengdong Lin2016-11-221-0/+1
| | | | | | | | | | | | Add a new flag bit SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP to link flags. If a link is used for voice wake up, users can set this flag bit and topology will set the link's 'ignore_suspend' to true. This ABI update is backward compatible and applied in kernel. We may rename this flag when we find a better name for this. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Export physical DAIs to the binary for kernelGuneshwor Singh2016-11-224-0/+71
| | | | | | | | | | Export the physical DAI objects to the binary output file for kernel. For physical DAIs defined by the text conf file, find and merge their stream capablities and private data before exporting. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Support configuring physical DAIs by C APIGuneshwor Singh2016-11-224-0/+75
| | | | | | | | | | In addition to text conf file, physical DAIs can also be configured by C API. This patch defines the template to add physical DAI configurations from C API. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse physical DAIs in text conf fileMengdong Lin2016-11-226-0/+166
| | | | | | | | Add support for parsing physical DAIs in the text configuration file. The syntax of physical DAIs is described in document in topology.h Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: ABI - Define new types for physical DAIGuneshwor Singh2016-11-221-1/+30
| | | | | | | | | Define the type and ABI struct for physical DAIs (e.g. backend DAIs). They are new to ABI and so no backward compatibility risk. Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: ABI - Update manifest and pump ABI version to 5Mengdong Lin2016-11-221-1/+4
| | | | | | | | | | | | | | | | Pump ABI version to 5. To support physical DAIs and furture extension, add the following fields to manifest: - the count of physical DAIs. Later patches will add new ABI types for physical DAIs. - some reserved fields for new ABI objects in the future. Kerel will handle this ABI update in a backward compatible way, via patch 'ASoC: topology: Make manifest backward compatible from ABI v4'. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm_dshare: Do not discard slave reported delay in status result.Alan Young2016-11-171-17/+28
| | | | | | | | | | | | | snd_pcm_dshare_status() gets the underlying status from the slave PCM. This may contain a delay value that includes elements such as codec and other transfer delays. Use this as the base for the returned delay value, adjusted for any frames buffered locally (within the dshare plugin). Note: snd_pcm_dshare_delay() is not updated. Signed-off-by: Alan Young <consult.awy@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: Don't install smixer modules unless python is enabledTakashi Iwai2016-11-141-3/+1
| | | | | | | | | | | Currently the whole smixer stuff depends on python, so it doesn't make sense to install plugins partially when the python support is disabled. This patch changes Makefile.am not to install the smixer stuff at all when the python support is disabled via configure script. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Remove BE or CC in comments of physical links C API templateMengdong Lin2016-11-081-1/+1
| | | | | | | | | No longer use BE or CC in comments of C API template for physical links. This template can be used by Backend or Codec-to-Codec DAI links but not only for them. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse name and stream name of physical DAI linksMengdong Lin2016-11-082-1/+24
| | | | | | | | | | | | | Parse name and stream name of physical links defined by text conf file or C API. Add name and stream name to C API template of physical DAI links. These two fields will help topology kernel driver to find an existing physical link to configure, since the id of links are often the default value ZERO and useless for match. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse and build private data of physical linksMengdong Lin2016-11-082-1/+27
| | | | | | | | Users can define private data for physical links by C API or text conf file. Private data pointer is added to C API template for physical links. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse link flags of physical DAI linksMengdong Lin2016-11-082-0/+41
| | | | | | | | | Parse physical DAI link flags defined by text conf file or C API. The flag mask and flags are added to C API template for physical DAI links. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse HW configurations of physical DAI links in text conf fileMengdong Lin2016-11-085-0/+236
| | | | | | | | | Users can configure the runtime supported HW configurations of a physical link by SectionHWConfig. A physical link can refer multiple HW config sections in SectionLink. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse HW configurations of physical DAI links defined by C APIMengdong Lin2016-11-084-7/+84
| | | | | | | Add HW configurations to C API template of physical link configuration. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Define new type and section name to configure physical linksMengdong Lin2016-11-084-10/+29
| | | | | | | | | | | | | | | | | | | | Users may not use DPCM but still need to configure the physical links. So we should not only consider backend links for DPCM. - SND_TPLG_TYPE_LINK is defined to configure physical links by C API. And SND_TPLG_TYPE_BE is still supported to configure Backend links for DPCM cases. - SectionLink can be used to configure physical links in text conf file. And SectionBE is still supported to config Backend links for DPCM cases. Actually, users can use SND_TPLG_TYPE_LINK and SectionLink to configure backend links for DPCM cases, because BE links are also physical links. The parsing is same and we rename the function from tplg_parse_be to tplg_parse_link. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Rename varaibles for add physical links by C APIMengdong Lin2016-11-081-10/+14
| | | | | | | | | | | Code refactoring. When adding a physical link element from C API: - Rename "link" to "link_tpl" for physical link config template for C API users. - Rename "lk" to "link" for physical link elements created by topology internally. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: ABI - Update physical DAI link configurations to ABI v5Mengdong Lin2016-11-081-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch update physicals DAI link config to ABI v5: - Define the types and ABI struct for runtime supported hardware configs e.g. audio hardware formats. The default HW config ID will help topology to find the DAI format to set on init. Topology provides this as a fallback if such HW settings are not available in ACPI or device tree, to avoid hard code in drivers. It's only for config items that can be programmed by SW or FW, not for physical things like link connections or GPIO used for HP etc. - Add flags. The flags will be used to configure an existing physical links. - Add private data. The private data is reserved for future extension. - Add name and stream name to physical DAI links. Kernel can also use name and stream name to find an existing physical link and configure it. Kernel can handle the ABI update in a backward compatible way via patch 'ASoC: topology: Add support to configure existing physical DAI links'. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: ABI - Define DAI physical PCM data formatsMengdong Lin2016-11-081-0/+15
| | | | | | | | | | | Define DAI physical PCM data formats for user space, so users can specify the formats of backends by topology (e.g. the DAI format to set on backend link init). The kernel will also refer to these formats. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Define a function to build a single physical DAI linkMengdong Lin2016-11-083-8/+25
| | | | | | | | | | | | Code refactoring. Rename the function to build all physical links from tplg_build_link_config() to tplg_build_links(). And define a new function build_link() to build a single physical DAI link element. The function build_link() will be extended to handle more properties of a physical DAI link (e.g. backend or codec-codec link). Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Merge an element's be & cc pointer to one link pointerMengdong Lin2016-11-082-14/+7
| | | | | | | | | | | Code refactoring. Previously an element has two pointers, 'be' and 'cc', for BE (Back End) and CC (Codec-Codec) link respectively. But actually the topology tool processes BE and CC links in the same way, so these two pointers can be merged into one 'link' pointer, which can be used configure any physical links. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Use snd_config_get_bool to simplify boolean flag parsingMengdong Lin2016-11-081-4/+5
| | | | | | | | The link flags in the text conf file are boolean, so this patch uses snd_config_get_bool() to simplify the code. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: tplg_elem_lookup() checks parameter before searchingMengdong Lin2016-11-051-0/+3
| | | | | | | Check the parameters at first in case of misuse. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse and build private data for PCMMengdong Lin2016-11-052-2/+53
| | | | | | | | | | | | | Users can define private for PCM (FE DAI & DAI links) elements by both text conf file and C API: - Text conf file may define multiple data blocks for a PCM and they will be merged in building phase; - Add private data to C API template of PCM object. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Define a function to build a single PCM elementMengdong Lin2016-11-053-5/+17
| | | | | | | | | | | Code refactoring. Rename tplg_build_pcm() to tplg_build_pcms() to build all PCM (FE DAI & DAI link) elements. It will call a new function build_pcm() to build a single PCM elemement. build_pcm() will be extended to handle more properties of a PCM. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse flags for PCMMengdong Lin2016-11-052-0/+56
| | | | | | | | Users can define flags by both text conf file and C API. Add flags and flag_mask to C API template of PCM object. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse sig_bits of stream capsMengdong Lin2016-11-052-0/+2
| | | | | | | Add sig_bits to stream caps template of C API and parse it. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: ABI - Update stream caps and PCM objects to ABI v5Mengdong Lin2016-11-051-0/+9
| | | | | | | | | | | | | Here are the ABI updates for PCM (Front DAI & DAI link) objects: - add sig_bits to stream caps. - add flags and private data to PCM. The kernel can handle the ABI update in a backward compatible way with the patch "ASoC: topology: Make PCM backward compatible from ABI v4". Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Add doc for including other files in the text conf fileMengdong Lin2016-10-251-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds document about how to include other files in the text configuration files, by alsaconf syntax <xxx> and <searchdir:xxx>. Users may define common info in separate files (e.g. vendor tokens, tuples) and share them for different platforms, by including them via syntax <path/to/configuration-file>. This can save the total size of files. Users can also specifiy additional configuraiton directories relative to "/usr/share/alsa/" to search the included files, via syntax <searchdir:relative-path/to/usr/share/alsa>. The alsaconf will search and open an included file in the following order of priority: 1. directly open the file by its name; 2. search for the file name in "/usr/share/alsa"; 3. search for the file name in user specified subdirectories under "/usr/share/alsa". The order of the included files need not to be same as their dependencies, because the toplogy library will load all of them before parsing their dependencies. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: Search included files under user specified configuration directoriesMengdong Lin2016-10-251-1/+158
| | | | | | | | | | | | | | | | | | | | | | | | Users can include file by giving a relative path or just a file name via alsaconf syntax <xxx>. ALSA conf will search the file in top configuration directory and additional configuration directories defined by users via alsaconf syntax <searchdir:xxx>. ALSA conf will search and open an included file in the following order of priority: 1. directly open the file by its name; 2. search for the file name in top config direcotry "/usr/share/alsa/"; 3. search for the file name in additional configuration directories specified by users, via alsaconf syntax <searchdir:relative-path/to/user/share/alsa>; These directories will be searched in the same order as their definition. The configuration directories defined by a file will only be used to search the files included by this file. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Fix missing stream name of widgets in text conf fileMengdong Lin2016-10-252-0/+11
| | | | | | | | | | | User can define the stream name of an input/output widget in the text conf file, by setting "stream_name" of a SectionWidget. Topology C API and kernel already have support for configuring a widget's stream name. This patch just adds the missing part of the text conf file. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>