X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fpci%2Fau88x0%2Fau88x0_a3d.c;h=d215f393ea6460deaf620f9521cff016b21bb766;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=dd85d947bde8568821d1b7fd4fe9d7934bac2406;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c index dd85d947b..d215f393e 100644 --- a/sound/pci/au88x0/au88x0_a3d.c +++ b/sound/pci/au88x0/au88x0_a3d.c @@ -488,7 +488,7 @@ static void a3dsrc_ZeroStateA3D(a3dsrc_t * a) int i, var, var2; if ((a->vortex) == NULL) { - printk("vortex: ZeroStateA3D: ERROR: a->vortex is NULL\n"); + printk(KERN_ERR "vortex: ZeroStateA3D: ERROR: a->vortex is NULL\n"); return; } @@ -567,7 +567,7 @@ static int Vort3DRend_Initialize(vortex_t * v, unsigned short mode) v->xt_mode = mode; /* this_14 */ vortex_XtalkHw_init(v); - vortex_XtalkHw_SetGains(v, asXtalkGainsAllChan); + vortex_XtalkHw_SetGainsAllChan(v); switch (v->xt_mode) { case XT_SPEAKER0: vortex_XtalkHw_ProgramXtalkNarrow(v); @@ -725,7 +725,7 @@ static void vortex_a3d_translate_filter(a3d_atmos_t filter, int *params) /* ALSA control interface. */ static int -snd_vortex_a3d_hrtf_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) +snd_vortex_a3d_hrtf_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 6; @@ -734,7 +734,7 @@ snd_vortex_a3d_hrtf_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) return 0; } static int -snd_vortex_a3d_itd_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) +snd_vortex_a3d_itd_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -743,7 +743,7 @@ snd_vortex_a3d_itd_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) return 0; } static int -snd_vortex_a3d_ild_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) +snd_vortex_a3d_ild_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -752,8 +752,8 @@ snd_vortex_a3d_ild_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) return 0; } static int -snd_vortex_a3d_filter_info(snd_kcontrol_t * - kcontrol, snd_ctl_elem_info_t * uinfo) +snd_vortex_a3d_filter_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 4; @@ -763,19 +763,19 @@ snd_vortex_a3d_filter_info(snd_kcontrol_t * } static int -snd_vortex_a3d_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +snd_vortex_a3d_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *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; } static int -snd_vortex_a3d_hrtf_put(snd_kcontrol_t * - kcontrol, snd_ctl_elem_value_t * ucontrol) +snd_vortex_a3d_hrtf_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *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++) @@ -789,10 +789,10 @@ snd_vortex_a3d_hrtf_put(snd_kcontrol_t * } static int -snd_vortex_a3d_itd_put(snd_kcontrol_t * - kcontrol, snd_ctl_elem_value_t * ucontrol) +snd_vortex_a3d_itd_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *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++) @@ -808,10 +808,10 @@ snd_vortex_a3d_itd_put(snd_kcontrol_t * } static int -snd_vortex_a3d_ild_put(snd_kcontrol_t * - kcontrol, snd_ctl_elem_value_t * ucontrol) +snd_vortex_a3d_ild_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *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. */ @@ -825,10 +825,10 @@ snd_vortex_a3d_ild_put(snd_kcontrol_t * } static int -snd_vortex_a3d_filter_put(snd_kcontrol_t - * kcontrol, snd_ctl_elem_value_t * ucontrol) +snd_vortex_a3d_filter_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *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++) @@ -845,26 +845,25 @@ snd_vortex_a3d_filter_put(snd_kcontrol_t return changed; } -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 +static struct snd_kcontrol_new vortex_a3d_kcontrol __devinitdata = { + .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. */ static int vortex_a3d_register_controls(vortex_t * vortex) { - snd_kcontrol_t *kcontrol; + struct snd_kcontrol *kcontrol; int err, i; /* HRTF controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->id.numid = CTRLID_HRTF; kcontrol->info = snd_vortex_a3d_hrtf_info; kcontrol->put = snd_vortex_a3d_hrtf_put; @@ -874,9 +873,8 @@ static int vortex_a3d_register_controls(vortex_t * vortex) /* ITD controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->id.numid = CTRLID_ITD; kcontrol->info = snd_vortex_a3d_itd_info; kcontrol->put = snd_vortex_a3d_itd_put; @@ -886,9 +884,8 @@ static int vortex_a3d_register_controls(vortex_t * vortex) /* ILD (gains) controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->id.numid = CTRLID_GAINS; kcontrol->info = snd_vortex_a3d_ild_info; kcontrol->put = snd_vortex_a3d_ild_put; @@ -898,9 +895,8 @@ static int vortex_a3d_register_controls(vortex_t * vortex) /* Filter controls. */ for (i = 0; i < NR_A3D; i++) { if ((kcontrol = - snd_ctl_new1(&vortex_a3d_kcontrol, vortex)) == NULL) + snd_ctl_new1(&vortex_a3d_kcontrol, &vortex->a3d[i])) == NULL) return -ENOMEM; - kcontrol->private_value = (int)&(vortex->a3d[i]); kcontrol->id.numid = CTRLID_FILTER; kcontrol->info = snd_vortex_a3d_filter_info; kcontrol->put = snd_vortex_a3d_filter_put;