From patchwork Fri Jan 8 23:22:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 7991081 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F1428BEEED for ; Fri, 8 Jan 2016 23:22:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 232DD201E4 for ; Fri, 8 Jan 2016 23:22:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3ECD4201EF for ; Fri, 8 Jan 2016 23:22:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F4C96E81A; Fri, 8 Jan 2016 15:22:34 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f67.google.com (mail-qg0-f67.google.com [209.85.192.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id B32146E815 for ; Fri, 8 Jan 2016 15:22:22 -0800 (PST) Received: by mail-qg0-f67.google.com with SMTP id o11so32615082qge.0 for ; Fri, 08 Jan 2016 15:22:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BbRgAjwCAfcGvbk7UUN4w55FI4kjZHZpJmzPGGdt0js=; b=eZj8qHelH+mMyNiRI8NoM6Jh5j6MPhp+9d83VEwBrWHJPHw3Hk6vloM9vICD5rL2/Y saAiCf+MAacR/FeL4jiNxsnuXAs+4ILz/FeaA9hiv31yVTmlFUV8Dqgo0Q7VGut7nWej d+9PfFQjmCzx3me7VjoFZddzJeLThEufISE/QqE46nF+PHRP21v46wea4oMiq0KF4JY5 McS70ejzct3SX00W6qd0pF82I0Tpvhu2cJ9ETMfaqWvyZIVTFeoHP3t8sjtalJxLsiuw rTwFhvq5MxvssQKjUzxnWyxvQk9YRTYM5Qk51eUoZIuFbfzyRpnoEgDPKt5zbbK7qwSi 8SwQ== X-Received: by 10.140.94.168 with SMTP id g37mr149632111qge.78.1452295341957; Fri, 08 Jan 2016 15:22:21 -0800 (PST) Received: from cm.localdomain (static-74-96-105-49.washdc.fios.verizon.net. [74.96.105.49]) by smtp.gmail.com with ESMTPSA id f83sm43834730qkb.25.2016.01.08.15.22.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jan 2016 15:22:21 -0800 (PST) From: Alex Deucher X-Google-Original-From: Alex Deucher To: airlied@gmail.com, dri-devel@lists.freedesktop.org, broonie@kernel.org, alsa-devel@alsa-project.org, maruthi.bayyavarapu@amd.com, rajeevkumar.linux@gmail.com Subject: [PATCH 3/9] ASoC: dwc: add quirk to override COMP_PARAM_1 register Date: Fri, 8 Jan 2016 18:22:05 -0500 Message-Id: <1452295331-28476-4-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452295331-28476-1-git-send-email-alexander.deucher@amd.com> References: <1452295331-28476-1-git-send-email-alexander.deucher@amd.com> Cc: Alex Deucher , Maruthi Srinivas Bayyavarapu , lgirdwood@gmail.com, perex@perex.cz X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Maruthi Srinivas Bayyavarapu DWC for capture in ACP 2.x IP reports playback and capture capabilities though it supports only capture. Added a quirk to override default value to represent capture capability only. Signed-off-by: Maruthi Bayyavarapu Signed-off-by: Alex Deucher --- include/sound/designware_i2s.h | 1 + sound/soc/dwc/designware_i2s.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/sound/designware_i2s.h b/include/sound/designware_i2s.h index e0bb458..5681855 100644 --- a/include/sound/designware_i2s.h +++ b/include/sound/designware_i2s.h @@ -46,6 +46,7 @@ struct i2s_platform_data { u32 snd_rates; #define DW_I2S_QUIRK_COMP_REG_OFFSET (1 << 0) + #define DW_I2S_QUIRK_COMP_PARAM1 (1 << 1) unsigned int quirks; unsigned int i2s_reg_comp1; unsigned int i2s_reg_comp2; diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c index 825a1f4..ce664c2 100644 --- a/sound/soc/dwc/designware_i2s.c +++ b/sound/soc/dwc/designware_i2s.c @@ -500,6 +500,10 @@ static int dw_configure_dai(struct dw_i2s_dev *dev, u32 comp2 = i2s_read_reg(dev->i2s_base, dev->i2s_reg_comp2); u32 idx; + if (dev->capability & DWC_I2S_RECORD && + dev->quirks & DW_I2S_QUIRK_COMP_PARAM1) + comp1 = comp1 & ~BIT(5); + if (COMP1_TX_ENABLED(comp1)) { dev_dbg(dev->dev, " designware: play supported\n"); idx = COMP1_TX_WORDSIZE_0(comp1);