hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/sound/pci/ice1712/maya44.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ALSA driver for ICEnsemble VT1724 (Envy24HT)
34 *
....@@ -5,21 +6,6 @@
56 *
67 * Copyright (c) 2009 Takashi Iwai <tiwai@suse.de>
78 * Based on the patches by Rainer Zimmermann <mail@lightshed.de>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
- *
239 */
2410
2511 #include <linux/init.h>
....@@ -130,7 +116,7 @@
130116 unsigned char mux_bits[2]; /* extra bits for ADC mute */
131117 };
132118
133
-static struct maya_vol_info vol_info[WM_NUM_VOLS] = {
119
+static const struct maya_vol_info vol_info[WM_NUM_VOLS] = {
134120 [WM_VOL_HP] = {
135121 .maxval = 80,
136122 .regs = { WM8776_REG_HEADPHONE_L, WM8776_REG_HEADPHONE_R },
....@@ -172,7 +158,7 @@
172158 struct snd_ctl_elem_info *uinfo)
173159 {
174160 unsigned int idx = kcontrol->private_value;
175
- struct maya_vol_info *vol = &vol_info[idx];
161
+ const struct maya_vol_info *vol = &vol_info[idx];
176162
177163 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
178164 uinfo->count = 2;
....@@ -203,7 +189,7 @@
203189 struct snd_wm8776 *wm =
204190 &chip->wm[snd_ctl_get_ioff(kcontrol, &ucontrol->id)];
205191 unsigned int idx = kcontrol->private_value;
206
- struct maya_vol_info *vol = &vol_info[idx];
192
+ const struct maya_vol_info *vol = &vol_info[idx];
207193 unsigned int val, data;
208194 int ch, changed = 0;
209195
....@@ -438,7 +424,7 @@
438424 * controls to be added
439425 */
440426
441
-static struct snd_kcontrol_new maya_controls[] = {
427
+static const struct snd_kcontrol_new maya_controls[] = {
442428 {
443429 .name = "Crossmix Playback Volume",
444430 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
....@@ -676,7 +662,7 @@
676662 /*
677663 * chip addresses on I2C bus
678664 */
679
-static unsigned char wm8776_addr[2] = {
665
+static const unsigned char wm8776_addr[2] = {
680666 0x34, 0x36, /* codec 0 & 1 */
681667 };
682668
....@@ -726,7 +712,7 @@
726712 * hence the driver needs to sets up it properly.
727713 */
728714
729
-static unsigned char maya44_eeprom[] = {
715
+static const unsigned char maya44_eeprom[] = {
730716 [ICE_EEP2_SYSCONF] = 0x45,
731717 /* clock xin1=49.152MHz, mpu401, 2 stereo ADCs+DACs */
732718 [ICE_EEP2_ACLINK] = 0x80,