summaryrefslogtreecommitdiffstats
path: root/core.h
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-03-01 17:20:29 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-03-05 10:33:28 +1100
commitdda7b36122998602a11462398fc0072c0f418bd5 (patch)
tree3eac58bd8573264f08fe821edec0228e2d46e197 /core.h
parent9dc9e5314bb53dd1591132e643fe35df237d5a19 (diff)
Move sysfs functionality to sysfs.c
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.h')
-rw-r--r--core.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/core.h b/core.h
index 6dc3333..e83631f 100644
--- a/core.h
+++ b/core.h
@@ -27,6 +27,12 @@ struct snd_avirt_core {
bool streams_sealed;
};
+struct snd_avirt_audiopath_obj {
+ struct kobject kobj;
+ struct list_head list;
+ struct snd_avirt_audiopath *path;
+};
+
/**
* snd_avirt_configfs_init - Initialise the configfs system
* @core: The snd_avirt_core pointer
@@ -41,6 +47,34 @@ int __init snd_avirt_configfs_init(struct snd_avirt_core *core);
void __exit snd_avirt_configfs_exit(struct snd_avirt_core *core);
/**
+ * snd_avirt_sysfs_init - Initialise the sysfs system
+ * @core: The snd_avirt_core pointer
+ * @return: 0 on success, negative ERRNO on failure
+ */
+int __init snd_avirt_sysfs_init(struct snd_avirt_core *core);
+
+/**
+ * snd_avirt_sysfs_exit - Clean up and exit the sysfs system
+ * @core: The snd_avirt_core pointer
+ */
+void __exit snd_avirt_sysfs_exit(struct snd_avirt_core *core);
+
+/**
+ * snd_avirt_audiopath_obj - creates an Audio Path object, assigns the kset
+ * and registers it with sysfs.
+ * @uid: Unique ID of the Audio Path
+ * @return: Pointer to the Audio Path object or NULL if it failed.
+ */
+struct snd_avirt_audiopath_obj *snd_avirt_audiopath_create_obj(const char *uid);
+
+/**
+ * snd_avirt_audiopath_destroy_obj - destroys an Audio Path object, deregisters
+ * it with sysfs
+ * @name: the Audio Path object
+ */
+void snd_avirt_audiopath_destroy_obj(struct snd_avirt_audiopath_obj *p);
+
+/**
* snd_avirt_streams_seal - Register the sound card to user space
* @return: 0 on success, negative ERRNO on failure
*/