#include <linux/device.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/kref.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/soc/qcom/apr.h>
#include <linux/wait.h>
#include <sound/asound.h>
#include "q6adm.h"
#include "q6afe.h"
#include "q6core.h"
#include "q6dsp-common.h"
#include "q6dsp-errno.h"
#define ADM_CMD_DEVICE_OPEN_V5 …
#define ADM_CMDRSP_DEVICE_OPEN_V5 …
#define ADM_CMD_DEVICE_CLOSE_V5 …
#define ADM_CMD_MATRIX_MAP_ROUTINGS_V5 …
#define TIMEOUT_MS …
#define RESET_COPP_ID …
#define INVALID_COPP_ID …
#define ADM_LEGACY_DEVICE_SESSION …
#define ADM_MATRIX_ID_AUDIO_RX …
#define ADM_MATRIX_ID_AUDIO_TX …
struct q6copp { … };
struct q6adm { … };
struct q6adm_cmd_device_open_v5 { … } __packed;
struct q6adm_cmd_matrix_map_routings_v5 { … } __packed;
struct q6adm_session_map_node_v5 { … } __packed;
static struct q6copp *q6adm_find_copp(struct q6adm *adm, int port_idx,
int copp_idx)
{ … }
static void q6adm_free_copp(struct kref *ref)
{ … }
static int q6adm_callback(struct apr_device *adev, struct apr_resp_pkt *data)
{ … }
static struct q6copp *q6adm_alloc_copp(struct q6adm *adm, int port_idx)
{ … }
static int q6adm_apr_send_copp_pkt(struct q6adm *adm, struct q6copp *copp,
struct apr_pkt *pkt, uint32_t rsp_opcode)
{ … }
static int q6adm_device_close(struct q6adm *adm, struct q6copp *copp,
int port_id, int copp_idx)
{ … }
static struct q6copp *q6adm_find_matching_copp(struct q6adm *adm,
int port_id, int topology,
int mode, int rate,
int channel_mode, int bit_width,
int app_type)
{ … }
static int q6adm_device_open(struct q6adm *adm, struct q6copp *copp,
int port_id, int path, int topology,
int channel_mode, int bit_width, int rate)
{ … }
struct q6copp *q6adm_open(struct device *dev, int port_id, int path, int rate,
int channel_mode, int topology, int perf_mode,
uint16_t bit_width, int app_type, int acdb_id)
{ … }
EXPORT_SYMBOL_GPL(…);
int q6adm_get_copp_id(struct q6copp *copp)
{ … }
EXPORT_SYMBOL_GPL(…);
int q6adm_matrix_map(struct device *dev, int path,
struct route_payload payload_map, int perf_mode)
{ … }
EXPORT_SYMBOL_GPL(…);
int q6adm_close(struct device *dev, struct q6copp *copp)
{ … }
EXPORT_SYMBOL_GPL(…);
static int q6adm_probe(struct apr_device *adev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id q6adm_device_id[] = …;
MODULE_DEVICE_TABLE(of, q6adm_device_id);
#endif
static struct apr_driver qcom_q6adm_driver = …;
module_apr_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;