From patchwork Tue Nov 6 18:09:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 150329 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4204611ljp; Tue, 6 Nov 2018 10:09:25 -0800 (PST) X-Google-Smtp-Source: AJdET5dGrlRTaU8gRjTZezK05BkiPtmjkz9ZFCgevZk3SSH4ujVLSMiSCP9gR0WMc3AxBUUcb93S X-Received: by 2002:adf:f9d2:: with SMTP id w18-v6mr24728492wrr.134.1541527765809; Tue, 06 Nov 2018 10:09:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541527765; cv=none; d=google.com; s=arc-20160816; b=BzJ4lgJVMx7QJ9gXDOgKNGqqAIp/+y+c7oRI9g3J+n6ab4cuZ8nqkdtJXpMguNk8M4 mTpca1S8UwlRg6XyeJn6bNZB3i81q0PJ/s7+qIkNfpr/cWv27R4svE5cF1zmKZRpd5zc 2JT2dMRNjLB8fzZ8EbYIjuyPAA4+/gofMGGdAlnoCVKS5Ke0vja41KPd+o7RoIvu0r4R LQ7qvCtcJ3FEdieiIcLwz5pzOmxgo9YSo7ch58IxohbiG05Sneh/nKMeq3FvE2vqUSkJ FKDO4aTDvf47L5/tPTeypflTFCaP5cv4D3jgmRgQXuPxwEC0u5E9shW5MOZdm9HIfmdo bqNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to; bh=7UpLtz8xBtovnhuCOjYRqLaUPHZfdjJjM7+xFxo2q5I=; b=qFoDYJzK6TLzsLNTnJT12nvZ/IK9GynUD78ZeCmPcoAFRmOQP6e1xJfVtY0d3xgPXQ fOmBTiYGmwW6HhSui/qAEbXC39oey1Ox/NloJ6bONipbWbuwErbYvd9Ib7gaJHNkx8lS io2Hjpxe/Cd08lGeTPoOpbCLwLYyGY/WSkv+dB7ON+aatc9MatEAIT1negfDqWqTIXui x1nOGGM2iTapIm/+fxFWLHip8DYVSPGv8aJ6e//JZT+vptuWGfo3zg5wKCqcxMNJRHpm H6+NUwrZQ+q9SuWX6UqJ+8V5ZyvN3FJgZjAsil8WCDvloljKLKCZ8BuP1LuaqddD+bnz PrXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=DT9UHlQ8; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id m11-v6si16042516wrr.58.2018.11.06.10.09.25; Tue, 06 Nov 2018 10:09:25 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=DT9UHlQ8; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8BADA267ADD; Tue, 6 Nov 2018 19:09:24 +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 5D770267ADE; Tue, 6 Nov 2018 19:09:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 98333267ADA for ; Tue, 6 Nov 2018 19:09:20 +0100 (CET) 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=dsKZaT5envVcEY9dHMW2UeTSiepQ1TkKbLAg7KqHlFI=; b=DT9UHlQ8RkNZ yR8xe/0pmY4Qo22QuYcYWvkdkEQCGsZLLZ34zJ3NZ2LJkvOADNe+kHzmYfXsIcCINa6zs6kzpv6rG yz8i+IhrmrX8bWHICfLJSJzY91g9dEdnsDPgrlN+wyBQtuVLdbqK91B4Kipjsx4+8aqmVVyxLkvwy +MMvo=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gK5my-0002uE-37; Tue, 06 Nov 2018 18:09:20 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id CD2CB112266B; Tue, 6 Nov 2018 18:09:19 +0000 (GMT) From: Mark Brown To: Axel Lin In-Reply-To: <20181106093919.20740-1-axel.lin@ingics.com> Message-Id: <20181106180919.CD2CB112266B@debutante.sirena.org.uk> Date: Tue, 6 Nov 2018 18:09:19 +0000 (GMT) Cc: alsa-devel@alsa-project.org, Mark Brown , Daniel Baluta , Liam Girdwood Subject: [alsa-devel] Applied "ASoC: ak5558: Remove redundant snd_soc_component_read32 calls" to the asoc tree 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 The patch ASoC: ak5558: Remove redundant snd_soc_component_read32 calls 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 39dfdf00c7a56b2a8c01c596f6522f089428b1c7 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 6 Nov 2018 17:39:19 +0800 Subject: [PATCH] ASoC: ak5558: Remove redundant snd_soc_component_read32 calls snd_soc_component_update_bits() will only update the mask bits, so remove the redundant snd_soc_component_read32(). Signed-off-by: Axel Lin Reviewed-by: Daniel Baluta Signed-off-by: Mark Brown --- sound/soc/codecs/ak5558.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) -- 2.19.0.rc2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c index 60f1f12c81ea..8179512129d3 100644 --- a/sound/soc/codecs/ak5558.c +++ b/sound/soc/codecs/ak5558.c @@ -130,16 +130,12 @@ static int ak5558_hw_params(struct snd_pcm_substream *substream, u8 bits; int pcm_width = max(params_physical_width(params), ak5558->slot_width); - /* set master/slave audio interface */ - bits = snd_soc_component_read32(component, AK5558_02_CONTROL1); - bits &= ~AK5558_BITS; - switch (pcm_width) { case 16: - bits |= AK5558_DIF_24BIT_MODE; + bits = AK5558_DIF_24BIT_MODE; break; case 32: - bits |= AK5558_DIF_32BIT_MODE; + bits = AK5558_DIF_32BIT_MODE; break; default: return -EINVAL; @@ -168,18 +164,15 @@ static int ak5558_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt) } /* set master/slave audio interface */ - format = snd_soc_component_read32(component, AK5558_02_CONTROL1); - format &= ~AK5558_DIF; - switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_I2S: - format |= AK5558_DIF_I2S_MODE; + format = AK5558_DIF_I2S_MODE; break; case SND_SOC_DAIFMT_LEFT_J: - format |= AK5558_DIF_MSB_MODE; + format = AK5558_DIF_MSB_MODE; break; case SND_SOC_DAIFMT_DSP_B: - format |= AK5558_DIF_MSB_MODE; + format = AK5558_DIF_MSB_MODE; break; default: return -EINVAL;