From nobody Tue Apr 7 19:39:39 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 40AC7C64990 for ; Thu, 25 Aug 2022 14:22:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235803AbiHYOWx (ORCPT ); Thu, 25 Aug 2022 10:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237971AbiHYOWp (ORCPT ); Thu, 25 Aug 2022 10:22:45 -0400 Received: from hutie.ust.cz (unknown [IPv6:2a03:3b40:fe:f0::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A11B4400 for ; Thu, 25 Aug 2022 07:22:43 -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=1661437361; bh=snL9pkaE4f5TuEA4/RFJEkEJWue+6V9/ZNAvLVwijxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HeX9EviMcDrqL8Cp3o0I0NsZip/wP6cx8O7XI+5Ljhjl/6Z/SFWupEWE9YXv94xr5 by5BUoeZ5p1lkrA6B4QHDvACKQx66lA5uSt9vj0SzOH9Iv/f25WY6E8A60Jq468iC1 2RS9jmNXinNuBKItlDGDRxdntaLPcgp9G1ydugIs= To: Liam Girdwood , Mark Brown Cc: navada@ti.com, shenghao-ding@ti.com, asyrus@ti.com, raphael-xu@ti.com, =?UTF-8?q?Martin=20Povi=C5=A1er?= , Stephen Kitt , Charles Keepax , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ASoC: tas2562: Drop conflicting set_bias_level power setting Date: Thu, 25 Aug 2022 16:22:25 +0200 Message-Id: <20220825142226.80929-2-povik+lin@cutebit.org> In-Reply-To: <20220825142226.80929-1-povik+lin@cutebit.org> References: <20220825142226.80929-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. (This mirrors commit c8a6ae3fe1c8 ("ASoC: tas2770: Drop conflicting set_bias_level power setting") which was a fix to the tas2770 driver.) Signed-off-by: Martin Povi=C5=A1er --- sound/soc/codecs/tas2562.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c index dc088a1c6721..2b0cdb6d1600 100644 --- a/sound/soc/codecs/tas2562.c +++ b/sound/soc/codecs/tas2562.c @@ -63,39 +63,6 @@ enum tas256x_model { TAS2110, }; =20 -static int tas2562_set_bias_level(struct snd_soc_component *component, - enum snd_soc_bias_level level) -{ - struct tas2562_data *tas2562 =3D - snd_soc_component_get_drvdata(component); - - switch (level) { - case SND_SOC_BIAS_ON: - snd_soc_component_update_bits(component, - TAS2562_PWR_CTRL, - TAS2562_MODE_MASK, TAS2562_ACTIVE); - break; - case SND_SOC_BIAS_STANDBY: - case SND_SOC_BIAS_PREPARE: - snd_soc_component_update_bits(component, - TAS2562_PWR_CTRL, - TAS2562_MODE_MASK, TAS2562_MUTE); - break; - case SND_SOC_BIAS_OFF: - snd_soc_component_update_bits(component, - TAS2562_PWR_CTRL, - TAS2562_MODE_MASK, TAS2562_SHUTDOWN); - break; - - default: - dev_err(tas2562->dev, - "wrong power level setting %d\n", level); - return -EINVAL; - } - - return 0; -} - static int tas2562_set_samplerate(struct tas2562_data *tas2562, int sample= rate) { int samp_rate; @@ -579,7 +546,6 @@ static const struct snd_soc_component_driver soc_compon= ent_dev_tas2110 =3D { .probe =3D tas2562_codec_probe, .suspend =3D tas2562_suspend, .resume =3D tas2562_resume, - .set_bias_level =3D tas2562_set_bias_level, .controls =3D tas2562_snd_controls, .num_controls =3D ARRAY_SIZE(tas2562_snd_controls), .dapm_widgets =3D tas2110_dapm_widgets, @@ -618,7 +584,6 @@ static const struct snd_soc_component_driver soc_compon= ent_dev_tas2562 =3D { .probe =3D tas2562_codec_probe, .suspend =3D tas2562_suspend, .resume =3D tas2562_resume, - .set_bias_level =3D tas2562_set_bias_level, .controls =3D tas2562_snd_controls, .num_controls =3D ARRAY_SIZE(tas2562_snd_controls), .dapm_widgets =3D tas2562_dapm_widgets, --=20 2.33.0