From patchwork Wed Oct 19 08:27:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4693 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp213135wrs; Wed, 19 Oct 2022 02:09:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5AZvI4WWKEKoAAa//UsPR9kJhIIaRr2dVV4UhuiXXFtWqafLmZeFuOmDsFIfIv6tCx8umT X-Received: by 2002:a05:6402:27d4:b0:45d:a69e:336d with SMTP id c20-20020a05640227d400b0045da69e336dmr6414927ede.298.1666170556382; Wed, 19 Oct 2022 02:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170556; cv=none; d=google.com; s=arc-20160816; b=BUP0PiZ9iz8rHtGyQdj9JUdYiy/YJdMSkZ1BVASM8ZUCDwyqlPzakzC0LNgQjUkPWb iiyQNDsmBZU1gSJqZn+ZW6hvdBSsUccdu7JbVbyyGBBab+LHfRpUsT2lzKa2nDovFEbj igzTlq4yXhLplW694SaQIGWGXFqtK5kI8cp0wNzcKh92S7i/4Zl9KxNwF0eAsmgugSLv xzdIsBIJ+fEKbdDEhOWaFYz50TZTQjpjLu0bYpVN3QFBeHwW9TV6b7y+swCg4yjZQvMh DLFEz/goR4rbPB+WD7GYRV06AJkwsuz3xZ/2wIswTyiHRrUBCc91TMif+0LILkMxsSv7 ljcg== 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=vI7s0nz1rv9pCyu39gyAepTTh8gweX5Xtdwjqi4d3qE=; b=a67lgCnPDUzrasfZS1ClesdejMBqU7VsJqPGqo46YFNH8kigVusUJEY13aXR0lx9i+ mL8Pe4PhWb+mCE7lLCrv5Jpi6wCr+rN7WtkKHuyKSruheBIiZsW8misU+B94Gp7a/Q9b gI5rd1FKG7giQuaZhoYhJicdis/ZK6n+mWQsgl6MkV4WSEM3u8VIobtWrwjiJHjxxqJ9 e3m4xNOfgh328pSmfx2XRvthpK5uuY75HlVuvbPzAvbaNenvf6DgZMGsKORnKv5dphFY UvpLLL9092iO2dPvdF+jNLoy1YrbQ2iz+LiyqnI44Rxn8L/mCebIJ0UxGBdLSwBKinnK 9pyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OaKUUM4u; 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 d38-20020a056402402600b0045cd5902d51si12583159eda.507.2022.10.19.02.08.50; Wed, 19 Oct 2022 02:09:16 -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=OaKUUM4u; 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 S232329AbiJSJEA (ORCPT + 99 others); Wed, 19 Oct 2022 05:04:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232248AbiJSJDI (ORCPT ); Wed, 19 Oct 2022 05:03:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B150B9AFBF; Wed, 19 Oct 2022 01:56:19 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E2747617E4; Wed, 19 Oct 2022 08:54:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0674EC433C1; Wed, 19 Oct 2022 08:54:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169687; bh=v2I5NFwDE412EDVLm4i5ccHXwxZyXlAQVO65ne0oE10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OaKUUM4uMPEOLqeFE0RX8giljA49usXm+QfZz19RecbbmHbd+KcmWhPzGVvjs+zsC Czvcb+Q7xfDqpT+vKhXDa2g1RUhnSR4cMdyPJPL46WPFWqrTBr5TsGSMgFLFCt0Lg7 ZRjRQSM74rC+RPAS+4yvObily5Vh28zO0z9OFiBc= 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 6.0 369/862] ASoC: tas2764: Drop conflicting set_bias_level power setting Date: Wed, 19 Oct 2022 10:27:36 +0200 Message-Id: <20221019083306.297168547@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747106457302163178?= X-GMAIL-MSGID: =?utf-8?q?1747106457302163178?= 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 0df5d975c3c9..f4ac6edefdc0 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,