forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/ppc/burgundy.c
....@@ -1,22 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * PMac Burgundy lowlevel functions
34 *
45 * Copyright (c) by Takashi Iwai <tiwai@suse.de>
56 * code based on dmasound.c.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
207 */
218
229 #include <linux/io.h>
....@@ -467,7 +454,7 @@
467454 /*
468455 * Burgundy mixers
469456 */
470
-static struct snd_kcontrol_new snd_pmac_burgundy_mixers[] = {
457
+static const struct snd_kcontrol_new snd_pmac_burgundy_mixers[] = {
471458 BURGUNDY_VOLUME_W("Master Playback Volume", 0,
472459 MASK_ADDR_BURGUNDY_MASTER_VOLUME, 8),
473460 BURGUNDY_VOLUME_W("CD Capture Volume", 0,
....@@ -495,7 +482,7 @@
495482 */ BURGUNDY_SWITCH_B("PCM Capture Switch", 0,
496483 MASK_ADDR_BURGUNDY_HOSTIFEH, 0x01, 0, 0)
497484 };
498
-static struct snd_kcontrol_new snd_pmac_burgundy_mixers_imac[] = {
485
+static const struct snd_kcontrol_new snd_pmac_burgundy_mixers_imac[] = {
499486 BURGUNDY_VOLUME_W("Line in Capture Volume", 0,
500487 MASK_ADDR_BURGUNDY_VOLLINE, 16),
501488 BURGUNDY_VOLUME_W("Mic Capture Volume", 0,
....@@ -521,7 +508,7 @@
521508 BURGUNDY_SWITCH_B("Mic Boost Capture Switch", 0,
522509 MASK_ADDR_BURGUNDY_INPBOOST, 0x40, 0x80, 1)
523510 };
524
-static struct snd_kcontrol_new snd_pmac_burgundy_mixers_pmac[] = {
511
+static const struct snd_kcontrol_new snd_pmac_burgundy_mixers_pmac[] = {
525512 BURGUNDY_VOLUME_W("Line in Capture Volume", 0,
526513 MASK_ADDR_BURGUNDY_VOLMIC, 16),
527514 BURGUNDY_VOLUME_B("Line in Gain Capture Volume", 0,
....@@ -537,33 +524,33 @@
537524 /* BURGUNDY_SWITCH_B("Line in Boost Capture Switch", 0,
538525 * MASK_ADDR_BURGUNDY_INPBOOST, 0x40, 0x80, 1) */
539526 };
540
-static struct snd_kcontrol_new snd_pmac_burgundy_master_sw_imac =
527
+static const struct snd_kcontrol_new snd_pmac_burgundy_master_sw_imac =
541528 BURGUNDY_SWITCH_B("Master Playback Switch", 0,
542529 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
543530 BURGUNDY_OUTPUT_LEFT | BURGUNDY_LINEOUT_LEFT | BURGUNDY_HP_LEFT,
544531 BURGUNDY_OUTPUT_RIGHT | BURGUNDY_LINEOUT_RIGHT | BURGUNDY_HP_RIGHT, 1);
545
-static struct snd_kcontrol_new snd_pmac_burgundy_master_sw_pmac =
532
+static const struct snd_kcontrol_new snd_pmac_burgundy_master_sw_pmac =
546533 BURGUNDY_SWITCH_B("Master Playback Switch", 0,
547534 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
548535 BURGUNDY_OUTPUT_INTERN
549536 | BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1);
550
-static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_imac =
537
+static const struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_imac =
551538 BURGUNDY_SWITCH_B("Speaker Playback Switch", 0,
552539 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
553540 BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1);
554
-static struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_pmac =
541
+static const struct snd_kcontrol_new snd_pmac_burgundy_speaker_sw_pmac =
555542 BURGUNDY_SWITCH_B("Speaker Playback Switch", 0,
556543 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
557544 BURGUNDY_OUTPUT_INTERN, 0, 0);
558
-static struct snd_kcontrol_new snd_pmac_burgundy_line_sw_imac =
545
+static const struct snd_kcontrol_new snd_pmac_burgundy_line_sw_imac =
559546 BURGUNDY_SWITCH_B("Line out Playback Switch", 0,
560547 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
561548 BURGUNDY_LINEOUT_LEFT, BURGUNDY_LINEOUT_RIGHT, 1);
562
-static struct snd_kcontrol_new snd_pmac_burgundy_line_sw_pmac =
549
+static const struct snd_kcontrol_new snd_pmac_burgundy_line_sw_pmac =
563550 BURGUNDY_SWITCH_B("Line out Playback Switch", 0,
564551 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
565552 BURGUNDY_OUTPUT_LEFT, BURGUNDY_OUTPUT_RIGHT, 1);
566
-static struct snd_kcontrol_new snd_pmac_burgundy_hp_sw_imac =
553
+static const struct snd_kcontrol_new snd_pmac_burgundy_hp_sw_imac =
567554 BURGUNDY_SWITCH_B("Headphone Playback Switch", 0,
568555 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES,
569556 BURGUNDY_HP_LEFT, BURGUNDY_HP_RIGHT, 1);