mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoc: msm: Refactor some codec functionality into separate files
- Add all codec driver common functionality in common files. - Add separate files for callback function definitions. - Add header files according to the platform. Change-Id: I906811043d4bb33571f719f79988fbdb89f5c385 Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
This commit is contained in:
parent
d760b2ccd2
commit
dcd23d119c
10 changed files with 1358 additions and 75 deletions
|
@ -242,6 +242,9 @@ config ARCH_MSMCOPPER
|
|||
select SPARSE_IRQ
|
||||
select MSM_RPM_SMD
|
||||
select REGULATOR
|
||||
select MSM_QDSP6_APR
|
||||
select MSM_QDSP6V2_CODECS
|
||||
select MSM_AUDIO_QDSP6V2 if SND_SOC
|
||||
|
||||
config ARCH_FSM9XXX
|
||||
bool "FSM9XXX"
|
||||
|
@ -2173,6 +2176,15 @@ config MSM_QDSP6_CODECS
|
|||
used by audio driver to configure QDSP6's
|
||||
ASM, ADM and AFE.
|
||||
|
||||
config MSM_QDSP6V2_CODECS
|
||||
bool "Audio QDSP6V2 APR support"
|
||||
depends on MSM_SMD
|
||||
help
|
||||
Enable Audio codecs with APR IPC protocol support between
|
||||
application processor and QDSP6 for B-family. APR is
|
||||
used by audio driver to configure QDSP6's
|
||||
ASM, ADM and AFE.
|
||||
|
||||
config MSM_AUDIO_QDSP6
|
||||
bool "QDSP6 HW Audio support"
|
||||
select SND_SOC_MSM_QDSP6_INTF
|
||||
|
@ -2181,6 +2193,16 @@ config MSM_AUDIO_QDSP6
|
|||
Enable HW audio support in QDSP6.
|
||||
QDSP6 can support HW encoder & decoder and audio processing
|
||||
|
||||
config MSM_AUDIO_QDSP6V2
|
||||
bool "QDSP6V2 HW Audio support"
|
||||
select SND_SOC_MSM_QDSP6V2_INTF
|
||||
help
|
||||
Enable HW audio support in QDSP6V2.
|
||||
QDSP6V2 can support HW encoder & decoder and
|
||||
audio processing. It will enable support for
|
||||
AAC, AMRNB, AMRWB, EVRC, MP3, QCELP among
|
||||
others.
|
||||
|
||||
config MSM_ULTRASOUND
|
||||
bool "MSM ultrasound support"
|
||||
depends on MSM_AUDIO_QDSP6
|
||||
|
|
|
@ -155,6 +155,7 @@ obj-$(CONFIG_MSM_RPCSERVER_HANDSET) += rpc_server_handset.o
|
|||
obj-$(CONFIG_MSM_QDSP6) += qdsp6/
|
||||
obj-$(CONFIG_MSM8X60_AUDIO) += qdsp6v2/
|
||||
obj-$(CONFIG_MSM_AUDIO_QDSP6) += qdsp6v2/
|
||||
obj-$(CONFIG_MSM_AUDIO_QDSP6V2) += qdsp6v2/
|
||||
obj-$(CONFIG_MSM_HW3D) += hw3d.o
|
||||
obj-$(CONFIG_PM) += pm-boot.o
|
||||
obj-$(CONFIG_MSM_PM8X60) += pm-8x60.o pm-data.o
|
||||
|
|
|
@ -14,8 +14,11 @@
|
|||
#define _AUDIO_ACDB_H
|
||||
|
||||
#include <linux/msm_audio_acdb.h>
|
||||
#ifdef CONFIG_ARCH_MSMCOPPER
|
||||
#include <sound/q6adm-v2.h>
|
||||
#else
|
||||
#include <sound/q6adm.h>
|
||||
|
||||
#endif
|
||||
enum {
|
||||
RX_CAL,
|
||||
TX_CAL,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
obj-y += rtac.o
|
||||
ifdef CONFIG_ARCH_MSM8X60
|
||||
obj-y += audio_dev_ctl.o
|
||||
obj-y += board-msm8x60-audio.o
|
||||
|
@ -13,10 +12,15 @@ obj-$(CONFIG_FB_MSM_HDMI_MSM_PANEL) += lpa_if_hdmi.o
|
|||
endif
|
||||
obj-$(CONFIG_MSM_QDSP6_APR) += apr.o apr_tal.o q6core.o dsp_debug.o
|
||||
obj-y += audio_acdb.o
|
||||
ifndef CONFIG_ARCH_MSM9615
|
||||
obj-y += aac_in.o qcelp_in.o evrc_in.o amrnb_in.o audio_utils.o
|
||||
obj-y += audio_wma.o audio_wmapro.o audio_aac.o audio_multi_aac.o audio_utils_aio.o
|
||||
obj-$(CONFIG_MSM_QDSP6_CODECS) += q6audio_v1.o q6audio_v1_aio.o
|
||||
obj-$(CONFIG_MSM_ULTRASOUND) += ultrasound/
|
||||
obj-y += audio_mp3.o audio_amrnb.o audio_amrwb.o audio_evrc.o audio_qcelp.o amrwb_in.o
|
||||
ifdef CONFIG_ARCH_MSM9615
|
||||
obj-y += rtac.o
|
||||
endif
|
||||
obj-$(CONFIG_MSM_QDSP6_CODECS) += aac_in.o qcelp_in.o evrc_in.o amrnb_in.o audio_utils.o
|
||||
obj-$(CONFIG_MSM_QDSP6_CODECS) += audio_wma.o audio_wmapro.o audio_aac.o audio_multi_aac.o audio_utils_aio.o
|
||||
obj-$(CONFIG_MSM_QDSP6_CODECS) += rtac.o q6audio_v1.o q6audio_v1_aio.o
|
||||
obj-$(CONFIG_MSM_QDSP6_CODECS) += audio_mp3.o audio_amrnb.o audio_amrwb.o audio_evrc.o audio_qcelp.o amrwb_in.o
|
||||
obj-$(CONFIG_MSM_QDSP6V2_CODECS) += aac_in.o qcelp_in.o evrc_in.o amrnb_in.o audio_utils.o
|
||||
obj-$(CONFIG_MSM_QDSP6V2_CODECS) += audio_wma.o audio_wmapro.o audio_aac.o audio_multi_aac.o audio_utils_aio.o
|
||||
obj-$(CONFIG_MSM_QDSP6V2_CODECS) += rtac_v2.o q6audio_v2.o q6audio_v2_aio.o
|
||||
obj-$(CONFIG_MSM_QDSP6V2_CODECS) += audio_mp3.o audio_amrnb.o audio_amrwb.o audio_evrc.o audio_qcelp.o amrwb_in.o
|
||||
obj-$(CONFIG_MSM_ULTRASOUND) += ultrasound/
|
||||
|
|
|
@ -15,8 +15,13 @@
|
|||
#ifndef __Q6_AUDIO_COMMON_H__
|
||||
#define __Q6_AUDIO_COMMON_H__
|
||||
|
||||
#ifdef CONFIG_ARCH_MSMCOPPER
|
||||
#include <sound/apr_audio-v2.h>
|
||||
#include <sound/q6asm-v2.h>
|
||||
#else
|
||||
#include <sound/apr_audio.h>
|
||||
#include <sound/q6asm.h>
|
||||
#endif
|
||||
|
||||
void q6_audio_cb(uint32_t opcode, uint32_t token,
|
||||
uint32_t *payload, void *priv);
|
||||
|
|
90
arch/arm/mach-msm/qdsp6v2/q6audio_v2.c
Normal file
90
arch/arm/mach-msm/qdsp6v2/q6audio_v2.c
Normal file
|
@ -0,0 +1,90 @@
|
|||
/* Copyright (c) 2012, Code Aurora Forum. 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/ioctls.h>
|
||||
#include "audio_utils.h"
|
||||
|
||||
void q6asm_in_cb(uint32_t opcode, uint32_t token,
|
||||
uint32_t *payload, void *priv)
|
||||
{
|
||||
struct q6audio_in *audio = (struct q6audio_in *)priv;
|
||||
unsigned long flags;
|
||||
|
||||
pr_debug("%s:session id %d: opcode[0x%x]\n", __func__,
|
||||
audio->ac->session, opcode);
|
||||
|
||||
spin_lock_irqsave(&audio->dsp_lock, flags);
|
||||
switch (opcode) {
|
||||
case ASM_DATA_EVENT_READ_DONE_V2:
|
||||
audio_in_get_dsp_frames(audio, token, payload);
|
||||
break;
|
||||
case ASM_DATA_EVENT_WRITE_DONE_V2:
|
||||
atomic_inc(&audio->in_count);
|
||||
wake_up(&audio->write_wait);
|
||||
break;
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
audio->eos_rsp = 1;
|
||||
wake_up(&audio->read_wait);
|
||||
break;
|
||||
case ASM_STREAM_CMDRSP_GET_PP_PARAMS_V2:
|
||||
break;
|
||||
case ASM_SESSION_EVENTX_OVERFLOW:
|
||||
pr_err("%s:session id %d: ASM_SESSION_EVENT_TX_OVERFLOW\n",
|
||||
__func__, audio->ac->session);
|
||||
break;
|
||||
default:
|
||||
pr_debug("%s:session id %d: Ignore opcode[0x%x]\n", __func__,
|
||||
audio->ac->session, opcode);
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&audio->dsp_lock, flags);
|
||||
}
|
||||
|
||||
void audio_in_get_dsp_frames(void *priv,
|
||||
uint32_t token, uint32_t *payload)
|
||||
{
|
||||
struct q6audio_in *audio = (struct q6audio_in *)priv;
|
||||
uint32_t index;
|
||||
|
||||
index = token;
|
||||
pr_debug("%s:session id %d: index=%d nr frames=%d offset[%d]\n",
|
||||
__func__, audio->ac->session, token, payload[9],
|
||||
payload[5]);
|
||||
pr_debug("%s:session id %d: timemsw=%d lsw=%d\n", __func__,
|
||||
audio->ac->session, payload[7], payload[6]);
|
||||
pr_debug("%s:session id %d: uflags=0x%8x uid=0x%8x\n", __func__,
|
||||
audio->ac->session, payload[8], payload[10]);
|
||||
pr_debug("%s:session id %d: enc_framesotal_size=0x%8x\n", __func__,
|
||||
audio->ac->session, payload[4]);
|
||||
|
||||
audio->out_frame_info[index][0] = payload[9];
|
||||
audio->out_frame_info[index][1] = payload[5];
|
||||
|
||||
/* statistics of read */
|
||||
atomic_add(payload[4], &audio->in_bytes);
|
||||
atomic_add(payload[9], &audio->in_samples);
|
||||
|
||||
if (atomic_read(&audio->out_count) <= audio->str_cfg.buffer_count) {
|
||||
atomic_inc(&audio->out_count);
|
||||
wake_up(&audio->read_wait);
|
||||
}
|
||||
}
|
112
arch/arm/mach-msm/qdsp6v2/q6audio_v2_aio.c
Normal file
112
arch/arm/mach-msm/qdsp6v2/q6audio_v2_aio.c
Normal file
|
@ -0,0 +1,112 @@
|
|||
/* Copyright (c) 2012, Code Aurora Forum. 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/ioctls.h>
|
||||
#include "audio_utils_aio.h"
|
||||
|
||||
void q6_audio_cb(uint32_t opcode, uint32_t token,
|
||||
uint32_t *payload, void *priv)
|
||||
{
|
||||
struct q6audio_aio *audio = (struct q6audio_aio *)priv;
|
||||
|
||||
pr_debug("%s:opcode = %x token = 0x%x\n", __func__, opcode, token);
|
||||
switch (opcode) {
|
||||
case ASM_DATA_EVENT_WRITE_DONE_V2:
|
||||
case ASM_DATA_EVENT_READ_DONE_V2:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
case ASM_DATA_CMD_MEDIA_FMT_UPDATE_V2:
|
||||
case ASM_STREAM_CMD_SET_ENCDEC_PARAM:
|
||||
case ASM_DATA_EVENT_SR_CM_CHANGE_NOTIFY:
|
||||
case ASM_DATA_EVENT_ENC_SR_CM_CHANGE_NOTIFY:
|
||||
audio_aio_cb(opcode, token, payload, audio);
|
||||
break;
|
||||
default:
|
||||
pr_debug("%s:Unhandled event = 0x%8x\n", __func__, opcode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void audio_aio_cb(uint32_t opcode, uint32_t token,
|
||||
uint32_t *payload, void *priv/*struct q6audio_aio *audio*/)
|
||||
{
|
||||
struct q6audio_aio *audio = (struct q6audio_aio *)priv;
|
||||
union msm_audio_event_payload e_payload;
|
||||
|
||||
switch (opcode) {
|
||||
case ASM_DATA_EVENT_WRITE_DONE_V2:
|
||||
pr_debug("%s[%p]:ASM_DATA_EVENT_WRITE_DONE token = 0x%x\n",
|
||||
__func__, audio, token);
|
||||
audio_aio_async_write_ack(audio, token, payload);
|
||||
break;
|
||||
case ASM_DATA_EVENT_READ_DONE_V2:
|
||||
pr_debug("%s[%p]:ASM_DATA_EVENT_READ_DONE token = 0x%x\n",
|
||||
__func__, audio, token);
|
||||
audio_aio_async_read_ack(audio, token, payload);
|
||||
break;
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
/* EOS Handle */
|
||||
pr_debug("%s[%p]:ASM_DATA_CMDRSP_EOS\n", __func__, audio);
|
||||
if (audio->feedback) { /* Non-Tunnel mode */
|
||||
audio->eos_rsp = 1;
|
||||
/* propagate input EOS i/p buffer,
|
||||
after receiving DSP acknowledgement */
|
||||
if (audio->eos_flag &&
|
||||
(audio->eos_write_payload.aio_buf.buf_addr)) {
|
||||
audio_aio_post_event(audio,
|
||||
AUDIO_EVENT_WRITE_DONE,
|
||||
audio->eos_write_payload);
|
||||
memset(&audio->eos_write_payload , 0,
|
||||
sizeof(union msm_audio_event_payload));
|
||||
audio->eos_flag = 0;
|
||||
}
|
||||
} else { /* Tunnel mode */
|
||||
audio->eos_rsp = 1;
|
||||
wake_up(&audio->write_wait);
|
||||
wake_up(&audio->cmd_wait);
|
||||
}
|
||||
break;
|
||||
case ASM_DATA_CMD_MEDIA_FMT_UPDATE_V2:
|
||||
case ASM_STREAM_CMD_SET_ENCDEC_PARAM:
|
||||
pr_debug("%s[%p]:payload0[%x] payloa1d[%x]opcode= 0x%x\n",
|
||||
__func__, audio, payload[0], payload[1], opcode);
|
||||
break;
|
||||
case ASM_DATA_EVENT_SR_CM_CHANGE_NOTIFY:
|
||||
case ASM_DATA_EVENT_ENC_SR_CM_CHANGE_NOTIFY:
|
||||
|
||||
pr_debug("%s[%p]: ASM_DATA_EVENT_SR_CM_CHANGE_NOTIFY, payload[0]-sr = %d, payload[1]-chl = %d, payload[2] = %d, payload[3] = %d\n",
|
||||
__func__, audio, payload[0],
|
||||
payload[1], payload[2], payload[3]);
|
||||
|
||||
pr_debug("%s[%p]: ASM_DATA_EVENT_SR_CM_CHANGE_NOTIFY, sr(prev) = %d, chl(prev) = %d,",
|
||||
__func__, audio, audio->pcm_cfg.sample_rate,
|
||||
audio->pcm_cfg.channel_count);
|
||||
|
||||
audio->pcm_cfg.sample_rate = payload[0];
|
||||
audio->pcm_cfg.channel_count = payload[1] & 0xFFFF;
|
||||
e_payload.stream_info.chan_info = audio->pcm_cfg.channel_count;
|
||||
e_payload.stream_info.sample_rate = audio->pcm_cfg.sample_rate;
|
||||
audio_aio_post_event(audio, AUDIO_EVENT_STREAM_INFO, e_payload);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -22,8 +22,8 @@
|
|||
#include <asm/atomic.h>
|
||||
#include <mach/qdsp6v2/audio_acdb.h>
|
||||
#include <mach/qdsp6v2/rtac.h>
|
||||
#include <sound/q6asm.h>
|
||||
#include <sound/q6adm.h>
|
||||
#include "q6audio_common.h"
|
||||
#include <sound/q6afe.h>
|
||||
|
||||
#ifndef CONFIG_RTAC
|
||||
|
||||
|
@ -400,10 +400,8 @@ void rtac_copy_adm_payload_to_user(void *payload, u32 payload_size)
|
|||
memcpy(rtac_adm_buffer, &payload_size, sizeof(u32));
|
||||
if (payload_size != 0) {
|
||||
if (payload_size > rtac_adm_user_buf_size) {
|
||||
pr_err("%s: Buffer set not big enough for "
|
||||
"returned data, buf size = %d, "
|
||||
"ret data = %d\n", __func__,
|
||||
rtac_adm_user_buf_size, payload_size);
|
||||
pr_err("%s: Buffer set not big enough for returned data, buf size = %d,ret data = %d\n",
|
||||
__func__, rtac_adm_user_buf_size, payload_size);
|
||||
goto done;
|
||||
}
|
||||
memcpy(rtac_adm_buffer + sizeof(u32), payload, payload_size);
|
||||
|
@ -443,7 +441,6 @@ u32 send_adm_apr(void *buf, u32 opcode)
|
|||
|
||||
|
||||
if (payload_size > MAX_PAYLOAD_SIZE) {
|
||||
|
||||
pr_err("%s: Invalid payload size = %d\n",
|
||||
__func__, payload_size);
|
||||
goto done;
|
||||
|
@ -522,8 +519,8 @@ u32 send_adm_apr(void *buf, u32 opcode)
|
|||
if (rtac_adm_payload_size != 0) {
|
||||
if (copy_to_user(buf, rtac_adm_buffer,
|
||||
rtac_adm_payload_size + sizeof(u32))) {
|
||||
pr_err("%s: Could not copy buffer to user,"
|
||||
"size = %d\n", __func__, payload_size);
|
||||
pr_err("%s: Could not copy buffer to user, size = %d\n",
|
||||
__func__, payload_size);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -573,10 +570,8 @@ void rtac_copy_asm_payload_to_user(void *payload, u32 payload_size)
|
|||
memcpy(rtac_asm_buffer, &payload_size, sizeof(u32));
|
||||
if (payload_size) {
|
||||
if (payload_size > rtac_asm_user_buf_size) {
|
||||
pr_err("%s: Buffer set not big enough for "
|
||||
"returned data, buf size = %d, "
|
||||
"ret data = %d\n", __func__,
|
||||
rtac_asm_user_buf_size, payload_size);
|
||||
pr_err("%s: Buffer set not big enough for returned data, buf size = %d, ret data = %d\n",
|
||||
__func__, rtac_asm_user_buf_size, payload_size);
|
||||
goto done;
|
||||
}
|
||||
memcpy(rtac_asm_buffer + sizeof(u32), payload, payload_size);
|
||||
|
@ -614,7 +609,6 @@ u32 send_rtac_asm_apr(void *buf, u32 opcode)
|
|||
}
|
||||
|
||||
if (payload_size > MAX_PAYLOAD_SIZE) {
|
||||
|
||||
pr_err("%s: Invalid payload size = %d\n",
|
||||
__func__, payload_size);
|
||||
goto done;
|
||||
|
@ -692,8 +686,8 @@ u32 send_rtac_asm_apr(void *buf, u32 opcode)
|
|||
if (rtac_asm_payload_size != 0) {
|
||||
if (copy_to_user(buf, rtac_asm_buffer,
|
||||
rtac_asm_payload_size + sizeof(u32))) {
|
||||
pr_err("%s: Could not copy buffer to user,"
|
||||
"size = %d\n", __func__, payload_size);
|
||||
pr_err("%s: Could not copy buffer to user,size = %d\n",
|
||||
__func__, payload_size);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -715,7 +709,6 @@ err:
|
|||
void rtac_set_voice_handle(u32 mode, void *handle)
|
||||
{
|
||||
pr_debug("%s\n", __func__);
|
||||
|
||||
mutex_lock(&rtac_voice_apr_mutex);
|
||||
rtac_voice_apr_data[mode].apr_handle = handle;
|
||||
mutex_unlock(&rtac_voice_apr_mutex);
|
||||
|
@ -743,10 +736,8 @@ void rtac_copy_voice_payload_to_user(void *payload, u32 payload_size)
|
|||
memcpy(rtac_voice_buffer, &payload_size, sizeof(u32));
|
||||
if (payload_size) {
|
||||
if (payload_size > rtac_voice_user_buf_size) {
|
||||
pr_err("%s: Buffer set not big enough for "
|
||||
"returned data, buf size = %d, "
|
||||
"ret data = %d\n", __func__,
|
||||
rtac_voice_user_buf_size, payload_size);
|
||||
pr_err("%s: Buffer set not big enough for returned data, buf size = %d, ret data = %d\n",
|
||||
__func__, rtac_voice_user_buf_size, payload_size);
|
||||
goto done;
|
||||
}
|
||||
memcpy(rtac_voice_buffer + sizeof(u32), payload, payload_size);
|
||||
|
@ -860,8 +851,8 @@ u32 send_voice_apr(u32 mode, void *buf, u32 opcode)
|
|||
if (rtac_voice_payload_size != 0) {
|
||||
if (copy_to_user(buf, rtac_voice_buffer,
|
||||
rtac_voice_payload_size + sizeof(u32))) {
|
||||
pr_err("%s: Could not copy buffer to user,"
|
||||
"size = %d\n", __func__, payload_size);
|
||||
pr_err("%s: Could not copy buffer to user,size = %d\n",
|
||||
__func__, payload_size);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -972,7 +963,7 @@ static int __init rtac_init(void)
|
|||
mutex_init(&rtac_adm_mutex);
|
||||
mutex_init(&rtac_adm_apr_mutex);
|
||||
|
||||
rtac_adm_buffer = kmalloc(RTAC_BUF_SIZE, GFP_KERNEL);
|
||||
rtac_adm_buffer = kzalloc(RTAC_BUF_SIZE, GFP_KERNEL);
|
||||
if (rtac_adm_buffer == NULL) {
|
||||
pr_err("%s: Could not allocate payload of size = %d\n",
|
||||
__func__, RTAC_BUF_SIZE);
|
||||
|
@ -987,10 +978,11 @@ static int __init rtac_init(void)
|
|||
}
|
||||
mutex_init(&rtac_asm_apr_mutex);
|
||||
|
||||
rtac_asm_buffer = kmalloc(RTAC_BUF_SIZE, GFP_KERNEL);
|
||||
rtac_asm_buffer = kzalloc(RTAC_BUF_SIZE, GFP_KERNEL);
|
||||
if (rtac_asm_buffer == NULL) {
|
||||
pr_err("%s: Could not allocate payload of size = %d\n",
|
||||
__func__, RTAC_BUF_SIZE);
|
||||
kzfree(rtac_adm_buffer);
|
||||
goto nomem;
|
||||
}
|
||||
|
||||
|
@ -1004,10 +996,12 @@ static int __init rtac_init(void)
|
|||
mutex_init(&rtac_voice_mutex);
|
||||
mutex_init(&rtac_voice_apr_mutex);
|
||||
|
||||
rtac_voice_buffer = kmalloc(RTAC_BUF_SIZE, GFP_KERNEL);
|
||||
rtac_voice_buffer = kzalloc(RTAC_BUF_SIZE, GFP_KERNEL);
|
||||
if (rtac_voice_buffer == NULL) {
|
||||
pr_err("%s: Could not allocate payload of size = %d\n",
|
||||
__func__, RTAC_BUF_SIZE);
|
||||
kzfree(rtac_adm_buffer);
|
||||
kzfree(rtac_asm_buffer);
|
||||
goto nomem;
|
||||
}
|
||||
|
||||
|
|
1019
arch/arm/mach-msm/qdsp6v2/rtac_v2.c
Normal file
1019
arch/arm/mach-msm/qdsp6v2/rtac_v2.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -105,6 +105,16 @@ config SND_SOC_MSM_QDSP6_INTF
|
|||
help
|
||||
To add support for SoC audio on MSM8960.
|
||||
|
||||
config SND_SOC_MSM_QDSP6V2_INTF
|
||||
bool "SoC Q6 audio driver for MSMCOPPER"
|
||||
depends on MSM_QDSP6_APR
|
||||
help
|
||||
To add support for SoC audio on MSMCOPPER.
|
||||
This will enable all the platform specific
|
||||
interactions towards DSP. It includes asm,
|
||||
adm and afe interfaces on the DSP.
|
||||
|
||||
|
||||
config SND_SOC_VOICE
|
||||
bool "SoC Q6 voice driver for MSM8960"
|
||||
depends on SND_SOC_MSM_QDSP6_INTF
|
||||
|
@ -119,6 +129,15 @@ config SND_SOC_QDSP6
|
|||
help
|
||||
To add support for MSM QDSP6 Soc Audio.
|
||||
|
||||
config SND_SOC_QDSP6V2
|
||||
tristate "SoC ALSA audio driver for QDSP6V2"
|
||||
select SND_SOC_MSM_QDSP6V2_INTF
|
||||
help
|
||||
To add support for MSM QDSP6V2 Soc Audio.
|
||||
This will enable sound soc platform specific
|
||||
audio drivers. This includes q6asm, q6adm,
|
||||
q6afe interfaces to DSP using apr.
|
||||
|
||||
config SND_SOC_MSM8960
|
||||
tristate "SoC Machine driver for MSM8960 and APQ8064 boards"
|
||||
depends on ARCH_MSM8960 || ARCH_APQ8064
|
||||
|
@ -134,6 +153,20 @@ config SND_SOC_MSM8960
|
|||
help
|
||||
To add support for SoC audio on MSM8960 and APQ8064 boards
|
||||
|
||||
config SND_SOC_MSM8974
|
||||
tristate "SoC Machine driver for MSMCOPPER boards"
|
||||
depends on ARCH_MSMCOPPER
|
||||
select SND_SOC_QDSP6V2
|
||||
select SND_SOC_MSM_STUB
|
||||
select SND_SOC_MSM_HOSTLESS_PCM
|
||||
select SND_DYNAMIC_MINORS
|
||||
help
|
||||
To add support for SoC audio on MSMCOPPER.
|
||||
This will enable sound soc drivers which
|
||||
interfaces with DSP, also it will enable
|
||||
the machine drivers and the corresponding
|
||||
DAI-links.
|
||||
|
||||
config SND_SOC_MDM9615
|
||||
tristate "SoC Machine driver for MDM9615 boards"
|
||||
depends on ARCH_MSM9615
|
||||
|
|
Loading…
Reference in a new issue