OSDN Git Service

ALSA: hda: cs35l41: Use pre and post playback hooks
authorStefan Binding <sbinding@opensource.cirrus.com>
Fri, 21 Jul 2023 15:18:13 +0000 (16:18 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 24 Jul 2023 09:00:03 +0000 (11:00 +0200)
commit01ecc562936439cf6dd08b5f8c6bbed2704d9f9e
treeba125129ab08915a65e614a61501dae485bd8241
parent4eae4892c5bdef990b4b80997b813e2443d6554c
ALSA: hda: cs35l41: Use pre and post playback hooks

Use new hooks to ensure separation between play/pause actions,
as required by external boost.

External Boost on CS35L41 requires the amp to go through a
particular sequence of steps. One of these steps involes
the setting of a GPIO. This GPIO is connected to one or
more of the amps, and it may control the boost for all of
the amps. To ensure that the GPIO is set when it is safe
to do so, and to ensure that boost is ready for the rest of
the sequence to be able to continue, we must ensure that
the each part of the sequence is executed for each amp
before moving on to the next part of the sequence.

Some of the Play and Pause actions have moved from Open to
Prepare. This is because Open is not guaranteed to be called
again on system resume, whereas Prepare should.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230721151816.2080453-9-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/cs35l41_hda.c