From patchwork Mon Oct 24 11:29:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10001 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp616525wru; Mon, 24 Oct 2022 12:29:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77ODfQU5MvKVzkedQTgCH1YL1tMnAMYuNPi9OUGx6BhqaHxS+zoM07sUgqr8MS9RPsUOKY X-Received: by 2002:a17:906:5daa:b0:78d:fa76:f837 with SMTP id n10-20020a1709065daa00b0078dfa76f837mr28206954ejv.239.1666639762548; Mon, 24 Oct 2022 12:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666639762; cv=none; d=google.com; s=arc-20160816; b=xffWtBCUyTy+nw7Jj5rzvy127QOxBXDSgUSbbMhjgT0hKHH+ODjk1e6UffvT590RoU 4OFM0MPZh7oEd1G0pV5Ew8Xk87Z4sChoKVv7g2JHvnzOcN8gA63PxqvY0Se7rhhmLVvf 12suuAajAOU8M2DTqzfxb/QYw6wHsu+7VcA2yAfH2m0KKtlTMuzvATaL7+WcX5hCP0bz WzY9ERuGyTl54y+NFtgSzVgMze3KZQi3xtqQRSxvdhysUJ69488Ad1UQN/Vxo835KJnc vovNgORYzSz47H7zSV4RMK9qk94O0UroZ+yHIt7jQtivRQp/TEkAhun9b65Xi6DoL7E3 IKMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fgb6M4X+EIwXk/DCMmi+ug+8qtFYRyBfWMYMGDETYUk=; b=g7UsJvL3/V+ipVoEcRpDFO4DtQhQZ5EtPYPuPiNn4I75UAkPpBTWhI3YsKPzfGPBck vnpYEWf+TDp4HSKEImhJv5uKa+H+twBdB9sqhWZrjQZV0Agp9/4/FpbSYdNkwf6ZIGd2 6ou3aPDPe9YbbkxeHjP4ZCTyZN3TkV9/CtRGI1oDi0pvnVxMQL/E9T9of9JMpGaY5xUb zdUI7kvfRykmRN75lqTqXTf1ldomzhJ4TXcItAlQKZLa8+LeOXuQ6IaGz82ShQWkT/ES x3JH8quguGtJnZ4oXg/2AYahw9VRLmHpfQsJ1WlDf6a8Q4upy7UO5BEbko4On4Ca9j7f 8bMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eGw0zXVK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p23-20020a05640210d700b00461f9648c7dsi460634edu.422.2022.10.24.12.28.55; Mon, 24 Oct 2022 12:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eGw0zXVK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233239AbiJXT0q (ORCPT + 99 others); Mon, 24 Oct 2022 15:26:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231441AbiJXTYo (ORCPT ); Mon, 24 Oct 2022 15:24:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E87AC4C25; Mon, 24 Oct 2022 10:58:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EB1BCB8199E; Mon, 24 Oct 2022 12:42:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44D8CC433D6; Mon, 24 Oct 2022 12:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615358; bh=yFICbyVM8BgNcPfifIhOQsq5a8XozO4z6144M/HeQM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eGw0zXVKaJBBylPyzS3jCQifZCbKbMETk8WSN8D1wERjALMrqLsNpkje1zx04ZPhA sK2uzcQWl293HV8Yy7q2yNZiI3RWs+u8SMICYAdsvsB6epUWAxoQvP6IymMwG7xoF5 EoqlShStV/rUkG+6UzmrnMxkbYKIyBl/llLLJpIA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?utf-8?q?Martin_Povi=C5=A1er?= , Mark Brown , Sasha Levin Subject: [PATCH 5.15 220/530] ASoC: tas2764: Drop conflicting set_bias_level power setting Date: Mon, 24 Oct 2022 13:29:24 +0200 Message-Id: <20221024113055.049925924@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747598455568972891?= X-GMAIL-MSGID: =?utf-8?q?1747598455568972891?= From: Martin Povišer [ Upstream commit 09273f38832406db19a8907a934687cc10660a6b ] The driver is setting the PWR_CTRL field in both the set_bias_level callback and on DAPM events of the DAC widget (and also in the mute_stream method). Drop the set_bias_level callback altogether as the power setting it does is in conflict with the other code paths. (This mirrors commit c8a6ae3fe1c8 ("ASoC: tas2770: Drop conflicting set_bias_level power setting") which was a fix to the tas2770 driver.) Fixes: 827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764") Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20220825140241.53963-3-povik+lin@cutebit.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/tas2764.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c index d0b6c174186d..e76ce90c787f 100644 --- a/sound/soc/codecs/tas2764.c +++ b/sound/soc/codecs/tas2764.c @@ -50,38 +50,6 @@ static void tas2764_reset(struct tas2764_priv *tas2764) usleep_range(1000, 2000); } -static int tas2764_set_bias_level(struct snd_soc_component *component, - enum snd_soc_bias_level level) -{ - struct tas2764_priv *tas2764 = snd_soc_component_get_drvdata(component); - - switch (level) { - case SND_SOC_BIAS_ON: - snd_soc_component_update_bits(component, TAS2764_PWR_CTRL, - TAS2764_PWR_CTRL_MASK, - TAS2764_PWR_CTRL_ACTIVE); - break; - case SND_SOC_BIAS_STANDBY: - case SND_SOC_BIAS_PREPARE: - snd_soc_component_update_bits(component, TAS2764_PWR_CTRL, - TAS2764_PWR_CTRL_MASK, - TAS2764_PWR_CTRL_MUTE); - break; - case SND_SOC_BIAS_OFF: - snd_soc_component_update_bits(component, TAS2764_PWR_CTRL, - TAS2764_PWR_CTRL_MASK, - TAS2764_PWR_CTRL_SHUTDOWN); - break; - - default: - dev_err(tas2764->dev, - "wrong power level setting %d\n", level); - return -EINVAL; - } - - return 0; -} - #ifdef CONFIG_PM static int tas2764_codec_suspend(struct snd_soc_component *component) { @@ -549,7 +517,6 @@ static const struct snd_soc_component_driver soc_component_driver_tas2764 = { .probe = tas2764_codec_probe, .suspend = tas2764_codec_suspend, .resume = tas2764_codec_resume, - .set_bias_level = tas2764_set_bias_level, .controls = tas2764_snd_controls, .num_controls = ARRAY_SIZE(tas2764_snd_controls), .dapm_widgets = tas2764_dapm_widgets,