.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * ALSA driver for ICEnsemble VT1724 (Envy24HT) |
---|
3 | 4 | * |
---|
4 | 5 | * Lowlevel functions for Pontis MS300 |
---|
5 | 6 | * |
---|
6 | 7 | * 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 | | - * |
---|
22 | 8 | */ |
---|
23 | 9 | |
---|
24 | 10 | #include <linux/delay.h> |
---|
.. | .. |
---|
543 | 529 | * mixers |
---|
544 | 530 | */ |
---|
545 | 531 | |
---|
546 | | -static struct snd_kcontrol_new pontis_controls[] = { |
---|
| 532 | +static const struct snd_kcontrol_new pontis_controls[] = { |
---|
547 | 533 | { |
---|
548 | 534 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
---|
549 | 535 | .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | |
---|
.. | .. |
---|
659 | 645 | |
---|
660 | 646 | static void wm_proc_init(struct snd_ice1712 *ice) |
---|
661 | 647 | { |
---|
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); |
---|
668 | 650 | } |
---|
669 | 651 | |
---|
670 | 652 | static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) |
---|
.. | .. |
---|
684 | 666 | |
---|
685 | 667 | static void cs_proc_init(struct snd_ice1712 *ice) |
---|
686 | 668 | { |
---|
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); |
---|
690 | 670 | } |
---|
691 | 671 | |
---|
692 | 672 | |
---|
.. | .. |
---|
798 | 778 | * hence the driver needs to sets up it properly. |
---|
799 | 779 | */ |
---|
800 | 780 | |
---|
801 | | -static unsigned char pontis_eeprom[] = { |
---|
| 781 | +static const unsigned char pontis_eeprom[] = { |
---|
802 | 782 | [ICE_EEP2_SYSCONF] = 0x08, /* clock 256, mpu401, spdif-in/ADC, 1DAC */ |
---|
803 | 783 | [ICE_EEP2_ACLINK] = 0x80, /* I2S */ |
---|
804 | 784 | [ICE_EEP2_I2S] = 0xf8, /* vol, 96k, 24bit, 192k */ |
---|