hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/sound/pci/ice1712/juli.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ALSA driver for ICEnsemble VT1724 (Envy24HT)
34 *
....@@ -5,22 +6,6 @@
56 *
67 * Copyright (c) 2004 Jaroslav Kysela <perex@perex.cz>
78 * 2008 Pavel Hofman <dustin@seznam.cz>
8
- *
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License as published by
12
- * the Free Software Foundation; either version 2 of the License, or
13
- * (at your option) any later version.
14
- *
15
- * This program is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- * GNU General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU General Public License
21
- * along with this program; if not, write to the Free Software
22
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
- *
249 */
2510
2611 #include <linux/delay.h>
....@@ -358,7 +343,7 @@
358343 return 0;
359344 }
360345
361
-static struct snd_kcontrol_new juli_mute_controls[] = {
346
+static const struct snd_kcontrol_new juli_mute_controls[] = {
362347 {
363348 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
364349 .name = "Master Playback Switch",
....@@ -412,7 +397,7 @@
412397 },
413398 };
414399
415
-static char *slave_vols[] = {
400
+static const char * const follower_vols[] = {
416401 PCM_VOLUME,
417402 MONITOR_AN_IN_VOLUME,
418403 MONITOR_DIG_IN_VOLUME,
....@@ -433,16 +418,16 @@
433418 return snd_ctl_find_id(card, &sid);
434419 }
435420
436
-static void add_slaves(struct snd_card *card,
437
- struct snd_kcontrol *master,
438
- char * const *list)
421
+static void add_followers(struct snd_card *card,
422
+ struct snd_kcontrol *master,
423
+ const char * const *list)
439424 {
440425 for (; *list; list++) {
441
- struct snd_kcontrol *slave = ctl_find(card, *list);
442
- /* dev_dbg(card->dev, "add_slaves - %s\n", *list); */
443
- if (slave) {
444
- /* dev_dbg(card->dev, "slave %s found\n", *list); */
445
- snd_ctl_add_slave(master, slave);
426
+ struct snd_kcontrol *follower = ctl_find(card, *list);
427
+ /* dev_dbg(card->dev, "add_followers - %s\n", *list); */
428
+ if (follower) {
429
+ /* dev_dbg(card->dev, "follower %s found\n", *list); */
430
+ snd_ctl_add_follower(master, follower);
446431 }
447432 }
448433 }
....@@ -469,7 +454,7 @@
469454 juli_master_db_scale);
470455 if (!vmaster)
471456 return -ENOMEM;
472
- add_slaves(ice->card, vmaster, slave_vols);
457
+ add_followers(ice->card, vmaster, follower_vols);
473458 err = snd_ctl_add(ice->card, vmaster);
474459 if (err < 0)
475460 return err;
....@@ -666,7 +651,7 @@
666651 * hence the driver needs to sets up it properly.
667652 */
668653
669
-static unsigned char juli_eeprom[] = {
654
+static const unsigned char juli_eeprom[] = {
670655 [ICE_EEP2_SYSCONF] = 0x2b, /* clock 512, mpu401, 1xADC, 1xDACs,
671656 SPDIF in */
672657 [ICE_EEP2_ACLINK] = 0x80, /* I2S */