[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230720133147.1294337-10-sbinding@opensource.cirrus.com>
Date: Thu, 20 Jul 2023 14:31:45 +0100
From: Stefan Binding <sbinding@...nsource.cirrus.com>
To: Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>
CC: <alsa-devel@...a-project.org>, <linux-kernel@...r.kernel.org>,
<patches@...nsource.cirrus.com>,
Stefan Binding <sbinding@...nsource.cirrus.com>
Subject: [PATCH v1 09/11] ALSA: hda/realtek: Support pre-/post- playback hooks for cs35l41
hda_component now supports pre and post playback hooks.
These should be called for each amp in a loop before moving on
to the next hook.
Signed-off-by: Stefan Binding <sbinding@...nsource.cirrus.com>
---
sound/pci/hda/patch_realtek.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ac29965951833..4aa49d37ed9e6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6716,9 +6716,17 @@ static void comp_generic_playback_hook(struct hda_pcm_stream *hinfo, struct hda_
int i;
for (i = 0; i < HDA_MAX_COMPONENTS; i++) {
- if (spec->comps[i].dev)
+ if (spec->comps[i].dev && spec->comps[i].pre_playback_hook)
+ spec->comps[i].pre_playback_hook(spec->comps[i].dev, action);
+ }
+ for (i = 0; i < HDA_MAX_COMPONENTS; i++) {
+ if (spec->comps[i].dev && spec->comps[i].playback_hook)
spec->comps[i].playback_hook(spec->comps[i].dev, action);
}
+ for (i = 0; i < HDA_MAX_COMPONENTS; i++) {
+ if (spec->comps[i].dev && spec->comps[i].post_playback_hook)
+ spec->comps[i].post_playback_hook(spec->comps[i].dev, action);
+ }
}
struct cs35l41_dev_name {
--
2.34.1
Powered by blists - more mailing lists