git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
sound
/
pci
/
au88x0
/
au88x0_eq.c
diff --git
a/sound/pci/au88x0/au88x0_eq.c
b/sound/pci/au88x0/au88x0_eq.c
index
53b47a4
..
0c86a31
100644
(file)
--- a/
sound/pci/au88x0/au88x0_eq.c
+++ b/
sound/pci/au88x0/au88x0_eq.c
@@
-377,23
+377,23
@@
static void vortex_EqHw_GetLevels(vortex_t * vortex, u16 a[])
#endif
/* Global Control */
#endif
/* Global Control */
-static void vortex_EqHw_SetControlReg(vortex_t * vortex, u
nsigned long
reg)
+static void vortex_EqHw_SetControlReg(vortex_t * vortex, u
32
reg)
{
hwwrite(vortex->mmio, 0x2b440, reg);
}
{
hwwrite(vortex->mmio, 0x2b440, reg);
}
-static void vortex_EqHw_SetSampleRate(vortex_t * vortex,
int
sr)
+static void vortex_EqHw_SetSampleRate(vortex_t * vortex,
u32
sr)
{
hwwrite(vortex->mmio, 0x2b440, ((sr & 0x1f) << 3) | 0xb800);
}
#if 0
{
hwwrite(vortex->mmio, 0x2b440, ((sr & 0x1f) << 3) | 0xb800);
}
#if 0
-static void vortex_EqHw_GetControlReg(vortex_t * vortex, u
nsigned long
*reg)
+static void vortex_EqHw_GetControlReg(vortex_t * vortex, u
32
*reg)
{
*reg = hwread(vortex->mmio, 0x2b440);
}
{
*reg = hwread(vortex->mmio, 0x2b440);
}
-static void vortex_EqHw_GetSampleRate(vortex_t * vortex,
int
*sr)
+static void vortex_EqHw_GetSampleRate(vortex_t * vortex,
u32
*sr)
{
*sr = (hwread(vortex->mmio, 0x2b440) >> 3) & 0x1f;
}
{
*sr = (hwread(vortex->mmio, 0x2b440) >> 3) & 0x1f;
}
@@
-554,7
+554,7
@@
static void vortex_Eqlzr_SetRightGain(vortex_t * vortex, u16 index, u16 gain)
#if 0
static int
#if 0
static int
-vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains,
unsigned long
*cnt)
+vortex_Eqlzr_GetAllBands(vortex_t * vortex, u16 * gains,
s32
*cnt)
{
eqlzr_t *eq = &(vortex->eq);
int si = 0;
{
eqlzr_t *eq = &(vortex->eq);
int si = 0;
@@
-586,7
+586,7
@@
static int vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex_t * vortex)
}
static int
}
static int
-vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[],
unsigned long
count)
+vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[],
s32
count)
{
eqlzr_t *eq = &(vortex->eq);
int i;
{
eqlzr_t *eq = &(vortex->eq);
int i;
@@
-604,11
+604,10
@@
vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], unsigned long count)
}
static void
}
static void
-vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, unsigned long a,
- unsigned long b)
+vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, u32 a, u32 b)
{
eqlzr_t *eq = &(vortex->eq);
{
eqlzr_t *eq = &(vortex->eq);
-
int
eax, ebx;
+
u32
eax, ebx;
eq->this58 = a;
eq->this5c = b;
eq->this58 = a;
eq->this5c = b;
@@
-624,7
+623,7
@@
vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, unsigned long a,
static void vortex_Eqlzr_ProgramA3dBypassGain(vortex_t * vortex)
{
eqlzr_t *eq = &(vortex->eq);
static void vortex_Eqlzr_ProgramA3dBypassGain(vortex_t * vortex)
{
eqlzr_t *eq = &(vortex->eq);
-
int
eax, ebx;
+
u32
eax, ebx;
if (eq->this54)
eax = eq->this0e;
if (eq->this54)
eax = eq->this0e;
@@
-641,7
+640,7
@@
static void vortex_Eqlzr_ShutDownA3d(vortex_t * vortex)
vortex_EqHw_ZeroA3DIO(vortex);
}
vortex_EqHw_ZeroA3DIO(vortex);
}
-static void vortex_Eqlzr_SetBypass(vortex_t * vortex,
long
bp)
+static void vortex_Eqlzr_SetBypass(vortex_t * vortex,
u32
bp)
{
eqlzr_t *eq = &(vortex->eq);
{
eqlzr_t *eq = &(vortex->eq);
@@
-651,8
+650,8
@@
static void vortex_Eqlzr_SetBypass(vortex_t * vortex, long bp)
vortex_EqHw_SetBypassGain(vortex, eq->this08, eq->this08);
} else {
/* EQ disabled. */
vortex_EqHw_SetBypassGain(vortex, eq->this08, eq->this08);
} else {
/* EQ disabled. */
- vortex_EqHw_SetLeftGainsTarget(vortex,
(u16 *) (eq->this14)
);
- vortex_EqHw_SetRightGainsTarget(vortex,
(u16 *) (eq->this14)
);
+ vortex_EqHw_SetLeftGainsTarget(vortex,
eq->this14_array
);
+ vortex_EqHw_SetRightGainsTarget(vortex,
eq->this14_array
);
vortex_EqHw_SetBypassGain(vortex, eq->this0c, eq->this0c);
}
vortex_Eqlzr_ProgramA3dBypassGain(vortex);
vortex_EqHw_SetBypassGain(vortex, eq->this0c, eq->this0c);
}
vortex_Eqlzr_ProgramA3dBypassGain(vortex);
@@
-706,7
+705,7
@@
static void vortex_Eqlzr_init(vortex_t * vortex)
eq->this5c = 0xffff;
/* Set gains. */
eq->this5c = 0xffff;
/* Set gains. */
- memset(eq->this14
, 0, 2 * 10
);
+ memset(eq->this14
_array, 0, sizeof(eq->this14_array)
);
/* Actual init. */
vortex_EqHw_ZeroState(vortex);
/* Actual init. */
vortex_EqHw_ZeroState(vortex);
@@
-730,7
+729,7
@@
static void vortex_Eqlzr_shutdown(vortex_t * vortex)
/* Control interface */
static int
/* Control interface */
static int
-snd_vortex_eqtoggle_info(s
nd_kcontrol_t * kcontrol, snd_ctl_elem_info_t *
uinfo)
+snd_vortex_eqtoggle_info(s
truct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *
uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
@@
-740,8
+739,8
@@
snd_vortex_eqtoggle_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
}
static int
}
static int
-snd_vortex_eqtoggle_get(s
nd_kcontrol_t *
kcontrol,
- s
nd_ctl_elem_value_t *
ucontrol)
+snd_vortex_eqtoggle_get(s
truct snd_kcontrol *
kcontrol,
+ s
truct snd_ctl_elem_value *
ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
eqlzr_t *eq = &(vortex->eq);
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
eqlzr_t *eq = &(vortex->eq);
@@
-753,8
+752,8
@@
snd_vortex_eqtoggle_get(snd_kcontrol_t * kcontrol,
}
static int
}
static int
-snd_vortex_eqtoggle_put(s
nd_kcontrol_t *
kcontrol,
- s
nd_ctl_elem_value_t *
ucontrol)
+snd_vortex_eqtoggle_put(s
truct snd_kcontrol *
kcontrol,
+ s
truct snd_ctl_elem_value *
ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
eqlzr_t *eq = &(vortex->eq);
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
eqlzr_t *eq = &(vortex->eq);
@@
-766,7
+765,7
@@
snd_vortex_eqtoggle_put(snd_kcontrol_t * kcontrol,
return 1; /* Allways changes */
}
return 1; /* Allways changes */
}
-static s
nd_kcontrol_new_t
vortex_eqtoggle_kcontrol __devinitdata = {
+static s
truct snd_kcontrol_new
vortex_eqtoggle_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "EQ Enable",
.index = 0,
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "EQ Enable",
.index = 0,
@@
-778,7
+777,7
@@
static snd_kcontrol_new_t vortex_eqtoggle_kcontrol __devinitdata = {
};
static int
};
static int
-snd_vortex_eq_info(s
nd_kcontrol_t * kcontrol, snd_ctl_elem_info_t *
uinfo)
+snd_vortex_eq_info(s
truct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *
uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 2;
@@
-788,11
+787,11
@@
snd_vortex_eq_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
}
static int
}
static int
-snd_vortex_eq_get(s
nd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
ucontrol)
+snd_vortex_eq_get(s
truct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *
ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int i = kcontrol->private_value;
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int i = kcontrol->private_value;
- u16 gainL
, gainR
;
+ u16 gainL
= 0, gainR = 0
;
vortex_Eqlzr_GetLeftGain(vortex, i, &gainL);
vortex_Eqlzr_GetRightGain(vortex, i, &gainR);
vortex_Eqlzr_GetLeftGain(vortex, i, &gainL);
vortex_Eqlzr_GetRightGain(vortex, i, &gainR);
@@
-802,11
+801,11
@@
snd_vortex_eq_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
}
static int
}
static int
-snd_vortex_eq_put(s
nd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
ucontrol)
+snd_vortex_eq_put(s
truct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *
ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int changed = 0, i = kcontrol->private_value;
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int changed = 0, i = kcontrol->private_value;
- u16 gainL
, gainR
;
+ u16 gainL
= 0, gainR = 0
;
vortex_Eqlzr_GetLeftGain(vortex, i, &gainL);
vortex_Eqlzr_GetRightGain(vortex, i, &gainR);
vortex_Eqlzr_GetLeftGain(vortex, i, &gainL);
vortex_Eqlzr_GetRightGain(vortex, i, &gainR);
@@
-824,7
+823,7
@@
snd_vortex_eq_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
return changed;
}
return changed;
}
-static s
nd_kcontrol_new_t
vortex_eq_kcontrol __devinitdata = {
+static s
truct snd_kcontrol_new
vortex_eq_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = " .",
.index = 0,
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = " .",
.index = 0,
@@
-836,7
+835,7
@@
static snd_kcontrol_new_t vortex_eq_kcontrol __devinitdata = {
};
static int
};
static int
-snd_vortex_peaks_info(s
nd_kcontrol_t * kcontrol, snd_ctl_elem_info_t *
uinfo)
+snd_vortex_peaks_info(s
truct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *
uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 20;
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 20;
@@
-846,15
+845,15
@@
snd_vortex_peaks_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo)
}
static int
}
static int
-snd_vortex_peaks_get(s
nd_kcontrol_t * kcontrol, snd_ctl_elem_value_t *
ucontrol)
+snd_vortex_peaks_get(s
truct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *
ucontrol)
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
{
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
- int i, count;
+ int i, count
= 0
;
u16 peaks[20];
vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
if (count != 20) {
u16 peaks[20];
vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
if (count != 20) {
- printk("vortex: peak count error 20 != %d \n", count);
+ printk(
KERN_ERR
"vortex: peak count error 20 != %d \n", count);
return -1;
}
for (i = 0; i < 20; i++)
return -1;
}
for (i = 0; i < 20; i++)
@@
-863,7
+862,7
@@
snd_vortex_peaks_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
return 0;
}
return 0;
}
-static s
nd_kcontrol_new_t
vortex_levels_kcontrol __devinitdata = {
+static s
truct snd_kcontrol_new
vortex_levels_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "EQ Peaks",
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "EQ Peaks",
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
@@
-886,9
+885,9
@@
static char *EqBandLabels[10] __devinitdata = {
};
/* ALSA driver entry points. Init and exit. */
};
/* ALSA driver entry points. Init and exit. */
-static int vortex_eq_init(vortex_t * vortex)
+static int
__devinit
vortex_eq_init(vortex_t * vortex)
{
{
- s
nd_kcontrol_t
*kcontrol;
+ s
truct snd_kcontrol
*kcontrol;
int err, i;
vortex_Eqlzr_init(vortex);
int err, i;
vortex_Eqlzr_init(vortex);