summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* pcm_plug: Clear plugins on all error conditionsMichael Forney2016-10-201-1/+3
| | | | | | | | | Otherwise, they will linger after the error is returned (but pcm->setup == 0). Then, if the caller tries to clean up and call snd_pcm_close(), the assertion plug->gen.slave == plug->req_slave will fail. Signed-off-by: Michael Forney <mforney@mforney.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf/ucm: skylake: add skylake-rt286 conf filesVinod Koul2016-10-107-1/+235
| | | | | | | | | | | This add the UCM conf files for skylake enabling I2S audio, HDMI and DMIC ports. Signed-off-by: Karthik D M <karthik.d.m@intel.com> Signed-off-by: Nishit Sharma <nishitx.sharma@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ctl: correct documentation about TLV featureTakashi Sakamoto2016-09-301-10/+10
| | | | | | | | From my misunderstanding, some explanations are wrong. This commit corrects them. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ctl: improve documentation about TLV-related APIsTakashi Sakamoto2016-09-301-0/+21
| | | | | | | | | The documentation gives no hints to users about format of TLV data. This commit add hints to construct/parse the information. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ctl: improve API documentation for TLV operationTakashi Sakamoto2016-09-301-3/+3
| | | | | | | | | | | | A commit fe1b08803db6 ("ctl: improve API documentation for threshold level operations") changes documentations for some TLV-related APIs with wrong explanations. This commit fix it with better explanations. Fixes: fe1b08803db6 ("ctl: improve API documentation for threshold level operations") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* test: use actual information for TLV operationTakashi Sakamoto2016-09-301-36/+178
| | | | | | | | | | | Currently, this test program uses undefined type of TLV data. This can bring confusions to userspace applications. This commit replaces the array with valid information, constructed by newly exported TLV macros from kernel land. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Update include/sound/tlv.h from 4.9-pre kernel uapiTakashi Sakamoto2016-09-301-0/+77
| | | | | | | | | | The UAPI header in 4.9-pre kernel newly includes existent macros related to tlv operation, mainly for layout of TLV packet payload. This commit updates corresponding backport header in this library. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: docs: typeset lists of identifiers explicitlyAntonio Ospite2016-09-291-28/+29
| | | | | | | | | | | | | | | | Doxygen doesn't preserve formatting that relies only on indentation, typeset lists of identifiers explicitly. This makes the HTML docs a lot more readable. This change comes along the lines of commit 72aa0f8332fb ("ucm: reformat snd_use_case_get() doc"). Some TABs has been added too in order to preserve the aligned look when reading the source code. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: fix crash when calling snd_use_case_geti() with no device or modifierAntonio Ospite2016-09-291-0/+8
| | | | | | | | | | | | | | | | | When calling snd_use_case_geti(uc_mgr, "_devstatus", &lvalue) the code ends up calling device_status(uc_mgr, NULL), which result in a crash in strcmp(dev->name, NULL), when there are enabled devices. This happens because snd_use_case_geti() allows a "_devstatus" identifier even if it's only supposed to allow the form "_devstatus/{device}". So check that the device name is not null. The same issue occurs with "_modstatus", this change fixes that as well. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: Better understandable locking codeTakashi Iwai2016-09-023-11/+34
| | | | | | | | | | | | | | | | | The newly added locking code seems to have confused quite a few people, as "thread_safe=1" may be considered as if the thread-safety lock has to be turned on. (It meant that the plugin _is_ thread-safe, i.e. it needs no extra locking.) For avoiding such a misunderstanding, this commit renames the relevant pcm fields and give more comments to explain what is for what. The former single pcm->thread_safe flag is now split to two boolean flags, pcm->need_lock and pcm->lock_enabled. It consumes a few more bytes, but this would be (hopefully) better understandable. No functional change by this commit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: bxtrt298: Add topology conf file for bxtShreyas NC2016-08-304-1/+3329
| | | | | | | | | Add the conf file for bxt platform as well to define module private data. Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: sklrt286: Remove tool to generate private data blobsShreyas NC2016-08-3025-2154/+0
| | | | | | | | | | | | Since tuples are used to define driver private data, the private data blobs are no longer required. So, remove the source files required to generate the private data blobs and the private data blobs. Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: sklrt286: define module private data through tuples in skylakeShreyas NC2016-08-302-37/+2659
| | | | | | | | | | | | | | | | | In the conf file, module private data can be described through tuples instead of blobs defined by vendor defined structures. This patch defines the tuple section and the token list. The tokens are then used to build the tuple array. The module data may have both driver data and firmware data. The driver data is passed using the tuple array and the firmware data using byte data. A descriptor tuple array is defined to describe the succeeding data block. Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: Fix shm initialization race-conditionIsmael Luceno2016-08-221-2/+3
| | | | | | | | | | | Easily seen when two threads try at the same time, one of them will fail. The bug was identified by using apulse with Skype. Fixes: dec428c35221 ("pcm: fix 'unable to create IPC shm instance' caused by fork from a thread") Fixes: https://github.com/i-rinat/apulse/issues/38 Signed-off-by: Ismael Luceno <ismael@iodev.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: Fix rounding mode documentationDavid Henningsson2016-08-221-6/+6
| | | | | | | | | The documentation specifies three different rounding modes, but this is wrong, because they all end up calling snd_tlv_convert_from_dB, which only has two rounding modes. Signed-off-by: David Henningsson <diwic@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Add ucm files for DB410c board.Srinivas Kandagatla2016-08-106-1/+230
| | | | | | | | | | | | | | | | | | | | | DB410c board has support for both Digital and Analog audio. Digital audio is over HDMI and analog is over codec chip integrated inside the APQ8016 SOC. It can support: - 3 Microphones: Primary Mic(Handset mic), Headset Mic and Secondary - 2 Digital Microphones. - Earpiece. - Headset. - Loud Speaker. - HDMI. [Riku: squashed Srinivas's patches together and converted spaces to tabs] Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Cc: nicolas.dechesne@linaro.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Release v1.1.2v1.1.2baserock/v1.1.2Jaroslav Kysela2016-08-021-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Makefile: fix sklrt286 dist filesJaroslav Kysela2016-08-021-0/+2
|
* topology: Fix the missing referenced elem ptr when merging private dataMengdong Lin2016-07-251-1/+5
| | | | | | | | | tplg_copy_data() should set the valid referenced data element pointer on success. The caller will double check this pointer for all kinds of references, including controls and data. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Fix inaccurate message on failure to find a widgets's referenceMengdong Lin2016-07-251-1/+1
| | | | | | | | A widget may have references to control or data elements. So the message should not only use "control" here. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ctl: use condition statements instead of assert() for new APIs to add an ↵Takashi Sakamoto2016-07-201-5/+19
| | | | | | | | | | | | | | | element set Usage of assert() is not better practice of programming as shared library APIs. They should return appropriate error code to promote applications to handle error state. This commit applies condition statements with return value of -EINVAL, instead of assert(). As a backward compatibility for existent applications, old APIs still call assert(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Check address and length before string copyMengdong Lin2016-07-201-0/+3
| | | | | | | | | | elem_copy_text() is widely used for string copy in topology. Because some name fields are not mandatory for users, sometimes the source can be invalid and we should not do the copy. So we add check here. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Add ATTRIBUTE_UNUSED for unused parameters to fix compiler warningMengdong Lin2016-07-201-4/+4
| | | | | | | | | | | | | | | | | | | | This commit adds ATTRIBUTE_UNUSED to the unused parameter 'tplg' for function tplg_parse_streams() and tplg_parse_fe_dai(). These two functions need to keep 'tplg' as ops for tplg_parse_compound(). The compiler warnings below are fixed: pcm.c: In function 'tplg_parse_streams': pcm.c:262:43: warning: unused parameter 'tplg' [-Wunused-parameter] static int tplg_parse_streams(snd_tplg_t *tplg, snd_config_t *cfg, ^ pcm.c: In function 'tplg_parse_fe_dai': pcm.c:324:42: warning: unused parameter 'tplg' [-Wunused-parameter] static int tplg_parse_fe_dai(snd_tplg_t *tplg, snd_config_t *cfg, Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Remove support for control flag SNDRV_CTL_ELEM_ACCESS_USERMengdong Lin2016-07-201-1/+0
| | | | | | | | | | | This access flag is used to add controls from user space by ioctl. But topology only configures controls in user space and these controls will eventually be created by ASoC in kernel, so topology should not support this flag. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ctl: rename APIs to add an element set so that their names are appropriateTakashi Sakamoto2016-07-174-29/+29
| | | | | | | | | | | In this development period, some APIs have already been added. Most of them are to add an element set, while their names are not so appropriate against their feature. This is due to following to names of old APIs. This commit renames them. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Tuple type can have an extenstionMengdong Lin2016-07-172-6/+29
| | | | | | | | | | | | | | After the type specific string ("uuid", "string", "byte", "short" and "word"), users may append a string, like "uuidxxx". The topology parser will check the first few characters to get the tuple type. This can allow users to put multiple tuples of the same type into one vendor tuple section (SectionVendorTuples), e.g. parameters of multiple firmware modules. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Parse vendor private data for manifestMengdong Lin2016-07-175-2/+153
| | | | | | | | | | | In text conf file, user can define a manifest section and let it refer to private data sections, in the same syntax as other element types. The text conf file can have at most 1 manifest section. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Change uuid value to 16 separate characters in text conf fileMengdong Lin2016-07-173-15/+51
| | | | | | | | | | Previously in text conf file, the uuid value of vendor tuples is a 16-characer string. Now change it to 16 characters separated by commas, easier for users to edit it manually. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: Merge lookup for data reference into tplg_copy_data()Mengdong Lin2016-07-174-31/+34
| | | | | | | | | Code refactor to reduce function calls. Now tplg_copy_data() can look up a referenced data element and merge its data. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topology: An element can refer to multipe data sections in text conf fileMengdong Lin2016-07-175-46/+131
| | | | | | | | | | | | | | | | | Previously in text conf file, an element can only refer to one data section (SectionData). Now it can also refer to a list of data sections. Thus users can split groups of firmware parameters to multiple data sections, and put them all in the reference list. Finally, data of these data sections will be merged, in the same order as they are in the reference list, as the element's private data for kernel. We still support the original syntax of reference to a single data section. The doc is updated for the syntax extension. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from simple_event_add()Takashi Sakamoto2016-07-151-8/+7
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for simple_event_add()Takashi Sakamoto2016-07-151-2/+4
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from simple_add1()Takashi Sakamoto2016-07-151-10/+9
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for simple_add1()Takashi Sakamoto2016-07-151-9/+14
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from set_enum_item_ops()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from get_enum_item_ops()Takashi Sakamoto2016-07-151-4/+3
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from enum_item_name_ops()Takashi Sakamoto2016-07-151-6/+5
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from init_db_range()Takashi Sakamoto2016-07-151-4/+3
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for init_db_range()Takashi Sakamoto2016-07-151-2/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from selem_write_main()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for selem_write_main()Takashi Sakamoto2016-07-151-3/+6
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_route()Takashi Sakamoto2016-07-151-6/+5
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_route()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_enum()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_enum()Takashi Sakamoto2016-07-151-2/+4
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_switch_constant()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_switch()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_switch()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: remove alloca() from elem_write_volume()Takashi Sakamoto2016-07-151-5/+4
| | | | | | | | | | | | Both of alloca() and automatic variables keep storages on stack, while the former generates more instructions than the latter. It's better to use the latter if the size of storage is computable at pre-compile or compile time; i.e. just for structures. This commit obsolete usages of alloca() with automatic variables. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* mixer: change code formatting for elem_write_volume()Takashi Sakamoto2016-07-151-1/+2
| | | | | | | This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>