ASoC: msm: Add driver to support compressed audio.
The driver uses compressed audio APIs in the pcm substream
framework. The driver uses the compressed audio IOCTLS to
expose the compressed capability to the user space. The core
compressed audio framework is not being used currently.
The driver supports only MP3 at this stage.
Change-Id: Ib973aa8005fc6aeacf63fc6f2e244a32ff192485
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
diff --git a/sound/soc/msm/qdsp6/q6asm.c b/sound/soc/msm/qdsp6/q6asm.c
index 268d2e5..ab7f9f7 100644
--- a/sound/soc/msm/qdsp6/q6asm.c
+++ b/sound/soc/msm/qdsp6/q6asm.c
@@ -1202,6 +1202,9 @@
case FORMAT_WMA_V10PRO:
open.format = WMA_V10PRO;
break;
+ case FORMAT_MP3:
+ open.format = MP3;
+ break;
default:
pr_err("%s: Invalid format[%d]\n", __func__, format);
goto fail_cmd;
@@ -1865,7 +1868,26 @@
q6asm_add_hdr(ac, &fmt.hdr, sizeof(fmt), TRUE);
fmt.hdr.opcode = ASM_DATA_CMD_MEDIA_FORMAT_UPDATE;
- fmt.format = format;
+ switch (format) {
+ case FORMAT_V13K:
+ fmt.format = V13K_FS;
+ break;
+ case FORMAT_EVRC:
+ fmt.format = EVRC_FS;
+ break;
+ case FORMAT_AMRWB:
+ fmt.format = AMRWB_FS;
+ break;
+ case FORMAT_AMRNB:
+ fmt.format = AMRNB_FS;
+ break;
+ case FORMAT_MP3:
+ fmt.format = MP3;
+ break;
+ default:
+ pr_err("Invalid format[%d]\n", format);
+ goto fail_cmd;
+ }
fmt.cfg_size = 0;
rc = apr_send_pkt(ac->apr, (uint32_t *) &fmt);