Skip to content

Commit

Permalink
Allow more granularity in dspbridge API
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
  • Loading branch information
Felipe Contreras authored and felipec committed Jul 3, 2010
1 parent 03b7c3a commit 9fe587d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -6,7 +6,9 @@ CFLAGS := -O2 -Wall -Wextra -Wno-unused-parameter -std=c99
override CFLAGS += -D_GNU_SOURCE

ifndef OLD
override CFLAGS += -DNEW_API
override CFLAGS += -DDSP_API=1
else
override CFLAGS += -DDSP_API=0
endif

ifdef DEBUG
Expand Down
6 changes: 3 additions & 3 deletions dsp_bridge.c
Expand Up @@ -62,7 +62,7 @@
#define DB_MODULE_MASK 0xE0
#define DB_IOC_MASK 0x1F

#ifdef NEW_API
#if DSP_API >= 1

#include <linux/ioctl.h>

Expand All @@ -77,7 +77,7 @@
#define DB_IOC(module, num) \
(((module) & DB_MODULE_MASK) | ((num) & DB_IOC_MASK))

#else /* NEW_API */
#elif DSP_API

#define DB_MGR 1
#define DB_PROC 7
Expand All @@ -95,7 +95,7 @@
#define _IOW(type, nr, size) (nr)
#define _IOWR(type, nr, size) (nr)

#endif /* NEW_API */
#endif /* DSP_API */

/* MGR Module */
#define MGR_WAIT _IOWR(DB, DB_IOC(DB_MGR, 4), unsigned long)
Expand Down

0 comments on commit 9fe587d

Please sign in to comment.