From patchwork Fri Nov 14 04:14:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5303061 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 571819F440 for ; Fri, 14 Nov 2014 04:15:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 526E8201BB for ; Fri, 14 Nov 2014 04:15:31 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 12DAE2012B for ; Fri, 14 Nov 2014 04:15:30 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 557E5266511; Fri, 14 Nov 2014 05:15:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0FB2926050C; Fri, 14 Nov 2014 05:15:18 +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 0E1F2260522; Fri, 14 Nov 2014 05:15:17 +0100 (CET) Received: from mail-qg0-f52.google.com (mail-qg0-f52.google.com [209.85.192.52]) by alsa0.perex.cz (Postfix) with ESMTP id 140772604E8 for ; Fri, 14 Nov 2014 05:15:10 +0100 (CET) Received: by mail-qg0-f52.google.com with SMTP id z60so585742qgd.25 for ; Thu, 13 Nov 2014 20:15:09 -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; bh=OYbY61wwiMWx2GO2HZJWVUrZrO8ktPNjIynvc5QDopI=; b=IrwYUp68mxGVgxgCvN2dyEla9Loo3QmnmMq+/B0e34wPqpq1Z9YKTfDK1qjPqVok3i GmpOCoyurDWJ/Smar6ExJ5YBhV3Dj4GY1otzjCGNE/99OVO/io3BLAXN76MIHB+Rghid IVNqGrMBqwjME+AUKY2X6N2v4wsUTMTKf8QoEzUyt0Jdyq0sCcqqrW/VDI89vQiKg/L6 xJ5qNOK+Vl1cfciWFrVmwjLgeaosTKoxKbHn97KQMN2CSx9twCRbMUs+CsCx0HQw9e2l IFOgfjw0jfErU+IVWFQNUDwZm1Wff2SFhI20J8KbJ5FBo97R9qdO4HztBHgnODM1fLsD Bu6Q== X-Received: by 10.224.38.5 with SMTP id z5mr8299556qad.89.1415938509250; Thu, 13 Nov 2014 20:15:09 -0800 (PST) Received: from localhost.localdomain ([201.82.52.106]) by mx.google.com with ESMTPSA id i45sm13025052qge.8.2014.11.13.20.15.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Nov 2014 20:15:08 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Fri, 14 Nov 2014 02:14:47 -0200 Message-Id: <1415938487-20196-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Fabio Estevam , alsa-devel@alsa-project.org, craig.mcqueen@beamcommunications.com, michael@amarulasolutions.com Subject: [alsa-devel] [PATCH] ASoC: sgtl5000: Fix SMALL_POP bit definition 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen 5 seconds after the end of a playback. The SMALL_POP bit should fix this, but its definition is incorrect: according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not bit 1. Fix the definition accordingly and enable the bit as intended per the code comment. After applying this change, no loud 'click' sound is heard after playback Signed-off-by: Fabio Estevam --- sound/soc/codecs/sgtl5000.c | 3 +-- sound/soc/codecs/sgtl5000.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 6bb77d7..dab9b15 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1299,8 +1299,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) /* enable small pop, introduce 400ms delay in turning off */ snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL, - SGTL5000_SMALL_POP, - SGTL5000_SMALL_POP); + SGTL5000_SMALL_POP, 1); /* disable short cut detector */ snd_soc_write(codec, SGTL5000_CHIP_SHORT_CTRL, 0); diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h index 2f8c889..bd7a344 100644 --- a/sound/soc/codecs/sgtl5000.h +++ b/sound/soc/codecs/sgtl5000.h @@ -275,7 +275,7 @@ #define SGTL5000_BIAS_CTRL_MASK 0x000e #define SGTL5000_BIAS_CTRL_SHIFT 1 #define SGTL5000_BIAS_CTRL_WIDTH 3 -#define SGTL5000_SMALL_POP 0x0001 +#define SGTL5000_SMALL_POP 0 /* * SGTL5000_CHIP_MIC_CTRL