OSDN Git Service

ASoC: max98357a: move control of SD_MODE to DAPM
authorTzung-Bi Shih <tzungbi@google.com>
Wed, 12 Feb 2020 05:55:16 +0000 (13:55 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 12 Feb 2020 19:44:34 +0000 (19:44 +0000)
commit128f825aeab79ebff9679a84f49105eda85ecf2c
treed9537daab22b72f5be7caeb1944461260b169bb3
parent681c896ceb411ccd2ce0a88059d86ccf8d7a497e
ASoC: max98357a: move control of SD_MODE to DAPM

Some machine may share the same I2S lines for multiple codecs. For
example, mediatek/mt8183/mt8183-da7219-max98357 shares the same lines
between max98357a and da7219.  When writing audio data through the I2S
lines, all codecs on the lines would try to generate sound if they
accepts DO line.  As a result, multiple codecs generate sound at a
time.

Moves control of SD_MODE to DAPM so that machine drivers have chances
to manipulate DAPM widget to turn on/off max98357a.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200212124608.1.I73b26b5e319de173d05823e79f5861bf1826261c@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98357a.c