hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/pci/au88x0/au88x0_core.c
....@@ -1,17 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License as published by
4
- * the Free Software Foundation; either version 2 of the License, or
5
- * (at your option) any later version.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU Library General Public License for more details.
11
- *
12
- * You should have received a copy of the GNU General Public License
13
- * along with this program; if not, write to the Free Software
14
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
153 */
164
175 /*
....@@ -1115,6 +1103,7 @@
11151103 hwwrite(vortex->mmio,
11161104 VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0xc,
11171105 snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
1106
+ fallthrough;
11181107 /* 3 pages */
11191108 case 3:
11201109 dma->cfg0 |= 0x12000000;
....@@ -1122,12 +1111,14 @@
11221111 hwwrite(vortex->mmio,
11231112 VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x8,
11241113 snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
1114
+ fallthrough;
11251115 /* 2 pages */
11261116 case 2:
11271117 dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize - 1);
11281118 hwwrite(vortex->mmio,
11291119 VORTEX_ADBDMA_BUFBASE + (adbdma << 4) + 0x4,
11301120 snd_pcm_sgbuf_get_addr(dma->substream, psize));
1121
+ fallthrough;
11311122 /* 1 page */
11321123 case 1:
11331124 dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize - 1) << 0xc);
....@@ -1390,17 +1381,20 @@
13901381 dma->cfg1 |= 0x88000000 | 0x44000000 | 0x30000000 | (psize-1);
13911382 hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0xc,
13921383 snd_pcm_sgbuf_get_addr(dma->substream, psize * 3));
1384
+ fallthrough;
13931385 /* 3 pages */
13941386 case 3:
13951387 dma->cfg0 |= 0x12000000;
13961388 dma->cfg1 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);
13971389 hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x8,
13981390 snd_pcm_sgbuf_get_addr(dma->substream, psize * 2));
1391
+ fallthrough;
13991392 /* 2 pages */
14001393 case 2:
14011394 dma->cfg0 |= 0x88000000 | 0x44000000 | 0x10000000 | (psize-1);
14021395 hwwrite(vortex->mmio, VORTEX_WTDMA_BUFBASE + (wtdma << 4) + 0x4,
14031396 snd_pcm_sgbuf_get_addr(dma->substream, psize));
1397
+ fallthrough;
14041398 /* 1 page */
14051399 case 1:
14061400 dma->cfg0 |= 0x80000000 | 0x40000000 | ((psize-1) << 0xc);
....@@ -1995,7 +1989,7 @@
19951989 // Higher level ADB audio path (de)allocator.
19961990
19971991 /* Resource manager */
1998
-static int resnum[VORTEX_RESOURCE_LAST] =
1992
+static const int resnum[VORTEX_RESOURCE_LAST] =
19991993 { NR_ADB, NR_SRC, NR_MIXIN, NR_MIXOUT, NR_A3D };
20001994 /*
20011995 Checkout/Checkin resource of given type.
....@@ -2004,7 +1998,7 @@
20041998 out: Mean checkout if != 0. Else mean Checkin resource.
20051999 restype: Indicates type of resource to be checked in or out.
20062000 */
2007
-static char
2001
+static int
20082002 vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype)
20092003 {
20102004 int i, qty = resnum[restype], resinuse = 0;