Skip to content

Commit 1f7116a

Browse files
wjablon1lgirdwood
authored andcommitted
ipc4: base_fw: Request empty Astate table
Improve IPC4 compatibility in respect to the Astate table that is received by FW as a part of set_large_config IPC. The table contains maximal KCPS thresholds, one for each supported clock source. Currently SOF FW performs autonomous management of clock sources and does not take such a configuration into account. Despite this, FW reports through get_large_config its support for 3 elements of Astate table. This change sets the supported Astate table size to 0. Also, as a corner case, a trivial handler is added for handling the empty table. Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
1 parent d065d54 commit 1f7116a

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/audio/base_fw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,10 @@ __cold static int basefw_set_large_config(struct comp_dev *dev, uint32_t param_i
681681
assert_can_be_cold();
682682

683683
switch (param_id) {
684+
case IPC4_ASTATE_TABLE:
685+
/* Trivial handler due to an empty Astate Table requested in get_large_config */
686+
STATIC_ASSERT(IPC4_MAX_CLK_STATES == 0, IPC4_NON_ZERO_ASTATE_UNSUPPORTED);
687+
return IPC4_SUCCESS;
684688
case IPC4_DMA_CONTROL:
685689
return basefw_dma_control(first_block, last_block, data_offset, data);
686690
case IPC4_PERF_MEASUREMENTS_STATE:

src/include/ipc4/base_fw.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
#ifndef __SOF_IPC4_BASE_FW_H__
1818
#define __SOF_IPC4_BASE_FW_H__
1919

20-
/* Three clk src states :low power XTAL, low power ring
21-
* and high power ring oscillator
20+
/* SOF FW performs autonomous management of clock sources.
21+
* Set MAX_CLK_STATES to 0 in order to propagate this information through IPC and thus
22+
* prevent reception of unsupported clock configuration.
2223
*/
23-
#define IPC4_MAX_CLK_STATES 3
24+
#define IPC4_MAX_CLK_STATES 0
2425

2526
/* Max src queue count count supported by ipc4 */
2627
#define IPC4_MAX_SRC_QUEUE 8

0 commit comments

Comments
 (0)