26 #undef HPI_OS_LINUX_KERNEL
27 #define HPI_OS_LINUX_KERNEL
29 #define HPI_OS_DEFINED
30 #define HPI_BUILD_KERNEL_MODE
34 #include <linux/kernel.h>
35 #include <linux/string.h>
36 #include <linux/device.h>
39 #include <linux/pci.h>
42 #define HPI_NO_OS_FILE_OPS
60 *locked_mem_handle,
u32 *p_physical_addr)
62 *p_physical_addr = locked_mem_handle->
dma_handle;
67 *locked_mem_handle,
void **pp_virtual_addr)
69 *pp_virtual_addr = locked_mem_handle->
vaddr;
76 return locked_mem_handle->
size != 0;
87 #define HPI_IOCTL_LINUX _IOWR('H', 0xFC, struct hpi_ioctl_linux)
89 #define HPI_DEBUG_FLAG_ERROR KERN_ERR
90 #define HPI_DEBUG_FLAG_WARNING KERN_WARNING
91 #define HPI_DEBUG_FLAG_NOTICE KERN_NOTICE
92 #define HPI_DEBUG_FLAG_INFO KERN_INFO
93 #define HPI_DEBUG_FLAG_DEBUG KERN_DEBUG
94 #define HPI_DEBUG_FLAG_VERBOSE KERN_DEBUG
111 #define IN_LOCK_IRQ 0
118 spin_lock(&((l)->
lock));
121 spin_lock_bh(&((l)->
lock));
129 spin_unlock_bh(&((l)->lock));
131 spin_unlock(&((l)->lock));
134 #define hpios_msgxlock_init(obj) spin_lock_init(&(obj)->lock)
135 #define hpios_msgxlock_lock(obj) cond_lock(obj)
136 #define hpios_msgxlock_unlock(obj) cond_unlock(obj)
138 #define hpios_dsplock_init(obj) spin_lock_init(&(obj)->dsp_lock.lock)
139 #define hpios_dsplock_lock(obj) cond_lock(&(obj)->dsp_lock)
140 #define hpios_dsplock_unlock(obj) cond_unlock(&(obj)->dsp_lock)
142 #ifdef CONFIG_SND_DEBUG
143 #define HPI_BUILD_DEBUG
146 #define HPI_ALIST_LOCKING
147 #define hpios_alistlock_init(obj) spin_lock_init(&((obj)->list_lock.lock))
148 #define hpios_alistlock_lock(obj) spin_lock(&((obj)->list_lock.lock))
149 #define hpios_alistlock_unlock(obj) spin_unlock(&((obj)->list_lock.lock))