mbox series

[v2,0/2] ASoC: max9867: keep ADCs and DACs always on

Message ID 20200522142957.18364-1-dobias@2n.cz
Headers show
Series ASoC: max9867: keep ADCs and DACs always on | expand

Message

Pavel Dobias May 22, 2020, 2:29 p.m. UTC
On 20. 05. 20 15:01, Mark Brown wrote:
> On Wed, May 20, 2020 at 09:19:02AM +0200, Pavel Dobias wrote:
>> Codec requires enabling of left and right ADCs in the same I2C write
>> operation which isn't fullfilled when controlled from DAPM and
>> causes unexpected behaviour of codec. The similar applies to DACs.
>> Enable ADCs and DACs once at startup and never switch them off
>> to solve the issue.
> It will be normally when the two channels are updated simultaneously
> though that doesn't stop the user doing something to update them
> separately.  In any case this would be better handled through moving the
> power control to either supply widgets or event callbacks rather than
> just giving up on power control entirely.

I found out that the codec requires toggling shutdown bit on each change
of the power management register (stated in the datasheet). I tried
that and it worked, even updating the two channels separately worked,
but toggling the shutdown bit causes a loud speaker crackling which
can't be suppressed by muting the DACs. It seems to me that
the best choice is to avoid changing the power management register
during the codec's operation to suppress speaker crackling.


Pavel Dobias (2):
  ASoC: max9867: add digital microphone controls
  ASoC: max9867: keep ADCs and DACs always on

 sound/soc/codecs/max9867.c | 45 ++++++++++++++++++++++++++++----------
 sound/soc/codecs/max9867.h |  1 -
 2 files changed, 33 insertions(+), 13 deletions(-)