linux/sound/soc/qcom/qdsp6/q6core.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
// Copyright (c) 2018, Linaro Limited

#include <linux/slab.h>
#include <linux/wait.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/jiffies.h>
#include <linux/soc/qcom/apr.h>
#include "q6core.h"
#include "q6dsp-errno.h"

#define ADSP_STATE_READY_TIMEOUT_MS
#define Q6_READY_TIMEOUT_MS
#define AVCS_CMD_ADSP_EVENT_GET_STATE
#define AVCS_CMDRSP_ADSP_EVENT_GET_STATE
#define AVCS_GET_VERSIONS
#define AVCS_GET_VERSIONS_RSP
#define AVCS_CMD_GET_FWK_VERSION
#define AVCS_CMDRSP_GET_FWK_VERSION

struct avcs_svc_info {} __packed;

struct avcs_cmdrsp_get_version {} __packed;

/* for ADSP2.8 and above */
struct avcs_svc_api_info {} __packed;

struct avcs_cmdrsp_get_fwk_version {} __packed;

struct q6core {};

static struct q6core *g_core;

static int q6core_callback(struct apr_device *adev, struct apr_resp_pkt *data)
{}

static int q6core_get_fwk_versions(struct q6core *core)
{}

static int q6core_get_svc_versions(struct q6core *core)
{}

static bool __q6core_is_adsp_ready(struct q6core *core)
{}

/**
 * q6core_get_svc_api_info() - Get version number of a service.
 *
 * @svc_id: service id of the service.
 * @ainfo: Valid struct pointer to fill svc api information.
 *
 * Return: zero on success and error code on failure or unsupported
 */
int q6core_get_svc_api_info(int svc_id, struct q6core_svc_api_info *ainfo)
{}
EXPORT_SYMBOL_GPL();

/**
 * q6core_is_adsp_ready() - Get status of adsp
 *
 * Return: Will be an true if adsp is ready and false if not.
 */
bool q6core_is_adsp_ready(void)
{}
EXPORT_SYMBOL_GPL();

static int q6core_probe(struct apr_device *adev)
{}

static void q6core_exit(struct apr_device *adev)
{}

#ifdef CONFIG_OF
static const struct of_device_id q6core_device_id[]  =;
MODULE_DEVICE_TABLE(of, q6core_device_id);
#endif

static struct apr_driver qcom_q6core_driver =;

module_apr_driver();
MODULE_DESCRIPTION();
MODULE_LICENSE();