mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
ASoC: move cirrus playback driver to QC audio-kernel
This driver is hard to share on all QC platform. But this project is hoped to common for as most as product. Move it to QC audio kernel. It's seperated on different QC platform. Change-Id: I37202e87bf6174be7aa015ae9566d34739ed7d87 Signed-off-by: huangys <huangys@motorola.com> Reviewed-on: https://gerrit.mot.com/1370172 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Hujun Liao <liaohj@motorola.com> Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
4d96a0bf80
commit
5fe048dccc
5 changed files with 0 additions and 1199 deletions
|
|
@ -1,21 +0,0 @@
|
|||
Cirrus Logic MSM Framework Driver
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : "cirrus,msm-cirrus-playback"
|
||||
|
||||
- usecase-names : List of strings representing the various usecases
|
||||
available on a given platform (max of 4).
|
||||
|
||||
- usecase-indexes : List of usecases index representing the above
|
||||
|
||||
- ff-port-id : Port index of feedforward speaker enhancement module
|
||||
|
||||
Example:
|
||||
|
||||
msm-cirrus-playback {
|
||||
compatible = "cirrus,msm-cirrus-playback";
|
||||
usecase-names = "Playback", "Voice", "Headset", "Handsfree";
|
||||
usecase-indexes = <0 1 2 3>;
|
||||
ff-port-id = "16384";
|
||||
};
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
/* Copyright (c) 2015 Cirrus Logic, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License 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 MSM_CIRRUS_PLAYBACK_H
|
||||
#define MSM_CIRRUS_PLAYBACK_H
|
||||
|
||||
#include <linux/slab.h>
|
||||
#include <sound/soc.h>
|
||||
#include <dsp/apr_audio-v2.h>
|
||||
#include <dsp/q6afe-v2.h>
|
||||
#include <dsp/q6audio-v2.h>
|
||||
#include <uapi/sound/cirrus-playback.h>
|
||||
|
||||
struct afe_custom_crus_set_config_t {
|
||||
struct apr_hdr hdr;
|
||||
struct afe_port_cmd_set_param_v2 param;
|
||||
struct afe_port_param_data_v2 data;
|
||||
} __packed;
|
||||
|
||||
struct afe_custom_crus_get_config_t {
|
||||
struct apr_hdr hdr;
|
||||
struct afe_port_cmd_get_param_v2 param;
|
||||
struct afe_port_param_data_v2 data;
|
||||
} __packed;
|
||||
|
||||
/* Payload struct for getting or setting one integer value from/to the DSP
|
||||
* module
|
||||
*/
|
||||
struct crus_single_data_t {
|
||||
int32_t value;
|
||||
};
|
||||
|
||||
/* Payload struct for getting or setting two integer values from/to the DSP
|
||||
* module
|
||||
*/
|
||||
struct crus_dual_data_t {
|
||||
int32_t data1;
|
||||
int32_t data2;
|
||||
};
|
||||
|
||||
/* Payload struct for getting or setting three integer values from/to the DSP
|
||||
* module
|
||||
*/
|
||||
struct crus_triple_data_t {
|
||||
int32_t data1;
|
||||
int32_t data2;
|
||||
int32_t data3;
|
||||
};
|
||||
|
||||
/* Payload struct for setting the RX and TX use cases */
|
||||
struct crus_rx_run_case_ctrl_t {
|
||||
int32_t value;
|
||||
int32_t status_l;
|
||||
int32_t checksum_l;
|
||||
int32_t z_l;
|
||||
int32_t status_r;
|
||||
int32_t checksum_r;
|
||||
int32_t z_r;
|
||||
int32_t atemp;
|
||||
};
|
||||
|
||||
/* Payload struct for getting calibration result from DSP module */
|
||||
struct cirrus_cal_result_t {
|
||||
int32_t status_l;
|
||||
int32_t checksum_l;
|
||||
int32_t z_l;
|
||||
int32_t status_r;
|
||||
int32_t checksum_r;
|
||||
int32_t z_r;
|
||||
};
|
||||
|
||||
#define APR_CHUNK_SIZE 256
|
||||
#define CONFIG_FILE_SIZE 128
|
||||
#define PAYLOAD_FOLLOWS_CONFIG 4
|
||||
#define MAX_TUNING_CONFIGS 4
|
||||
#define MIN_CHAN_SWAP_SAMPLES 48
|
||||
#define MAX_CHAN_SWAP_SAMPLES 9600
|
||||
|
||||
/* Payload struct for sending an external configuration string to the DSP
|
||||
* module
|
||||
*/
|
||||
struct crus_external_config_t {
|
||||
uint32_t total_size;
|
||||
uint32_t chunk_size;
|
||||
int32_t done;
|
||||
int32_t reserved;
|
||||
int32_t config;
|
||||
char data[APR_CHUNK_SIZE];
|
||||
};
|
||||
|
||||
/* Payload struct for sending an external tuning transition string to the DSP
|
||||
* module
|
||||
*/
|
||||
struct crus_delta_config_t {
|
||||
uint32_t total_size;
|
||||
uint32_t chunk_size;
|
||||
int32_t done;
|
||||
int32_t index;
|
||||
int32_t reserved;
|
||||
int32_t config;
|
||||
char data[APR_CHUNK_SIZE];
|
||||
};
|
||||
|
||||
extern int afe_apr_send_pkt_crus(void *data, int index);
|
||||
extern int crus_afe_set_callback(
|
||||
int32_t (*crus_afe_callback_func)(void *payload, int size));
|
||||
void msm_crus_pb_add_controls(struct snd_soc_platform *platform);
|
||||
|
||||
#endif /* _MSM_CIRRUS_PLAYBACK_H */
|
||||
|
||||
|
|
@ -1,12 +1,6 @@
|
|||
DLKM_DIR := motorola/kernel/modules
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := cirrus_playback.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
|
||||
include $(DLKM_DIR)/AndroidKernelModule.mk
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := snd_soc_tfa9874.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@ EXTRA_CFLAGS += -DTFA9874_NONDSP_STEREO
|
|||
EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/sound/soc/codecs/inc
|
||||
EXTRA_CFLAGS += -Werror
|
||||
|
||||
cirrus_playback-objs = msm-cirrus-playback.o
|
||||
obj-m += cirrus_playback.o
|
||||
|
||||
snd_soc_tfa9874-objs += tfa98xx.o
|
||||
snd_soc_tfa9874-objs += tfa_container.o
|
||||
snd_soc_tfa9874-objs += tfa_dsp.o
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue