summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2018-11-15 13:13:23 -0500
committerMark Brown <broonie@kernel.org>2018-12-14 07:43:54 -0500
commitf2e6c6aa0cb5f39e48627850680b87ec688070f8 (patch)
tree85d0cebebea663c5b7016986e29dc660989f7f57 /sound
parentee23cf37fd586769febab95e2fbbbb50da5f9f2d (diff)
ASoC: qdsp6: q6asm: add support to MP3 format
This patch adds support to mp3 format in ASM module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/qcom/qdsp6/q6asm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c
index e1cfa846a1dc..4f85cb19a309 100644
--- a/sound/soc/qcom/qdsp6/q6asm.c
+++ b/sound/soc/qcom/qdsp6/q6asm.c
@@ -12,6 +12,7 @@
12#include <linux/kref.h> 12#include <linux/kref.h>
13#include <linux/of.h> 13#include <linux/of.h>
14#include <uapi/sound/asound.h> 14#include <uapi/sound/asound.h>
15#include <uapi/sound/compress_params.h>
15#include <linux/delay.h> 16#include <linux/delay.h>
16#include <linux/slab.h> 17#include <linux/slab.h>
17#include <linux/mm.h> 18#include <linux/mm.h>
@@ -36,6 +37,7 @@
36#define ASM_PARAM_ID_ENCDEC_ENC_CFG_BLK_V2 0x00010DA3 37#define ASM_PARAM_ID_ENCDEC_ENC_CFG_BLK_V2 0x00010DA3
37#define ASM_SESSION_CMD_RUN_V2 0x00010DAA 38#define ASM_SESSION_CMD_RUN_V2 0x00010DAA
38#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2 0x00010DA5 39#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2 0x00010DA5
40#define ASM_MEDIA_FMT_MP3 0x00010BE9
39#define ASM_DATA_CMD_WRITE_V2 0x00010DAB 41#define ASM_DATA_CMD_WRITE_V2 0x00010DAB
40#define ASM_DATA_CMD_READ_V2 0x00010DAC 42#define ASM_DATA_CMD_READ_V2 0x00010DAC
41#define ASM_SESSION_CMD_SUSPEND 0x00010DEC 43#define ASM_SESSION_CMD_SUSPEND 0x00010DEC
@@ -868,6 +870,9 @@ int q6asm_open_write(struct audio_client *ac, uint32_t format,
868 open->postprocopo_id = ASM_NULL_POPP_TOPOLOGY; 870 open->postprocopo_id = ASM_NULL_POPP_TOPOLOGY;
869 871
870 switch (format) { 872 switch (format) {
873 case SND_AUDIOCODEC_MP3:
874 open->dec_fmt_id = ASM_MEDIA_FMT_MP3;
875 break;
871 case FORMAT_LINEAR_PCM: 876 case FORMAT_LINEAR_PCM:
872 open->dec_fmt_id = ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2; 877 open->dec_fmt_id = ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2;
873 break; 878 break;