aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/haswell/sst-haswell-ipc.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-10-06ASoC: Intel: Remove haswell solutionCezary Rojewski1-2222/+0
Newly added catpt solution found in sound/soc/intel/catpt is a direct replacement to sound/soc/intel/haswell. It covers all features supported by it and more - by aligning to recommended flows and requirement list based on Windows driver equivalent. No harm is done to userspace as catpt - similarly to haswell - loads no extenal topology files while sharing the exact same ADSP firmware binary. Given the above, existing haswell code is redundant so remove it. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://lore.kernel.org/r/20201006064907.16277-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18Merge series "ASoC: Intel: fix cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:Mark Brown1-2/+2
This patchset tries to reduce the number of warnings on those drivers, so that cppcheck can become a viable tool to detect issues (currently hundreds of reports). Most of the problems are related to unnecessary/redundant variable assignments, prototypes and one nice logical mistake resulting in an always-true condition. Pierre-Louis Bossart (21): ASoC: Intel: Atom: sst-atom-controls: remove redundant assignments ASoC: Intel: Atom: compress: remove redundant assignment ASoC: Intel: Atom: platform-pcm: remove redundant assignment ASoC: Intel: Atom: sst: remove useless NULL assignment ASoC: Intel: Atom: remove redundant initialization ASoC: Intel: Atom: sst_pvt: remove redundant initialization ASoC: Intel: Atom: platform-pcm: fix redundant return ASoC: Intel: Atom: remove useless assignment ASoC: Intel: Atom: sst_loader: remove always-true condition ASoC: Intel: Atom: sst_pvt: simplify return handling ASoC: Intel: Atom: (cosmetic) align parameters ASoC: Intel: Baytrail: (cosmetic) align function parameters ASoC: Intel: common: (cosmetic) align function parameters ASoC: Intel: haswell: (cosmetic) align function parameters ASoC: Intel: haswell-ipc: remove redundant assignments ASoC: Intel: Skylake: skl-nhlt: remove redundant initialization ASoC: Intel: Skylake: cldma: remove redundant initialization ASoC: Intel: Skylake: sst-utils: remove redundant assignment ASoC: Intel: Skylake: skl-topology: remove redundant assignments ASoC: Intel: Skylake: skl-topology: remove redundant assignment ASoC: Intel: Skylake: (cosmetic) align function parameters sound/soc/intel/atom/sst-atom-controls.c | 4 +-- .../intel/atom/sst-mfld-platform-compress.c | 3 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 4 +-- sound/soc/intel/atom/sst-mfld-platform.h | 4 +-- sound/soc/intel/atom/sst/sst.c | 5 ++- sound/soc/intel/atom/sst/sst.h | 34 +++++++++---------- sound/soc/intel/atom/sst/sst_loader.c | 3 +- sound/soc/intel/atom/sst/sst_pvt.c | 4 +-- sound/soc/intel/baytrail/sst-baytrail-ipc.h | 3 +- sound/soc/intel/common/sst-dsp-priv.h | 2 +- sound/soc/intel/common/sst-dsp.h | 15 ++++---- sound/soc/intel/haswell/sst-haswell-ipc.c | 4 +-- sound/soc/intel/haswell/sst-haswell-ipc.h | 2 +- sound/soc/intel/skylake/cnl-sst-dsp.h | 4 +-- sound/soc/intel/skylake/skl-nhlt.c | 2 +- sound/soc/intel/skylake/skl-sst-cldma.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.h | 16 ++++----- sound/soc/intel/skylake/skl-sst-utils.c | 2 +- sound/soc/intel/skylake/skl-topology.c | 8 ++--- sound/soc/intel/skylake/skl-topology.h | 8 ++--- sound/soc/intel/skylake/skl.h | 2 +- 21 files changed, 63 insertions(+), 68 deletions(-) -- 2.25.1
2020-08-18sound/soc/intel: Fix spelling mistake "cant" --> "can't"Youling Tang1-3/+3
There is some spelling mistakes in a dev_err message. Fix it. Signed-off-by: Youling Tang <tangyouling@loongson.cn> Link: https://lore.kernel.org/r/1597299157-32221-1-git-send-email-tangyouling@loongson.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-18ASoC: Intel: haswell-ipc: remove redundant assignmentsPierre-Louis Bossart1-2/+2
Fix cppcheck warnings: sound/soc/intel/haswell/sst-haswell-ipc.c:430:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] sound/soc/intel/haswell/sst-haswell-ipc.c:1792:8: style: Variable 'id' is assigned a value that is never used. [unreadVariable] Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200813200147.61990-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-13ASoC: Intel: hsw: remove i386 build warning w/ size_t argumentPierre-Louis Bossart1-2/+2
Recent changes in the common IPC code introduced a build warning with size_t fields, use the correct %zu format. include/linux/dynamic_debug.h:82:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat=] Fixes: abf31feea26c0 ('ASoC: Intel: Update request-reply IPC model') Reported-by: kbuild test robot <lkp@intel.com> Cc: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-By: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20190812140305.17570-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-07ASoC: Intel: Update request-reply IPC modelCezary Rojewski1-76/+88
struct ipc_message contains fields: header, tx_data and tx_size which represent TX i.e. request while RX is represented by rx_data and rx_size with reply's header equivalent missing. Reply header may contain some vital information including, but not limited to, received payload size. Some IPCs have entire payload found within RX header instead. Content and value of said header is context dependent and may vary between firmware versions and target platform. Current model does not allow such IPCs to function at all. Rather than appending yet another parameter to an already long list of such for sst_ipc_tx_message_XXXs, declare message container in form of struct sst_ipc_message and add them to parent's ipc_message declaration. Align haswell, baytrail and skylake with updated request-reply model and modify their reply processing functions to save RX header within message container. Despite the range of changes, status quo is achieved. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20190723144341.21339-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner1-10/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'YueHaibing1-7/+1
Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable] It is never used since introduction in commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-03ASoC: Intel: Haswell: assign booleans to true/falsePierre-Louis Bossart1-1/+1
Detected with Coccinelle Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-27ASoC: intel: remove unused variable data and associated codeColin Ian King1-6/+0
The variable 'data' is assigned null and never re-assigned. There is also a redundant check for data being non-null which is always false, so remove this and the variable data and dma_addr as they are not used once the dead code has been removed. Detected with CoverityScan, CID#1324015 ("'Constant' variable gaurds dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30ASoC: intel: Replace kthread with workTakashi Iwai1-2/+1
The usage pattern of kthread worker in Intel SST drivers can be replaced gracefully with the normal workqueue, which is more light- weight and easier to manage in general. Let's do it. While in the replacement, move the schedule_work() call inside the spinlock for excluding the race, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-11kthread: kthread worker API cleanupPetr Mladek1-1/+1
A good practice is to prefix the names of functions by the name of the subsystem. The kthread worker API is a mix of classic kthreads and workqueues. Each worker has a dedicated kthread. It runs a generic function that process queued works. It is implemented as part of the kthread subsystem. This patch renames the existing kthread worker API to use the corresponding name from the workqueues API prefixed by kthread_: __init_kthread_worker() -> __kthread_init_worker() init_kthread_worker() -> kthread_init_worker() init_kthread_work() -> kthread_init_work() insert_kthread_work() -> kthread_insert_work() queue_kthread_work() -> kthread_queue_work() flush_kthread_work() -> kthread_flush_work() flush_kthread_worker() -> kthread_flush_worker() Note that the names of DEFINE_KTHREAD_WORK*() macros stay as they are. It is common that the "DEFINE_" prefix has precedence over the subsystem names. Note that INIT() macros and init() functions use different naming scheme. There is no good solution. There are several reasons for this solution: + "init" in the function names stands for the verb "initialize" aka "initialize worker". While "INIT" in the macro names stands for the noun "INITIALIZER" aka "worker initializer". + INIT() macros are used only in DEFINE() macros + init() functions are used close to the other kthread() functions. It looks much better if all the functions use the same scheme. + There will be also kthread_destroy_worker() that will be used close to kthread_cancel_work(). It is related to the init() function. Again it looks better if all functions use the same naming scheme. + there are several precedents for such init() function names, e.g. amd_iommu_init_device(), free_area_init_node(), jump_label_init_type(), regmap_init_mmio_clk(), + It is not an argument but it was inconsistent even before. [arnd@arndb.de: fix linux-next merge conflict] Link: http://lkml.kernel.org/r/20160908135724.1311726-1-arnd@arndb.de Link: http://lkml.kernel.org/r/1470754545-17632-3-git-send-email-pmladek@suse.com Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Petr Mladek <pmladek@suse.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Borislav Petkov <bp@suse.de> Cc: Michal Hocko <mhocko@suse.cz> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-04-06ASoC: Intel: sst: fix a loop timeout in sst_hsw_stream_reset()Dan Carpenter1-1/+1
In the original code we ended the loop with tries set to -1 instead of zero. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-14ASoC: Intel: sst: fix the IRQ locked issueLiam Girdwood1-18/+13
If driver received a message that it can't handle, it won't clear the corresponding bit and unmask interrupt, this may lock the IRQ and DSP can't send message anymore. To fix the issue, we should Always update IMRX after IPC. Here we always clear the DONE/BUSY bit and unmask the IRQ source, even when IPC failures have occurred previously. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Modified-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-23Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/doc', 'asoc/fix/fsl-card', 'asoc/fix/fsl-ssi', 'asoc/fix/intel' and 'asoc/fix/maintainers' into asoc-linusMark Brown1-8/+12
2015-09-09ASoC: intel: Fix SSP port configuration after RTD3 resume.Liam Girdwood1-8/+12
Currently the SSP port settings are being clobbered as part of the DSP RTD3 restore logic. make sure we save the correct params and restore them at resume. The FW sadly does not save SSP settings as part of the PM context. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29ASoC: Intel: haswell: fix initialize 'NULL device *' issueJie Yang1-0/+2
Add initialization for sst_hsw.dev at init stage, which fix the 'NULL device *' warning issues. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22ASoC: Intel: Initialize max mailbox size for haswellSubhransu S. Prusty1-0/+3
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-22ASoC: Intel: Move the busy check to ops for HSWSubhransu S. Prusty1-0/+9
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: Intel: Remove invalid kfree of devm allocated dataJin Yao1-1/+0
kbuild robot reports following warning: "sound/soc/intel/haswell/sst-haswell-ipc.c:2204:1-6: WARNING: invalid free of devm_ allocated data" As julia explains to me, the memory allocated with devm_kalloc is freed automatically on failure of a probe function. So this kfree should be removed otherwise the double free will be got in error handler path. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-12ASoC: Intel: fix array_size.cocci warningskbuild test robot1-1/+1
sound/soc/intel/haswell/sst-haswell-ipc.c:646:28-29: WARNING: Use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Semantic patch information: This makes an effort to find cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Generated by: scripts/coccinelle/misc/array_size.cocci CC: Jie Yang <yang.jie@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: Intel: Use the generic IPC/mailbox APIs in BroadwellJin Yao1-295/+87
Use the generic IPC/mailbox APIs to replace the original processing code for Broadwell platform. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-06ASoC: Intel: create haswell folder and move haswell platform files inJie Yang1-0/+2428
Restructure the sound/soc/intel/ directory: create haswell folder, and move haswell platform files here. Signed-off-by: Jie Yang <yang.jie@intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>