mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-28 00:00:22 +02:00
msm: audio: qdsp5: Add Support for AC3/EAC3 driver
Add new driver to support AC3/EAC3 playback. Change-Id: I217d354d80ce1848e1c552416045a31b54a4a994 Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
This commit is contained in:
@@ -513,7 +513,8 @@ static struct platform_device msm_device_snd = {
|
||||
(1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
|
||||
(1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
|
||||
(1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
|
||||
(1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
|
||||
(1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))| \
|
||||
(1<<MSM_ADSP_CODEC_AC3)
|
||||
#define DEC1_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
|
||||
(1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
|
||||
(1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
|
||||
|
||||
@@ -459,7 +459,8 @@ static struct platform_device msm_device_snd = {
|
||||
(1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
|
||||
(1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
|
||||
(1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
|
||||
(1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
|
||||
(1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))| \
|
||||
(1<<MSM_ADSP_CODEC_AC3)
|
||||
#define DEC1_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
|
||||
(1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
|
||||
(1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
|
||||
|
||||
@@ -334,6 +334,7 @@ enum msm_adspdec_concurrency {
|
||||
MSM_ADSP_CODEC_AMRWB = 11,
|
||||
MSM_ADSP_CODEC_EVRC = 12,
|
||||
MSM_ADSP_CODEC_WMAPRO = 13,
|
||||
MSM_ADSP_CODEC_AC3 = 23,
|
||||
MSM_ADSP_MODE_TUNNEL = 24,
|
||||
MSM_ADSP_MODE_NONTUNNEL = 25,
|
||||
MSM_ADSP_MODE_LP = 26,
|
||||
|
||||
@@ -414,6 +414,7 @@ struct audpp_cmd_cfg_adec_params_evrc {
|
||||
/*
|
||||
* Command Structure to configure Per decoder Parameters (AMRWB)
|
||||
*/
|
||||
#define ADEC_PARAMS_AC3_INDEX 14
|
||||
|
||||
struct audpp_cmd_cfg_adec_params_amrwb {
|
||||
audpp_cmd_cfg_adec_params_common common;
|
||||
@@ -423,6 +424,18 @@ struct audpp_cmd_cfg_adec_params_amrwb {
|
||||
#define AUDPP_CMD_CFG_ADEC_PARAMS_AMRWB_LEN \
|
||||
sizeof(struct audpp_cmd_cfg_adec_params_amrwb)
|
||||
|
||||
/*
|
||||
* Command Structure to configure Per decoder Parameters (AC3)
|
||||
*/
|
||||
|
||||
struct audpp_cmd_cfg_adec_params_ac3 {
|
||||
audpp_cmd_cfg_adec_params_common common;
|
||||
unsigned short index[ADEC_PARAMS_AC3_INDEX];
|
||||
} __packed;
|
||||
|
||||
#define AUDPP_CMD_CFG_ADEC_PARAMS_AC3_LEN \
|
||||
sizeof(struct audpp_cmd_cfg_adec_params_ac3)
|
||||
|
||||
/*
|
||||
* Command Structure to configure the HOST PCM interface
|
||||
*/
|
||||
|
||||
@@ -17,4 +17,4 @@ obj-y += audio_wma.o audio_voicememo.o audio_pcm.o audio_amrwb.o audio_wmapro.o
|
||||
obj-y += snd.o snd_adie.o
|
||||
obj-$(CONFIG_ARCH_MSM7X27A) += audio_fm.o
|
||||
obj-$(CONFIG_ARCH_MSM7X27A) += audio_mvs.o
|
||||
obj-$(CONFIG_ARCH_MSM7X27A) += audio_lpa.o
|
||||
obj-$(CONFIG_ARCH_MSM7X27A) += audio_lpa.o audio_ac3.o
|
||||
|
||||
@@ -33,7 +33,8 @@ static char *rm_errs[] = {
|
||||
"PCM Blocks not Sufficient",
|
||||
"TASK is already occupied",
|
||||
"Concurrency not supported",
|
||||
"MIPS not sufficient"
|
||||
"MIPS not sufficient",
|
||||
"DDP invalid/no licence"
|
||||
};
|
||||
static struct client {
|
||||
wait_queue_head_t wait;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -77,6 +77,7 @@ enum rpc_aud_def_codec_type {
|
||||
RPC_AUD_DEF_CODEC_AMR_NB,
|
||||
RPC_AUD_DEF_CODEC_13K,
|
||||
RPC_AUD_DEF_CODEC_EVRC,
|
||||
RPC_AUD_DEF_CODEC_AC3,
|
||||
RPC_AUD_DEF_CODEC_MAX_002,
|
||||
};
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ enum rpc_aud_def_codec_type {
|
||||
RPC_AUD_DEF_CODEC_AMR_NB,
|
||||
RPC_AUD_DEF_CODEC_13K,
|
||||
RPC_AUD_DEF_CODEC_EVRC,
|
||||
RPC_AUD_DEF_CODEC_AC3,
|
||||
RPC_AUD_DEF_CODEC_MAX_002,
|
||||
};
|
||||
|
||||
|
||||
@@ -427,6 +427,7 @@ header-y += msm_vidc_dec.h
|
||||
header-y += msm_vidc_enc.h
|
||||
header-y += msm_audio.h
|
||||
header-y += msm_audio_aac.h
|
||||
header-y += msm_audio_ac3.h
|
||||
header-y += msm_audio_acdb.h
|
||||
header-y += android_pmem.h
|
||||
header-y += msm_audio_wma.h
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#ifndef __MSM_AUDIO_AC3_H
|
||||
#define __MSM_AUDIO_AC3_H
|
||||
|
||||
#include <linux/msm_audio.h>
|
||||
|
||||
#define AUDIO_SET_AC3_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \
|
||||
(AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
|
||||
#define AUDIO_GET_AC3_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \
|
||||
(AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
|
||||
|
||||
#define AUDAC3_DEF_WORDSIZE 0
|
||||
#define AUDAC3_DEF_USER_DOWNMIX_FLAG 0x0
|
||||
#define AUDAC3_DEF_USER_KARAOKE_FLAG 0x0
|
||||
#define AUDAC3_DEF_ERROR_CONCEALMENT 0
|
||||
#define AUDAC3_DEF_MAX_REPEAT_COUNT 0
|
||||
|
||||
struct msm_audio_ac3_config {
|
||||
unsigned short numChans;
|
||||
unsigned short wordSize;
|
||||
unsigned short kCapableMode;
|
||||
unsigned short compMode;
|
||||
unsigned short outLfeOn;
|
||||
unsigned short outputMode;
|
||||
unsigned short stereoMode;
|
||||
unsigned short dualMonoMode;
|
||||
unsigned short fsCod;
|
||||
unsigned short pcmScaleFac;
|
||||
unsigned short dynRngScaleHi;
|
||||
unsigned short dynRngScaleLow;
|
||||
unsigned short user_downmix_flag;
|
||||
unsigned short user_karaoke_flag;
|
||||
unsigned short dm_address_high;
|
||||
unsigned short dm_address_low;
|
||||
unsigned short ko_address_high;
|
||||
unsigned short ko_address_low;
|
||||
unsigned short error_concealment;
|
||||
unsigned short max_rep_count;
|
||||
unsigned short channel_routing_mode[6];
|
||||
};
|
||||
|
||||
#endif /* __MSM_AUDIO_AC3_H */
|
||||
Reference in New Issue
Block a user