| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /*************************************************************************** |
|---|
| 2 | 3 | * au88x0_a3d.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 9 | 10 | ****************************************************************************/ |
|---|
| 10 | 11 | |
|---|
| 11 | 12 | /* |
|---|
| 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. |
|---|
| 25 | 13 | */ |
|---|
| 26 | 14 | |
|---|
| 27 | 15 | #include "au88x0_a3d.h" |
|---|
| .. | .. |
|---|
| 777 | 765 | struct snd_ctl_elem_value *ucontrol) |
|---|
| 778 | 766 | { |
|---|
| 779 | 767 | a3dsrc_t *a = kcontrol->private_data; |
|---|
| 780 | | - int changed = 1, i; |
|---|
| 768 | + int i; |
|---|
| 781 | 769 | int coord[6]; |
|---|
| 782 | 770 | for (i = 0; i < 6; i++) |
|---|
| 783 | 771 | coord[i] = ucontrol->value.integer.value[i]; |
|---|
| .. | .. |
|---|
| 786 | 774 | vortex_a3d_coord2hrtf(a->hrtf[1], coord); |
|---|
| 787 | 775 | a3dsrc_SetHrtfTarget(a, a->hrtf[0], a->hrtf[1]); |
|---|
| 788 | 776 | a3dsrc_SetHrtfCurrent(a, a->hrtf[0], a->hrtf[1]); |
|---|
| 789 | | - return changed; |
|---|
| 777 | + return 1; |
|---|
| 790 | 778 | } |
|---|
| 791 | 779 | |
|---|
| 792 | 780 | static int |
|---|
| .. | .. |
|---|
| 795 | 783 | { |
|---|
| 796 | 784 | a3dsrc_t *a = kcontrol->private_data; |
|---|
| 797 | 785 | int coord[6]; |
|---|
| 798 | | - int i, changed = 1; |
|---|
| 786 | + int i; |
|---|
| 799 | 787 | for (i = 0; i < 6; i++) |
|---|
| 800 | 788 | coord[i] = ucontrol->value.integer.value[i]; |
|---|
| 801 | 789 | /* Translate orientation coordinates to a3d params. */ |
|---|
| .. | .. |
|---|
| 805 | 793 | a3dsrc_SetItdTarget(a, a->itd[0], a->itd[1]); |
|---|
| 806 | 794 | a3dsrc_SetItdCurrent(a, a->itd[0], a->itd[1]); |
|---|
| 807 | 795 | a3dsrc_SetItdDline(a, a->dline); |
|---|
| 808 | | - return changed; |
|---|
| 796 | + return 1; |
|---|
| 809 | 797 | } |
|---|
| 810 | 798 | |
|---|
| 811 | 799 | static int |
|---|
| .. | .. |
|---|
| 813 | 801 | struct snd_ctl_elem_value *ucontrol) |
|---|
| 814 | 802 | { |
|---|
| 815 | 803 | a3dsrc_t *a = kcontrol->private_data; |
|---|
| 816 | | - int changed = 1; |
|---|
| 817 | 804 | int l, r; |
|---|
| 818 | 805 | /* There may be some scale tranlation needed here. */ |
|---|
| 819 | 806 | l = ucontrol->value.integer.value[0]; |
|---|
| .. | .. |
|---|
| 822 | 809 | /* Left Right panning. */ |
|---|
| 823 | 810 | a3dsrc_SetGainTarget(a, l, r); |
|---|
| 824 | 811 | a3dsrc_SetGainCurrent(a, l, r); |
|---|
| 825 | | - return changed; |
|---|
| 812 | + return 1; |
|---|
| 826 | 813 | } |
|---|
| 827 | 814 | |
|---|
| 828 | 815 | static int |
|---|
| .. | .. |
|---|
| 830 | 817 | struct snd_ctl_elem_value *ucontrol) |
|---|
| 831 | 818 | { |
|---|
| 832 | 819 | a3dsrc_t *a = kcontrol->private_data; |
|---|
| 833 | | - int i, changed = 1; |
|---|
| 820 | + int i; |
|---|
| 834 | 821 | int params[6]; |
|---|
| 835 | 822 | for (i = 0; i < 6; i++) |
|---|
| 836 | 823 | params[i] = ucontrol->value.integer.value[i]; |
|---|
| .. | .. |
|---|
| 843 | 830 | a3dsrc_SetAtmosCurrent(a, a->filter[0], |
|---|
| 844 | 831 | a->filter[1], a->filter[2], |
|---|
| 845 | 832 | a->filter[3], a->filter[4]); |
|---|
| 846 | | - return changed; |
|---|
| 833 | + return 1; |
|---|
| 847 | 834 | } |
|---|
| 848 | 835 | |
|---|
| 849 | 836 | static const struct snd_kcontrol_new vortex_a3d_kcontrol = { |
|---|