| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for Digigram miXart soundcards |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * mixer callbacks |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (c) 2003 by Digigram <alsa@digigram.com> |
|---|
| 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; if not, write to the Free Software |
|---|
| 20 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 21 | 8 | */ |
|---|
| 22 | 9 | |
|---|
| 23 | 10 | #include <linux/time.h> |
|---|
| .. | .. |
|---|
| 33 | 20 | #include <sound/tlv.h> |
|---|
| 34 | 21 | #include "mixart_mixer.h" |
|---|
| 35 | 22 | |
|---|
| 36 | | -static u32 mixart_analog_level[256] = { |
|---|
| 23 | +static const u32 mixart_analog_level[256] = { |
|---|
| 37 | 24 | 0xc2c00000, /* [000] -96.0 dB */ |
|---|
| 38 | 25 | 0xc2bf0000, /* [001] -95.5 dB */ |
|---|
| 39 | 26 | 0xc2be0000, /* [002] -95.0 dB */ |
|---|
| .. | .. |
|---|
| 456 | 443 | .put = mixart_audio_sw_put |
|---|
| 457 | 444 | }; |
|---|
| 458 | 445 | |
|---|
| 459 | | -static u32 mixart_digital_level[256] = { |
|---|
| 446 | +static const u32 mixart_digital_level[256] = { |
|---|
| 460 | 447 | 0x00000000, /* [000] = 0.00e+000 = mute if <= -109.5dB */ |
|---|
| 461 | 448 | 0x366e1c7a, /* [001] = 3.55e-006 = pow(10.0, 0.05 * -109.0dB) */ |
|---|
| 462 | 449 | 0x367c3860, /* [002] = 3.76e-006 = pow(10.0, 0.05 * -108.5dB) */ |
|---|