summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2021-05-25 15:23:44 +0200
committerMaxime Ripard <maxime@cerno.tech>2021-06-08 17:05:41 +0200
commit9eafc11f921b8cb7d7e28ab1fdcf6b92fcbcb0be (patch)
tree697a95e9e49641f6272a71cda90097ba1378acf2 /include
parentaa7899537a4ec63ac3d58c9ece945c2750d22168 (diff)
downloadlinux-9eafc11f921b8cb7d7e28ab1fdcf6b92fcbcb0be.tar.bz2
ALSA: iec958: Split status creation and fill
In some situations, like a codec probe, we need to provide an IEC status default but don't have access to the sampling rate and width yet since no stream has been configured yet. Each and every driver has its own default, whereas the core iec958 code also has some buried in the snd_pcm_create_iec958_consumer functions. Let's split these functions in two to provide a default that doesn't rely on the sampling rate and width, and another function to fill them when available. Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210525132354.297468-3-maxime@cerno.tech
Diffstat (limited to 'include')
-rw-r--r--include/sound/pcm_iec958.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/pcm_iec958.h b/include/sound/pcm_iec958.h
index 0939aa45e2fe..64e84441cde1 100644
--- a/include/sound/pcm_iec958.h
+++ b/include/sound/pcm_iec958.h
@@ -4,6 +4,14 @@
#include <linux/types.h>
+int snd_pcm_create_iec958_consumer_default(u8 *cs, size_t len);
+
+int snd_pcm_fill_iec958_consumer(struct snd_pcm_runtime *runtime, u8 *cs,
+ size_t len);
+
+int snd_pcm_fill_iec958_consumer_hw_params(struct snd_pcm_hw_params *params,
+ u8 *cs, size_t len);
+
int snd_pcm_create_iec958_consumer(struct snd_pcm_runtime *runtime, u8 *cs,
size_t len);