summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@kozmo.(none)>2003-04-09 22:52:33 -0700
committerJames Simmons <jsimmons@kozmo.(none)>2003-04-09 22:52:33 -0700
commit1e1b793fe5f235aedc0baa87bdba97170ce2aca8 (patch)
tree7481f106331eef9b0fab9d00b6cf8a8be1dace59 /include
parent2cb43aa086204d1b2949f4456158a69449c52549 (diff)
parent064d7c46a94c981cb227db17631d3d19d1ab0ab1 (diff)
Merge kozmo.(none):/usr/src/linus-2.5
into kozmo.(none):/usr/src/fbdev-2.5
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/siginfo.h1
-rw-r--r--include/asm-sparc/signal.h18
-rw-r--r--include/asm-sparc/uaccess.h145
-rw-r--r--include/asm-sparc64/signal.h18
-rw-r--r--include/asm-sparc64/uaccess.h47
-rw-r--r--include/linux/pnp.h19
-rw-r--r--include/sound/ac97_codec.h13
-rw-r--r--include/sound/asound.h11
-rw-r--r--include/sound/control.h43
-rw-r--r--include/sound/cs46xx.h3
-rw-r--r--include/sound/cs46xx_dsp_scb_types.h812
-rw-r--r--include/sound/cs46xx_dsp_spos.h24
-rw-r--r--include/sound/cs46xx_dsp_task_types.h124
-rw-r--r--include/sound/driver.h1
-rw-r--r--include/sound/emu10k1.h10
-rw-r--r--include/sound/hdsp.h92
-rw-r--r--include/sound/initval.h2
-rw-r--r--include/sound/memalloc.h15
-rw-r--r--include/sound/opl3.h3
-rw-r--r--include/sound/snd_wavefront.h12
-rw-r--r--include/sound/trident.h8
-rw-r--r--include/sound/ymfpci.h24
22 files changed, 967 insertions, 478 deletions
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index 209ba0222647..e12f55dbaee9 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -1,6 +1,7 @@
#ifndef _ASM_GENERIC_SIGINFO_H
#define _ASM_GENERIC_SIGINFO_H
+#include <linux/compiler.h>
#include <linux/types.h>
typedef union sigval {
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h
index dca2ae21f286..d8b0d4463184 100644
--- a/include/asm-sparc/signal.h
+++ b/include/asm-sparc/signal.h
@@ -118,10 +118,10 @@ struct sigstack {
};
/* Sigvec flags */
-#define SV_SSTACK 1 /* This signal handler should use sig-stack */
-#define SV_INTR 2 /* Sig return should not restart system call */
-#define SV_RESET 4 /* Set handler to SIG_DFL upon taken signal */
-#define SV_IGNCHILD 8 /* Do not send SIGCHLD */
+#define SV_SSTACK 1u /* This signal handler should use sig-stack */
+#define SV_INTR 2u /* Sig return should not restart system call */
+#define SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */
+#define SV_IGNCHILD 8u /* Do not send SIGCHLD */
/*
* sa_flags values: SA_STACK is not currently supported, but will allow the
@@ -137,11 +137,11 @@ struct sigstack {
#define SA_ONSTACK SV_SSTACK
#define SA_RESTART SV_INTR
#define SA_ONESHOT SV_RESET
-#define SA_INTERRUPT 0x10
-#define SA_NOMASK 0x20
-#define SA_SHIRQ 0x40
-#define SA_NOCLDWAIT 0x100
-#define SA_SIGINFO 0x200
+#define SA_INTERRUPT 0x10u
+#define SA_NOMASK 0x20u
+#define SA_SHIRQ 0x40u
+#define SA_NOCLDWAIT 0x100u
+#define SA_SIGINFO 0x200u
#define SIG_BLOCK 0x01 /* for blocking signals */
#define SIG_UNBLOCK 0x02 /* for unblocking signals */
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h
index 8abd61f88991..68e718b07ef5 100644
--- a/include/asm-sparc/uaccess.h
+++ b/include/asm-sparc/uaccess.h
@@ -8,6 +8,7 @@
#define _ASM_UACCESS_H
#ifdef __KERNEL__
+#include <linux/compiler.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/errno.h>
@@ -45,7 +46,7 @@
#define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size)))
#define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size))
-extern inline int verify_area(int type, const void * addr, unsigned long size)
+static inline int verify_area(int type, const void __user * addr, unsigned long size)
{
return access_ok(type,addr,size)?0:-EFAULT;
}
@@ -291,87 +292,87 @@ __asm__ __volatile__( \
extern int __get_user_bad(void);
-extern __kernel_size_t __copy_user(void *to, void *from, __kernel_size_t size);
-
-#define copy_to_user(to,from,n) ({ \
-void *__copy_to = (void *) (to); \
-__kernel_size_t __copy_size = (__kernel_size_t) (n); \
-__kernel_size_t __copy_res; \
-if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \
-__copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \
-} else __copy_res = __copy_size; \
-__copy_res; })
-
-#define __copy_to_user(to,from,n) \
- __copy_user((void *)(to), \
- (void *)(from), n)
-
-#define copy_from_user(to,from,n) ({ \
-void *__copy_to = (void *) (to); \
-void *__copy_from = (void *) (from); \
-__kernel_size_t __copy_size = (__kernel_size_t) (n); \
-__kernel_size_t __copy_res; \
-if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \
-__copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \
-} else __copy_res = __copy_size; \
-__copy_res; })
-
-#define __copy_from_user(to,from,n) \
- __copy_user((void *)(to), \
- (void *)(from), n)
-
-extern __inline__ __kernel_size_t __clear_user(void *addr, __kernel_size_t size)
+extern unsigned long __copy_user(void *to, const void *from, unsigned long size);
+
+static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)
{
- __kernel_size_t ret;
- __asm__ __volatile__ (
- ".section __ex_table,#alloc\n\t"
- ".align 4\n\t"
- ".word 1f,3\n\t"
- ".previous\n\t"
- "mov %2, %%o1\n"
- "1:\n\t"
- "call __bzero\n\t"
- " mov %1, %%o0\n\t"
- "mov %%o0, %0\n"
- : "=r" (ret) : "r" (addr), "r" (size) :
- "o0", "o1", "o2", "o3", "o4", "o5", "o7",
- "g1", "g2", "g3", "g4", "g5", "g7", "cc");
- return ret;
+ if (n && __access_ok((unsigned long) to, n))
+ return __copy_user((void *) to, from, n);
+ else
+ return n;
}
-#define clear_user(addr,n) ({ \
-void *__clear_addr = (void *) (addr); \
-__kernel_size_t __clear_size = (__kernel_size_t) (n); \
-__kernel_size_t __clear_res; \
-if(__clear_size && __access_ok((unsigned long)__clear_addr, __clear_size)) { \
-__clear_res = __clear_user(__clear_addr, __clear_size); \
-} else __clear_res = __clear_size; \
-__clear_res; })
-
-extern int __strncpy_from_user(unsigned long dest, unsigned long src, int count);
-
-#define strncpy_from_user(dest,src,count) ({ \
-unsigned long __sfu_src = (unsigned long) (src); \
-int __sfu_count = (int) (count); \
-long __sfu_res = -EFAULT; \
-if(__access_ok(__sfu_src, __sfu_count)) { \
-__sfu_res = __strncpy_from_user((unsigned long) (dest), __sfu_src, __sfu_count); \
-} __sfu_res; })
-
-extern int __strlen_user(const char *);
-extern int __strnlen_user(const char *, long len);
-
-extern __inline__ int strlen_user(const char *str)
+static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n)
+{
+ return __copy_user((void *)to, from, n);
+}
+
+static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)
+{
+ if (n && __access_ok((unsigned long) from, n))
+ return __copy_user(to, (void *) from, n);
+ else
+ return n;
+}
+
+static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n)
+{
+ return __copy_user(to, (void *)from, n);
+}
+
+static inline unsigned long __clear_user(void __user *addr, unsigned long size)
+{
+ unsigned long ret;
+
+ __asm__ __volatile__ (
+ ".section __ex_table,#alloc\n\t"
+ ".align 4\n\t"
+ ".word 1f,3\n\t"
+ ".previous\n\t"
+ "mov %2, %%o1\n"
+ "1:\n\t"
+ "call __bzero\n\t"
+ " mov %1, %%o0\n\t"
+ "mov %%o0, %0\n"
+ : "=r" (ret) : "r" (addr), "r" (size) :
+ "o0", "o1", "o2", "o3", "o4", "o5", "o7",
+ "g1", "g2", "g3", "g4", "g5", "g7", "cc");
+
+ return ret;
+}
+
+static inline unsigned long clear_user(void __user *addr, unsigned long n)
+{
+ if (n && __access_ok((unsigned long) addr, n))
+ return __clear_user(addr, n);
+ else
+ return n;
+}
+
+extern long __strncpy_from_user(char *dest, const char __user *src, long count);
+
+static inline long strncpy_from_user(char *dest, const char __user *src, long count)
+{
+ if (__access_ok((unsigned long) src, count))
+ return __strncpy_from_user(dest, src, count);
+ else
+ return -EFAULT;
+}
+
+extern long __strlen_user(const char __user *);
+extern long __strnlen_user(const char __user *, long len);
+
+static inline long strlen_user(const char __user *str)
{
- if(!access_ok(VERIFY_READ, str, 0))
+ if (!access_ok(VERIFY_READ, str, 0))
return 0;
else
return __strlen_user(str);
}
-extern __inline__ int strnlen_user(const char *str, long len)
+static inline long strnlen_user(const char __user *str, long len)
{
- if(!access_ok(VERIFY_READ, str, 0))
+ if (!access_ok(VERIFY_READ, str, 0))
return 0;
else
return __strnlen_user(str, len);
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index 73f5f5b307ac..24bda08d6173 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -123,10 +123,10 @@ struct sigstack {
};
/* Sigvec flags */
-#define SV_SSTACK 1 /* This signal handler should use sig-stack */
-#define SV_INTR 2 /* Sig return should not restart system call */
-#define SV_RESET 4 /* Set handler to SIG_DFL upon taken signal */
-#define SV_IGNCHILD 8 /* Do not send SIGCHLD */
+#define SV_SSTACK 1u /* This signal handler should use sig-stack */
+#define SV_INTR 2u /* Sig return should not restart system call */
+#define SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */
+#define SV_IGNCHILD 8u /* Do not send SIGCHLD */
/*
* sa_flags values: SA_STACK is not currently supported, but will allow the
@@ -142,11 +142,11 @@ struct sigstack {
#define SA_ONSTACK SV_SSTACK
#define SA_RESTART SV_INTR
#define SA_ONESHOT SV_RESET
-#define SA_INTERRUPT 0x10
-#define SA_NOMASK 0x20
-#define SA_SHIRQ 0x40
-#define SA_NOCLDWAIT 0x100
-#define SA_SIGINFO 0x200
+#define SA_INTERRUPT 0x10u
+#define SA_NOMASK 0x20u
+#define SA_SHIRQ 0x40u
+#define SA_NOCLDWAIT 0x100u
+#define SA_SIGINFO 0x200u
#define SIG_BLOCK 0x01 /* for blocking signals */
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h
index 62e5e5416e25..e12d46d40588 100644
--- a/include/asm-sparc64/uaccess.h
+++ b/include/asm-sparc64/uaccess.h
@@ -7,6 +7,7 @@
*/
#ifdef __KERNEL__
+#include <linux/compiler.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <asm/a.out.h>
@@ -52,7 +53,7 @@ do { \
#define __access_ok(addr,size) 1
#define access_ok(type,addr,size) 1
-static inline int verify_area(int type, const void * addr, unsigned long size)
+static inline int verify_area(int type, const void __user * addr, unsigned long size)
{
return 0;
}
@@ -249,44 +250,34 @@ __asm__ __volatile__( \
extern int __get_user_bad(void);
-extern __kernel_size_t __copy_from_user(void *to, const void *from,
- __kernel_size_t size);
+extern unsigned long __copy_from_user(void *to, const void __user *from,
+ unsigned long size);
-extern __kernel_size_t __copy_to_user(void *to, const void *from,
- __kernel_size_t size);
+extern unsigned long __copy_to_user(void __user *to, const void *from,
+ unsigned long size);
-extern __kernel_size_t __copy_in_user(void *to, const void *from,
- __kernel_size_t size);
+extern unsigned long __copy_in_user(void __user *to, const void __user *from,
+ unsigned long size);
-#define copy_from_user(to,from,n) \
- __copy_from_user((void *)(to), \
- (void *)(from), (__kernel_size_t)(n))
+#define copy_from_user __copy_from_user
+#define copy_to_user __copy_to_user
+#define copy_in_user __copy_in_user
-#define copy_to_user(to,from,n) \
- __copy_to_user((void *)(to), \
- (void *) (from), (__kernel_size_t)(n))
-
-#define copy_in_user(to,from,n) \
- __copy_in_user((void *)(to), \
- (void *) (from), (__kernel_size_t)(n))
-
-static __inline__ __kernel_size_t __clear_user(void *addr, __kernel_size_t size)
+static inline unsigned long __clear_user(void __user *addr, unsigned long size)
{
- extern __kernel_size_t __bzero_noasi(void *addr, __kernel_size_t size);
+ extern unsigned long __bzero_noasi(void *addr, unsigned long size);
- return __bzero_noasi(addr, size);
+ return __bzero_noasi((void *) addr, size);
}
-#define clear_user(addr,n) \
- __clear_user((void *)(addr), (__kernel_size_t)(n))
+#define clear_user __clear_user
-extern int __strncpy_from_user(unsigned long dest, unsigned long src, int count);
+extern long __strncpy_from_user(char *dest, const char __user *src, long count);
-#define strncpy_from_user(dest,src,count) \
- __strncpy_from_user((unsigned long)(dest), (unsigned long)(src), (int)(count))
+#define strncpy_from_user __strncpy_from_user
-extern int __strlen_user(const char *);
-extern int __strnlen_user(const char *, long len);
+extern long __strlen_user(const char __user *);
+extern long __strnlen_user(const char __user *, long len);
#define strlen_user __strlen_user
#define strnlen_user __strnlen_user
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 73d74d0e52a7..d0249ab40676 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -274,12 +274,31 @@ struct pnp_fixup {
#define pnp_can_configure(dev) ((!(dev)->active) && ((dev)->config_mode & PNP_CONFIG_AUTO) && \
((dev)->capabilities & PNP_CONFIGURABLE))
+#ifdef CONFIG_ISAPNP
+extern struct pnp_protocol isapnp_protocol;
+#define pnp_device_is_isapnp(dev) ((dev)->protocol == (&isapnp_protocol))
+#else
+#define pnp_device_is_isapnp(dev) 0
+#endif
+
+#ifdef CONFIG_PNPBIOS
+extern struct pnp_protocol pnpbios_protocol;
+#define pnp_device_is_pnpbios(dev) ((dev)->protocol == (&pnpbios_protocol))
+#else
+#define pnp_device_is_pnpbios(dev) 0
+#endif
+
+
/* status */
#define PNP_READY 0x0000
#define PNP_ATTACHED 0x0001
#define PNP_BUSY 0x0002
#define PNP_FAULTY 0x0004
+/* isapnp specific macros */
+
+#define isapnp_card_number(dev) ((dev)->card ? (dev)->card->number : -1)
+#define isapnp_csn_number(dev) ((dev)->number)
/*
* Driver Management
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 57415914c610..0e7ffef06cc8 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -223,6 +223,13 @@
#define AC97_YMF753_DIT_CTRL2 0x66 /* DIT Control 2 */
#define AC97_YMF753_3D_MODE_SEL 0x68 /* 3D Mode Select */
+/* specific - C-Media */
+#define AC97_CM9738_VENDOR_CTRL 0x5a
+#define AC97_CM9739_MULTI_CHAN 0x64
+#define AC97_CM9739_SPDIF_IN_STATUS 0x68 /* 32bit */
+#define AC97_CM9739_SPDIF_CTRL 0x6c
+
+
/* ac97->scaps */
#define AC97_SCAP_AUDIO (1<<0) /* audio AC'97 codec */
#define AC97_SCAP_MODEM (1<<1) /* modem AC'97 codec */
@@ -259,6 +266,9 @@ struct _snd_ac97 {
void (*private_free) (ac97_t *ac97);
/* --- */
snd_card_t *card;
+ struct pci_dev *pci; /* assigned PCI device - used for quirks */
+ unsigned short subsystem_vendor;
+ unsigned short subsystem_device;
spinlock_t reg_lock;
unsigned short num; /* number of codec: 0 = primary, 1 = secondary */
unsigned short addr; /* physical address of codec [0-3] */
@@ -280,6 +290,7 @@ struct _snd_ac97 {
unsigned short chained[3]; // 0 = C34, 1 = C79, 2 = C69
unsigned short id[3]; // codec IDs (lower 16-bit word)
unsigned short pcmreg[3]; // PCM registers
+ unsigned short codec_cfg[3]; // CODEC_CFG bits
struct semaphore mutex;
} ad18xx;
} spec;
@@ -327,6 +338,6 @@ struct ac97_quirk {
int type;
};
-int snd_ac97_tune_hardware(ac97_t *ac97, struct pci_dev *pci, struct ac97_quirk *quirk);
+int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk);
#endif /* __SOUND_AC97_CODEC_H */
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 53836234e31b..7fdf1c4ce346 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -681,7 +681,7 @@ struct sndrv_timer_tread {
* *
****************************************************************************/
-#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 1)
+#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 2)
struct sndrv_ctl_card_info {
int card; /* card number */
@@ -726,7 +726,8 @@ enum sndrv_ctl_elem_iface {
#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */
#define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */
#define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */
-#define SNDRV_CTL_ELEM_ACCESS_INDIRECT (1<<31) /* indirect access */
+#define SNDRV_CTL_ELEM_ACCESS_DINDIRECT (1<<30) /* indirect access for matrix dimensions in the info structure */
+#define SNDRV_CTL_ELEM_ACCESS_INDIRECT (1<<31) /* indirect access for element value in the value structure */
/* for further details see the ACPI and PCI power management specification */
#define SNDRV_CTL_POWER_D0 0x0000 /* full On */
@@ -778,7 +779,11 @@ struct sndrv_ctl_elem_info {
} enumerated;
unsigned char reserved[128];
} value;
- unsigned char reserved[64];
+ union {
+ unsigned short d[4]; /* dimensions */
+ unsigned short *d_ptr; /* indirect */
+ } dimen;
+ unsigned char reserved[64-4*sizeof(unsigned short)];
};
struct sndrv_ctl_elem_value {
diff --git a/include/sound/control.h b/include/sound/control.h
index 139028a72a65..9224ffe0aa21 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -49,24 +49,30 @@ typedef struct _snd_kcontrol_new {
unsigned char *name; /* ASCII name of item */
unsigned int index; /* index of item */
unsigned int access; /* access rights */
+ unsigned int count; /* count of same elements */
snd_kcontrol_info_t *info;
snd_kcontrol_get_t *get;
snd_kcontrol_put_t *put;
unsigned long private_value;
} snd_kcontrol_new_t;
+typedef struct _snd_kcontrol_volatile {
+ snd_ctl_file_t *owner; /* locked */
+ pid_t owner_pid;
+ unsigned int access; /* access rights */
+} snd_kcontrol_volatile_t;
+
struct _snd_kcontrol {
struct list_head list; /* list of controls */
snd_ctl_elem_id_t id;
- snd_ctl_file_t *owner; /* locked */
- pid_t owner_pid;
- unsigned int access; /* access rights */
+ unsigned int count; /* count of same elements */
snd_kcontrol_info_t *info;
snd_kcontrol_get_t *get;
snd_kcontrol_put_t *put;
unsigned long private_value;
void *private_data;
void (*private_free)(snd_kcontrol_t *kcontrol);
+ snd_kcontrol_volatile_t vd[0]; /* volatile data */
};
#define snd_kcontrol(n) list_entry(n, snd_kcontrol_t, list)
@@ -100,7 +106,7 @@ typedef int (*snd_kctl_ioctl_func_t) (snd_card_t * card,
void snd_ctl_notify(snd_card_t * card, unsigned int mask, snd_ctl_elem_id_t * id);
-snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * kcontrol);
+snd_kcontrol_t *snd_ctl_new(snd_kcontrol_t * kcontrol, unsigned int access);
snd_kcontrol_t *snd_ctl_new1(snd_kcontrol_new_t * kcontrolnew, void * private_data);
void snd_ctl_free_one(snd_kcontrol_t * kcontrol);
int snd_ctl_add(snd_card_t * card, snd_kcontrol_t * kcontrol);
@@ -117,4 +123,33 @@ int snd_ctl_unregister(snd_card_t *card);
int snd_ctl_register_ioctl(snd_kctl_ioctl_func_t fcn);
int snd_ctl_unregister_ioctl(snd_kctl_ioctl_func_t fcn);
+static inline unsigned int snd_ctl_get_ioffnum(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
+{
+ return id->numid - kctl->id.numid;
+}
+
+static inline unsigned int snd_ctl_get_ioffidx(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
+{
+ return id->index - kctl->id.index;
+}
+
+static inline unsigned int snd_ctl_get_ioff(snd_kcontrol_t *kctl, snd_ctl_elem_id_t *id)
+{
+ if (id->numid) {
+ return snd_ctl_get_ioffnum(kctl, id);
+ } else {
+ return snd_ctl_get_ioffidx(kctl, id);
+ }
+}
+
+static inline snd_ctl_elem_id_t *snd_ctl_build_ioff(snd_ctl_elem_id_t *dst_id,
+ snd_kcontrol_t *src_kctl,
+ unsigned int offset)
+{
+ *dst_id = src_kctl->id;
+ dst_id->index += offset;
+ dst_id->numid += offset;
+ return dst_id;
+}
+
#endif /* __SOUND_CONTROL_H */
diff --git a/include/sound/cs46xx.h b/include/sound/cs46xx.h
index f60ea070bacd..3404438145d5 100644
--- a/include/sound/cs46xx.h
+++ b/include/sound/cs46xx.h
@@ -1730,6 +1730,7 @@ struct _snd_cs46xx {
void (*amplifier_ctrl)(cs46xx_t *, int);
void (*active_ctrl)(cs46xx_t *, int);
void (*mixer_init)(cs46xx_t *);
+
struct pci_dev *acpi_dev;
int acpi_port;
snd_kcontrol_t *eapd_switch; /* for amplifier hack */
@@ -1749,6 +1750,7 @@ struct _snd_cs46xx {
dsp_spos_instance_t * dsp_spos_instance;
snd_pcm_t *pcm_rear;
+ snd_pcm_t *pcm_center_lfe;
snd_pcm_t *pcm_iec958;
#else /* for compatibility */
cs46xx_pcm_t *playback_pcm;
@@ -1764,6 +1766,7 @@ int snd_cs46xx_create(snd_card_t *card,
int snd_cs46xx_pcm(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
int snd_cs46xx_pcm_rear(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
int snd_cs46xx_pcm_iec958(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
+int snd_cs46xx_pcm_center_lfe(cs46xx_t *chip, int device, snd_pcm_t **rpcm);
int snd_cs46xx_mixer(cs46xx_t *chip);
int snd_cs46xx_midi(cs46xx_t *chip, int device, snd_rawmidi_t **rmidi);
int snd_cs46xx_start_dsp(cs46xx_t *chip);
diff --git a/include/sound/cs46xx_dsp_scb_types.h b/include/sound/cs46xx_dsp_scb_types.h
index f5543e774bd1..3f990a3a6903 100644
--- a/include/sound/cs46xx_dsp_scb_types.h
+++ b/include/sound/cs46xx_dsp_scb_types.h
@@ -27,6 +27,18 @@
#ifndef __CS46XX_DSP_SCB_TYPES_H__
#define __CS46XX_DSP_SCB_TYPES_H__
+#include <asm/byteorder.h>
+
+#ifndef ___DSP_DUAL_16BIT_ALLOC
+#if defined(__LITTLE_ENDIAN)
+#define ___DSP_DUAL_16BIT_ALLOC(a,b) u16 a; u16 b;
+#elif defined(__BIG_ENDIAN)
+#define ___DSP_DUAL_16BIT_ALLOC(a,b) u16 b; u16 a;
+#else
+#error Not __LITTLE_ENDIAN and not __BIG_ENDIAN, then what ???
+#endif
+#endif
+
/* This structs are used internally by the SP */
typedef struct _basic_dma_req_t {
@@ -60,11 +72,14 @@ typedef struct _scatter_gather_ext_t {
} scatter_gather_ext_t;
typedef struct _volume_control_t {
- u16 rightTarg; /* Target volume for left & right channels */
- u16 leftTarg;
-
- u16 rightVol; /* Current left & right channel volumes */
- u16 leftVol;
+ ___DSP_DUAL_16BIT_ALLOC(
+ rightTarg, /* Target volume for left & right channels */
+ leftTarg
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ rightVol, /* Current left & right channel volumes */
+ leftVol
+ )
} volume_control_t;
/* Generic stream control block (SCB) structure definition */
@@ -95,15 +110,17 @@ typedef struct _generic_scb_t {
/* Sublist pointer & next stream control block (SCB) link.
Initialized & modified by the host R/O for the DSP task
*/
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
/* Pointer to this tasks parameter block & stream function pointer
Initialized by the host R/O for the DSP task */
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
/* rsConfig register for stream buffer (rsDMA reg.
is loaded from basicReq.daw for incoming streams, or
@@ -176,59 +193,78 @@ typedef struct _spos_control_block_t {
This rule does not apply to one off boot time initialisation prior to starting the SP
*/
-
+
+ ___DSP_DUAL_16BIT_ALLOC(
/* First element on the Hyper forground task tree */
- u16 hfg_tree_root_ptr; /* HOST */
+ hfg_tree_root_ptr, /* HOST */
/* First 3 dwords are written by the host and read-only on the DSP */
- u16 hfg_stack_base; /* HOST */
+ hfg_stack_base /* HOST */
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
/* Point to this data structure to enable easy access */
- u16 spos_cb_ptr; /* SP */
- u16 prev_task_tree_ptr; /* SP && HOST */
-
+ spos_cb_ptr, /* SP */
+ prev_task_tree_ptr /* SP && HOST */
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
/* Currently Unused */
- u16 xxinterval_timer_period;
+ xxinterval_timer_period,
/* Enable extension of SPOS data structure */
- u16 HFGSPB_ptr;
+ HFGSPB_ptr
+ )
- u16 xxnum_HFG_ticks_thisInterval;
+ ___DSP_DUAL_16BIT_ALLOC(
+ xxnum_HFG_ticks_thisInterval,
/* Modified by the DSP */
- u16 xxnum_tntervals;
+ xxnum_tntervals
+ )
/* Set by DSP upon encountering a trap (breakpoint) or a spurious
interrupt. The host must clear this dword after reading it
upon receiving spInt1. */
- u16 spurious_int_flag; /* (Host & SP) Nature of the spurious interrupt */
- u16 trap_flag; /* (Host & SP) Nature of detected Trap */
-
-
- u16 unused2;
- u16 invalid_IP_flag; /* (Host & SP ) Indicate detection of invalid instruction pointer */
+ ___DSP_DUAL_16BIT_ALLOC(
+ spurious_int_flag, /* (Host & SP) Nature of the spurious interrupt */
+ trap_flag /* (Host & SP) Nature of detected Trap */
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused2,
+ invalid_IP_flag /* (Host & SP ) Indicate detection of invalid instruction pointer */
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
/* pointer to forground task tree header for use in next task search */
- u16 fg_task_tree_hdr_ptr; /* HOST */
+ fg_task_tree_hdr_ptr, /* HOST */
/* Data structure for controlling synchronous link update */
- u16 hfg_sync_update_ptr; /* HOST */
+ hfg_sync_update_ptr /* HOST */
+ )
- u16 begin_foreground_FCNT; /* SP */
+ ___DSP_DUAL_16BIT_ALLOC(
+ begin_foreground_FCNT, /* SP */
/* Place holder for holding sleep timing */
- u16 last_FCNT_before_sleep; /* SP */
+ last_FCNT_before_sleep /* SP */
+ )
- u16 unused7; /* SP */
- u16 next_task_treePtr; /* SP */
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused7, /* SP */
+ next_task_treePtr /* SP */
+ )
- u32 nused5;
+ u32 unused5;
- u16 active_flags; /* SP */
+ ___DSP_DUAL_16BIT_ALLOC(
+ active_flags, /* SP */
/* State flags, used to assist control of execution of Hyper Forground */
- u16 HFG_flags; /* SP */
+ HFG_flags /* SP */
+ )
- u16 unused9;
- u16 unused8;
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused9,
+ unused8
+ )
/* Space for saving enough context so that we can set up enough
to save some more context.
@@ -261,16 +297,21 @@ typedef struct _timing_master_scb_t {
/* First 12 dwords from generic_scb_t */
basic_dma_req_t basic_req; /* Optional */
scatter_gather_ext_t sg_ext; /* Optional */
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
-
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
/* Initial values are 0000:xxxx */
- u16 reserved;
- u16 extra_sample_accum;
+ reserved,
+ extra_sample_accum
+ )
/* Initial values are xxxx:0000
@@ -281,9 +322,10 @@ typedef struct _timing_master_scb_t {
resynchronize the FIFO pointer
upon start/restart)
*/
- u16 codec_FIFO_syncd;
- u16 codec_FIFO_ptr;
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ codec_FIFO_syncd,
+ codec_FIFO_ptr
+ )
/* Init. 8000:0005 for 44.1k
8000:0001 for 48k
@@ -292,8 +334,10 @@ typedef struct _timing_master_scb_t {
processed in the current group of
frames
*/
- u16 frac_samp_accum_qm1;
- u16 TM_frms_left_in_group;
+ ___DSP_DUAL_16BIT_ALLOC(
+ frac_samp_accum_qm1,
+ TM_frms_left_in_group
+ )
/* Init. 0001:0005 for 44.1k
0000:0001 for 48k
@@ -303,8 +347,10 @@ typedef struct _timing_master_scb_t {
nsamp_per_frm_q15
lo: Number of frames in the group
*/
- u16 frac_samp_correction_qm1;
- u16 TM_frm_group_length;
+ ___DSP_DUAL_16BIT_ALLOC(
+ frac_samp_correction_qm1,
+ TM_frm_group_length
+ )
/* Init. 44.1k*65536/8k = 0x00058333 for 44.1k
48k*65536/8k = 0x00060000 for 48k
@@ -319,13 +365,18 @@ typedef struct _codec_output_scb_t {
/* First 13 dwords from generic_scb_t */
basic_dma_req_t basic_req; /* Optional */
scatter_gather_ext_t sg_ext; /* Optional */
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
u32 strm_rs_config; /* REQUIRED */
+
u32 strm_buf_ptr; /* REQUIRED */
/* NOTE: The CODEC output task reads samples from the first task on its
@@ -347,8 +398,10 @@ typedef struct _codec_output_scb_t {
to which the right-channel samples
are to be written.
*/
- u16 left_chan_base_IO_addr;
- u16 right_chan_IO_disp;
+ ___DSP_DUAL_16BIT_ALLOC(
+ left_chan_base_IO_addr,
+ right_chan_IO_disp
+ )
/* Init: 0x0080:0004 for non-AC-97
@@ -359,12 +412,16 @@ typedef struct _codec_output_scb_t {
16-bit input sample to obtain the
32-bit output word
*/
- u16 CO_scale_shift_count;
- u16 CO_exp_vol_change_rate;
+ ___DSP_DUAL_16BIT_ALLOC(
+ CO_scale_shift_count,
+ CO_exp_vol_change_rate
+ )
/* Pointer to SCB at end of input chain */
- u16 reserved;
- u16 last_sub_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ reserved,
+ last_sub_ptr
+ )
} codec_output_scb_t;
/* SCB for CODEC input algorithm */
@@ -372,11 +429,15 @@ typedef struct _codec_input_scb_t {
/* First 13 dwords from generic_scb_t */
basic_dma_req_t basic_req; /* Optional */
scatter_gather_ext_t sg_ext; /* Optional */
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
u32 strm_rs_config; /* REQUIRED */
u32 strm_buf_ptr; /* REQUIRED */
@@ -402,17 +463,20 @@ typedef struct _codec_input_scb_t {
to which the right-channel samples
are to be written.
*/
- u16 rightChanINdisp;
- u16 left_chan_base_IN_addr;
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ rightChanINdisp,
+ left_chan_base_IN_addr
+ )
/* Init. ?:fffc
lo: Negative shift count to shift the
32-bit input dword to obtain the
16-bit sample msb-aligned (count
is negative to shift left)
*/
- u16 scaleShiftCount;
- u16 reserver1;
+ ___DSP_DUAL_16BIT_ALLOC(
+ scaleShiftCount,
+ reserver1
+ )
u32 reserved2;
} codec_input_scb_t;
@@ -422,11 +486,15 @@ typedef struct _pcm_serial_input_scb_t {
/* First 13 dwords from generic_scb_t */
basic_dma_req_t basic_req; /* Optional */
scatter_gather_ext_t sg_ext; /* Optional */
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
u32 strm_buf_ptr; /* REQUIRED */
u32 strm_rs_config; /* REQUIRED */
@@ -438,8 +506,10 @@ typedef struct _pcm_serial_input_scb_t {
lo: Flag indicating the link to the CODEC
input task is to be initialized
*/
- u16 init_codec_input_link;
- u16 codec_input_buf_scb;
+ ___DSP_DUAL_16BIT_ALLOC(
+ init_codec_input_link,
+ codec_input_buf_scb
+ )
/* Initialized by the host (host updates target volumes) */
volume_control_t psi_vol_ctrl;
@@ -447,36 +517,54 @@ typedef struct _pcm_serial_input_scb_t {
} pcm_serial_input_scb_t;
typedef struct _src_task_scb_t {
- u16 frames_left_in_gof;
- u16 gofs_left_in_sec;
+ ___DSP_DUAL_16BIT_ALLOC(
+ frames_left_in_gof,
+ gofs_left_in_sec
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ const2_thirds,
+ num_extra_tnput_samples
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ cor_per_gof,
+ correction_per_sec
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ output_buf_producer_ptr,
+ junk_DMA_MID
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ gof_length,
+ gofs_per_sec
+ )
- u16 const2_thirds;
- u16 num_extra_tnput_samples;
-
- u16 cor_per_gof;
- u16 correction_per_sec;
-
- u16 output_buf_producer_ptr;
- u16 junk_DMA_MID;
-
- u16 gof_length;
- u16 gofs_per_sec;
-
u32 input_buf_strm_config;
- u16 reserved_for_SRC_use;
- u16 input_buf_consumer_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ reserved_for_SRC_use,
+ input_buf_consumer_ptr
+ )
u32 accum_phi;
- u16 exp_src_vol_change_rate;
- u16 input_buf_producer_ptr;
-
- u16 src_next_scb;
- u16 src_sub_list_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ exp_src_vol_change_rate,
+ input_buf_producer_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ src_next_scb,
+ src_sub_list_ptr
+ )
- u16 src_entry_point;
- u16 src_this_sbp;
+ ___DSP_DUAL_16BIT_ALLOC(
+ src_entry_point,
+ src_this_sbp
+ )
u32 src_strm_rs_config;
u32 src_strm_buf_ptr;
@@ -490,26 +578,34 @@ typedef struct _decimate_by_pow2_scb_t {
/* decimationFactor = 2, 4, or 8 (larger factors waste too much memory
when compared to cascading decimators)
*/
- u16 dec2_coef_base_ptr;
- u16 dec2_coef_increment;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_coef_base_ptr,
+ dec2_coef_increment
+ )
+
/* coefIncrement = 128 / decimationFactor (for our ROM filter)
coefBasePtr = 0x8000 (for our ROM filter)
*/
-
- u16 dec2_in_samples_per_out_triplet;
- u16 dec2_extra_in_samples;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_in_samples_per_out_triplet,
+ dec2_extra_in_samples
+ )
/* extraInSamples: # of accumulated, unused input samples (init. to 0)
inSamplesPerOutTriplet = 3 * decimationFactor
*/
- u16 dec2_const2_thirds;
- u16 dec2_half_num_taps_mp5;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_const2_thirds,
+ dec2_half_num_taps_mp5
+ )
/* halfNumTapsM5: (1/2 number of taps in decimation filter) minus 5
const2thirds: constant 2/3 in 16Q0 format (sign.15)
*/
- u16 dec2_output_buf_producer_ptr;
- u16 dec2_junkdma_mid;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_output_buf_producer_ptr,
+ dec2_junkdma_mid
+ )
u32 dec2_reserved2;
@@ -518,26 +614,34 @@ typedef struct _decimate_by_pow2_scb_t {
(buffer size = decimationFactor * 32 dwords)
*/
- u16 dec2_phi_incr;
- u16 dec2_input_buf_consumer_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_phi_incr,
+ dec2_input_buf_consumer_ptr
+ )
/* inputBufConsumerPtr: Input buffer read pointer (into SRC filter)
phiIncr = decimationFactor * 4
*/
u32 dec2_reserved3;
- u16 dec2_exp_vol_change_rate;
- u16 dec2_input_buf_producer_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_exp_vol_change_rate,
+ dec2_input_buf_producer_ptr
+ )
/* inputBufProducerPtr: Input buffer write pointer
expVolChangeRate: Exponential volume change rate for possible
future mixer on input streams
*/
- u16 dec2_next_scb;
- u16 dec2_sub_list_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_next_scb,
+ dec2_sub_list_ptr
+ )
- u16 dec2_entry_point;
- u16 dec2_this_spb;
+ ___DSP_DUAL_16BIT_ALLOC(
+ dec2_entry_point,
+ dec2_this_spb
+ )
u32 dec2_strm_rs_config;
u32 dec2_strm_buf_ptr;
@@ -548,23 +652,32 @@ typedef struct _decimate_by_pow2_scb_t {
} decimate_by_pow2_scb_t;
typedef struct _vari_decimate_scb_t {
- u16 vdec_frames_left_in_gof;
- u16 vdec_gofs_left_in_sec;
-
- u16 vdec_const2_thirds;
- u16 vdec_extra_in_samples;
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_frames_left_in_gof,
+ vdec_gofs_left_in_sec
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_const2_thirds,
+ vdec_extra_in_samples
+ )
/* extraInSamples: # of accumulated, unused input samples (init. to 0)
const2thirds: constant 2/3 in 16Q0 format (sign.15) */
- u16 vdec_cor_per_gof;
- u16 vdec_correction_per_sec;
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_cor_per_gof,
+ vdec_correction_per_sec
+ )
- u16 vdec_output_buf_producer_ptr;
- u16 vdec_input_buf_consumer_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_output_buf_producer_ptr,
+ vdec_input_buf_consumer_ptr
+ )
/* inputBufConsumerPtr: Input buffer read pointer (into SRC filter) */
-
- u16 vdec_gof_length;
- u16 vdec_gofs_per_sec;
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_gof_length,
+ vdec_gofs_per_sec
+ )
u32 vdec_input_buf_strm_config;
/* inputBufStrmConfig: rsConfig for the input buffer to the decimator
@@ -575,17 +688,23 @@ typedef struct _vari_decimate_scb_t {
u32 vdec_accumphi;
/* accumPhi: accumulated fractional phase increment (6.26) */
- u16 vdec_exp_vol_change_rate;
- u16 vdec_input_buf_producer_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_exp_vol_change_rate,
+ vdec_input_buf_producer_ptr
+ )
/* inputBufProducerPtr: Input buffer write pointer
expVolChangeRate: Exponential volume change rate for possible
future mixer on input streams */
- u16 vdec_next_scb;
- u16 vdec_sub_list_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_next_scb,
+ vdec_sub_list_ptr
+ )
- u16 vdec_entry_point;
- u16 vdec_this_spb;
+ ___DSP_DUAL_16BIT_ALLOC(
+ vdec_entry_point,
+ vdec_this_spb
+ )
u32 vdec_strm_rs_config;
u32 vdec_strm_buf_ptr;
@@ -601,11 +720,15 @@ typedef struct _mix2_ostream_scb_t {
/* First 13 dwords from generic_scb_t */
basic_dma_req_t basic_req; /* Optional */
scatter_gather_ext_t sg_ext; /* Optional */
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
u32 strm_rs_config; /* REQUIRED */
u32 strm_buf_ptr; /* REQUIRED */
@@ -617,18 +740,24 @@ typedef struct _mix2_ostream_scb_t {
processed in the current group of
frames
*/
- u16 frames_left_in_group;
- u16 accum_input_triplets;
+ ___DSP_DUAL_16BIT_ALLOC(
+ frames_left_in_group,
+ accum_input_triplets
+ )
/* hi: Exponential volume change rate
for mixer on input streams
lo: Number of frames in the group
*/
- u16 frame_group_length;
- u16 exp_vol_change_rate;
+ ___DSP_DUAL_16BIT_ALLOC(
+ frame_group_length,
+ exp_vol_change_rate
+ )
- u16 const_FFFF;
- u16 const_zero;
+ ___DSP_DUAL_16BIT_ALLOC(
+ const_FFFF,
+ const_zero
+ )
} mix2_ostream_scb_t;
@@ -637,11 +766,15 @@ typedef struct _mix_only_scb_t {
/* First 13 dwords from generic_scb_t */
basic_dma_req_t basic_req; /* Optional */
scatter_gather_ext_t sg_ext; /* Optional */
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
u32 strm_rs_config; /* REQUIRED */
u32 strm_buf_ptr; /* REQUIRED */
@@ -668,30 +801,40 @@ typedef struct _async_codec_input_scb_t {
u32 ostrm_rs_config;
u32 ostrm_buf_ptr;
- u16 io_sclks_per_lr_clk;
- u16 io_io_enable;
+ ___DSP_DUAL_16BIT_ALLOC(
+ io_sclks_per_lr_clk,
+ io_io_enable
+ )
u32 io_free4;
-
- u16 io_next_scb;
- u16 io_sub_list_ptr;
- u16 io_entry_point;
- u16 io_this_spb;
+ ___DSP_DUAL_16BIT_ALLOC(
+ io_next_scb,
+ io_sub_list_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ io_entry_point,
+ io_this_spb
+ )
u32 istrm_rs_config;
u32 istrm_buf_ptr;
/* Init. 0000:8042: for ASER1
0000:8044: for ASER2 */
- u16 io_stat_reg_addr;
- u16 iofifo_pointer;
+ ___DSP_DUAL_16BIT_ALLOC(
+ io_stat_reg_addr,
+ iofifo_pointer
+ )
/* Init 1 stero:100 ASER1
Init 0 mono:110 ASER2
*/
- u16 ififo_base_addr;
- u16 ist_mo_format;
+ ___DSP_DUAL_16BIT_ALLOC(
+ ififo_base_addr,
+ ist_mo_format
+ )
u32 i_free;
} async_codec_input_scb_t;
@@ -699,43 +842,59 @@ typedef struct _async_codec_input_scb_t {
/* SCB for the SP/DIF CODEC input and output */
typedef struct _spdifiscb_t {
- u16 status_ptr;
- u16 status_start_ptr;
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ status_ptr,
+ status_start_ptr
+ )
+
u32 current_total;
u32 previous_total;
- u16 count;
- u16 count_limit;
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ count,
+ count_limit
+ )
+
u32 status_data;
-
- u16 status;
- u16 free4;
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ status,
+ free4
+ )
u32 free3;
-
- u16 free2;
- u16 bit_count;
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ free2,
+ bit_count
+ )
u32 temp_status;
- u16 next_SCB;
- u16 sub_list_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_SCB,
+ sub_list_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point,
+ this_spb
+ )
- u16 entry_point;
- u16 this_spb;
-
u32 strm_rs_config;
u32 strm_buf_ptr;
- u16 stat_reg_addr;
- u16 fifo_pointer;
-
- u16 fifo_base_addr;
- u16 st_mo_format;
-
- u32 Free1;
+ ___DSP_DUAL_16BIT_ALLOC(
+ stat_reg_addr,
+ fifo_pointer
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ fifo_base_addr,
+ st_mo_format
+ )
+
+ u32 free1;
} spdifiscb_t;
@@ -751,93 +910,132 @@ typedef struct _spdifoscb_t {
u32 strm_rs_config;
u32 strm_buf_ptr;
-
- u16 status;
- u16 free5;
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ status,
+ free5
+ )
u32 free4;
-
- u16 next_scb;
- u16 sub_list_ptr;
- u16 entry_point;
- u16 this_spb;
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb,
+ sub_list_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point,
+ this_spb
+ )
+
u32 free6[2];
- u16 stat_reg_addr;
- u16 fifo_pointer;
-
- u16 fifo_base_addr;
- u16 st_mo_format;
-
+ ___DSP_DUAL_16BIT_ALLOC(
+ stat_reg_addr,
+ fifo_pointer
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ fifo_base_addr,
+ st_mo_format
+ )
+
u32 free1;
} spdifoscb_t;
typedef struct _asynch_fg_rx_scb_t {
+ ___DSP_DUAL_16BIT_ALLOC(
+ bot_buf_mask,
+ buf_Mask
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ max,
+ min
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ old_producer_pointer,
+ hfg_scb_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ delta,
+ adjust_count
+ )
- u16 bot_buf_mask;
- u16 buf_Mask;
-
- u16 max;
- u16 min;
-
- u16 old_producer_pointer;
- u16 hfg_scb_ptr;
-
- u16 delta;
- u16 adjust_count;
-
u32 unused2[5];
-
- u16 sibling_ptr;
- u16 child_ptr;
-
- u16 code_ptr;
- u16 this_ptr;
-
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ sibling_ptr,
+ child_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ code_ptr,
+ this_ptr
+ )
+
u32 strm_rs_config;
u32 strm_buf_ptr;
u32 unused_phi_incr;
- u16 righttarg;
- u16 left_targ;
-
- u16 rightVol;
- u16 leftVol;
+ ___DSP_DUAL_16BIT_ALLOC(
+ right_targ,
+ left_targ
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ right_vol,
+ left_vol
+ )
} asynch_fg_rx_scb_t;
typedef struct _asynch_fg_tx_scb_t {
- u16 not_buf_mask;
- u16 buf_mask;
-
- u16 Max;
- u16 min;
-
- u16 unused1;
- u16 hfg_scb_ptr;
-
- u16 delta;
- u16 adjust_count;
+ ___DSP_DUAL_16BIT_ALLOC(
+ not_buf_mask,
+ buf_mask
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ max,
+ min
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused1,
+ hfg_scb_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ delta,
+ adjust_count
+ )
u32 accum_phi;
- u16 unused2;
- u16 const_one_third;
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused2,
+ const_one_third
+ )
u32 unused3[3];
- u16 sibling_ptr;
- u16 child_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ sibling_ptr,
+ child_ptr
+ )
- u16 codePtr;
- u16 this_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ codePtr,
+ this_ptr
+ )
u32 strm_rs_config;
@@ -845,11 +1043,15 @@ typedef struct _asynch_fg_tx_scb_t {
u32 phi_incr;
- u16 unused_right_targ;
- u16 unused_left_targ;
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused_right_targ,
+ unused_left_targ
+ )
- u16 unused_right_vol;
- u16 unused_left_vol;
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused_right_vol,
+ unused_left_vol
+ )
} asynch_fg_tx_scb_t;
@@ -857,49 +1059,67 @@ typedef struct _output_snoop_scb_t {
/* First 13 dwords from generic_scb_t */
basic_dma_req_t basic_req; /* Optional */
scatter_gather_ext_t sg_ext; /* Optional */
- u16 next_scb; /* REQUIRED */
- u16 sub_list_ptr; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb, /* REQUIRED */
+ sub_list_ptr /* REQUIRED */
+ )
- u16 entry_point; /* REQUIRED */
- u16 this_spb; /* REQUIRED */
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* REQUIRED */
+ this_spb /* REQUIRED */
+ )
u32 strm_rs_config; /* REQUIRED */
u32 strm_buf_ptr; /* REQUIRED */
- u16 init_snoop_input_link;
- u16 snoop_child_input_scb;
+ ___DSP_DUAL_16BIT_ALLOC(
+ init_snoop_input_link,
+ snoop_child_input_scb
+ )
u32 snoop_input_buf_ptr;
- u16 reserved;
- u16 input_scb;
+ ___DSP_DUAL_16BIT_ALLOC(
+ reserved,
+ input_scb
+ )
} output_snoop_scb_t;
typedef struct _spio_write_scb_t {
- u16 address1;
- u16 address2;
+ ___DSP_DUAL_16BIT_ALLOC(
+ address1,
+ address2
+ )
u32 data1;
u32 data2;
- u16 address3;
- u16 address4;
+ ___DSP_DUAL_16BIT_ALLOC(
+ address3,
+ address4
+ )
u32 data3;
u32 data4;
- u16 unused1;
- u16 data_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ unused1,
+ data_ptr
+ )
u32 unused2[2];
- u16 sibling_ptr;
- u16 child_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ sibling_ptr,
+ child_ptr
+ )
- u16 entry_point;
- u16 this_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point,
+ this_ptr
+ )
u32 unused3[5];
} spio_write_scb_t;
@@ -920,11 +1140,15 @@ typedef struct _magic_snoop_task_t {
u32 i7;
- u16 next_scb;
- u16 sub_list_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb,
+ sub_list_ptr
+ )
- u16 entry_point;
- u16 this_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point,
+ this_ptr
+ )
u32 strm_buf_config;
u32 strm_buf_ptr2;
@@ -933,4 +1157,60 @@ typedef struct _magic_snoop_task_t {
volume_control_t vdec_vol_ctrl;
} magic_snoop_task_t;
+
+
+typedef struct _filter_scb_t {
+ ___DSP_DUAL_16BIT_ALLOC(
+ a0_right, /* 0x00 */
+ a0_left
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ a1_right, /* 0x01 */
+ a1_left
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ a2_right, /* 0x02 */
+ a2_left
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ output_buf_ptr, /* 0x03 */
+ init
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ filter_unused3, /* 0x04 */
+ filter_unused2
+ )
+
+ u32 prev_sample_output1; /* 0x05 */
+ u32 prev_sample_output2; /* 0x06 */
+ u32 prev_sample_input1; /* 0x07 */
+ u32 prev_sample_input2; /* 0x08 */
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ next_scb_ptr, /* 0x09 */
+ sub_list_ptr
+ )
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ entry_point, /* 0x0A */
+ spb_ptr
+ )
+
+ u32 strm_rs_config; /* 0x0B */
+ u32 strm_buf_ptr; /* 0x0C */
+
+ ___DSP_DUAL_16BIT_ALLOC(
+ b0_right, /* 0x0D */
+ b0_left
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ b1_right, /* 0x0E */
+ b1_left
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ b2_right, /* 0x0F */
+ b2_left
+ )
+} filter_scb_t;
#endif /* __DSP_SCB_TYPES_H__ */
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h
index a6006b75c0e2..10014cb62423 100644
--- a/include/sound/cs46xx_dsp_spos.h
+++ b/include/sound/cs46xx_dsp_spos.h
@@ -52,17 +52,18 @@
#define DSP_MAX_TASK_DESC 50
#define DSP_MAX_PCM_CHANNELS 32
-#define DSP_MAX_SRC_NR 6
+#define DSP_MAX_SRC_NR 14
-#define DSP_PCM_MAIN_CHANNEL 1
-#define DSP_PCM_REAR_CHANNEL 2
-#define DSP_PCM_CENTER_CHANNEL 3
-#define DSP_PCM_LFE_CHANNEL 4
-#define DSP_IEC958_CHANNEL 5
+#define DSP_PCM_MAIN_CHANNEL 1
+#define DSP_PCM_REAR_CHANNEL 2
+#define DSP_PCM_CENTER_LFE_CHANNEL 3
+#define DSP_PCM_S71_CHANNEL 4 /* surround 7.1 */
+#define DSP_IEC958_CHANNEL 5
-#define DSP_SPDIF_STATUS_OUTPUT_ENABLED 1
-#define DSP_SPDIF_STATUS_PLAYBACK_OPEN 2
-#define DSP_SPDIF_STATUS_HW_ENABLED 4
+#define DSP_SPDIF_STATUS_OUTPUT_ENABLED 1
+#define DSP_SPDIF_STATUS_PLAYBACK_OPEN 2
+#define DSP_SPDIF_STATUS_HW_ENABLED 4
+#define DSP_SPDIF_STATUS_INPUT_CTRL_ENABLED 8
struct _dsp_module_desc_t;
@@ -157,9 +158,12 @@ typedef struct _dsp_spos_instance_t {
u16 dac_volume_right;
u16 dac_volume_left;
- /* Rear PCM playback mixer */
+ /* Rear/surround PCM playback mixer */
dsp_scb_descriptor_t * rear_mix_scb;
+ /* Center/LFE mixer */
+ dsp_scb_descriptor_t * center_lfe_mix_scb;
+
int npcm_channels;
int nsrc_scb;
pcm_channel_descriptor_t pcm_channels[DSP_MAX_PCM_CHANNELS];
diff --git a/include/sound/cs46xx_dsp_task_types.h b/include/sound/cs46xx_dsp_task_types.h
index b97a65ac01e6..5dd3bf69cb03 100644
--- a/include/sound/cs46xx_dsp_task_types.h
+++ b/include/sound/cs46xx_dsp_task_types.h
@@ -27,6 +27,8 @@
#ifndef __CS46XX_DSP_TASK_TYPES_H__
#define __CS46XX_DSP_TASK_TYPES_H__
+#include "cs46xx_dsp_scb_types.h"
+
/*********************************************************************************************
Example hierarchy of stream control blocks in the SP
@@ -54,7 +56,7 @@ Ptr____Call (c)
#define HFG_CONTEXT_SWITCH_MODE 0x0002
#define HFG_CONTEXT_SWITCH_MODE_BIT 1
-#define MAX_FG_STACK_SIZE 32 // THESE NEED TO BE COMPUTED PROPERLY
+#define MAX_FG_STACK_SIZE 32 /* THESE NEED TO BE COMPUTED PROPERLY */
#define MAX_MG_STACK_SIZE 16
#define MAX_BG_STACK_SIZE 9
#define MAX_HFG_STACK_SIZE 4
@@ -74,64 +76,84 @@ typedef struct _hf_save_area_t {
u32 r54_save;
u32 r98_save;
- u16 status_save;
- u16 ind_save;
+ ___DSP_DUAL_16BIT_ALLOC(
+ status_save,
+ ind_save
+ )
- u16 rci1_save;
- u16 rci0_save;
+ ___DSP_DUAL_16BIT_ALLOC(
+ rci1_save,
+ rci0_save
+ )
u32 r32_save;
u32 r76_save;
u32 rsd2_save;
- u16 rsi2_save; /* See TaskTreeParameterBlock for
+ ___DSP_DUAL_16BIT_ALLOC(
+ rsi2_save, /* See TaskTreeParameterBlock for
remainder of registers */
- u16 rsa2Save;
+ rsa2Save
+ )
/* saved as part of HFG context */
} hf_save_area_t;
/* Task link data structure */
typedef struct _tree_link_t {
+ ___DSP_DUAL_16BIT_ALLOC(
/* Pointer to sibling task control block */
- u16 next_scb;
+ next_scb,
/* Pointer to child task control block */
- u16 sub_ptr;
+ sub_ptr
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
/* Pointer to code entry point */
- u16 entry_point;
+ entry_point,
/* Pointer to local data */
- u16 this_spb;
+ this_spb
+ )
} tree_link_t;
typedef struct _task_tree_data_t {
+ ___DSP_DUAL_16BIT_ALLOC(
/* Initial tock count; controls task tree execution rate */
- u16 tock_count_limit;
+ tock_count_limit,
/* Tock down counter */
- u16 tock_count;
-
+ tock_count
+ )
+
/* Add to ActiveCount when TockCountLimit reached:
Subtract on task tree termination */
- u16 active_tncrement;
+ ___DSP_DUAL_16BIT_ALLOC(
+ active_tncrement,
/* Number of pending activations for task tree */
- u16 active_count;
+ active_count
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
/* BitNumber to enable modification of correct bit in ActiveTaskFlags */
- u16 active_bit;
+ active_bit,
/* Pointer to OS location for indicating current activity on task level */
- u16 active_task_flags_ptr;
+ active_task_flags_ptr
+ )
/* Data structure for controlling movement of memory blocks:-
currently unused */
- u16 mem_upd_ptr;
+ ___DSP_DUAL_16BIT_ALLOC(
+ mem_upd_ptr,
/* Data structure for controlling synchronous link update */
- u16 link_upd_ptr;
+ link_upd_ptr
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
/* Save area for remainder of full context. */
- u16 save_area;
+ save_area,
/* Address of start of local stack for data storage */
- u16 data_stack_base_ptr;
+ data_stack_base_ptr
+ )
} task_tree_data_t;
@@ -140,12 +162,16 @@ typedef struct _task_tree_data_t {
typedef struct _interval_timer_data_t
{
/* These data items have the same relative locations to those */
- u16 interval_timer_period;
- u16 itd_unused;
+ ___DSP_DUAL_16BIT_ALLOC(
+ interval_timer_period,
+ itd_unused
+ )
/* used for this data in the SPOS control block for SPOS 1.0 */
- u16 num_FG_ticks_this_interval;
- u16 num_intervals;
+ ___DSP_DUAL_16BIT_ALLOC(
+ num_FG_ticks_this_interval,
+ num_intervals
+ )
} interval_timer_data_t;
@@ -155,24 +181,36 @@ typedef struct _task_tree_context_block_t {
/* Up to 10 values are saved onto the stack. 8 for the task tree, 1 for
The access to the context switch (call or interrupt), and 1 spare that
users should never use. This last may be required by the system */
- u16 stack1;
- u16 stack0;
- u16 stack3;
- u16 stack2;
- u16 stack5;
- u16 stack4;
- u16 stack7;
- u16 stack6;
- u16 stack9;
- u16 stack8;
-
- u32 saverfe;
+ ___DSP_DUAL_16BIT_ALLOC(
+ stack1,
+ stack0
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ stack3,
+ stack2
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ stack5,
+ stack4
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ stack7,
+ stack6
+ )
+ ___DSP_DUAL_16BIT_ALLOC(
+ stack9,
+ stack8
+ )
+
+ u32 saverfe;
/* Value may be overwriten by stack save algorithm.
Retain the size of the stack data saved here if used */
- u16 reserved1;
- u16 stack_size;
- u32 saverba; /* (HFG) */
+ ___DSP_DUAL_16BIT_ALLOC(
+ reserved1,
+ stack_size
+ )
+ u32 saverba; /* (HFG) */
u32 saverdc;
u32 savers_config_23; /* (HFG) */
u32 savers_DMA23; /* (HFG) */
@@ -205,8 +243,8 @@ typedef struct _task_tree_context_block_t {
typedef struct _task_tree_control_block_t {
hf_save_area_t context;
- tree_link_t links;
- task_tree_data_t data;
+ tree_link_t links;
+ task_tree_data_t data;
task_tree_context_block_t context_blk;
interval_timer_data_t int_timer;
} task_tree_control_block_t;
diff --git a/include/sound/driver.h b/include/sound/driver.h
index 84416da19845..adef8f96f0c6 100644
--- a/include/sound/driver.h
+++ b/include/sound/driver.h
@@ -27,7 +27,6 @@
#endif
#include <linux/config.h>
-#include <linux/version.h>
#define SNDRV_CARDS 8 /* number of supported soundcards - don't change - minor numbers */
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index e412b1751aea..4161dfd1f2b3 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -49,8 +49,8 @@
#define NUM_G 64 /* use all channels */
#define NUM_FXSENDS 4
-#define EMU10K1_DMA_MASK 0x1fffffffUL
-#define AUDIGY_DMA_MASK 0xffffffffUL
+#define EMU10K1_DMA_MASK 0x7fffffffUL /* 31bit */
+#define AUDIGY_DMA_MASK 0xffffffffUL /* 32bit */
#define TMEMSIZE 256*1024
#define TMEMSIZEREG 4
@@ -818,9 +818,6 @@ typedef struct {
unsigned char send_routing[3][8];
unsigned char send_volume[3][8];
unsigned short attn[3];
- snd_kcontrol_t *ctl_send_routing;
- snd_kcontrol_t *ctl_send_volume;
- snd_kcontrol_t *ctl_attn;
emu10k1_pcm_t *epcm;
} emu10k1_pcm_mixer_t;
@@ -980,6 +977,9 @@ struct _snd_emu10k1 {
emu10k1_voice_t voices[64];
emu10k1_pcm_mixer_t pcm_mixer[32];
+ snd_kcontrol_t *ctl_send_routing;
+ snd_kcontrol_t *ctl_send_volume;
+ snd_kcontrol_t *ctl_attn;
void (*hwvol_interrupt)(emu10k1_t *emu, unsigned int status);
void (*capture_interrupt)(emu10k1_t *emu, unsigned int status);
diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h
new file mode 100644
index 000000000000..004eeb41df92
--- /dev/null
+++ b/include/sound/hdsp.h
@@ -0,0 +1,92 @@
+#ifndef __SOUND_HDSP_H
+#define __SOUND_HDSP_H
+
+/*
+ * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define HDSP_MATRIX_MIXER_SIZE 2048
+
+typedef enum {
+ Digiface,
+ Multiface,
+ Undefined,
+} HDSP_IO_Type;
+
+typedef struct _snd_hdsp_peak_rms hdsp_peak_rms_t;
+
+struct _snd_hdsp_peak_rms {
+ unsigned int playback_peaks[26];
+ unsigned int input_peaks[26];
+ unsigned int output_peaks[28];
+ unsigned long long playback_rms[26];
+ unsigned long long input_rms[26];
+};
+
+#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, hdsp_peak_rms_t)
+
+typedef struct _snd_hdsp_config_info hdsp_config_info_t;
+
+struct _snd_hdsp_config_info {
+ unsigned char pref_sync_ref;
+ unsigned char wordclock_sync_check;
+ unsigned char spdif_sync_check;
+ unsigned char adatsync_sync_check;
+ unsigned char adat_sync_check[3];
+ unsigned char spdif_in;
+ unsigned char spdif_out;
+ unsigned char spdif_professional;
+ unsigned char spdif_emphasis;
+ unsigned char spdif_nonaudio;
+ unsigned int spdif_sample_rate;
+ unsigned int system_sample_rate;
+ unsigned int autosync_sample_rate;
+ unsigned char system_clock_mode;
+ unsigned char clock_source;
+ unsigned char autosync_ref;
+ unsigned char line_out;
+ unsigned char passthru;
+};
+
+#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, hdsp_config_info_t)
+
+typedef struct _snd_hdsp_firmware hdsp_firmware_t;
+
+struct _snd_hdsp_firmware {
+ unsigned long firmware_data[24413];
+};
+
+#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t)
+
+typedef struct _snd_hdsp_version hdsp_version_t;
+
+struct _snd_hdsp_version {
+ HDSP_IO_Type io_type;
+ unsigned short firmware_rev;
+};
+
+#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, hdsp_version_t)
+
+typedef struct _snd_hdsp_mixer hdsp_mixer_t;
+
+struct _snd_hdsp_mixer {
+ unsigned short matrix[HDSP_MATRIX_MIXER_SIZE];
+};
+
+#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, hdsp_mixer_t)
+
+#endif /* __SOUND_HDSP_H */
diff --git a/include/sound/initval.h b/include/sound/initval.h
index 7ccacd52b015..016151a49a9b 100644
--- a/include/sound/initval.h
+++ b/include/sound/initval.h
@@ -25,7 +25,7 @@
#ifdef MODULE
#define MODULE_GENERIC_STRING(name, string) \
static const char __module_generic_string_##name [] \
- __attribute__ ((section(".modstring"))) = #name "=" string;
+ __attribute__ ((unused, __section__(".modstring"))) = #name "=" string;
#else
#define MODULE_GENERIC_STRING(name, string)
#endif
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 02d57069a6f9..744fc22fdf38 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -174,19 +174,4 @@ static inline dma_addr_t snd_sgbuf_get_addr(struct snd_sg_buf *sgbuf, size_t off
}
#endif /* CONFIG_PCI */
-
-/*
- * wrappers
- */
-
-#ifdef CONFIG_PCI
-#if defined(__i386__) || defined(__ppc__) || defined(__x86_64__)
-#define HACK_PCI_ALLOC_CONSISTENT
-/* a hack for 2.4/5 kernels for better allocation of large buffers */
-void *snd_pci_hack_alloc_consistent(struct pci_dev *hwdev, size_t size,
- dma_addr_t *dma_handle);
-#endif /* arch */
-#endif /* CONFIG_PCI */
-
-
#endif /* __SOUND_MEMALLOC_H */
diff --git a/include/sound/opl3.h b/include/sound/opl3.h
index f516550dc9a1..48fcf7cb0113 100644
--- a/include/sound/opl3.h
+++ b/include/sound/opl3.h
@@ -230,7 +230,8 @@
#define OPL3_HW_OPL3_FM801 0x0303 /* FM801 */
#define OPL3_HW_OPL3_CS4281 0x0304 /* CS4281 */
#define OPL3_HW_OPL3_PC98 0x0305 /* PC9800 */
-#define OPL3_HW_OPL4 0x0400
+#define OPL3_HW_OPL4 0x0400 /* YMF278B/YMF295 */
+#define OPL3_HW_OPL4_ML 0x0401 /* YMF704/YMF721 */
#define OPL3_HW_MASK 0xff00
#define MAX_OPL2_VOICES 9
diff --git a/include/sound/snd_wavefront.h b/include/sound/snd_wavefront.h
index 234c81b6db98..414ddb410b28 100644
--- a/include/sound/snd_wavefront.h
+++ b/include/sound/snd_wavefront.h
@@ -98,12 +98,12 @@ struct _snd_wavefront {
struct _snd_wavefront_card {
snd_wavefront_t wavefront;
-#ifdef __ISAPNP__
- struct isapnp_dev *wss;
- struct isapnp_dev *ctrl;
- struct isapnp_dev *mpu;
- struct isapnp_dev *synth;
-#endif /* CONFIG_ISAPNP */
+#ifdef CONFIG_PNP
+ struct pnp_dev *wss;
+ struct pnp_dev *ctrl;
+ struct pnp_dev *mpu;
+ struct pnp_dev *synth;
+#endif /* CONFIG_PNP */
};
extern void snd_wavefront_internal_interrupt (snd_wavefront_card_t *card);
diff --git a/include/sound/trident.h b/include/sound/trident.h
index a2263766ed41..7098bfdc2b48 100644
--- a/include/sound/trident.h
+++ b/include/sound/trident.h
@@ -403,10 +403,6 @@ struct _snd_trident_pcm_mixer {
unsigned char rvol; /* rear volume */
unsigned char cvol; /* center volume */
unsigned char pad;
- snd_kcontrol_t *ctl_vol; /* front volume */
- snd_kcontrol_t *ctl_pan; /* pan */
- snd_kcontrol_t *ctl_rvol; /* rear volume */
- snd_kcontrol_t *ctl_cvol; /* center volume */
};
struct _snd_trident {
@@ -458,6 +454,10 @@ struct _snd_trident {
unsigned int musicvol_wavevol;
snd_trident_pcm_mixer_t pcm_mixer[32];
+ snd_kcontrol_t *ctl_vol; /* front volume */
+ snd_kcontrol_t *ctl_pan; /* pan */
+ snd_kcontrol_t *ctl_rvol; /* rear volume */
+ snd_kcontrol_t *ctl_cvol; /* center volume */
spinlock_t reg_lock;
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
index 0c24824adbfd..4c2a3da41082 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -174,6 +174,28 @@
#define YDSXG_CAPTURE_VOICES 2
#define YDSXG_EFFECT_VOICES 5
+#define YMFPCI_LEGACY_SBEN (1 << 0) /* soundblaster enable */
+#define YMFPCI_LEGACY_FMEN (1 << 1) /* OPL3 enable */
+#define YMFPCI_LEGACY_JPEN (1 << 2) /* joystick enable */
+#define YMFPCI_LEGACY_MEN (1 << 3) /* MPU401 enable */
+#define YMFPCI_LEGACY_MIEN (1 << 4) /* MPU RX irq enable */
+#define YMFPCI_LEGACY_IOBITS (1 << 5) /* i/o bits range, 0 = 16bit, 1 =10bit */
+#define YMFPCI_LEGACY_SDMA (3 << 6) /* SB DMA select */
+#define YMFPCI_LEGACY_SBIRQ (7 << 8) /* SB IRQ select */
+#define YMFPCI_LEGACY_MPUIRQ (7 << 11) /* MPU IRQ select */
+#define YMFPCI_LEGACY_SIEN (1 << 14) /* serialized IRQ */
+#define YMFPCI_LEGACY_LAD (1 << 15) /* legacy audio disable */
+
+#define YMFPCI_LEGACY2_FMIO (3 << 0) /* OPL3 i/o address (724/740) */
+#define YMFPCI_LEGACY2_SBIO (3 << 2) /* SB i/o address (724/740) */
+#define YMFPCI_LEGACY2_MPUIO (3 << 4) /* MPU401 i/o address (724/740) */
+#define YMFPCI_LEGACY2_JSIO (3 << 6) /* joystick i/o address (724/740) */
+#define YMFPCI_LEGACY2_MAIM (1 << 8) /* MPU401 ack intr mask */
+#define YMFPCI_LEGACY2_SMOD (3 << 11) /* SB DMA mode */
+#define YMFPCI_LEGACY2_SBVER (3 << 13) /* SB version select */
+#define YMFPCI_LEGACY2_IMOD (1 << 15) /* legacy IRQ mode */
+/* SIEN:IMOD 0:0 = legacy irq, 0:1 = INTA, 1:0 = serialized IRQ */
+
/*
*
*/
@@ -283,6 +305,8 @@ struct _snd_ymfpci {
unsigned long reg_area_phys;
unsigned long reg_area_virt;
struct resource *res_reg_area;
+ struct resource *fm_res;
+ struct resource *mpu_res;
unsigned short old_legacy_ctrl;
unsigned int joystick_port;