Received: by 10.192.165.148 with SMTP id m20csp126231imm; Thu, 3 May 2018 16:19:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpbBKqW/Nj0hsppYFdNRlMut3Xv+lLejLqk9sBmEZanKGk9ga+zO3CgJ4h+jfUDdVB82rZK X-Received: by 2002:a65:434c:: with SMTP id k12-v6mr21076740pgq.109.1525389580953; Thu, 03 May 2018 16:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525389580; cv=none; d=google.com; s=arc-20160816; b=xc1gf/2Rii9b+u12dF7jx1/fxNoTmEF4Bk/e8BtPPzy1RcCJe9PQ28KxodNablvo8q sah7+akOPqEbUIAGhyFuuUXPV20r7CJ5WM4JlIC51TOGF41zHaRRZFb1wXcgJf9Vw353 siLFta+T+Dx5n+uhkFQC+G0SKAsD+wgeZWZdVdI7P4KMOdKAirDQZOJK2UCQDkUZtsI6 trcfZeSIQqdUTPNiComiS4rseF4fVpvUX1QtHALr0JFq4VR2wt1yrX1eVzmHvlDLa+DS 3VkTmsKqBY/qAm/rZf/QzwFPhizAl6hAd5G5aE3xgmRrDJlgYkpdZ9bk+xqMms5OUYzY eplw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=ylrfBE+7wZtm03abmEk5dHdeMUYdidtpICprHsms7Sc=; b=Onf8k1fYE4ryzvtr2D7KGSyTA5wGaN2Ty86fU1f2XmDSrViJYL7bLC7W0LhiJu7x33 SBjsCBMytV/r55hqZ9zmkfYhWLoO0nJiKF9SRS9rH2dOxznAaL3S/26Xvn58xDiSFQq+ SUT3k2PXwJ1vKzW/yrjy8KWMfypivclJpjAG4s6vnphHJc0SUa4gqQKaYaB5dYEH85Md Zec+SCs5fUv5XSLiXgkpXmuRz3q4rYc2md3jbmzbfUAPWP/bTqTwXxwejIc7BzXAjReF e3T0dY3to/pqVD38lQIGlAy67MAQe2Pd58WArX6bV1B4n0RoaSoaWl8MbHxMRmpKuicv WAqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ugTJXNnm; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f18-v6si11994302pgt.63.2018.05.03.16.19.25; Thu, 03 May 2018 16:19:40 -0700 (PDT) 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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=ugTJXNnm; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751137AbeECXTG (ORCPT + 99 others); Thu, 3 May 2018 19:19:06 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:57660 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965AbeECXTF (ORCPT ); Thu, 3 May 2018 19:19:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=ylrfBE+7wZtm03abmEk5dHdeMUYdidtpICprHsms7Sc=; b=ugTJXNnmFZm2 cvem1comswA1HESW4KHs8q6XbLUICMrdHyiPcRQrQWLrPgLCpHmwxTWlJiENCVoot+Zrw4ocONT3M ryxBFQEmrfRn5+WGORHCVJsjNxV/wCB2FAJ5jW77cooxP96/svASeelJCmZOVyv2Pas0mE5uEQpcN ly4Ws=; Received: from [211.55.52.16] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fENUy-0004ac-Jj; Thu, 03 May 2018 23:18:53 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 2B7AD44007A; Fri, 4 May 2018 00:18:48 +0100 (BST) From: Mark Brown To: Jean-Jacques Hiblot Cc: Mark Brown , broonie@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, perex@perex.cz, tiwai@suse.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, afd@ti.com, dannenberg@ti.com, alsa-devel@alsa-project.org Subject: Applied "ASoC: tas6424: Allow disabling auto diagnostics for faster power-on" to the asoc tree In-Reply-To: <1525332987-5266-1-git-send-email-jjhiblot@ti.com> Message-Id: <20180503231848.2B7AD44007A@finisterre.ee.mobilebroadband> Date: Fri, 4 May 2018 00:18:48 +0100 (BST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: tas6424: Allow disabling auto diagnostics for faster power-on has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 396888772ab738eca923d13fd3d55733091c5daf Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Thu, 3 May 2018 09:36:27 +0200 Subject: [PATCH] ASoC: tas6424: Allow disabling auto diagnostics for faster power-on The TAS6424 incorporates both DC-load and AC-load diagnostics which are used to determine the status of the load. The DC diagnostics runs when any channel is directed to leave the Hi-Z state and enter the MUTE or PLAY state. The DC diagnostics are turned on by default but, if a fast startup without diagnostics is required, the diagnostics can be disabled using a dedicated ALSA control. Signed-off-by: Jean-Jacques Hiblot Signed-off-by: Mark Brown --- sound/soc/codecs/tas6424.c | 13 +++++++++++-- sound/soc/codecs/tas6424.h | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tas6424.c b/sound/soc/codecs/tas6424.c index 89fd0c1b3903..14999b999fd3 100644 --- a/sound/soc/codecs/tas6424.c +++ b/sound/soc/codecs/tas6424.c @@ -64,6 +64,8 @@ static const struct snd_kcontrol_new tas6424_snd_controls[] = { TAS6424_CH3_VOL_CTRL, 0, 0xff, 0, dac_tlv), SOC_SINGLE_TLV("Speaker Driver CH4 Playback Volume", TAS6424_CH4_VOL_CTRL, 0, 0xff, 0, dac_tlv), + SOC_SINGLE_STROBE("Auto Diagnostics Switch", TAS6424_DC_DIAG_CTRL1, + TAS6424_LDGBYPASS_SHIFT, 1), }; static int tas6424_dac_event(struct snd_soc_dapm_widget *w, @@ -297,6 +299,11 @@ static int tas6424_power_on(struct snd_soc_component *component) struct tas6424_data *tas6424 = snd_soc_component_get_drvdata(component); int ret; u8 chan_states; + int no_auto_diags = 0; + unsigned int reg_val; + + if (!regmap_read(tas6424->regmap, TAS6424_DC_DIAG_CTRL1, ®_val)) + no_auto_diags = reg_val & TAS6424_LDGBYPASS_MASK; ret = regulator_bulk_enable(ARRAY_SIZE(tas6424->supplies), tas6424->supplies); @@ -327,9 +334,11 @@ static int tas6424_power_on(struct snd_soc_component *component) snd_soc_component_write(component, TAS6424_CH_STATE_CTRL, chan_states); /* any time we come out of HIZ, the output channels automatically run DC - * load diagnostics, wait here until this completes + * load diagnostics if autodiagnotics are enabled. wait here until this + * completes. */ - msleep(230); + if (!no_auto_diags) + msleep(230); return 0; } diff --git a/sound/soc/codecs/tas6424.h b/sound/soc/codecs/tas6424.h index 430588328a06..b5958c45ed0e 100644 --- a/sound/soc/codecs/tas6424.h +++ b/sound/soc/codecs/tas6424.h @@ -111,6 +111,10 @@ TAS6424_CH3_STATE_DIAG | \ TAS6424_CH4_STATE_DIAG) +/* TAS6424_DC_DIAG_CTRL1 */ +#define TAS6424_LDGBYPASS_SHIFT 0 +#define TAS6424_LDGBYPASS_MASK BIT(TAS6424_LDGBYPASS_SHIFT) + /* TAS6424_GLOB_FAULT1_REG */ #define TAS6424_FAULT_CLOCK BIT(4) #define TAS6424_FAULT_PVDD_OV BIT(3) -- 2.17.0