hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/sound/pci/lx6464es/lx_core.c
....@@ -1,25 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* -*- linux-c -*- *
23 *
34 * ALSA driver for the digigram lx6464es interface
45 * low-level interface
56 *
67 * Copyright (c) 2009 Tim Blechmann <tim@klingt.org>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; see the file COPYING. If not, write to
20
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
- * Boston, MA 02111-1307, USA.
22
- *
238 */
249
2510 /* #define RMH_DEBUG 1 */
....@@ -176,7 +161,7 @@
176161 the number of status words (in addition to the return value)
177162 */
178163
179
-static struct dsp_cmd_info dsp_commands[] =
164
+static const struct dsp_cmd_info dsp_commands[] =
180165 {
181166 { (CMD_00_INFO_DEBUG << OPCODE_OFFSET) , 1 /*custom*/
182167 , 1 , 0 /**/ , CMD_NAME("INFO_DEBUG") },
....@@ -508,12 +493,11 @@
508493 dev_dbg(chip->card->dev,
509494 "CMD_08_ASK_BUFFERS: needed %d, freed %d\n",
510495 *r_needed, *r_freed);
511
- for (i = 0; i < MAX_STREAM_BUFFER; ++i) {
512
- for (i = 0; i != chip->rmh.stat_len; ++i)
513
- dev_dbg(chip->card->dev,
514
- " stat[%d]: %x, %x\n", i,
515
- chip->rmh.stat[i],
516
- chip->rmh.stat[i] & MASK_DATA_SIZE);
496
+ for (i = 0; i < MAX_STREAM_BUFFER && i < chip->rmh.stat_len;
497
+ ++i) {
498
+ dev_dbg(chip->card->dev, " stat[%d]: %x, %x\n", i,
499
+ chip->rmh.stat[i],
500
+ chip->rmh.stat[i] & MASK_DATA_SIZE);
517501 }
518502 }
519503
....@@ -873,7 +857,7 @@
873857 return err;
874858 }
875859
876
-static u32 peak_map[] = {
860
+static const u32 peak_map[] = {
877861 0x00000109, /* -90.308dB */
878862 0x0000083B, /* -72.247dB */
879863 0x000020C4, /* -60.205dB */
....@@ -1001,8 +985,6 @@
1001985 * Stat[8] LSB overrun
1002986 * */
1003987
1004
- u64 orun_mask;
1005
- u64 urun_mask;
1006988 int eb_pending_out = (irqsrc & MASK_SYS_STATUS_EOBO) ? 1 : 0;
1007989 int eb_pending_in = (irqsrc & MASK_SYS_STATUS_EOBI) ? 1 : 0;
1008990
....@@ -1024,9 +1006,6 @@
10241006 dev_dbg(chip->card->dev, "interrupt: EOBO pending %llx\n",
10251007 *r_notified_out_pipe_mask);
10261008 }
1027
-
1028
- orun_mask = ((u64)stat[7] << 32) + stat[8];
1029
- urun_mask = ((u64)stat[5] << 32) + stat[6];
10301009
10311010 /* todo: handle xrun notification */
10321011