forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/pci/ice1712/pontis.c
....@@ -1,24 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ALSA driver for ICEnsemble VT1724 (Envy24HT)
34 *
45 * Lowlevel functions for Pontis MS300
56 *
67 * Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
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
- *
228 */
239
2410 #include <linux/delay.h>
....@@ -543,7 +529,7 @@
543529 * mixers
544530 */
545531
546
-static struct snd_kcontrol_new pontis_controls[] = {
532
+static const struct snd_kcontrol_new pontis_controls[] = {
547533 {
548534 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
549535 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
....@@ -659,12 +645,8 @@
659645
660646 static void wm_proc_init(struct snd_ice1712 *ice)
661647 {
662
- struct snd_info_entry *entry;
663
- if (! snd_card_proc_new(ice->card, "wm_codec", &entry)) {
664
- snd_info_set_text_ops(entry, ice, wm_proc_regs_read);
665
- entry->mode |= 0200;
666
- entry->c.text.write = wm_proc_regs_write;
667
- }
648
+ snd_card_rw_proc_new(ice->card, "wm_codec", ice, wm_proc_regs_read,
649
+ wm_proc_regs_write);
668650 }
669651
670652 static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
....@@ -684,9 +666,7 @@
684666
685667 static void cs_proc_init(struct snd_ice1712 *ice)
686668 {
687
- struct snd_info_entry *entry;
688
- if (! snd_card_proc_new(ice->card, "cs_codec", &entry))
689
- snd_info_set_text_ops(entry, ice, cs_proc_regs_read);
669
+ snd_card_ro_proc_new(ice->card, "cs_codec", ice, cs_proc_regs_read);
690670 }
691671
692672
....@@ -798,7 +778,7 @@
798778 * hence the driver needs to sets up it properly.
799779 */
800780
801
-static unsigned char pontis_eeprom[] = {
781
+static const unsigned char pontis_eeprom[] = {
802782 [ICE_EEP2_SYSCONF] = 0x08, /* clock 256, mpu401, spdif-in/ADC, 1DAC */
803783 [ICE_EEP2_ACLINK] = 0x80, /* I2S */
804784 [ICE_EEP2_I2S] = 0xf8, /* vol, 96k, 24bit, 192k */