Commit 9d0020af authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[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.
parent ef57ecaf
...@@ -765,7 +765,7 @@ snd_vortex_a3d_filter_info(snd_kcontrol_t * ...@@ -765,7 +765,7 @@ snd_vortex_a3d_filter_info(snd_kcontrol_t *
static int static int
snd_vortex_a3d_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 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 ? */ /* No read yet. Would this be really useable/needed ? */
return 0; return 0;
...@@ -775,7 +775,7 @@ static int ...@@ -775,7 +775,7 @@ static int
snd_vortex_a3d_hrtf_put(snd_kcontrol_t * snd_vortex_a3d_hrtf_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol) 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 changed = 1, i;
int coord[6]; int coord[6];
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
...@@ -792,7 +792,7 @@ static int ...@@ -792,7 +792,7 @@ static int
snd_vortex_a3d_itd_put(snd_kcontrol_t * snd_vortex_a3d_itd_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol) 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 coord[6];
int i, changed = 1; int i, changed = 1;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
...@@ -811,7 +811,7 @@ static int ...@@ -811,7 +811,7 @@ static int
snd_vortex_a3d_ild_put(snd_kcontrol_t * snd_vortex_a3d_ild_put(snd_kcontrol_t *
kcontrol, snd_ctl_elem_value_t * ucontrol) 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 changed = 1;
int l, r; int l, r;
/* There may be some scale tranlation needed here. */ /* There may be some scale tranlation needed here. */
...@@ -828,7 +828,7 @@ static int ...@@ -828,7 +828,7 @@ static int
snd_vortex_a3d_filter_put(snd_kcontrol_t snd_vortex_a3d_filter_put(snd_kcontrol_t
* kcontrol, snd_ctl_elem_value_t * ucontrol) * 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 i, changed = 1;
int params[6]; int params[6];
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
...@@ -846,12 +846,12 @@ snd_vortex_a3d_filter_put(snd_kcontrol_t ...@@ -846,12 +846,12 @@ snd_vortex_a3d_filter_put(snd_kcontrol_t
} }
static snd_kcontrol_new_t vortex_a3d_kcontrol __devinitdata = { static snd_kcontrol_new_t vortex_a3d_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_PCM,.name = .iface = SNDRV_CTL_ELEM_IFACE_PCM,
"Playback PCM advanced processing",.index = .name = "Playback PCM advanced processing",
0,.access = .access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
SNDRV_CTL_ELEM_ACCESS_READWRITE,.private_value = .info = snd_vortex_a3d_hrtf_info,
0,.info = snd_vortex_a3d_hrtf_info,.get = .get = snd_vortex_a3d_get,
snd_vortex_a3d_get,.put = snd_vortex_a3d_hrtf_put .put = snd_vortex_a3d_hrtf_put,
}; };
/* Control (un)registration. */ /* Control (un)registration. */
...@@ -864,7 +864,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex) ...@@ -864,7 +864,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol = if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM; return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_HRTF; kcontrol->id.numid = CTRLID_HRTF;
kcontrol->info = snd_vortex_a3d_hrtf_info; kcontrol->info = snd_vortex_a3d_hrtf_info;
kcontrol->put = snd_vortex_a3d_hrtf_put; kcontrol->put = snd_vortex_a3d_hrtf_put;
...@@ -876,7 +876,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex) ...@@ -876,7 +876,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol = if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM; return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_ITD; kcontrol->id.numid = CTRLID_ITD;
kcontrol->info = snd_vortex_a3d_itd_info; kcontrol->info = snd_vortex_a3d_itd_info;
kcontrol->put = snd_vortex_a3d_itd_put; kcontrol->put = snd_vortex_a3d_itd_put;
...@@ -888,7 +888,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex) ...@@ -888,7 +888,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol = if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM; return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_GAINS; kcontrol->id.numid = CTRLID_GAINS;
kcontrol->info = snd_vortex_a3d_ild_info; kcontrol->info = snd_vortex_a3d_ild_info;
kcontrol->put = snd_vortex_a3d_ild_put; kcontrol->put = snd_vortex_a3d_ild_put;
...@@ -900,7 +900,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex) ...@@ -900,7 +900,7 @@ static int vortex_a3d_register_controls(vortex_t * vortex)
if ((kcontrol = if ((kcontrol =
snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL)
return -ENOMEM; return -ENOMEM;
kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->private_data = &vortex->a3d[i];
kcontrol->id.numid = CTRLID_FILTER; kcontrol->id.numid = CTRLID_FILTER;
kcontrol->info = snd_vortex_a3d_filter_info; kcontrol->info = snd_vortex_a3d_filter_info;
kcontrol->put = snd_vortex_a3d_filter_put; kcontrol->put = snd_vortex_a3d_filter_put;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment