summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_component.h
diff options
context:
space:
mode:
authorStefan Binding <sbinding@opensource.cirrus.com>2023-07-21 18:18:12 +0300
committerTakashi Iwai <tiwai@suse.de>2023-07-24 12:00:02 +0300
commit4eae4892c5bdef990b4b80997b813e2443d6554c (patch)
tree82797365b26826bc23923e5d553db19693af3cec /sound/pci/hda/hda_component.h
parenta5adbfb60b0299e788189aa8f88d8fa0dafb9d65 (diff)
downloadlinux-4eae4892c5bdef990b4b80997b813e2443d6554c.tar.xz
ALSA: hda: hda_component: Add pre and post playback hooks to hda_component
These hooks can be used to add callbacks that would be run before and after the main playback hooks. These hooks would be called for all amps, before moving on to the next hook, i.e. pre_playback_hook would be called for all amps, before the playback_hook is called for all amps, then finally the post_playback_hook is called for all amps. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230721151816.2080453-8-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_component.h')
-rw-r--r--sound/pci/hda/hda_component.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_component.h b/sound/pci/hda/hda_component.h
index 534e845b9cd1..f170aec967c1 100644
--- a/sound/pci/hda/hda_component.h
+++ b/sound/pci/hda/hda_component.h
@@ -15,5 +15,7 @@ struct hda_component {
struct device *dev;
char name[HDA_MAX_NAME_SIZE];
struct hda_codec *codec;
+ void (*pre_playback_hook)(struct device *dev, int action);
void (*playback_hook)(struct device *dev, int action);
+ void (*post_playback_hook)(struct device *dev, int action);
};