summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeiyin Jiang <wjiang@codeaurora.org>2016-11-23 16:57:38 +0800
committerWeiyin Jiang <wjiang@codeaurora.org>2016-12-07 16:20:08 +0800
commit41417b20311288cdd4b947c9db65129ede6f34ce (patch)
treebe0c686d05f63ee50f3ca14314fe71a7d2ef1b14
parent1289f9837566deab9e7fc209437b911825663a4d (diff)
ASoC: msm: enable DAP set license logic on 8998
Since we move to GEF implementation for Dolby post processing, disabling DAP/DAX2 driver logic on msm8998 target except for license validation. CRs-Fixed: 1094027 Change-Id: I33c5625026611856f6cdd8c6e0b5d7ef229ba8c7 Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
-rw-r--r--sound/soc/msm/Kconfig11
-rw-r--r--sound/soc/msm/qdsp6v2/Makefile1
-rw-r--r--sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c4
-rw-r--r--sound/soc/msm/qdsp6v2/msm-ds2-dap-config.h8
-rw-r--r--sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c10
-rw-r--r--sound/soc/msm/qdsp6v2/q6adm.c10
6 files changed, 37 insertions, 7 deletions
diff --git a/sound/soc/msm/Kconfig b/sound/soc/msm/Kconfig
index a5cd94f91cfc..a5a81df49d69 100644
--- a/sound/soc/msm/Kconfig
+++ b/sound/soc/msm/Kconfig
@@ -50,6 +50,15 @@ config DOLBY_DS2
device, end point dependent post processing parameters and
the various posrt processing parameters
+config DOLBY_LICENSE
+ bool "Enable Dolby LICENSE"
+ depends on SND_SOC_MSM_QDSP6V2_INTF
+ help
+ To add support for dolby DAP post processing,
+ and retain DAP set license functionality only.
+ This is required by Dolby GEF implementation which needs
+ nothing but dolby license validation functionality in driver.
+
config DTS_EAGLE
bool "Enable DTS Eagle Support"
depends on SND_SOC_MSM_QDSP6V2_INTF
@@ -211,7 +220,7 @@ config SND_SOC_MSM8998
select QTI_PP
select SND_SOC_CPE
select MSM_ULTRASOUND
- select DOLBY_DS2
+ select DOLBY_LICENSE
select SND_HWDEP
select DTS_EAGLE
help
diff --git a/sound/soc/msm/qdsp6v2/Makefile b/sound/soc/msm/qdsp6v2/Makefile
index 461c09db2937..469ab1a19c5b 100644
--- a/sound/soc/msm/qdsp6v2/Makefile
+++ b/sound/soc/msm/qdsp6v2/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_SND_HWDEP) += msm-pcm-routing-devdep.o
obj-$(CONFIG_DTS_EAGLE) += msm-dts-eagle.o
obj-$(CONFIG_DOLBY_DAP) += msm-dolby-dap-config.o
obj-$(CONFIG_DOLBY_DS2) += msm-ds2-dap-config.o
+obj-$(CONFIG_DOLBY_LICENSE) += msm-ds2-dap-config.o
obj-$(CONFIG_DTS_SRS_TM) += msm-dts-srs-tm-config.o
obj-$(CONFIG_QTI_PP) += msm-qti-pp-config.o
obj-y += audio_calibration.o audio_cal_utils.o q6adm.o q6afe.o q6asm.o \
diff --git a/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c b/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c
index ad2f2e9865c3..2441cabc07a7 100644
--- a/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c
+++ b/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.c
@@ -20,7 +20,7 @@
#include <sound/q6core.h>
-#ifdef CONFIG_DOLBY_DS2
+#if defined(CONFIG_DOLBY_DS2) || defined(CONFIG_DOLBY_LICENSE)
/* ramp up/down for 30ms */
#define DOLBY_SOFT_VOLUME_PERIOD 40
@@ -2284,4 +2284,4 @@ int msm_ds2_dap_ioctl_shared(struct snd_hwdep *hw, struct file *file,
{
return 0;
}
-#endif /*CONFIG_DOLBY_DS2*/
+#endif /* CONFIG_DOLBY_DS2 || CONFIG_DOLBY_LICENSE */
diff --git a/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.h b/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.h
index 82794ee768a8..0eb6017fd383 100644
--- a/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.h
+++ b/sound/soc/msm/qdsp6v2/msm-ds2-dap-config.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2014, 2016, 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.
@@ -45,7 +45,7 @@ struct dolby_param_license32 {
_IOR('U', 0x15, struct dolby_param_data32)
#endif
-#ifdef CONFIG_DOLBY_DS2
+#if defined(CONFIG_DOLBY_DS2) || defined(CONFIG_DOLBY_LICENSE)
/* DOLBY DOLBY GUIDS */
#define DS2_MODULE_ID 0x00010775
@@ -86,11 +86,11 @@ int msm_ds2_dap_set_custom_stereo_onoff(int port_id, int copp_idx,
/* Dolby DOLBY end */
#else
-static inline void msm_ds2_dap_update_port_parameters(struct snd_hwdep *hw,
+static inline int msm_ds2_dap_update_port_parameters(struct snd_hwdep *hw,
struct file *file,
bool open)
{
- return;
+ return 0;
}
static inline int msm_ds2_dap_ioctl(struct snd_hwdep *hw, struct file *file,
diff --git a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
index 9164475386ff..513d9ed822f9 100644
--- a/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
+++ b/sound/soc/msm/qdsp6v2/msm-pcm-routing-v2.c
@@ -46,6 +46,16 @@
#include "q6voice.h"
#include "sound/q6lsm.h"
+#ifndef CONFIG_DOLBY_DAP
+#undef DOLBY_ADM_COPP_TOPOLOGY_ID
+#define DOLBY_ADM_COPP_TOPOLOGY_ID 0xFFFFFFFE
+#endif
+
+#ifndef CONFIG_DOLBY_DS2
+#undef DS2_ADM_COPP_TOPOLOGY_ID
+#define DS2_ADM_COPP_TOPOLOGY_ID 0xFFFFFFFF
+#endif
+
static int get_cal_path(int path_type);
static struct mutex routing_lock;
diff --git a/sound/soc/msm/qdsp6v2/q6adm.c b/sound/soc/msm/qdsp6v2/q6adm.c
index 8f99a73fd29f..30876b52ec9e 100644
--- a/sound/soc/msm/qdsp6v2/q6adm.c
+++ b/sound/soc/msm/qdsp6v2/q6adm.c
@@ -39,6 +39,16 @@
#define ULL_SUPPORTED_BITS_PER_SAMPLE 16
#define ULL_SUPPORTED_SAMPLE_RATE 48000
+#ifndef CONFIG_DOLBY_DAP
+#undef DOLBY_ADM_COPP_TOPOLOGY_ID
+#define DOLBY_ADM_COPP_TOPOLOGY_ID 0xFFFFFFFE
+#endif
+
+#ifndef CONFIG_DOLBY_DS2
+#undef DS2_ADM_COPP_TOPOLOGY_ID
+#define DS2_ADM_COPP_TOPOLOGY_ID 0xFFFFFFFF
+#endif
+
/* ENUM for adm_status */
enum adm_cal_status {
ADM_STATUS_CALIBRATION_REQUIRED = 0,