Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions app/boards/intel_adsp/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ config DAI_INTEL_DMIC
config DAI_INTEL_SSP
default y

config INTEL_ADSP_IPC
default y

config INTEL_ADSP_TIMER
default y

Expand Down
2 changes: 0 additions & 2 deletions app/boards/intel_adsp_ace30_ptl_sim.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ CONFIG_SOF_LOG_LEVEL_INF=n
CONFIG_SOF_LOG_LEVEL_OFF=y
CONFIG_ZEPHYR_LOG=n

CONFIG_INTEL_ADSP_IPC=y


# Temporary disabled options
CONFIG_PM_DEVICE_RUNTIME=n
Expand Down
4 changes: 2 additions & 2 deletions src/include/sof/ipc/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ int ipc_dai_data_config(struct dai_data *dd, struct comp_dev *dev);
*/
void ipc_boot_complete_msg(struct ipc_cmd_hdr *header, uint32_t data);

#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_INTEL_ADSP_IPC)
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)
/**
* @brief Send an IPC response to Host power transition request informing
* that power transition failed.
Expand All @@ -186,7 +186,7 @@ void ipc_boot_complete_msg(struct ipc_cmd_hdr *header, uint32_t data);
* IPC task but during power transition logic in the Idle thread.
*/
void ipc_send_failed_power_transition_response(void);
#endif /* CONFIG_PM_DEVICE && CONFIG_INTEL_ADSP_IPC */
#endif /* CONFIG_PM_DEVICE && CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC */
/**
* \brief Send a IPC notification that FW has hit
* a DSP notification.
Expand Down
14 changes: 8 additions & 6 deletions src/ipc/ipc-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

#include <zephyr/kernel.h>
#include <zephyr/ipc/ipc_service.h>
#ifdef CONFIG_INTEL_ADSP_IPC
#ifdef CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC
#include <zephyr/ipc/backends/intel_adsp_host_ipc.h>
#endif
Comment on lines +16 to +18
#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
#include <intel_adsp_ipc.h>
#endif

Expand Down Expand Up @@ -97,7 +99,7 @@ static void sof_ipc_receive_cb(const void *data, size_t len, void *priv)
k_spin_unlock(&ipc->lock, key);
}

#ifdef CONFIG_PM_DEVICE
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)
/**
* @brief IPC device suspend handler callback function.
* Checks whether device power state should be actually changed.
Expand Down Expand Up @@ -179,7 +181,7 @@ static int ipc_device_resume_handler(const struct device *dev, void *arg)
#endif
return 0;
}
#endif /* CONFIG_PM_DEVICE */
#endif /* CONFIG_PM_DEVICE && CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC */

#if CONFIG_DEBUG_IPC_COUNTERS

Expand Down Expand Up @@ -328,7 +330,7 @@ int platform_ipc_init(struct ipc *ipc)
if (ret < 0)
return ret;

#if defined(CONFIG_PM) && defined(CONFIG_INTEL_ADSP_IPC)
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is replacing CONFIG_PM with CONFIG_PM_DEVICE intentional or a mistake?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG_PM_DEVICE  makes the registration guard exactly match the definitions it references and the backend API it invokes: https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/ipc/backends/intel_adsp_host_ipc.h#L138-L162

intel_adsp_ipc_set_suspend_handler(INTEL_ADSP_IPC_HOST_DEV,
ipc_device_suspend_handler, ipc);
intel_adsp_ipc_set_resume_handler(INTEL_ADSP_IPC_HOST_DEV,
Expand All @@ -338,7 +340,7 @@ int platform_ipc_init(struct ipc *ipc)
return 0;
}

#ifdef CONFIG_INTEL_ADSP_IPC
#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
static bool ipc_wait_complete(const struct device *dev, void *arg)
{
k_sem_give(arg);
Expand All @@ -358,4 +360,4 @@ void ipc_platform_wait_ack(struct ipc *ipc)

intel_adsp_ipc_set_done_handler(INTEL_ADSP_IPC_HOST_DEV, NULL, NULL);
}
#endif /* CONFIG_INTEL_ADSP_IPC */
#endif /* CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE */
4 changes: 2 additions & 2 deletions src/ipc/ipc4/handler-kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ __cold void ipc_boot_complete_msg(struct ipc_cmd_hdr *header, uint32_t data)
header->ext = 0;
}

#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_INTEL_ADSP_IPC)
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)
__cold void ipc_send_failed_power_transition_response(void)
{
struct ipc4_message_request *request = ipc_from_hdr(&msg_data.msg_in);
Expand All @@ -461,7 +461,7 @@ __cold void ipc_send_failed_power_transition_response(void)

ipc_msg_send_direct(&msg_reply, NULL);
}
#endif /* defined(CONFIG_PM_DEVICE) && defined(CONFIG_INTEL_ADSP_IPC) */
#endif /* defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC) */

__cold void ipc_send_panic_notification(void)
{
Expand Down
Loading