aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--configfs.c3
-rw-r--r--core.c3
-rw-r--r--core_internal.h8
-rw-r--r--dummy/Makefile2
-rw-r--r--dummy/dummy.c2
-rw-r--r--loopback/Makefile2
-rw-r--r--loopback/loopback.c3
-rw-r--r--sound/avirt.h (renamed from core.h)23
-rw-r--r--utils.h14
10 files changed, 30 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index 44874ca..791a60a 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ avirt_core-y += configfs.o
ifeq ($(CONFIG_AVIRT_BUILDLOCAL),)
CCFLAGS_AVIRT := "drivers/staging/"
else
- CCFLAGS_AVIRT := "$(PWD)/../"
+ CCFLAGS_AVIRT := "$(PWD)"
endif
ccflags-y += -I${CCFLAGS_AVIRT}
diff --git a/configfs.c b/configfs.c
index 13e38b2..49eaa78 100644
--- a/configfs.c
+++ b/configfs.c
@@ -7,7 +7,8 @@
* configfs.c - AVIRT configfs support
*/
-#include <sound/core.h>
+#include <linux/slab.h>
+
#include "core_internal.h"
#define D_LOGNAME "configfs"
diff --git a/core.c b/core.c
index b63944a..6509b55 100644
--- a/core.c
+++ b/core.c
@@ -9,9 +9,8 @@
#include <linux/module.h>
#include <linux/string.h>
-#include <sound/core.h>
+#include <linux/slab.h>
#include <sound/initval.h>
-#include <avirt/core.h>
#include "core_internal.h"
diff --git a/core_internal.h b/core_internal.h
index 5bff1c8..f3fcb48 100644
--- a/core_internal.h
+++ b/core_internal.h
@@ -7,10 +7,10 @@
* core_internal.h - AVIRT internal header
*/
-#ifndef __AVIRT_CORE_INTERNAL_H__
-#define __AVIRT_CORE_INTERNAL_H__
+#ifndef __SOUND_AVIRT_CORE_H
+#define __SOUND_AVIRT_CORE_H
-#include <avirt/core.h>
+#include <sound/avirt.h>
#include "utils.h"
@@ -64,4 +64,4 @@ struct avirt_stream *__avirt_stream_find_by_device(unsigned int device);
*/
struct avirt_stream *__avirt_stream_create(const char *name, int direction);
-#endif // __AVIRT_CORE_INTERNAL_H__
+#endif /* __SOUND_AVIRT_CORE_H */
diff --git a/dummy/Makefile b/dummy/Makefile
index 965bd1a..78579d7 100644
--- a/dummy/Makefile
+++ b/dummy/Makefile
@@ -3,4 +3,4 @@ obj-$(CONFIG_AVIRT_DUMMYAP) += avirt_dummyap.o
$(info $(src))
avirt_dummyap-objs := dummy.o
ccflags-y += -Idrivers/staging/
-ccflags-y += -I$(src)/../../
+ccflags-y += -I$(src)/../
diff --git a/dummy/dummy.c b/dummy/dummy.c
index 596838d..100972a 100644
--- a/dummy/dummy.c
+++ b/dummy/dummy.c
@@ -13,7 +13,7 @@
#include <linux/module.h>
#include <linux/slab.h>
-#include <avirt/core.h>
+#include <sound/avirt.h>
MODULE_AUTHOR("James O'Shannessy <james.oshannessy@fiberdyne.com.au>");
MODULE_AUTHOR("Mark Farrugia <mark.farrugia@fiberdyne.com.au>");
diff --git a/loopback/Makefile b/loopback/Makefile
index 0464aba..9d3c606 100644
--- a/loopback/Makefile
+++ b/loopback/Makefile
@@ -4,4 +4,4 @@ obj-$(CONFIG_AVIRT_LOOPBACKAP) += avirt_loopbackap.o
$(info $(src))
avirt_loopbackap-objs := loopback.o
ccflags-y += -Idrivers/staging/
-ccflags-y += -I$(src)/../../
+ccflags-y += -I$(src)/../
diff --git a/loopback/loopback.c b/loopback/loopback.c
index acddf99..ba9225e 100644
--- a/loopback/loopback.c
+++ b/loopback/loopback.c
@@ -27,13 +27,12 @@
#include <linux/wait.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/info.h>
#include <sound/initval.h>
-#include <avirt/core.h>
+#include <sound/avirt.h>
MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
MODULE_DESCRIPTION("Loopback Audio Path for AVIRT");
diff --git a/core.h b/sound/avirt.h
index bac4fc0..5df84fe 100644
--- a/core.h
+++ b/sound/avirt.h
@@ -1,15 +1,16 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * ALSA Virtual Soundcard
+ * AVIRT - ALSA Virtual Soundcard
*
- * core.h - System-level header for virtual ALSA card
- *
- * Copyright (C) 2010-2018 Fiberdyne Systems Pty Ltd
+ * Copyright (c) 2010-2018 Fiberdyne Systems Pty Ltd
+ *
+ * avirt.h - AVIRT system-level header
*/
-#ifndef __AVIRT_CORE_H__
-#define __AVIRT_CORE_H__
+#ifndef __SOUND_AVIRT_H
+#define __SOUND_AVIRT_H
+#include <sound/core.h>
#include <sound/pcm.h>
#include <linux/configfs.h>
@@ -17,15 +18,13 @@
#define MAX_NAME_LEN 80
#define DINFO(logname, fmt, args...) \
- printk(KERN_INFO "[AVIRT][%s]: " fmt "\n", logname, ##args)
+ snd_printk(KERN_INFO "AVIRT: %s: " fmt "\n", logname, ##args)
#define DERROR(logname, fmt, args...) \
- printk(KERN_ERR "[AVIRT][%s]: %d:%s " fmt "\n", logname, __LINE__, \
- __func__, ##args)
+ snd_printk(KERN_ERR "AVIRT: %s: " fmt "\n", logname, ##args)
#define DDEBUG(logname, fmt, args...) \
- printk(KERN_DEBUG "[AVIRT][%s]: %d:%s " fmt "\n", logname, __LINE__, \
- __func__, ##args)
+ snd_printk(KERN_DEBUG "AVIRT: %s: " fmt "\n", logname, ##args)
/**
* AVIRT Audio Path configure function type
@@ -120,4 +119,4 @@ avirt_stream_from_config_item(struct config_item *item)
*/
void avirt_pcm_period_elapsed(struct snd_pcm_substream *substream);
-#endif // __AVIRT_CORE_H__
+#endif // __SOUND_AVIRT_H
diff --git a/utils.h b/utils.h
index 34e273f..844ee55 100644
--- a/utils.h
+++ b/utils.h
@@ -1,14 +1,14 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * ALSA Virtual Soundcard
+ * AVIRT - ALSA Virtual Soundcard
*
- * utils.h - Some useful utilities for AVIRT
- *
- * Copyright (C) 2010-2018 Fiberdyne Systems Pty Ltd
+ * Copyright (c) 2010-2018 Fiberdyne Systems Pty Ltd
+ *
+ * utils.h - Some useful macros/utils for AVIRT
*/
-#ifndef __AVIRT_UTILS_H__
-#define __AVIRT_UTILS_H__
+#ifndef __SOUND_AVIRT_UTILS_H
+#define __SOUND_AVIRT_UTILS_H
#include <linux/slab.h>
@@ -46,4 +46,4 @@
} \
} while (0)
-#endif
+#endif /* __SOUND_AVIRT_UTILS_H */