.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* -*- linux-c -*- * |
---|
2 | 3 | * |
---|
3 | 4 | * ALSA driver for the digigram lx6464es interface |
---|
4 | 5 | * low-level interface |
---|
5 | 6 | * |
---|
6 | 7 | * 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 | | - * |
---|
23 | 8 | */ |
---|
24 | 9 | |
---|
25 | 10 | /* #define RMH_DEBUG 1 */ |
---|
.. | .. |
---|
176 | 161 | the number of status words (in addition to the return value) |
---|
177 | 162 | */ |
---|
178 | 163 | |
---|
179 | | -static struct dsp_cmd_info dsp_commands[] = |
---|
| 164 | +static const struct dsp_cmd_info dsp_commands[] = |
---|
180 | 165 | { |
---|
181 | 166 | { (CMD_00_INFO_DEBUG << OPCODE_OFFSET) , 1 /*custom*/ |
---|
182 | 167 | , 1 , 0 /**/ , CMD_NAME("INFO_DEBUG") }, |
---|
.. | .. |
---|
508 | 493 | dev_dbg(chip->card->dev, |
---|
509 | 494 | "CMD_08_ASK_BUFFERS: needed %d, freed %d\n", |
---|
510 | 495 | *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); |
---|
517 | 501 | } |
---|
518 | 502 | } |
---|
519 | 503 | |
---|
.. | .. |
---|
873 | 857 | return err; |
---|
874 | 858 | } |
---|
875 | 859 | |
---|
876 | | -static u32 peak_map[] = { |
---|
| 860 | +static const u32 peak_map[] = { |
---|
877 | 861 | 0x00000109, /* -90.308dB */ |
---|
878 | 862 | 0x0000083B, /* -72.247dB */ |
---|
879 | 863 | 0x000020C4, /* -60.205dB */ |
---|
.. | .. |
---|
1001 | 985 | * Stat[8] LSB overrun |
---|
1002 | 986 | * */ |
---|
1003 | 987 | |
---|
1004 | | - u64 orun_mask; |
---|
1005 | | - u64 urun_mask; |
---|
1006 | 988 | int eb_pending_out = (irqsrc & MASK_SYS_STATUS_EOBO) ? 1 : 0; |
---|
1007 | 989 | int eb_pending_in = (irqsrc & MASK_SYS_STATUS_EOBI) ? 1 : 0; |
---|
1008 | 990 | |
---|
.. | .. |
---|
1024 | 1006 | dev_dbg(chip->card->dev, "interrupt: EOBO pending %llx\n", |
---|
1025 | 1007 | *r_notified_out_pipe_mask); |
---|
1026 | 1008 | } |
---|
1027 | | - |
---|
1028 | | - orun_mask = ((u64)stat[7] << 32) + stat[8]; |
---|
1029 | | - urun_mask = ((u64)stat[5] << 32) + stat[6]; |
---|
1030 | 1009 | |
---|
1031 | 1010 | /* todo: handle xrun notification */ |
---|
1032 | 1011 | |
---|