| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * PMac Burgundy lowlevel functions |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) by Takashi Iwai <tiwai@suse.de> |
|---|
| 5 | 6 | * 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 |
|---|
| 20 | 7 | */ |
|---|
| 21 | 8 | |
|---|
| 22 | 9 | #include <linux/io.h> |
|---|
| .. | .. |
|---|
| 467 | 454 | /* |
|---|
| 468 | 455 | * Burgundy mixers |
|---|
| 469 | 456 | */ |
|---|
| 470 | | -static struct snd_kcontrol_new snd_pmac_burgundy_mixers[] = { |
|---|
| 457 | +static const struct snd_kcontrol_new snd_pmac_burgundy_mixers[] = { |
|---|
| 471 | 458 | BURGUNDY_VOLUME_W("Master Playback Volume", 0, |
|---|
| 472 | 459 | MASK_ADDR_BURGUNDY_MASTER_VOLUME, 8), |
|---|
| 473 | 460 | BURGUNDY_VOLUME_W("CD Capture Volume", 0, |
|---|
| .. | .. |
|---|
| 495 | 482 | */ BURGUNDY_SWITCH_B("PCM Capture Switch", 0, |
|---|
| 496 | 483 | MASK_ADDR_BURGUNDY_HOSTIFEH, 0x01, 0, 0) |
|---|
| 497 | 484 | }; |
|---|
| 498 | | -static struct snd_kcontrol_new snd_pmac_burgundy_mixers_imac[] = { |
|---|
| 485 | +static const struct snd_kcontrol_new snd_pmac_burgundy_mixers_imac[] = { |
|---|
| 499 | 486 | BURGUNDY_VOLUME_W("Line in Capture Volume", 0, |
|---|
| 500 | 487 | MASK_ADDR_BURGUNDY_VOLLINE, 16), |
|---|
| 501 | 488 | BURGUNDY_VOLUME_W("Mic Capture Volume", 0, |
|---|
| .. | .. |
|---|
| 521 | 508 | BURGUNDY_SWITCH_B("Mic Boost Capture Switch", 0, |
|---|
| 522 | 509 | MASK_ADDR_BURGUNDY_INPBOOST, 0x40, 0x80, 1) |
|---|
| 523 | 510 | }; |
|---|
| 524 | | -static struct snd_kcontrol_new snd_pmac_burgundy_mixers_pmac[] = { |
|---|
| 511 | +static const struct snd_kcontrol_new snd_pmac_burgundy_mixers_pmac[] = { |
|---|
| 525 | 512 | BURGUNDY_VOLUME_W("Line in Capture Volume", 0, |
|---|
| 526 | 513 | MASK_ADDR_BURGUNDY_VOLMIC, 16), |
|---|
| 527 | 514 | BURGUNDY_VOLUME_B("Line in Gain Capture Volume", 0, |
|---|
| .. | .. |
|---|
| 537 | 524 | /* BURGUNDY_SWITCH_B("Line in Boost Capture Switch", 0, |
|---|
| 538 | 525 | * MASK_ADDR_BURGUNDY_INPBOOST, 0x40, 0x80, 1) */ |
|---|
| 539 | 526 | }; |
|---|
| 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 = |
|---|
| 541 | 528 | BURGUNDY_SWITCH_B("Master Playback Switch", 0, |
|---|
| 542 | 529 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
|---|
| 543 | 530 | BURGUNDY_OUTPUT_LEFT | BURGUNDY_LINEOUT_LEFT | BURGUNDY_HP_LEFT, |
|---|
| 544 | 531 | 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 = |
|---|
| 546 | 533 | BURGUNDY_SWITCH_B("Master Playback Switch", 0, |
|---|
| 547 | 534 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
|---|
| 548 | 535 | BURGUNDY_OUTPUT_INTERN |
|---|
| 549 | 536 | | 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 = |
|---|
| 551 | 538 | BURGUNDY_SWITCH_B("Speaker Playback Switch", 0, |
|---|
| 552 | 539 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
|---|
| 553 | 540 | 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 = |
|---|
| 555 | 542 | BURGUNDY_SWITCH_B("Speaker Playback Switch", 0, |
|---|
| 556 | 543 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
|---|
| 557 | 544 | 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 = |
|---|
| 559 | 546 | BURGUNDY_SWITCH_B("Line out Playback Switch", 0, |
|---|
| 560 | 547 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
|---|
| 561 | 548 | 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 = |
|---|
| 563 | 550 | BURGUNDY_SWITCH_B("Line out Playback Switch", 0, |
|---|
| 564 | 551 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
|---|
| 565 | 552 | 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 = |
|---|
| 567 | 554 | BURGUNDY_SWITCH_B("Headphone Playback Switch", 0, |
|---|
| 568 | 555 | MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES, |
|---|
| 569 | 556 | BURGUNDY_HP_LEFT, BURGUNDY_HP_RIGHT, 1); |
|---|