From patchwork Thu Nov 15 18:13:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10684823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05C2113BB for ; Thu, 15 Nov 2018 18:16:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA6782C92A for ; Thu, 15 Nov 2018 18:16:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE5072CE25; Thu, 15 Nov 2018 18:16:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 670E82C92A for ; Thu, 15 Nov 2018 18:16:08 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 95588267B20; Thu, 15 Nov 2018 19:15:42 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id EFC10267B10; Thu, 15 Nov 2018 19:15:36 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by alsa0.perex.cz (Postfix) with ESMTP id 5BE8E267B0E for ; Thu, 15 Nov 2018 19:15:34 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id p2-v6so18791545wmc.2 for ; Thu, 15 Nov 2018 10:15:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LYRqNC3RC3C8D1z2RDljriVISNyoMdcAQwEZ0hOyVmY=; b=UeW0A/Hu7pYM3VodQ6SXBsirVZqx7FUK4P8KuwDC4JKYS3sSCXNHwgju59z99rJZCv 6sqgrVsLwoBv7m+pLy/vBjdzLs9NF0SyaPGvck9kttMzVuvj7GptY113n585mtKiIiaw d8orl/3jP/+feMIrB9lS/JHuzH5uRe6S91Ye0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LYRqNC3RC3C8D1z2RDljriVISNyoMdcAQwEZ0hOyVmY=; b=eFWhIzHOQQmsRf12g5/QPxTCf2Nni0otJeRcbJ6oPYJXEclIIMn5XihZ1RwXM7NZ3Z oG2EBeB4t8aAoW5Lpzvk2uE5M6Uni8R6OvLU5/bmTo9yStL1ShRK2DV5SL8X61NHNZx+ pPjUXzzjQWHyxsUvom5GblXIlGp8fWp9w/gGaz4+QseyqAoI0ej5WZ4mMgYH11ez4YZG obQXg89lH9KcKlVmrmtIZv0cfzW3c/0c+X6vRYDxdRhN8dgfyh2re0EmfYf/pvGediMy P8izv/iLKhx7fpZFXG9u5hvy02VPJC/VlKnZuwVM7bXJ+Giakith0wpq0Osb4V2f16V6 odkg== X-Gm-Message-State: AGRZ1gIrzTAJwf4eTlSbMEGkEOpr+nk8QP51mmFt+a1iwJOd8Org/46p rO1PTayC70sWauT1B70QzGgCkQ== X-Google-Smtp-Source: AJdET5dNZQSTLe+MI3Y1VD9bxx9xSY54XmCqitSZd1CYMQtra61b0f+WHB2x9RU7BnwWgqvCWWcnSw== X-Received: by 2002:a1c:d1cd:: with SMTP id i196mr5969547wmg.107.1542305734050; Thu, 15 Nov 2018 10:15:34 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id r76-v6sm20934737wmb.21.2018.11.15.10.15.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Nov 2018 10:15:33 -0800 (PST) From: Srinivas Kandagatla To: broonie@kernel.org, vkoul@kernel.org Date: Thu, 15 Nov 2018 18:13:23 +0000 Message-Id: <20181115181324.26784-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115181324.26784-1-srinivas.kandagatla@linaro.org> References: <20181115181324.26784-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, tiwai@suse.com, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, robh+dt@kernel.org, rohitkr@codeaurora.org, srini@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH v3 4/5] ASoC: qdsp6: q6asm: add support to MP3 format X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds support to mp3 format in ASM module. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6asm.c | 5 +++++ 1 file changed, 5 insertions(+) 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 @@ #include #include #include +#include #include #include #include @@ -36,6 +37,7 @@ #define ASM_PARAM_ID_ENCDEC_ENC_CFG_BLK_V2 0x00010DA3 #define ASM_SESSION_CMD_RUN_V2 0x00010DAA #define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2 0x00010DA5 +#define ASM_MEDIA_FMT_MP3 0x00010BE9 #define ASM_DATA_CMD_WRITE_V2 0x00010DAB #define ASM_DATA_CMD_READ_V2 0x00010DAC #define ASM_SESSION_CMD_SUSPEND 0x00010DEC @@ -868,6 +870,9 @@ int q6asm_open_write(struct audio_client *ac, uint32_t format, open->postprocopo_id = ASM_NULL_POPP_TOPOLOGY; switch (format) { + case SND_AUDIOCODEC_MP3: + open->dec_fmt_id = ASM_MEDIA_FMT_MP3; + break; case FORMAT_LINEAR_PCM: open->dec_fmt_id = ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2; break;