forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASoC: Intel: avs: Add data probing requests
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>
- Loading branch information
1 parent
f7de161
commit dab8d00
Showing
4 changed files
with
178 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
// | ||
// Copyright(c) 2021-2022 Intel Corporation. All rights reserved. | ||
// | ||
// Authors: Cezary Rojewski <cezary.rojewski@intel.com> | ||
// Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com> | ||
// | ||
|
||
#include "avs.h" | ||
#include "messages.h" | ||
|
||
__maybe_unused | ||
static int avs_dsp_init_probe(struct avs_dev *adev, union avs_connector_node_id node_id, | ||
size_t buffer_size) | ||
|
||
{ | ||
struct avs_probe_cfg cfg = {{0}}; | ||
struct avs_module_entry mentry; | ||
u16 dummy; | ||
|
||
avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry); | ||
|
||
/* | ||
* Probe module uses no cycles, audio data format and input and output | ||
* frame sizes are unused. It is also not owned by any pipeline. | ||
*/ | ||
cfg.base.ibs = 1; | ||
/* BSS module descriptor is always segment of index=2. */ | ||
cfg.base.is_pages = mentry.segments[2].flags.length; | ||
cfg.gtw_cfg.node_id = node_id; | ||
cfg.gtw_cfg.dma_buffer_size = buffer_size; | ||
|
||
return avs_dsp_init_module(adev, mentry.module_id, INVALID_PIPELINE_ID, 0, 0, &cfg, | ||
sizeof(cfg), &dummy); | ||
} | ||
|
||
__maybe_unused | ||
static void avs_dsp_delete_probe(struct avs_dev *adev) | ||
{ | ||
struct avs_module_entry mentry; | ||
|
||
avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry); | ||
|
||
/* There is only ever one probe module instance. */ | ||
avs_dsp_delete_module(adev, mentry.module_id, 0, INVALID_PIPELINE_ID, 0); | ||
} |