hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/sound/pci/ak4531_codec.c
....@@ -1,22 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
34 * Universal routines for AK4531 codec
4
- *
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
- *
205 */
216
227 #include <linux/delay.h>
....@@ -270,7 +255,7 @@
270255 static const DECLARE_TLV_DB_SCALE(db_scale_mono, -2800, 400, 0);
271256 static const DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0);
272257
273
-static struct snd_kcontrol_new snd_ak4531_controls[] = {
258
+static const struct snd_kcontrol_new snd_ak4531_controls[] = {
274259
275260 AK4531_DOUBLE_TLV("Master Playback Switch", 0,
276261 AK4531_LMASTER, AK4531_RMASTER, 7, 7, 1, 1,
....@@ -350,7 +335,7 @@
350335 return snd_ak4531_free(ak4531);
351336 }
352337
353
-static u8 snd_ak4531_initial_map[0x19 + 1] = {
338
+static const u8 snd_ak4531_initial_map[0x19 + 1] = {
354339 0x9f, /* 00: Master Volume Lch */
355340 0x9f, /* 01: Master Volume Rch */
356341 0x9f, /* 02: Voice Volume Lch */
....@@ -386,7 +371,7 @@
386371 unsigned int idx;
387372 int err;
388373 struct snd_ak4531 *ak4531;
389
- static struct snd_device_ops ops = {
374
+ static const struct snd_device_ops ops = {
390375 .dev_free = snd_ak4531_dev_free,
391376 };
392377
....@@ -481,8 +466,5 @@
481466 static void
482467 snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531)
483468 {
484
- struct snd_info_entry *entry;
485
-
486
- if (! snd_card_proc_new(card, "ak4531", &entry))
487
- snd_info_set_text_ops(entry, ak4531, snd_ak4531_proc_read);
469
+ snd_card_ro_proc_new(card, "ak4531", ak4531, snd_ak4531_proc_read);
488470 }