lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 120/244] ASoC: tas2770: Drop conflicting set_bias_level power setting
    Date
    From: Martin Povišer <povik+lin@cutebit.org>

    commit 482c23fbc7e9bf5a7a74defd0735d5346215db58 upstream.

    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šer <povik+lin@cutebit.org>
    Link: https://lore.kernel.org/r/20220808141246.5749-4-povik+lin@cutebit.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    sound/soc/codecs/tas2770.c | 33 ---------------------------------
    1 file changed, 33 deletions(-)

    --- a/sound/soc/codecs/tas2770.c
    +++ b/sound/soc/codecs/tas2770.c
    @@ -46,38 +46,6 @@ static void tas2770_reset(struct tas2770
    usleep_range(1000, 2000);
    }

    -static int tas2770_set_bias_level(struct snd_soc_component *component,
    - enum snd_soc_bias_level level)
    -{
    - struct tas2770_priv *tas2770 =
    - 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_dr
    .probe = tas2770_codec_probe,
    .suspend = tas2770_codec_suspend,
    .resume = tas2770_codec_resume,
    - .set_bias_level = tas2770_set_bias_level,
    .controls = tas2770_snd_controls,
    .num_controls = ARRAY_SIZE(tas2770_snd_controls),
    .dapm_widgets = tas2770_dapm_widgets,

    \
     
     \ /
      Last update: 2022-08-23 12:10    [W:4.190 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site