Searched hist:"9 dd28b467c35eef320a2974f6b1f209343ad8704" (Results 1 – 1 of 1) sorted by relevance
/linux/sound/soc/codecs/ |
H A D | max98390.c | diff 9dd28b467c35eef320a2974f6b1f209343ad8704 Fri Sep 16 13:13:49 CEST 2022 Peter Ujfalusi <peter.ujfalusi@linux.intel.com> ASoC: max98390: Fix dsm calibration reading
With the change introduced by 6ac246105b4f, the calibration can only be done after the codec probe (but questionable if it is working since 203A_AMP_EN is 0) or when the codec is powered up for audio use, in other cases "AMP is not ready to run calibration" is printed.
This changes how this worked before the patch: the codec was force powered on for the duration of the calibration readout, then shut down. So, if a calibration was asked when the codec was active, it would have powered it down?
To correct the calibration logic: check if the codec is powered on and if it is not then enable it, do the readout and put it back to disabled. Do this while keeping the dapm locked to avoid interfering with normal operation via DAPM.
Fixes: 6ac246105b4f ("ASoC: max98390: Remove unnecessary amp on/off conrtol") Reported-by: Fred Oh <fred.oh@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220916111349.4433-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
|