diff options
author | Maxime Ripard | 2021-05-25 15:23:47 +0200 |
---|---|---|
committer | Maxime Ripard | 2021-06-10 11:48:56 +0200 |
commit | 2fef64eec23a0840c97977b16dd8919afaffa876 (patch) | |
tree | a68df13178379d6cc406dbfbf145417360f4b91c /include/sound | |
parent | 7a8e1d44211e16eb394b7b9e0b236ee1503a3ad3 (diff) |
ASoC: hdmi-codec: Add a prepare hook
The IEC958 status bit is usually set by the userspace after hw_params
has been called, so in order to use whatever is set by the userspace, we
need to implement the prepare hook. Let's add it to the hdmi_codec_ops,
and mandate that either prepare or hw_params is implemented.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210525132354.297468-6-maxime@cerno.tech
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/hdmi-codec.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h index 4b3a1d374b90..4fc733c8c570 100644 --- a/include/sound/hdmi-codec.h +++ b/include/sound/hdmi-codec.h @@ -65,13 +65,23 @@ struct hdmi_codec_ops { /* * Configures HDMI-encoder for audio stream. - * Mandatory + * Having either prepare or hw_params is mandatory. */ int (*hw_params)(struct device *dev, void *data, struct hdmi_codec_daifmt *fmt, struct hdmi_codec_params *hparms); /* + * Configures HDMI-encoder for audio stream. Can be called + * multiple times for each setup. + * + * Having either prepare or hw_params is mandatory. + */ + int (*prepare)(struct device *dev, void *data, + struct hdmi_codec_daifmt *fmt, + struct hdmi_codec_params *hparms); + + /* * Shuts down the audio stream. * Mandatory */ |