#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/slab.h>
#include <sound/hdaudio_ext.h>
#include "avs.h"
#include "messages.h"
#include "registers.h"
#include "trace.h"
#define AVS_IPC_TIMEOUT_MS …
#define AVS_D0IX_DELAY_MS …
static int
avs_dsp_set_d0ix(struct avs_dev *adev, bool enable)
{ … }
static void avs_dsp_schedule_d0ix(struct avs_dev *adev, struct avs_ipc_msg *tx)
{ … }
static void avs_dsp_d0ix_work(struct work_struct *work)
{ … }
static int avs_dsp_wake_d0i0(struct avs_dev *adev, struct avs_ipc_msg *tx)
{ … }
int avs_dsp_disable_d0ix(struct avs_dev *adev)
{ … }
int avs_dsp_enable_d0ix(struct avs_dev *adev)
{ … }
static void avs_dsp_recovery(struct avs_dev *adev)
{ … }
static void avs_dsp_recovery_work(struct work_struct *work)
{ … }
static void avs_dsp_exception_caught(struct avs_dev *adev, union avs_notify_msg *msg)
{ … }
static void avs_dsp_receive_rx(struct avs_dev *adev, u64 header)
{ … }
static void avs_dsp_process_notification(struct avs_dev *adev, u64 header)
{ … }
void avs_dsp_process_response(struct avs_dev *adev, u64 header)
{ … }
static bool avs_ipc_is_busy(struct avs_ipc *ipc)
{ … }
static int avs_ipc_wait_busy_completion(struct avs_ipc *ipc, int timeout)
{ … }
static void avs_ipc_msg_init(struct avs_ipc *ipc, struct avs_ipc_msg *reply)
{ … }
static void avs_dsp_send_tx(struct avs_dev *adev, struct avs_ipc_msg *tx, bool read_fwregs)
{ … }
static int avs_dsp_do_send_msg(struct avs_dev *adev, struct avs_ipc_msg *request,
struct avs_ipc_msg *reply, int timeout, const char *name)
{ … }
static int avs_dsp_send_msg_sequence(struct avs_dev *adev, struct avs_ipc_msg *request,
struct avs_ipc_msg *reply, int timeout, bool wake_d0i0,
bool schedule_d0ix, const char *name)
{ … }
int avs_dsp_send_msg_timeout(struct avs_dev *adev, struct avs_ipc_msg *request,
struct avs_ipc_msg *reply, int timeout, const char *name)
{ … }
int avs_dsp_send_msg(struct avs_dev *adev, struct avs_ipc_msg *request,
struct avs_ipc_msg *reply, const char *name)
{ … }
int avs_dsp_send_pm_msg_timeout(struct avs_dev *adev, struct avs_ipc_msg *request,
struct avs_ipc_msg *reply, int timeout, bool wake_d0i0,
const char *name)
{ … }
int avs_dsp_send_pm_msg(struct avs_dev *adev, struct avs_ipc_msg *request,
struct avs_ipc_msg *reply, bool wake_d0i0, const char *name)
{ … }
static int avs_dsp_do_send_rom_msg(struct avs_dev *adev, struct avs_ipc_msg *request, int timeout,
const char *name)
{ … }
int avs_dsp_send_rom_msg_timeout(struct avs_dev *adev, struct avs_ipc_msg *request, int timeout,
const char *name)
{ … }
int avs_dsp_send_rom_msg(struct avs_dev *adev, struct avs_ipc_msg *request, const char *name)
{ … }
void avs_dsp_interrupt_control(struct avs_dev *adev, bool enable)
{ … }
int avs_ipc_init(struct avs_ipc *ipc, struct device *dev)
{ … }
void avs_ipc_block(struct avs_ipc *ipc)
{ … }