ASoc: msm: Refactor some codec functionality into separate files

- Add all codec driver common functionality in common file.
- Add separate files for codec drivers callback function
definitions to make it platform dependent.

Change-Id: I64665fcb420f9c7f3fa4bfdd2e7356347d7c48b2
Signed-off-by: Harmandeep Singh <hsingh@codeaurora.org>
diff --git a/arch/arm/mach-msm/qdsp6v2/audio_wma.c b/arch/arm/mach-msm/qdsp6v2/audio_wma.c
index bea0485..021d58b 100644
--- a/arch/arm/mach-msm/qdsp6v2/audio_wma.c
+++ b/arch/arm/mach-msm/qdsp6v2/audio_wma.c
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2008 Google, Inc.
  * Copyright (C) 2008 HTC Corporation
- * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
+ * Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -19,24 +19,6 @@
 #include <linux/msm_audio_wma.h>
 #include "audio_utils_aio.h"
 
-static void q6_audio_wma_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:
-	case ASM_DATA_EVENT_READ_DONE:
-	case ASM_DATA_CMDRSP_EOS:
-		audio_aio_cb(opcode, token, payload, audio);
-		break;
-	default:
-		pr_debug("%s:Unhandled event = 0x%8x\n", __func__, opcode);
-		break;
-	}
-}
-
 #ifdef CONFIG_DEBUG_FS
 static const struct file_operations audio_wma_debug_fops = {
 	.read = audio_aio_debug_read,
@@ -139,15 +121,15 @@
 	audio->codec_cfg = kzalloc(sizeof(struct msm_audio_wma_config_v2),
 					GFP_KERNEL);
 	if (audio->codec_cfg == NULL) {
-		pr_err("%s:Could not allocate memory for wma\
-			config\n", __func__);
+		pr_err("%s:Could not allocate memory for wma"
+			"config\n", __func__);
 		kfree(audio);
 		return -ENOMEM;
 	}
 
 	audio->pcm_cfg.buffer_size = PCM_BUFSZ_MIN;
 
-	audio->ac = q6asm_audio_client_alloc((app_cb) q6_audio_wma_cb,
+	audio->ac = q6asm_audio_client_alloc((app_cb) q6_audio_cb,
 					     (void *)audio);
 
 	if (!audio->ac) {