summaryrefslogtreecommitdiffstats
path: root/alsa-pcm.h
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-09-20 17:23:42 +1000
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-26 17:27:34 +1100
commitc032639678c494710f685612acffeae9b0f603f3 (patch)
treedb5336923253e43bf717caead3a42ab21295b975 /alsa-pcm.h
parent3786b607d4dd5e738cbe491dbfb03c2283e74358 (diff)
Create avirt_stream structure in place of old config structures
Remove unnecessary extra memory allocation with the old config structures. We can store the snd_pcm pointer, which contains lots of info already. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'alsa-pcm.h')
-rwxr-xr-xalsa-pcm.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/alsa-pcm.h b/alsa-pcm.h
new file mode 100755
index 0000000..c45e2a7
--- /dev/null
+++ b/alsa-pcm.h
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * ALSA Virtual Soundcard
+ *
+ * alsa-pcm.h - AVIRT ALSA PCM interface
+ *
+ * Copyright (C) 2010-2018 Fiberdyne Systems Pty Ltd
+ */
+
+#ifndef __AVIRT_ALSA_PCM_H__
+#define __AVIRT_ALSA_PCM_H__
+
+#include "core.h"
+
+extern struct avirt_coreinfo coreinfo;
+extern struct snd_pcm_ops pcm_ops;
+
+/**
+ * pcm_buff_complete_cb - PCM buffer complete callback
+ * @substream: pointer to ALSA PCM substream
+ * @return 0 on success or error code otherwise
+ *
+ * This should be called from a child Audio Path once it has finished processing
+ * the PCM buffer
+ */
+int pcm_buff_complete_cb(struct snd_pcm_substream *substream);
+
+#endif // __AVIRT_ALSA_PCM_H__