forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a log backend that maintains a ringbuffer in coordination with cAVS HDA. The DMA channel is expected to be given some time after the logger starts so a seperate step to initialize the dma channel is required. Signed-off-by: Tom Burdick <[email protected]>
- Loading branch information
Showing
15 changed files
with
521 additions
and
11 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (c) 2022 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef ZEPHYR_LOG_BACKEND_CAVS_HDA_H_ | ||
#define ZEPHYR_LOG_BACKEND_CAVS_HDA_H_ | ||
|
||
#include <stdint.h> | ||
|
||
/** | ||
*@brief HDA logger requires a hook for IPC messages | ||
* | ||
* When the log is flushed and written with DMA an IPC message should | ||
* be sent to inform the host. This hook function pointer allows for that | ||
*/ | ||
typedef void(*cavs_hda_log_hook_t)(uint32_t written); | ||
|
||
/** | ||
* @brief Initialize the cavs hda logger | ||
* | ||
* @param hook Function is called after each hda flush in order to | ||
* inform the Host of DMA log data. This hook may be called | ||
* from multiple CPUs and multiple calling contexts concurrently. | ||
* It is up to the author of the hook to serialize if needed. | ||
* It is guaranteed to be called once for every flush. | ||
* @param channel HDA stream (DMA Channel) to use for logging | ||
*/ | ||
void cavs_hda_log_init(cavs_hda_log_hook_t hook, uint32_t channel); | ||
|
||
#endif /* ZEPHYR_LOG_BACKEND_CAVS_HDA_H_ */ |
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
Oops, something went wrong.