.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2004 James Courtier-Dutton <James@superbug.demon.co.uk> |
---|
3 | 4 | * Driver CA0106 chips. e.g. Sound Blaster Audigy LS and Live 24bit |
---|
.. | .. |
---|
44 | 45 | * |
---|
45 | 46 | * This code was initially based on code from ALSA's emu10k1x.c which is: |
---|
46 | 47 | * Copyright (c) by Francisco Moraes <fmoraes@nc.rr.com> |
---|
47 | | - * |
---|
48 | | - * This program is free software; you can redistribute it and/or modify |
---|
49 | | - * it under the terms of the GNU General Public License as published by |
---|
50 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
51 | | - * (at your option) any later version. |
---|
52 | | - * |
---|
53 | | - * This program is distributed in the hope that it will be useful, |
---|
54 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
55 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
56 | | - * GNU General Public License for more details. |
---|
57 | | - * |
---|
58 | | - * You should have received a copy of the GNU General Public License |
---|
59 | | - * along with this program; if not, write to the Free Software |
---|
60 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
61 | | - * |
---|
62 | 48 | */ |
---|
63 | 49 | #include <linux/delay.h> |
---|
64 | 50 | #include <linux/init.h> |
---|
.. | .. |
---|
80 | 66 | const char *name; |
---|
81 | 67 | }; |
---|
82 | 68 | |
---|
83 | | -static struct snd_ca0106_category_str snd_ca0106_con_category[] = { |
---|
| 69 | +static const struct snd_ca0106_category_str snd_ca0106_con_category[] = { |
---|
84 | 70 | { IEC958_AES1_CON_DAT, "DAT" }, |
---|
85 | 71 | { IEC958_AES1_CON_VCR, "VCR" }, |
---|
86 | 72 | { IEC958_AES1_CON_MICROPHONE, "microphone" }, |
---|
.. | .. |
---|
424 | 410 | |
---|
425 | 411 | int snd_ca0106_proc_init(struct snd_ca0106 *emu) |
---|
426 | 412 | { |
---|
427 | | - struct snd_info_entry *entry; |
---|
428 | | - |
---|
429 | | - if(! snd_card_proc_new(emu->card, "iec958", &entry)) |
---|
430 | | - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_iec958); |
---|
431 | | - if(! snd_card_proc_new(emu->card, "ca0106_reg32", &entry)) { |
---|
432 | | - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read32); |
---|
433 | | - entry->c.text.write = snd_ca0106_proc_reg_write32; |
---|
434 | | - entry->mode |= 0200; |
---|
435 | | - } |
---|
436 | | - if(! snd_card_proc_new(emu->card, "ca0106_reg16", &entry)) |
---|
437 | | - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read16); |
---|
438 | | - if(! snd_card_proc_new(emu->card, "ca0106_reg8", &entry)) |
---|
439 | | - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read8); |
---|
440 | | - if(! snd_card_proc_new(emu->card, "ca0106_regs1", &entry)) { |
---|
441 | | - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); |
---|
442 | | - entry->c.text.write = snd_ca0106_proc_reg_write; |
---|
443 | | - entry->mode |= 0200; |
---|
444 | | - } |
---|
445 | | - if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { |
---|
446 | | - entry->c.text.write = snd_ca0106_proc_i2c_write; |
---|
447 | | - entry->private_data = emu; |
---|
448 | | - entry->mode |= 0200; |
---|
449 | | - } |
---|
450 | | - if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) |
---|
451 | | - snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); |
---|
| 413 | + snd_card_ro_proc_new(emu->card, "iec958", emu, snd_ca0106_proc_iec958); |
---|
| 414 | + snd_card_rw_proc_new(emu->card, "ca0106_reg32", emu, |
---|
| 415 | + snd_ca0106_proc_reg_read32, |
---|
| 416 | + snd_ca0106_proc_reg_write32); |
---|
| 417 | + snd_card_ro_proc_new(emu->card, "ca0106_reg16", emu, |
---|
| 418 | + snd_ca0106_proc_reg_read16); |
---|
| 419 | + snd_card_ro_proc_new(emu->card, "ca0106_reg8", emu, |
---|
| 420 | + snd_ca0106_proc_reg_read8); |
---|
| 421 | + snd_card_rw_proc_new(emu->card, "ca0106_regs1", emu, |
---|
| 422 | + snd_ca0106_proc_reg_read1, |
---|
| 423 | + snd_ca0106_proc_reg_write); |
---|
| 424 | + snd_card_rw_proc_new(emu->card, "ca0106_i2c", emu, NULL, |
---|
| 425 | + snd_ca0106_proc_i2c_write); |
---|
| 426 | + snd_card_ro_proc_new(emu->card, "ca0106_regs2", emu, |
---|
| 427 | + snd_ca0106_proc_reg_read2); |
---|
452 | 428 | return 0; |
---|
453 | 429 | } |
---|