forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/pci/au88x0/au88x0_a3d.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /***************************************************************************
23 * au88x0_a3d.c
34 *
....@@ -9,19 +10,6 @@
910 ****************************************************************************/
1011
1112 /*
12
- * This program is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation; either version 2 of the License, or
15
- * (at your option) any later version.
16
- *
17
- * This program is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- * GNU Library General Public License for more details.
21
- *
22
- * You should have received a copy of the GNU General Public License
23
- * along with this program; if not, write to the Free Software
24
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2513 */
2614
2715 #include "au88x0_a3d.h"
....@@ -777,7 +765,7 @@
777765 struct snd_ctl_elem_value *ucontrol)
778766 {
779767 a3dsrc_t *a = kcontrol->private_data;
780
- int changed = 1, i;
768
+ int i;
781769 int coord[6];
782770 for (i = 0; i < 6; i++)
783771 coord[i] = ucontrol->value.integer.value[i];
....@@ -786,7 +774,7 @@
786774 vortex_a3d_coord2hrtf(a->hrtf[1], coord);
787775 a3dsrc_SetHrtfTarget(a, a->hrtf[0], a->hrtf[1]);
788776 a3dsrc_SetHrtfCurrent(a, a->hrtf[0], a->hrtf[1]);
789
- return changed;
777
+ return 1;
790778 }
791779
792780 static int
....@@ -795,7 +783,7 @@
795783 {
796784 a3dsrc_t *a = kcontrol->private_data;
797785 int coord[6];
798
- int i, changed = 1;
786
+ int i;
799787 for (i = 0; i < 6; i++)
800788 coord[i] = ucontrol->value.integer.value[i];
801789 /* Translate orientation coordinates to a3d params. */
....@@ -805,7 +793,7 @@
805793 a3dsrc_SetItdTarget(a, a->itd[0], a->itd[1]);
806794 a3dsrc_SetItdCurrent(a, a->itd[0], a->itd[1]);
807795 a3dsrc_SetItdDline(a, a->dline);
808
- return changed;
796
+ return 1;
809797 }
810798
811799 static int
....@@ -813,7 +801,6 @@
813801 struct snd_ctl_elem_value *ucontrol)
814802 {
815803 a3dsrc_t *a = kcontrol->private_data;
816
- int changed = 1;
817804 int l, r;
818805 /* There may be some scale tranlation needed here. */
819806 l = ucontrol->value.integer.value[0];
....@@ -822,7 +809,7 @@
822809 /* Left Right panning. */
823810 a3dsrc_SetGainTarget(a, l, r);
824811 a3dsrc_SetGainCurrent(a, l, r);
825
- return changed;
812
+ return 1;
826813 }
827814
828815 static int
....@@ -830,7 +817,7 @@
830817 struct snd_ctl_elem_value *ucontrol)
831818 {
832819 a3dsrc_t *a = kcontrol->private_data;
833
- int i, changed = 1;
820
+ int i;
834821 int params[6];
835822 for (i = 0; i < 6; i++)
836823 params[i] = ucontrol->value.integer.value[i];
....@@ -843,7 +830,7 @@
843830 a3dsrc_SetAtmosCurrent(a, a->filter[0],
844831 a->filter[1], a->filter[2],
845832 a->filter[3], a->filter[4]);
846
- return changed;
833
+ return 1;
847834 }
848835
849836 static const struct snd_kcontrol_new vortex_a3d_kcontrol = {