summaryrefslogtreecommitdiff
path: root/sound/soc/intel/avs/messages.h
AgeCommit message (Collapse)AuthorFilesLines
2024-05-06ASoC: Intel: avs: clarify Copyright informationPierre-Louis Bossart1-1/+1
For some reason a number of files included the "All rights reserved" statement. Good old copy-paste made sure this mistake proliferated. Remove the "All rights reserved" in all Intel-copyright to align with internal guidance. Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20240503140359.259762-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05ASoC: Intel: avs: Add assert_static to guarantee ABI sizesAmadeusz Sławiński1-0/+43
In order to make sure that IPC interface is stable use assert_static to check union and struct sizes that describe communication interface. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240405090929.1184068-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-04-05ASoC: Intel: avs: Silence false-positive memcpy() warningsCezary Rojewski1-2/+2
Commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") enforced strict flex array declarations. This generates false-positive in form of: "memcpy: detected field-spanning write". Avoid it by utilizing the DECLARE_FLEX_ARRAY() macro. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240405090929.1184068-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-20ASoC: Intel: avs: ICL-based platforms supportCezary Rojewski1-0/+28
Define handlers specific to cAVS 2.0 platforms, that is ICL, JSL and all other variants based on this very version of AudioDSP architecture. Most operations are inherited from their predecessors with the major difference being firmware-logging functionality - IPC request as well as debug memory windows layout have changed. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240220115035.770402-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-20ASoC: Intel: avs: Prefix SKL/APL-specific membersCezary Rojewski1-5/+5
Prefix members that are platform-specific with 'avs_' to improve code cohesiveness and reduce the chance for naming-conflics with other drivers. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240220115035.770402-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-29ASoC: Intel: avs: Use generic size definesAmadeusz Sławiński1-1/+3
Instead of using PAGE_SIZE as base of definitions in headers, use generic size defines. While x86 platforms use 4096 as page size, there are platforms which use different page sizes. Two of changed defines are for memory windows on DSP side, which have fixed size independent of host side page size. Another one is for CLDMA buffer which also doesn't need to change with page size. Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929112436.787058-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-05-22ASoC: Intel: avs: Fix declaration of enum avs_channel_configCezary Rojewski1-1/+1
Constant 'C4_CHANNEL' does not exist on the firmware side. Value 0xC is reserved for 'C7_1' instead. Fixes: 580a5912d1fe ("ASoC: Intel: avs: Declare module configuration types") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230519201711.4073845-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-26ASoC: Intel: avs: Add peakvol runtime-parameter requestsAmadeusz Sławiński1-0/+33
Peakvol module allows for setting and obtaining DSP volume as well as modifying shape and duration at which volume actually changes. Add IPC messages to expose those capabilities. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20221214185500.3896902-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-05ASoC: Intel: avs: Add data probing requestsCezary Rojewski1-0/+53
Data probing is a cAVS firmware functionality that allows for data extraction and injection directly from or to DMA stream. To support it, new functions and types are added. These facilitate communication with the firmware. Total of eight IPCs: - probe module initialization and cleanup - addition and removal of probe points - addition and removal of injection DMAs - dumping list of currently connected probe points or enlisted DMAs Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221202152841.672536-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-17ASoC: Intel: avs: Do not treat unsupported IPCs as invalidCezary Rojewski1-0/+2
Utilize NOT_SUPPORTED status code to differentiate between unsupported and invalid requests. Skip over error paths if it is the former that is communicated by the base firmware. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221010121955.718168-12-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-17ASoC: Intel: avs: APL-based platforms supportCezary Rojewski1-0/+7
Define handlers specific to cAVS 1.5+ platforms, that is, APL and similar platforms. These differ from SKL-alike ones in terms of AudioDSP firmware generation and thus the '+' suffix. Introduciton of IMR, removal of CLDMA, D0IX support and monolithic-ation of library/module code are most impactful but are not the only changes brought with this newer generation. Some generic and 1.5 operations are being re-used to reduce code size. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220516101116.190192-16-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-17ASoC: Intel: avs: SKL-based platforms supportCezary Rojewski1-0/+18
Define handlers specific to cAVS 1.5 platforms, that is SKL, KBL, AML and all other variants based on this very version of AudioDSP architecture. Most are specific to SKL-alike platforms with only skl_log_buffer_offset() being exposed and used later by younger equivalents. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220516101116.190192-15-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-17ASoC: Intel: avs: Prepare for firmware tracingCezary Rojewski1-0/+21
Firmware provides its own debug functionality. While coredump is one of these, traces are the main area of interest. kfifo is enlisted to cache log data that is being pumped to driver through SRAM. Separate DSP operations are declared as actual feature implementation differs between firmware generations. As log gathering involves usage of IPCs, add all necessary: ENABLE_LOGS and SYSTEM_TIME. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220516101116.190192-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-17ASoC: Intel: avs: Coredump and recovery flowCezary Rojewski1-0/+5
In rare occasions, under stress conditions or hardware malfunction, DSP firmware may fail. Software is notified about such situation with EXCEPTION_CAUGHT notification. IPC timeout is also counted as critical device failure. More often than not, driver can recover from such situations by performing full reset: killing and restarting ADSP. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220516101116.190192-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Declare module configuration typesCezary Rojewski1-0/+252
Declare structures and constants for all modules being part of basefw binary. These are used in streaming operations to communicate the needs of software to firmware side. While adding module types, append handler for SET_SINK_FORMAT runtime for COPIER module which allows for configuration of output pin other than the default one (0). Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-13-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Add basefw runtime-parameter requestsCezary Rojewski1-0/+179
Each module may expose a range of runtime parameters. For basefw, implement handlers for: FIRMWARE_CONFIG, HARDWARE_CONFIG and MODULES_INFO. These are used by driver to dynamically allocate resources in respect to platform details, reducing number of hardcodes and code duplications that would otherwise be needed to be defined within the driver code. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-11-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Add ROM requestsCezary Rojewski1-0/+14
ROM requests are messages initiated by Host to alter firmware early boot process. They specify whether the next boot should be a fresh start or if IMR can be used to speed things up. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-10-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Add power management requestsCezary Rojewski1-0/+15
Audio DSP supports low power states i.e.: transitions between D0 and D3 and D0-substates in form of D0i0 and D0i3. That process is a combination of core and IPC operations. Here, Dx and D0ix IPC handlers are added. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Add module management requestsCezary Rojewski1-0/+52
Firmware modules implement processing algorithms. Their lifecycle, similarly to pipelines is being controlled by IPCs: initialization, deletion and (un)binding. Modules can be configured at runtime - runtime parameters. This is done with help of LARGE_CONFIG IPCs: getter and setter. Due to firmware limitations, LARGE_CONFIG_GET handler implementation does not support retrieving payload with size larger than IPC inbox window size. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-8-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Add pipeline management requestsCezary Rojewski1-0/+48
Pipeline represents a scheduling entity. Their existence as well as their state machine is controlled through CREATE_PIPELINE, DELETE_PIPELINE and SET_PIPELINE_STATE IPCs. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Add code loading requestsCezary Rojewski1-0/+22
Before firmware and its modules can be used, they have to be loaded. Code loading process is complex and is a combination of DMA and IPC operations. Here, IPC part is being added and accounts for CLDMA and HDA mechanisms both. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-03-11ASoC: Intel: avs: Inter process communicationCezary Rojewski1-0/+170
Implement the IPC between Intel audio firmware and kernel driver. The IPC allows transmission of requests, handling of responses as well as unsolicited (i.e. firmware-generated) notifications. A subscription mechanism is added to enable different parts of the driver to register for specific notifications. The part of the DSP boot process that involves sending ROM message requires an extra step - must be followed by unstall operation of MAIN_CORE. All other types of messages do not require such specific handling, so separate set of functions is provided for sending these. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220311153544.136854-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>