kernel-fxtec-pro1x/dsp/q6afecal-hwdep.h
Mangesh Kunchamwar 4e1e71885e dsp: afe: Add support for VAD in AFE native driver
Update to AFE native driver to send VAD calibration
to DSP. Add support for per service API version query
in q6core driver.

Change-Id: I6234879054e7b5622a40912da16072fd8dbd83fe
Signed-off-by: Mangesh Kunchamwar <mangeshk@codeaurora.org>
2018-06-12 19:18:35 +05:30

53 lines
1.5 KiB
C

/*
* Copyright (c) 2014,2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __Q6AFECAL_HWDEP_H__
#define __Q6AFECAL_HWDEP_H__
#include <sound/msmcal-hwdep.h>
enum q6afe_cal_states {
Q6AFECAL_UNINITIALISED,
Q6AFECAL_INITIALISED,
Q6AFECAL_RECEIVED
};
struct afe_fw_info {
struct firmware_cal *fw[Q6AFE_MAX_CAL];
DECLARE_BITMAP(cal_bit, Q6AFE_MAX_CAL);
/* for calibration tracking */
unsigned long q6afecal_state[Q6AFE_MAX_CAL];
struct mutex lock;
};
struct firmware_cal {
u8 *data;
size_t size;
};
#if IS_ENABLED(CONFIG_AFE_HWDEP)
int q6afe_cal_create_hwdep(void *fw, int node, void *card);
struct firmware_cal *q6afecal_get_fw_cal(struct afe_fw_info *fw_data,
enum q6afe_cal_type type);
#else /* CONFIG_AFE_HWDEP */
static inline int q6afe_cal_create_hwdep(void *fw, int node, void *card)
{
return 0;
}
static inline struct firmware_cal *q6afecal_get_fw_cal(
struct afe_fw_info *fw_data,
enum q6afe_cal_type type)
{
return NULL;
}
#endif /* CONFIG_AFE_HWDEP */
#endif /* __Q6AFECAL_HWDEP_H__ */