summaryrefslogtreecommitdiff
path: root/sound/soc/intel/catpt
AgeCommit message (Collapse)AuthorFilesLines
2022-08-17Revert "devcoredump: remove the useless gfp_t parameter in dev_coredumpv and ↵Greg Kroah-Hartman1-1/+1
dev_coredumpm" commit 38a523a2946d3a0961d141d477a1ee2b1f3bdbb1 upstream. This reverts commit 77515ebaf01920e2db49e04672ef669a7c2907f2 as it causes build problems in linux-next. It needs to be reintroduced in a way that can allow the api to evolve and not require a "flag day" to catch all users. Link: https://lore.kernel.org/r/20220623160723.7a44b573@canb.auug.org.au Cc: Duoming Zhou <duoming@zju.edu.cn> Cc: Brian Norris <briannorris@chromium.org> Cc: Johannes Berg <johannes@sipsolutions.net> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-17devcoredump: remove the useless gfp_t parameter in dev_coredumpv and ↵Duoming Zhou1-1/+1
dev_coredumpm [ Upstream commit 77515ebaf01920e2db49e04672ef669a7c2907f2 ] The dev_coredumpv() and dev_coredumpm() could not be used in atomic context, because they call kvasprintf_const() and kstrdup() with GFP_KERNEL parameter. The process is shown below: dev_coredumpv(.., gfp_t gfp) dev_coredumpm(.., gfp_t gfp) dev_set_name kobject_set_name_vargs kvasprintf_const(GFP_KERNEL, ...); //may sleep kstrdup(s, GFP_KERNEL); //may sleep This patch removes gfp_t parameter of dev_coredumpv() and dev_coredumpm() and changes the gfp_t parameter of kzalloc() in dev_coredumpm() to GFP_KERNEL in order to show they could not be used in atomic context. Fixes: 833c95456a70 ("device coredump: add new device coredump class") Reviewed-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/df72af3b1862bac7d8e793d1f3931857d3779dfd.1654569290.git.duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-05ASoC: Intel: catpt: Drop redundant enum constantCezary Rojewski1-3/+1
CATPT_SSP_IFACE_LAST is being used only to calculate CATPT_SSP_COUNT. Make CATPT_SSP_COUNT part of the enum directly and remove the redundant constant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220403141647.1037173-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-08ASoC: Intel: catpt: use asoc_substream_to_rtd()Lianjie Zhang1-3/+3
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Lianjie Zhang <zhanglianjie@uniontech.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220307151939.32870-1-zhanglianjie@uniontech.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-17ASoC: Intel: catpt: Streamline locals declaration for PCM-functionsCezary Rojewski1-16/+16
Group all the catpt_xxx structs together in PCM related functions so they look more cohesive. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211216115743.2130622-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-17ASoC: Intel: catpt: Reduce size of catpt_component_open()Cezary Rojewski1-3/+2
With some improved if-logy, function's size can be reduced slightly. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211216115743.2130622-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-17ASoC: Intel: catpt: Test dmaengine_submit() result before moving onCezary Rojewski1-2/+12
After calling dmaengine_submit(), the submitted transfer descriptor belongs to the DMA engine. Pointer to that descriptor may no longer be valid after the call and should be tested before awaiting transfer completion. Reported-by: Kevin Tian <kevin.tian@intel.com> Suggested-by: Dave Jiang <dave.jiang@intel.com> Fixes: 4fac9b31d0b9 ("ASoC: Intel: Add catpt base members") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20211216115743.2130622-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-02-03ASoC: Intel: catpt: remove unneeded semicolonYang Li1-1/+1
Eliminate the following coccicheck warning: ./sound/soc/intel/catpt/pcm.c:355:2-3: Unneeded semicolon Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/1612166481-121376-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-28catpt: Switch to use list_entry_is_head() helperAndy Shevchenko1-7/+5
Since we got list_entry_is_head() helper in the generic header, we may switch catpt to use it. It removes the need in additional variable. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201214172138.44267-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-16Merge tag 'acpi-5.11-rc1' of ↵Linus Torvalds2-12/+1
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to upstream revision 20201113, fix and clean up some resources manipulation code, extend the enumeration and gpio-line-names property documentation, clean up the handling of _DEP during device enumeration, add a new backlight DMI quirk, clean up transaction handling in the EC driver and make some assorted janitorial changes. Specifics: - Update ACPICA code in the kernel to upstream revision 20201113 with changes as follows: * Add 5 new UUIDs to the known UUID table (Bob Moore) * Remove extreaneous "the" in comments (Colin Ian King) * Add function trace macros to improve debugging (Erik Kaneda) * Fix interpreter memory leak (Erik Kaneda) * Handle "orphan" _REG for GPIO OpRegions (Hans de Goede) - Introduce resource_union() and resource_intersection() helpers and clean up some resource-manipulation code with the help of them (Andy Shevchenko) - Revert problematic commit related to the handling of resources in the ACPI core (Daniel Scally) - Extend the ACPI device enumeration documentation and the gpio-line-names _DSD property documentation, clean up the latter (Flavio Suligoi) - Clean up _DEP handling during device enumeration, modify the list of _DEP exceptions and the handling of it and fix up terminology related to _DEP (Hans de Goede, Rafael Wysocki) - Eliminate in_interrupt() usage from the ACPI EC driver (Sebastian Andrzej Siewior) - Clean up the advance_transaction() routine and related code in the ACPI EC driver (Rafael Wysocki) - Add new backlight quirk for GIGABYTE GB-BXBT-2807 (Jasper St Pierre) - Make assorted janitorial changes in several ACPI-related pieces of code (Hanjun Guo, Jason Yan, Punit Agrawal)" * tag 'acpi-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (40 commits) ACPI: scan: Fix up _DEP-related terminology with supplier/consumer ACPI: scan: Drop INT3396 from acpi_ignore_dep_ids[] ACPI: video: Add DMI quirk for GIGABYTE GB-BXBT-2807 Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" ACPI: scan: Add PNP0D80 to the _DEP exceptions list ACPI: scan: Call acpi_get_object_info() from acpi_add_single_object() ACPI: scan: Add acpi_info_matches_hids() helper ACPICA: Update version to 20201113 ACPICA: Interpreter: fix memory leak by using existing buffer ACPICA: Add function trace macros to improve debugging ACPICA: Also handle "orphan" _REG methods for GPIO OpRegions ACPICA: Remove extreaneous "the" in comments ACPICA: Add 5 new UUIDs to the known UUID table resource: provide meaningful MODULE_LICENSE() in test suite ASoC: Intel: catpt: Replace open coded variant of resource_intersection() ACPI: processor: Drop duplicate setting of shared_cpu_map ACPI: EC: Clean up status flags checks in advance_transaction() ACPI: EC: Untangle error handling in advance_transaction() ACPI: EC: Simplify error handling in advance_transaction() ACPI: EC: Rename acpi_ec_is_gpe_raised() ...
2020-12-15Merge branches 'acpi-resources' and 'acpi-docs'Rafael J. Wysocki2-12/+1
* acpi-resources: Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks" resource: provide meaningful MODULE_LICENSE() in test suite ASoC: Intel: catpt: Replace open coded variant of resource_intersection() ACPI: watchdog: Replace open coded variant of resource_union() PCI/ACPI: Replace open coded variant of resource_union() resource: Add test cases for new resource API resource: Introduce resource_intersection() for overlapping resources resource: Introduce resource_union() for overlapping resources resource: Group resource_overlaps() with other inline helpers resource: Simplify region_intersects() by reducing conditionals * acpi-docs: Documentation: ACPI: enumeration: add PCI hierarchy representation Documentation: ACPI: _DSD: enable hyperlink in final references Documentation: ACPI: explain how to use gpio-line-names
2020-11-25ASoC: Intel: catpt: Replace open coded variant of resource_intersection()Andy Shevchenko2-12/+1
Since we have resource_intersection() helper, let's utilize it here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-11-19ASoC: Intel: catpt: add dynamic selection of DSP driverPierre-Louis Bossart1-0/+12
Follow PCI example and stop the probe when another driver is desired for the same ACPI HID. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201112223825.39765-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-17Merge Intel catpt DSP fixes into asoc-5.10Mark Brown1-5/+4
2020-11-17Merge series "ASoC: Intel: catpt: Offload fixes and code optimization" from ↵Mark Brown4-123/+74
Cezary Rojewski <cezary.rojewski@intel.com>: First two of the series address bugs connected mainly to offload streams: - scenarios with very low buffer sizes: RESET_STREAM IPC timeouts - fix lp clock selection when switching between PAUSE <-> RESUME states: glitches on first offload when no additional stream is opened simultaneously Follow ups are: code reduction and optimization oriented patches. This has been foretold in: [PATCH v10 00/14] ASoC: Intel: Catpt - Lynx and Wildcat point https://www.spinics.net/lists/alsa-devel/msg116440.html Note: LPT power up/down sequences might get aligned with WPT once enough testing is done as capabilities are shared for both DSPs. First, optimize applying of user settings - prevent redundand calls from happening - and then as mentioned above, streamline power on/off sequence for LPT and WPT. Cezary Rojewski (5): ASoC: Intel: catpt: Skip position update for unprepared streams ASoC: Intel: catpt: Correct clock selection for dai trigger ASoC: Intel: catpt: Optimize applying user settings ASoC: Intel: catpt: Streamline power routines across LPT and WPT ASoC: Intel: catpt: Cleanup after power routines streamlining sound/soc/intel/catpt/core.h | 10 ++- sound/soc/intel/catpt/device.c | 18 +++--- sound/soc/intel/catpt/dsp.c | 56 ++-------------- sound/soc/intel/catpt/pcm.c | 113 ++++++++++++++++----------------- 4 files changed, 74 insertions(+), 123 deletions(-) -- 2.17.1 base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec
2020-11-16ASoC: Intel: catpt: Cleanup after power routines streamliningCezary Rojewski2-50/+0
With LPT switching to WPT-based power on/off routines, functions that have been previously used by it are rendered redundant so remove them. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Streamline power routines across LPT and WPTCezary Rojewski3-16/+18
There is no need for separate power on/off routines for LPT and WPT as as the protocol is shared for both platforms. Make WPT routines generic and reuse them in LPT case too. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Optimize applying user settingsCezary Rojewski1-52/+52
Initial user settings such as volume control need to be applied only once after stream is allocated. As prepare() operation can be invoked multiple times during the stream's lifetime, relocate catpt_dai_apply_usettings() and call it directly within catpt_dai_hw_params() rather than on every catpt_dai_prepare(). catpt_dai_apply_usettings() remains unchanged. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Correct clock selection for dai triggerCezary Rojewski1-5/+2
During stream start DSP firmware requires LPCS disabled as that moment in time is resource heavy. Currently high-clock is selected on start of second stream onwards while low-clock is re-selected before stream actually leaves RESUME state i.e. PAUSE_STREAM call. Fix this by always updating clock before RESUME_STREAM and directly after PAUSE_STREAM. Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-16ASoC: Intel: catpt: Skip position update for unprepared streamsCezary Rojewski1-0/+2
Playing with very low period sizes may lead to timeouts when awaiting RESET_STREAM reply for offload streams. This is caused by NOTIFY_POSITION appearing in the middle of trigger(stop). Stream is unprepared during trigger(stop) where PAUSE_STREAM IPC gets invoked. However, all data that is already mixed in DSP firmware's mixer stream will still be played regardless of the pause. For offload streams, this means possibility for another NOTIFY_POSITION to process. Keep these notifications in check by only handling them when stream is in prepared state. Fixes: a126750fc865 ("ASoC: Intel: catpt: PCM operations") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201116133332.8530-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-02ASoC: Intel: remove unneeded semicolonTom Rix2-3/+3
A semicolon is not needed after a switch statement. Signed-off-by: Tom Rix <trix@redhat.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201101171943.2305030-1-trix@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-14ASoC: Intel: catpt: Relax clock selection conditionsCezary Rojewski1-3/+6
Stress tests show that DSP may occasionally be late with signaling WAIT state when all pins are made use of simultaneously plus start/stop (pause) gets involved. While this isn't tied to standard audio scenarios where only System Pin (playback and capture) is involved, ensure user is not hindered when playing with more advanced scenarios. >From DSP perspective, clock acts as a resource: low clock equals less resources, high clock more resources. Relax clock selection procedure so only low -> high switch is allowed when awaiting WAIT signal times out. Once active stream count decreases, DSP will have more time internally to adjust thus low clock selection becomes possible again. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201012103221.30759-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-14ASoC: Intel: catpt: Wake up device before configuring SSP portCezary Rojewski1-0/+10
catpt_dai_pcm_new() invoked during new PCM runtime creation configures SSP by sending IPC to DSP firmware. For that to succeed device needs to be up and running. While components default probing behavior - snd_soc_catpt causing machine board module to load just after it - needs no changes, machine board's module may be unloaded and re-loaded at a different time e.g.: when catpt is already asleep. Wake device explicitly in catpt_dai_pcm_new() to ensure communication is established before sending any IPCs, enabling those advanced scenarios in the process. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201012103221.30759-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-08ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabledCezary Rojewski1-2/+5
module_is_live() is available only when CONFIG_MODULES is enabled. Replace its usage with try_module_get() which is present regardless of said config's status. Fixes: 7a10b66a5df9 ("ASoC: Intel: catpt: Device driver lifecycle") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20201007135701.20372-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: Select catpt and deprecate haswellCezary Rojewski1-0/+6
Prevent sound/soc/intel/haswell code compile and select catpt instead as a recommended solution. Userspace-exposed members are compatible with what is exposed by deprecated solution thus no harm is done. The only visible difference is the newly added 'Loopback Mute' kcontrol. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: Simple sysfs attributesCezary Rojewski3-0/+58
Add sysfs entries for displaying version of FW currently in use as well as dumping full FW information including build and log-providers hashes. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: Event tracingCezary Rojewski3-0/+97
Define tracing macros for easy catpt debug. These cover all IPC message types: requests, replies and notifications. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: Device driver lifecycleCezary Rojewski1-0/+348
Implement ACPI device probing and removal functions as well as handlers for its PM capabilities. Device probing also takes care of enumerating ADSP subsystem components. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: PCM operationsCezary Rojewski4-0/+1226
DSP designed for Lynxpoint and Wildcat Point offers no dynamic topology i.e. all pipelines are already defined within firmware and host is relegated to allocing stream for predefined pins. This is represented by 'catpt_topology' member. Implementation covers all available pin types: - system playback and capture - two offload streams - loopback (reference) - bluetooth playback and capture PCM DAI operations differentiate between those pins as some (mainly offload) are to be handled differently - DSP expects wp updates on each notify_position notification. System playback has no volume control capability as it is routed to mixer stream directly. Other primary streams - capture and two offloads - offer individual volume controls. Compared to sound/soc/intel/haswell this configures SSP device format automatically on pcm creation. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: Firmware loading and context restoreCezary Rojewski2-0/+631
For Lynxpoint and Wildcat Point solution, is it host's responsibility to allocate SRAM regions and ensure those already taken are not overwritten with other data until released. Blocks are transferred to SRAM - either IRAM or DRAM - via DW DMA controller. Once basefw is booted, ownership of DMA transfer is lost in favour of DSP. Hosts reponsibilities don't end on initial block allocation and binary transfer. During Dx transitions host must store FW runtime context from DRAM before putting AudioDSP subsystem into lower power state. Said context gets flashed after D0 entry to bring DSP right where it was just before suspending. Load and restore procedures are finalized with SRAM power gating and adequate clock level selection. This power gates unused EBBs and clock speed effectively reducing power consumption. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: Define DSP operationsCezary Rojewski2-0/+368
Implement dsp lifecycle functions such as core RESET and STALL, SRAM power control and LP clock selection. This also adds functions for handling transport over DW DMA controller. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: Add IPC message handlersCezary Rojewski4-0/+425
Declare global and stream IPC message handlers for all known message types. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: catpt: Implement IPC protocolCezary Rojewski4-1/+691
Implement IRQ handlers for immediate and delayed replies and notifications. Communication is synchronous and allows for serialization of maximum one message at a time. DSP may respond with ADSP_PENDING status for a request - known as delayed reply - and when situation occurs, framework keeps the lock and awaits upcoming response through IPCD channel which is handled in bottom-half. Immediate replies spawn no BH at all as their processing is very short. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-02ASoC: Intel: Add catpt base membersCezary Rojewski4-0/+449
Declare base structures, registers and extension routines for the catpt solution. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200929141247.8058-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>