aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAlexander Viro <viro@www.linux.org.uk>2004-07-15 22:02:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-15 22:02:54 -0700
commit9d0020afa6378c75d648d9791e678fa7510c303e (patch)
tree2f4956bb39b480aa7bcd1e468f056fbeb44fadea /sound
parentef57ecaf874386b93da0451f4a291a2d652865c5 (diff)
downloadhistory-9d0020afa6378c75d648d9791e678fa7510c303e.tar.gz
[PATCH] au88x0: use proper field of snd_kcontrol_t and don't try to store pointer in int
The au88x0 driver tries to use the wrong private field - there are two, one of them int and another void *. While it's not a problem on 32bot boxen, it breaks on 64bit ones. Fixed.
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/au88x0/au88x0_a3d.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c
index dd85d947bde856..8d4919ca29f575 100644
--- a/sound/pci/au88x0/au88x0_a3d.c
+++ b/sound/pci/au88x0/au88x0_a3d.c
@@ -765,7 +765,7 @@ snd_vortex_a3d_filter_info(snd_kcontrol_t *
static int
snd_vortex_a3d_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol)
{
- //a3dsrc_t *a = (a3dsrc_t*)(kcontrol->private_value);
+ //a3dsrc_t *a = kcontrol->private_data;
/* No read yet. Would this be really useable/needed ? */
return 0;
@@ -775,7 +775,7 @@ static int
snd_vortex_a3d_hrtf_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol)
{
- a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
+ a3dsrc_t *a = kcontrol->private_data;
int changed = 1, i;
int coord[6];
for (i = 0; i < 6; i++)
@@ -792,7 +792,7 @@ static int
snd_vortex_a3d_itd_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol)
{
- a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
+ a3dsrc_t *a = kcontrol->private_data;
int coord[6];
int i, changed = 1;
for (i = 0; i < 6; i++)
@@ -811,7 +811,7 @@ static int
snd_vortex_a3d_ild_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol)
{
- a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
+ a3dsrc_t *a = kcontrol->private_data;
int changed = 1;
int l, r;
/* There may be some scale tranlation needed here. */
@@ -828,7 +828,7 @@ static int
snd_vortex_a3d_filter_put(snd_kcontrol_t
* kcontrol, snd_ctl_elem_value_t * ucontrol)
{
- a3dsrc_t *a = (a3dsrc_t *) (kcontrol->private_value);
+ a3dsrc_t *a = kcontrol->private_data;
int i, changed = 1;
int params[6];
for (i = 0; i < 6; i++)
@@ -846,12 +846,12 @@ snd_vortex_a3d_filter_put(snd_kcontrol_t
}
static snd_kcontrol_new_t vortex_a3d_kcontrol __devinitdata = {
- .iface = SNDRV_CTL_ELEM_IFACE_PCM,.name =
- "Playback PCM advanced processing",.index =
- 0,.access =
- SNDRV_CTL_ELEM_ACCESS_READWRITE,.private_value =
- 0,.info = snd_vortex_a3d_hrtf_info,.get =
- snd_vortex_a3d_get,.put = snd_vortex_a3d_hrtf_put
+ .iface = SNDRV_CTL_ELEM_IFACE_PCM,
+ .name = "Playback PCM advanced processing",
+ .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
+ .info = snd_vortex_a3d_hrtf_info,
+ .get = snd_vortex_a3d_get,
+ .put = snd_vortex_a3d_hrtf_put,
};
/* Control (un)registration. */
@@ -864,7 +864,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
- kcontrol->private_value = (int)&(vortex->a3d[i]);
+ kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_HRTF;
kcontrol->info = snd_vortex_a3d_hrtf_info;
kcontrol->put = snd_vortex_a3d_hrtf_put;
@@ -876,7 +876,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
- kcontrol->private_value = (int)&(vortex->a3d[i]);
+ kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_ITD;
kcontrol->info = snd_vortex_a3d_itd_info;
kcontrol->put = snd_vortex_a3d_itd_put;
@@ -888,7 +888,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
- kcontrol->private_value = (int)&(vortex->a3d[i]);
+ kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_GAINS;
kcontrol->info = snd_vortex_a3d_ild_info;
kcontrol->put = snd_vortex_a3d_ild_put;
@@ -900,7 +900,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM;
- kcontrol->private_value = (int)&(vortex->a3d[i]);
+ kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_FILTER;
kcontrol->info = snd_vortex_a3d_filter_info;
kcontrol->put = snd_vortex_a3d_filter_put;