From nobody Sat Apr 11 20:14:05 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B246C00140 for ; Mon, 8 Aug 2022 14:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243595AbiHHOVg (ORCPT ); Mon, 8 Aug 2022 10:21:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243467AbiHHOVW (ORCPT ); Mon, 8 Aug 2022 10:21:22 -0400 Received: from hutie.ust.cz (unknown [IPv6:2a03:3b40:fe:f0::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0856BF5A6 for ; Mon, 8 Aug 2022 07:21:18 -0700 (PDT) From: =?UTF-8?q?Martin=20Povi=C5=A1er?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1659968029; bh=odD+Lb+pa0FPCQEPZICIcBt216AndpEzsCiglXQnk/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OGE7d3z2O8XJcQmoM5601IiE2Xiju0oxCBly/qlfwnFY8j5zXzb3CXklNCjrPsFyF ZzCK3r0P7R4iCmu3IENMVP5V3BNaTAKV81/fXGQGMfXlgK9K4qVH+ByupYIBToJczY o38yTQKeCAMJ6atW62jIifEl6412rVq7UzcIB6WM= To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: =?UTF-8?q?Martin=20Povi=C5=A1er?= , Stephen Kitt , Frank Shi , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, asahi@lists.linux.dev Subject: [PATCH 3/4] ASoC: tas2770: Drop conflicting set_bias_level power setting Date: Mon, 8 Aug 2022 16:12:45 +0200 Message-Id: <20220808141246.5749-4-povik+lin@cutebit.org> In-Reply-To: <20220808141246.5749-1-povik+lin@cutebit.org> References: <20220808141246.5749-1-povik+lin@cutebit.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Martin Povi=C5=A1er --- sound/soc/codecs/tas2770.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index db446db88df5..10a79f8139be 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -46,38 +46,6 @@ static void tas2770_reset(struct tas2770_priv *tas2770) usleep_range(1000, 2000); } =20 -static int tas2770_set_bias_level(struct snd_soc_component *component, - enum snd_soc_bias_level level) -{ - struct tas2770_priv *tas2770 =3D - snd_soc_component_get_drvdata(component); - - switch (level) { - case SND_SOC_BIAS_ON: - snd_soc_component_update_bits(component, TAS2770_PWR_CTRL, - TAS2770_PWR_CTRL_MASK, - TAS2770_PWR_CTRL_ACTIVE); - break; - case SND_SOC_BIAS_STANDBY: - case SND_SOC_BIAS_PREPARE: - snd_soc_component_update_bits(component, TAS2770_PWR_CTRL, - TAS2770_PWR_CTRL_MASK, - TAS2770_PWR_CTRL_MUTE); - break; - case SND_SOC_BIAS_OFF: - snd_soc_component_update_bits(component, TAS2770_PWR_CTRL, - TAS2770_PWR_CTRL_MASK, - TAS2770_PWR_CTRL_SHUTDOWN); - break; - - default: - dev_err(tas2770->dev, "wrong power level setting %d\n", level); - return -EINVAL; - } - - return 0; -} - #ifdef CONFIG_PM static int tas2770_codec_suspend(struct snd_soc_component *component) { @@ -555,7 +523,6 @@ static const struct snd_soc_component_driver soc_compon= ent_driver_tas2770 =3D { .probe =3D tas2770_codec_probe, .suspend =3D tas2770_codec_suspend, .resume =3D tas2770_codec_resume, - .set_bias_level =3D tas2770_set_bias_level, .controls =3D tas2770_snd_controls, .num_controls =3D ARRAY_SIZE(tas2770_snd_controls), .dapm_widgets =3D tas2770_dapm_widgets, --=20 2.33.0