Browse Source

asoc: enable MDF initialization in qcs405 target

Enable MultiDSP framework (MDF) initialization during
qcs405 machine driver registration. Add MDF config
to enable compilation of MDF platform driver.

Change-Id: I227a0a7b3dd284dcf750c7b424b240f8c3cd1202
Signed-off-by: Aditya Bavanari <[email protected]>
Aditya Bavanari 6 years ago
parent
commit
b2b9d42ce1
3 changed files with 9 additions and 0 deletions
  1. 7 0
      asoc/qcs405.c
  2. 1 0
      config/qcs405auto.conf
  3. 1 0
      config/qcs405autoconf.h

+ 7 - 0
asoc/qcs405.c

@@ -31,6 +31,7 @@
 #include <dsp/audio_notifier.h>
 #include <dsp/q6afe-v2.h>
 #include <dsp/q6core.h>
+#include <dsp/msm_mdf.h>
 #include "device_event.h"
 #include "msm-pcm-routing-v2.h"
 #include "codecs/msm-cdc-pinctrl.h"
@@ -8402,6 +8403,11 @@ static int msm_asoc_machine_probe(struct platform_device *pdev)
 	dev_info(&pdev->dev, "Sound card %s registered\n", card->name);
 	spdev = pdev;
 
+	ret = msm_mdf_mem_init();
+	if (ret)
+		dev_err(&pdev->dev, "msm_mdf_mem_init failed (%d)\n",
+			 ret);
+
 	/* Parse pinctrl info from devicetree */
 	ret = msm_get_pinctrl(pdev);
 	if (!ret) {
@@ -8426,6 +8432,7 @@ static int msm_asoc_machine_remove(struct platform_device *pdev)
 {
 	audio_notifier_deregister("qcs405");
 	msm_i2s_auxpcm_deinit();
+	msm_mdf_mem_deinit();
 
 	msm_release_pinctrl(pdev);
 	return 0;

+ 1 - 0
config/qcs405auto.conf

@@ -31,6 +31,7 @@ CONFIG_DTS_EAGLE=m
 CONFIG_DOLBY_DS2=m
 CONFIG_DOLBY_LICENSE=m
 CONFIG_DTS_SRS_TM=m
+CONFIG_MSM_MDF=m
 CONFIG_SND_SOC_MSM_STUB=m
 CONFIG_MSM_AVTIMER=m
 CONFIG_SND_SOC_MSM_HDMI_CODEC_RX=m

+ 1 - 0
config/qcs405autoconf.h

@@ -44,6 +44,7 @@
 #define CONFIG_DOLBY_LICENSE 1
 #define CONFIG_DTS_SRS_TM 1
 #define CONFIG_SND_SOC_MSM_STUB 1
+#define CONFIG_MSM_MDF 1
 #define CONFIG_MSM_AVTIMER 1
 #define CONFIG_SND_SOC_MSM_HDMI_CODEC_RX 1
 #define CONFIG_SND_SOC_EP92 1