| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Linux driver for TerraTec DMX 6Fire USB |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 10 | 11 | * Thanks to: |
|---|
| 11 | 12 | * - Holger Ruckdeschel: he found out how to control individual channel |
|---|
| 12 | 13 | * volumes and introduced mute switch |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 15 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 16 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 17 | | - * (at your option) any later version. |
|---|
| 18 | 14 | */ |
|---|
| 19 | 15 | |
|---|
| 20 | 16 | #include <linux/interrupt.h> |
|---|
| .. | .. |
|---|
| 401 | 397 | return 0; |
|---|
| 402 | 398 | } |
|---|
| 403 | 399 | |
|---|
| 404 | | -static struct snd_kcontrol_new vol_elements[] = { |
|---|
| 400 | +static const struct snd_kcontrol_new vol_elements[] = { |
|---|
| 405 | 401 | { |
|---|
| 406 | 402 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
|---|
| 407 | 403 | .name = "Analog Playback Volume", |
|---|
| .. | .. |
|---|
| 441 | 437 | {} |
|---|
| 442 | 438 | }; |
|---|
| 443 | 439 | |
|---|
| 444 | | -static struct snd_kcontrol_new mute_elements[] = { |
|---|
| 440 | +static const struct snd_kcontrol_new mute_elements[] = { |
|---|
| 445 | 441 | { |
|---|
| 446 | 442 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
|---|
| 447 | 443 | .name = "Analog Playback Switch", |
|---|
| .. | .. |
|---|
| 475 | 471 | {} |
|---|
| 476 | 472 | }; |
|---|
| 477 | 473 | |
|---|
| 478 | | -static struct snd_kcontrol_new elements[] = { |
|---|
| 474 | +static const struct snd_kcontrol_new elements[] = { |
|---|
| 479 | 475 | { |
|---|
| 480 | 476 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
|---|
| 481 | 477 | .name = "Line/Phono Capture Route", |
|---|
| .. | .. |
|---|
| 521 | 517 | struct control_runtime *rt, |
|---|
| 522 | 518 | struct snd_card *card, |
|---|
| 523 | 519 | char *name, |
|---|
| 524 | | - struct snd_kcontrol_new *elems) |
|---|
| 520 | + const struct snd_kcontrol_new *elems) |
|---|
| 525 | 521 | { |
|---|
| 526 | 522 | int ret; |
|---|
| 527 | 523 | int i; |
|---|
| .. | .. |
|---|
| 543 | 539 | ret = snd_ctl_add(card, control); |
|---|
| 544 | 540 | if (ret < 0) |
|---|
| 545 | 541 | return ret; |
|---|
| 546 | | - ret = snd_ctl_add_slave(vmaster, control); |
|---|
| 542 | + ret = snd_ctl_add_follower(vmaster, control); |
|---|
| 547 | 543 | if (ret < 0) |
|---|
| 548 | 544 | return ret; |
|---|
| 549 | 545 | i++; |
|---|