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: 151236 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7327883ljp; Thu, 15 Nov 2018 10:15:39 -0800 (PST) X-Google-Smtp-Source: AJdET5fOg+vFDD+VcIj6gSjUgNkSCX6OkdZmN1wMXb4hK+9feRpYnveb5edhuz2r/YZ2SPbevknn X-Received: by 2002:a63:e915:: with SMTP id i21mr6633147pgh.409.1542305739083; Thu, 15 Nov 2018 10:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542305739; cv=none; d=google.com; s=arc-20160816; b=msCWvY8Wymx7hcUWBBPQ3Oe0y3RV82ABqs/1BSX+jlD+1N/UvonMVvNNVd5lh3chPW Snm1Fwkot+bO3z0ba8z6bJWU8zY9F7P1y7vlJBegGEqHcBpG3L+Xa00tN3Hsuu66QPJp SW0zPKAILIeHHJCRDc+ls2CwnAFMYXxlCsmd1gzoTtk+lDJF9i53BEnDmdRzKYZNzYxe aeIVh7wVmCfGUPqVISDaTQfmgv/EV/FGvhhQqxOmcMqaz98wo1HzLnyHcGSj8Beo/VaP FpZYzwR9Ivsqh70YKWc1MG9h0aFWYgZNGJu2MVWrhZbXlw+i+0AJdBbSmbK7bG1SHrD9 jbMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LYRqNC3RC3C8D1z2RDljriVISNyoMdcAQwEZ0hOyVmY=; b=fZ//DTUu69tMsHWxJX4IDctTcZ4QxKMi9kHdpyeKTBE1BRP6LQkd0KOo79W7mLcpo5 Dh9RD0GsVy+TCArdzSUnNzUJFXTbzkpCjzWdZPDDsFTSFuwpvvykgPUIZKYElDlVw+Pm moTygxbaMaydo+gXHG1xOZUGn0ZWcyeaCupZOdfdNvQFjdyuNCSm3Sl6m/evpLIPf8xg IeSgtMlb1Ob/mUkCwgeUyO44r8EvxQOM+NkamhWuzZzezelAgPHjrHUPSJGOhcRo3EPT V7vb8lNznhqgv1Z98EP0bgTHg/2XtnvRwpcxJTGX1z3Twa4DaaagV64yUOKNmu3pOn/s fu7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UeW0A/Hu"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21-v6si27859476plo.89.2018.11.15.10.15.38; Thu, 15 Nov 2018 10:15:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UeW0A/Hu"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388939AbeKPEY2 (ORCPT + 32 others); Thu, 15 Nov 2018 23:24:28 -0500 Received: from mail-wm1-f49.google.com ([209.85.128.49]:53433 "EHLO mail-wm1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388454AbeKPEY1 (ORCPT ); Thu, 15 Nov 2018 23:24:27 -0500 Received: by mail-wm1-f49.google.com with SMTP id f10-v6so19686883wme.3 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=ug/rblpIfz1Ewy0rYq/YJfLvBMAslyqhOwpG1vzwvV0DRJTr99c7QoMvijNm74u2cJ Ub4YEZO8cdG3LyVL/stsWYbUMYGyMSKVxPv1KKhIAH4tl2iFjVfgMy/hCgdXaGHzYAsG +2ICOENUGlH8Nj5XLpln8HpS+MqqRbuZ9hwacZM9nCBLLQRIJzoQof6auDAw+aZah3ul sgjVZRzn4cI8d/aTc0KqkOZQebwiZzkQYQ3ikk+RGBJeR+LLXYh+SZtKdOHTAbknjEPC YZuJGbaVzb6HmmUNWMIebEDOrcFOOskHyckavisOG94ep/MfdUNEVOBqvW55Y6k1T6w2 E97Q== X-Gm-Message-State: AGRZ1gK/0lAJkTeKOXmSbBQpM2tajaWMGasROD1vSXKfTnhFKNFGALSA /bYwdVYVYh+HJiHxdDFDMtxJxw== 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 Cc: alsa-devel@alsa-project.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, bgoswami@codeaurora.org, rohitkr@codeaurora.org, lgirdwood@gmail.com, tiwai@suse.com, devicetree@vger.kernel.org, srini@kernel.org, Srinivas Kandagatla Subject: [PATCH v3 4/5] ASoC: qdsp6: q6asm: add support to MP3 format 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.19.1 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;