Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: pci: Constify snd_kcontrol_new items

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-38-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+76 -76
+1 -1
sound/pci/ak4531_codec.c
··· 255 255 static const DECLARE_TLV_DB_SCALE(db_scale_mono, -2800, 400, 0); 256 256 static const DECLARE_TLV_DB_SCALE(db_scale_input, -5000, 200, 0); 257 257 258 - static struct snd_kcontrol_new snd_ak4531_controls[] = { 258 + static const struct snd_kcontrol_new snd_ak4531_controls[] = { 259 259 260 260 AK4531_DOUBLE_TLV("Master Playback Switch", 0, 261 261 AK4531_LMASTER, AK4531_RMASTER, 7, 7, 1, 1,
+1 -1
sound/pci/ali5451/ali5451.c
··· 1776 1776 return change; 1777 1777 } 1778 1778 1779 - static struct snd_kcontrol_new snd_ali5451_mixer_spdif[] = { 1779 + static const struct snd_kcontrol_new snd_ali5451_mixer_spdif[] = { 1780 1780 /* spdif aplayback switch */ 1781 1781 /* FIXME: "IEC958 Playback Switch" may conflict with one on ac97_codec */ 1782 1782 ALI5451_SPDIF(SNDRV_CTL_NAME_IEC958("Output ",NONE,SWITCH), 0, 0),
+1 -1
sound/pci/au88x0/au88x0_pcm.c
··· 497 497 } 498 498 499 499 /* spdif controls */ 500 - static struct snd_kcontrol_new snd_vortex_mixer_spdif[] = { 500 + static const struct snd_kcontrol_new snd_vortex_mixer_spdif[] = { 501 501 { 502 502 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 503 503 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
+1 -1
sound/pci/azt3328.c
··· 1094 1094 return (nreg != oreg); 1095 1095 } 1096 1096 1097 - static struct snd_kcontrol_new snd_azf3328_mixer_controls[] = { 1097 + static const struct snd_kcontrol_new snd_azf3328_mixer_controls[] = { 1098 1098 AZF3328_MIXER_SWITCH("Master Playback Switch", IDX_MIXER_PLAY_MASTER, 15, 1), 1099 1099 AZF3328_MIXER_VOL_STEREO("Master Playback Volume", IDX_MIXER_PLAY_MASTER, 0x1f, 1), 1100 1100 AZF3328_MIXER_SWITCH("PCM Playback Switch", IDX_MIXER_WAVEOUT, 15, 1),
+2 -2
sound/pci/ca0106/ca0106_mixer.c
··· 550 550 .private_value = ((chid) << 8) | (reg) \ 551 551 } 552 552 553 - static struct snd_kcontrol_new snd_ca0106_volume_ctls[] = { 553 + static const struct snd_kcontrol_new snd_ca0106_volume_ctls[] = { 554 554 CA_VOLUME("Analog Front Playback Volume", 555 555 CONTROL_FRONT_CHANNEL, PLAYBACK_VOLUME2), 556 556 CA_VOLUME("Analog Rear Playback Volume", ··· 631 631 .private_value = chid \ 632 632 } 633 633 634 - static struct snd_kcontrol_new snd_ca0106_volume_i2c_adc_ctls[] = { 634 + static const struct snd_kcontrol_new snd_ca0106_volume_i2c_adc_ctls[] = { 635 635 I2C_VOLUME("Phone Capture Volume", 0), 636 636 I2C_VOLUME("Mic Capture Volume", 1), 637 637 I2C_VOLUME("Line in Capture Volume", 2),
+8 -8
sound/pci/cmipci.c
··· 2256 2256 } 2257 2257 2258 2258 2259 - static struct snd_kcontrol_new snd_cmipci_mixers[] = { 2259 + static const struct snd_kcontrol_new snd_cmipci_mixers[] = { 2260 2260 CMIPCI_SB_VOL_STEREO("Master Playback Volume", SB_DSP4_MASTER_DEV, 3, 31), 2261 2261 CMIPCI_MIXER_SW_MONO("3D Control - Switch", CM_REG_MIXER1, CM_X3DEN_SHIFT, 0), 2262 2262 CMIPCI_SB_VOL_STEREO("PCM Playback Volume", SB_DSP4_PCM_DEV, 3, 31), ··· 2567 2567 } 2568 2568 2569 2569 /* both for CM8338/8738 */ 2570 - static struct snd_kcontrol_new snd_cmipci_mixer_switches[] = { 2570 + static const struct snd_kcontrol_new snd_cmipci_mixer_switches[] = { 2571 2571 DEFINE_MIXER_SWITCH("Four Channel Mode", fourch), 2572 2572 { 2573 2573 .name = "Line-In Mode", ··· 2579 2579 }; 2580 2580 2581 2581 /* for non-multichannel chips */ 2582 - static struct snd_kcontrol_new snd_cmipci_nomulti_switch = 2582 + static const struct snd_kcontrol_new snd_cmipci_nomulti_switch = 2583 2583 DEFINE_MIXER_SWITCH("Exchange DAC", exchange_dac); 2584 2584 2585 2585 /* only for CM8738 */ 2586 - static struct snd_kcontrol_new snd_cmipci_8738_mixer_switches[] = { 2586 + static const struct snd_kcontrol_new snd_cmipci_8738_mixer_switches[] = { 2587 2587 #if 0 /* controlled in pcm device */ 2588 2588 DEFINE_MIXER_SWITCH("IEC958 In Record", spdif_in), 2589 2589 DEFINE_MIXER_SWITCH("IEC958 Out", spdif_out), ··· 2605 2605 }; 2606 2606 2607 2607 /* only for model 033/037 */ 2608 - static struct snd_kcontrol_new snd_cmipci_old_mixer_switches[] = { 2608 + static const struct snd_kcontrol_new snd_cmipci_old_mixer_switches[] = { 2609 2609 DEFINE_MIXER_SWITCH("IEC958 Mix Analog", spdif_dac_out), 2610 2610 DEFINE_MIXER_SWITCH("IEC958 In Phase Inverse", spdi_phase), 2611 2611 DEFINE_MIXER_SWITCH("IEC958 In Select", spdif_in_sel1), 2612 2612 }; 2613 2613 2614 2614 /* only for model 039 or later */ 2615 - static struct snd_kcontrol_new snd_cmipci_extra_mixer_switches[] = { 2615 + static const struct snd_kcontrol_new snd_cmipci_extra_mixer_switches[] = { 2616 2616 DEFINE_MIXER_SWITCH("IEC958 In Select", spdif_in_sel2), 2617 2617 DEFINE_MIXER_SWITCH("IEC958 In Phase Inverse", spdi_phase2), 2618 2618 { ··· 2625 2625 }; 2626 2626 2627 2627 /* card control switches */ 2628 - static struct snd_kcontrol_new snd_cmipci_modem_switch = 2628 + static const struct snd_kcontrol_new snd_cmipci_modem_switch = 2629 2629 DEFINE_CARD_SWITCH("Modem", modem); 2630 2630 2631 2631 2632 2632 static int snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_device) 2633 2633 { 2634 2634 struct snd_card *card; 2635 - struct snd_kcontrol_new *sw; 2635 + const struct snd_kcontrol_new *sw; 2636 2636 struct snd_kcontrol *kctl; 2637 2637 unsigned int idx; 2638 2638 int err;
+2 -2
sound/pci/cs46xx/cs46xx_lib.c
··· 2238 2238 #endif /* CONFIG_SND_CS46XX_NEW_DSP */ 2239 2239 2240 2240 2241 - static struct snd_kcontrol_new snd_cs46xx_controls[] = { 2241 + static const struct snd_kcontrol_new snd_cs46xx_controls[] = { 2242 2242 { 2243 2243 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2244 2244 .name = "DAC Volume", ··· 2364 2364 2365 2365 #ifdef CONFIG_SND_CS46XX_NEW_DSP 2366 2366 /* Only available on the Hercules Game Theater XP soundcard */ 2367 - static struct snd_kcontrol_new snd_hercules_controls[] = { 2367 + static const struct snd_kcontrol_new snd_hercules_controls[] = { 2368 2368 { 2369 2369 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2370 2370 .name = "Optical/Coaxial SPDIF Input Switch",
+1 -1
sound/pci/cs5535audio/cs5535audio_olpc.c
··· 111 111 return 1; 112 112 } 113 113 114 - static struct snd_kcontrol_new olpc_cs5535audio_ctls[] = { 114 + static const struct snd_kcontrol_new olpc_cs5535audio_ctls[] = { 115 115 { 116 116 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 117 117 .name = "DC Mode Enable",
+7 -7
sound/pci/emu10k1/emumixer.c
··· 484 484 .private_value = chid \ 485 485 } 486 486 487 - static struct snd_kcontrol_new snd_emu1010_output_enum_ctls[] = { 487 + static const struct snd_kcontrol_new snd_emu1010_output_enum_ctls[] = { 488 488 EMU1010_SOURCE_OUTPUT("Dock DAC1 Left Playback Enum", 0), 489 489 EMU1010_SOURCE_OUTPUT("Dock DAC1 Right Playback Enum", 1), 490 490 EMU1010_SOURCE_OUTPUT("Dock DAC2 Left Playback Enum", 2), ··· 513 513 514 514 515 515 /* 1616(m) cardbus */ 516 - static struct snd_kcontrol_new snd_emu1616_output_enum_ctls[] = { 516 + static const struct snd_kcontrol_new snd_emu1616_output_enum_ctls[] = { 517 517 EMU1010_SOURCE_OUTPUT("Dock DAC1 Left Playback Enum", 0), 518 518 EMU1010_SOURCE_OUTPUT("Dock DAC1 Right Playback Enum", 1), 519 519 EMU1010_SOURCE_OUTPUT("Dock DAC2 Left Playback Enum", 2), ··· 545 545 .private_value = chid \ 546 546 } 547 547 548 - static struct snd_kcontrol_new snd_emu1010_input_enum_ctls[] = { 548 + static const struct snd_kcontrol_new snd_emu1010_input_enum_ctls[] = { 549 549 EMU1010_SOURCE_INPUT("DSP 0 Capture Enum", 0), 550 550 EMU1010_SOURCE_INPUT("DSP 1 Capture Enum", 1), 551 551 EMU1010_SOURCE_INPUT("DSP 2 Capture Enum", 2), ··· 613 613 .private_value = chid \ 614 614 } 615 615 616 - static struct snd_kcontrol_new snd_emu1010_adc_pads[] = { 616 + static const struct snd_kcontrol_new snd_emu1010_adc_pads[] = { 617 617 EMU1010_ADC_PADS("ADC1 14dB PAD Audio Dock Capture Switch", EMU_HANA_DOCK_ADC_PAD1), 618 618 EMU1010_ADC_PADS("ADC2 14dB PAD Audio Dock Capture Switch", EMU_HANA_DOCK_ADC_PAD2), 619 619 EMU1010_ADC_PADS("ADC3 14dB PAD Audio Dock Capture Switch", EMU_HANA_DOCK_ADC_PAD3), ··· 661 661 .private_value = chid \ 662 662 } 663 663 664 - static struct snd_kcontrol_new snd_emu1010_dac_pads[] = { 664 + static const struct snd_kcontrol_new snd_emu1010_dac_pads[] = { 665 665 EMU1010_DAC_PADS("DAC1 Audio Dock 14dB PAD Playback Switch", EMU_HANA_DOCK_DAC_PAD1), 666 666 EMU1010_DAC_PADS("DAC2 Audio Dock 14dB PAD Playback Switch", EMU_HANA_DOCK_DAC_PAD2), 667 667 EMU1010_DAC_PADS("DAC3 Audio Dock 14dB PAD Playback Switch", EMU_HANA_DOCK_DAC_PAD3), ··· 1051 1051 } 1052 1052 1053 1053 1054 - static struct snd_kcontrol_new snd_audigy_i2c_volume_ctls[] = { 1054 + static const struct snd_kcontrol_new snd_audigy_i2c_volume_ctls[] = { 1055 1055 I2C_VOLUME("Mic Capture Volume", 0), 1056 1056 I2C_VOLUME("Line Capture Volume", 0) 1057 1057 }; ··· 1125 1125 return change; 1126 1126 } 1127 1127 1128 - static struct snd_kcontrol_new snd_audigy_spdif_output_rate = 1128 + static const struct snd_kcontrol_new snd_audigy_spdif_output_rate = 1129 1129 { 1130 1130 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, 1131 1131 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+1 -1
sound/pci/emu10k1/p16v.c
··· 776 776 .private_value = ((xreg) | ((xhl) << 8)) \ 777 777 } 778 778 779 - static struct snd_kcontrol_new p16v_mixer_controls[] = { 779 + static const struct snd_kcontrol_new p16v_mixer_controls[] = { 780 780 P16V_VOL("HD Analog Front Playback Volume", PLAYBACK_VOLUME_MIXER9, 0), 781 781 P16V_VOL("HD Analog Rear Playback Volume", PLAYBACK_VOLUME_MIXER10, 1), 782 782 P16V_VOL("HD Analog Center/LFE Playback Volume", PLAYBACK_VOLUME_MIXER9, 1),
+2 -2
sound/pci/ens1370.c
··· 1433 1433 1434 1434 1435 1435 /* spdif controls */ 1436 - static struct snd_kcontrol_new snd_es1371_mixer_spdif[] = { 1436 + static const struct snd_kcontrol_new snd_es1371_mixer_spdif[] = { 1437 1437 ES1371_SPDIF(SNDRV_CTL_NAME_IEC958("",PLAYBACK,SWITCH)), 1438 1438 { 1439 1439 .iface = SNDRV_CTL_ELEM_IFACE_PCM, ··· 1698 1698 * ENS1370 mixer 1699 1699 */ 1700 1700 1701 - static struct snd_kcontrol_new snd_es1370_controls[2] = { 1701 + static const struct snd_kcontrol_new snd_es1370_controls[2] = { 1702 1702 ENSONIQ_CONTROL("PCM 0 Output also on Line-In Jack", ES_1370_XCTL0), 1703 1703 ENSONIQ_CONTROL("Mic +5V bias", ES_1370_XCTL1) 1704 1704 };
+1 -1
sound/pci/es1938.c
··· 1307 1307 1308 1308 static const DECLARE_TLV_DB_SCALE(db_scale_capture, 0, 150, 0); 1309 1309 1310 - static struct snd_kcontrol_new snd_es1938_controls[] = { 1310 + static const struct snd_kcontrol_new snd_es1938_controls[] = { 1311 1311 ES1938_DOUBLE_TLV("Master Playback Volume", 0, 0x60, 0x62, 0, 0, 63, 0, 1312 1312 db_scale_master), 1313 1313 ES1938_DOUBLE("Master Playback Switch", 0, 0x60, 0x62, 6, 6, 1, 1),
+2 -2
sound/pci/fm801.c
··· 969 969 970 970 #define FM801_CONTROLS ARRAY_SIZE(snd_fm801_controls) 971 971 972 - static struct snd_kcontrol_new snd_fm801_controls[] = { 972 + static const struct snd_kcontrol_new snd_fm801_controls[] = { 973 973 FM801_DOUBLE_TLV("Wave Playback Volume", FM801_PCM_VOL, 0, 8, 31, 1, 974 974 db_scale_dsp), 975 975 FM801_SINGLE("Wave Playback Switch", FM801_PCM_VOL, 15, 1, 1), ··· 990 990 991 991 #define FM801_CONTROLS_MULTI ARRAY_SIZE(snd_fm801_controls_multi) 992 992 993 - static struct snd_kcontrol_new snd_fm801_controls_multi[] = { 993 + static const struct snd_kcontrol_new snd_fm801_controls_multi[] = { 994 994 FM801_SINGLE("AC97 2ch->4ch Copy Switch", FM801_CODEC_CTRL, 7, 1, 0), 995 995 FM801_SINGLE("AC97 18-bit Switch", FM801_CODEC_CTRL, 10, 1, 0), 996 996 FM801_SINGLE(SNDRV_CTL_NAME_IEC958("",CAPTURE,SWITCH), FM801_I2S_MODE, 8, 1, 0),
+5 -5
sound/pci/ice1712/aureon.c
··· 1389 1389 * mixers 1390 1390 */ 1391 1391 1392 - static struct snd_kcontrol_new aureon_dac_controls[] = { 1392 + static const struct snd_kcontrol_new aureon_dac_controls[] = { 1393 1393 { 1394 1394 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1395 1395 .name = "Master Playback Switch", ··· 1504 1504 } 1505 1505 }; 1506 1506 1507 - static struct snd_kcontrol_new wm_controls[] = { 1507 + static const struct snd_kcontrol_new wm_controls[] = { 1508 1508 { 1509 1509 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1510 1510 .name = "PCM Playback Switch", ··· 1570 1570 } 1571 1571 }; 1572 1572 1573 - static struct snd_kcontrol_new ac97_controls[] = { 1573 + static const struct snd_kcontrol_new ac97_controls[] = { 1574 1574 { 1575 1575 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1576 1576 .name = "AC97 Playback Switch", ··· 1675 1675 } 1676 1676 }; 1677 1677 1678 - static struct snd_kcontrol_new universe_ac97_controls[] = { 1678 + static const struct snd_kcontrol_new universe_ac97_controls[] = { 1679 1679 { 1680 1680 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1681 1681 .name = "AC97 Playback Switch", ··· 1807 1807 1808 1808 }; 1809 1809 1810 - static struct snd_kcontrol_new cs8415_controls[] = { 1810 + static const struct snd_kcontrol_new cs8415_controls[] = { 1811 1811 { 1812 1812 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1813 1813 .name = SNDRV_CTL_NAME_IEC958("", CAPTURE, SWITCH),
+5 -5
sound/pci/ice1712/delta.c
··· 753 753 * additional controls for M-Audio cards 754 754 */ 755 755 756 - static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_select = 756 + static const struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_select = 757 757 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Sync", 0, ICE1712_DELTA_WORD_CLOCK_SELECT, 1, 0); 758 - static struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_select = 758 + static const struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_select = 759 759 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Sync", 0, ICE1712_DELTA_1010LT_WORDCLOCK, 0, 0); 760 - static struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_status = 760 + static const struct snd_kcontrol_new snd_ice1712_delta1010_wordclock_status = 761 761 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Word Clock Status", 0, ICE1712_DELTA_WORD_CLOCK_STATUS, 1, SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE); 762 - static struct snd_kcontrol_new snd_ice1712_deltadio2496_spdif_in_select = 762 + static const struct snd_kcontrol_new snd_ice1712_deltadio2496_spdif_in_select = 763 763 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, ICE1712_DELTA_SPDIF_INPUT_SELECT, 0, 0); 764 - static struct snd_kcontrol_new snd_ice1712_delta_spdif_in_status = 764 + static const struct snd_kcontrol_new snd_ice1712_delta_spdif_in_status = 765 765 ICE1712_GPIO(SNDRV_CTL_ELEM_IFACE_MIXER, "Delta IEC958 Input Status", 0, ICE1712_DELTA_SPDIF_IN_STAT, 1, SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE); 766 766 767 767
+3 -3
sound/pci/ice1712/ews.c
··· 597 597 return val != nval; 598 598 } 599 599 600 - static struct snd_kcontrol_new snd_ice1712_ewx2496_controls[] = { 600 + static const struct snd_kcontrol_new snd_ice1712_ewx2496_controls[] = { 601 601 { 602 602 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 603 603 .name = "Input Sensitivity Switch", ··· 792 792 .private_value = xshift | (xinvert << 8),\ 793 793 } 794 794 795 - static struct snd_kcontrol_new snd_ice1712_ews88d_controls[] = { 795 + static const struct snd_kcontrol_new snd_ice1712_ews88d_controls[] = { 796 796 EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "IEC958 Input Optical", 0, 1, 0), /* inverted */ 797 797 EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT Output Optical", 1, 0, 0), 798 798 EWS88D_CONTROL(SNDRV_CTL_ELEM_IFACE_MIXER, "ADAT External Master Clock", 2, 0, 0), ··· 928 928 .private_value = xshift | (xinvert << 8),\ 929 929 } 930 930 931 - static struct snd_kcontrol_new snd_ice1712_6fire_controls[] = { 931 + static const struct snd_kcontrol_new snd_ice1712_6fire_controls[] = { 932 932 { 933 933 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 934 934 .name = "Analog Input Select",
+1 -1
sound/pci/ice1712/ice1712.c
··· 1335 1335 1336 1336 static const DECLARE_TLV_DB_SCALE(db_scale_playback, -14400, 150, 0); 1337 1337 1338 - static struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] = { 1338 + static const struct snd_kcontrol_new snd_ice1712_multi_playback_ctrls[] = { 1339 1339 { 1340 1340 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1341 1341 .name = "Multi Playback Switch",
+1 -1
sound/pci/ice1712/juli.c
··· 343 343 return 0; 344 344 } 345 345 346 - static struct snd_kcontrol_new juli_mute_controls[] = { 346 + static const struct snd_kcontrol_new juli_mute_controls[] = { 347 347 { 348 348 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 349 349 .name = "Master Playback Switch",
+1 -1
sound/pci/ice1712/maya44.c
··· 424 424 * controls to be added 425 425 */ 426 426 427 - static struct snd_kcontrol_new maya_controls[] = { 427 + static const struct snd_kcontrol_new maya_controls[] = { 428 428 { 429 429 .name = "Crossmix Playback Volume", 430 430 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+2 -2
sound/pci/ice1712/phase.c
··· 745 745 static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); 746 746 static const DECLARE_TLV_DB_SCALE(db_scale_wm_pcm, -6400, 50, 1); 747 747 748 - static struct snd_kcontrol_new phase28_dac_controls[] = { 748 + static const struct snd_kcontrol_new phase28_dac_controls[] = { 749 749 { 750 750 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 751 751 .name = "Master Playback Switch", ··· 860 860 } 861 861 }; 862 862 863 - static struct snd_kcontrol_new wm_controls[] = { 863 + static const struct snd_kcontrol_new wm_controls[] = { 864 864 { 865 865 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 866 866 .name = "PCM Playback Switch",
+1 -1
sound/pci/ice1712/pontis.c
··· 529 529 * mixers 530 530 */ 531 531 532 - static struct snd_kcontrol_new pontis_controls[] = { 532 + static const struct snd_kcontrol_new pontis_controls[] = { 533 533 { 534 534 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 535 535 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
+2 -2
sound/pci/ice1712/prodigy192.c
··· 346 346 * mixers 347 347 */ 348 348 349 - static struct snd_kcontrol_new stac_controls[] = { 349 + static const struct snd_kcontrol_new stac_controls[] = { 350 350 { 351 351 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 352 352 .name = "Master Playback Switch", ··· 578 578 } 579 579 580 580 581 - static struct snd_kcontrol_new ak4114_controls[] = { 581 + static const struct snd_kcontrol_new ak4114_controls[] = { 582 582 { 583 583 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 584 584 .name = "MIODIO IEC958 Capture Input",
+2 -2
sound/pci/ice1712/prodigy_hifi.c
··· 284 284 static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); 285 285 static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0); 286 286 287 - static struct snd_kcontrol_new prodigy_hd2_controls[] = { 287 + static const struct snd_kcontrol_new prodigy_hd2_controls[] = { 288 288 { 289 289 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 290 290 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | ··· 741 741 * mixers 742 742 */ 743 743 744 - static struct snd_kcontrol_new prodigy_hifi_controls[] = { 744 + static const struct snd_kcontrol_new prodigy_hifi_controls[] = { 745 745 { 746 746 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 747 747 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
+1 -1
sound/pci/ice1712/quartet.c
··· 720 720 .put = qtet_sw_put,\ 721 721 .private_value = xpriv } 722 722 723 - static struct snd_kcontrol_new qtet_controls[] = { 723 + static const struct snd_kcontrol_new qtet_controls[] = { 724 724 { 725 725 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 726 726 .name = "Master Playback Switch",
+1 -1
sound/pci/ice1712/wtm.c
··· 477 477 /* 478 478 * Control tabs 479 479 */ 480 - static struct snd_kcontrol_new stac9640_controls[] = { 480 + static const struct snd_kcontrol_new stac9640_controls[] = { 481 481 { 482 482 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 483 483 .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
+1 -1
sound/pci/korg1212/korg1212.c
··· 2019 2019 .private_value = ord, \ 2020 2020 } 2021 2021 2022 - static struct snd_kcontrol_new snd_korg1212_controls[] = { 2022 + static const struct snd_kcontrol_new snd_korg1212_controls[] = { 2023 2023 MON_MIXER(8, "Analog"), 2024 2024 MON_MIXER(10, "SPDIF"), 2025 2025 MON_MIXER(0, "ADAT-1"), MON_MIXER(1, "ADAT-2"), MON_MIXER(2, "ADAT-3"), MON_MIXER(3, "ADAT-4"),
+1 -1
sound/pci/rme32.c
··· 1796 1796 return 0; 1797 1797 } 1798 1798 1799 - static struct snd_kcontrol_new snd_rme32_controls[] = { 1799 + static const struct snd_kcontrol_new snd_rme32_controls[] = { 1800 1800 { 1801 1801 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1802 1802 .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, DEFAULT),
+1 -1
sound/pci/rme96.c
··· 2253 2253 return change; 2254 2254 } 2255 2255 2256 - static struct snd_kcontrol_new snd_rme96_controls[] = { 2256 + static const struct snd_kcontrol_new snd_rme96_controls[] = { 2257 2257 { 2258 2258 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2259 2259 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT),
+4 -4
sound/pci/rme9652/hdsp.c
··· 2879 2879 return change; 2880 2880 } 2881 2881 2882 - static struct snd_kcontrol_new snd_hdsp_9632_controls[] = { 2882 + static const struct snd_kcontrol_new snd_hdsp_9632_controls[] = { 2883 2883 HDSP_DA_GAIN("DA Gain", 0), 2884 2884 HDSP_AD_GAIN("AD Gain", 0), 2885 2885 HDSP_PHONE_GAIN("Phones Gain", 0), ··· 2887 2887 HDSP_DDS_OFFSET("DDS Sample Rate Offset", 0) 2888 2888 }; 2889 2889 2890 - static struct snd_kcontrol_new snd_hdsp_controls[] = { 2890 + static const struct snd_kcontrol_new snd_hdsp_controls[] = { 2891 2891 { 2892 2892 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 2893 2893 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), ··· 3216 3216 return snd_ctl_enum_info(uinfo, 1, 2, texts); 3217 3217 } 3218 3218 3219 - static struct snd_kcontrol_new snd_hdsp_rpm_controls[] = { 3219 + static const struct snd_kcontrol_new snd_hdsp_rpm_controls[] = { 3220 3220 { 3221 3221 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 3222 3222 .name = "RPM Bypass", ··· 3249 3249 HDSP_MIXER("Mixer", 0) 3250 3250 }; 3251 3251 3252 - static struct snd_kcontrol_new snd_hdsp_96xx_aeb = 3252 + static const struct snd_kcontrol_new snd_hdsp_96xx_aeb = 3253 3253 HDSP_TOGGLE_SETTING("Analog Extension Board", 3254 3254 HDSP_AnalogExtensionBoard); 3255 3255 static struct snd_kcontrol_new snd_hdsp_adat_sync_check = HDSP_ADAT_SYNC_CHECK;
+7 -7
sound/pci/rme9652/hdspm.c
··· 4478 4478 4479 4479 4480 4480 4481 - static struct snd_kcontrol_new snd_hdspm_controls_madi[] = { 4481 + static const struct snd_kcontrol_new snd_hdspm_controls_madi[] = { 4482 4482 HDSPM_MIXER("Mixer", 0), 4483 4483 HDSPM_INTERNAL_CLOCK("Internal Clock", 0), 4484 4484 HDSPM_SYSTEM_CLOCK_MODE("System Clock Mode", 0), ··· 4500 4500 }; 4501 4501 4502 4502 4503 - static struct snd_kcontrol_new snd_hdspm_controls_madiface[] = { 4503 + static const struct snd_kcontrol_new snd_hdspm_controls_madiface[] = { 4504 4504 HDSPM_MIXER("Mixer", 0), 4505 4505 HDSPM_INTERNAL_CLOCK("Internal Clock", 0), 4506 4506 HDSPM_SYSTEM_CLOCK_MODE("System Clock Mode", 0), ··· 4513 4513 HDSPM_MADI_SPEEDMODE("MADI Speed Mode", 0) 4514 4514 }; 4515 4515 4516 - static struct snd_kcontrol_new snd_hdspm_controls_aio[] = { 4516 + static const struct snd_kcontrol_new snd_hdspm_controls_aio[] = { 4517 4517 HDSPM_MIXER("Mixer", 0), 4518 4518 HDSPM_INTERNAL_CLOCK("Internal Clock", 0), 4519 4519 HDSPM_SYSTEM_CLOCK_MODE("System Clock Mode", 0), ··· 4554 4554 */ 4555 4555 }; 4556 4556 4557 - static struct snd_kcontrol_new snd_hdspm_controls_raydat[] = { 4557 + static const struct snd_kcontrol_new snd_hdspm_controls_raydat[] = { 4558 4558 HDSPM_MIXER("Mixer", 0), 4559 4559 HDSPM_INTERNAL_CLOCK("Internal Clock", 0), 4560 4560 HDSPM_SYSTEM_CLOCK_MODE("Clock Mode", 0), ··· 4582 4582 HDSPM_TOGGLE_SETTING("Single Speed WordClock Out", HDSPM_c0_Wck48) 4583 4583 }; 4584 4584 4585 - static struct snd_kcontrol_new snd_hdspm_controls_aes32[] = { 4585 + static const struct snd_kcontrol_new snd_hdspm_controls_aes32[] = { 4586 4586 HDSPM_MIXER("Mixer", 0), 4587 4587 HDSPM_INTERNAL_CLOCK("Internal Clock", 0), 4588 4588 HDSPM_SYSTEM_CLOCK_MODE("System Clock Mode", 0), ··· 4624 4624 4625 4625 4626 4626 /* Control elements for the optional TCO module */ 4627 - static struct snd_kcontrol_new snd_hdspm_controls_tco[] = { 4627 + static const struct snd_kcontrol_new snd_hdspm_controls_tco[] = { 4628 4628 HDSPM_TCO_SAMPLE_RATE("TCO Sample Rate", 0), 4629 4629 HDSPM_TCO_PULL("TCO Pull", 0), 4630 4630 HDSPM_TCO_WCK_CONVERSION("TCO WCK Conversion", 0), ··· 4671 4671 unsigned int idx, limit; 4672 4672 int err; 4673 4673 struct snd_kcontrol *kctl; 4674 - struct snd_kcontrol_new *list = NULL; 4674 + const struct snd_kcontrol_new *list = NULL; 4675 4675 4676 4676 switch (hdspm->io_type) { 4677 4677 case MADI:
+3 -3
sound/pci/rme9652/rme9652.c
··· 1454 1454 1455 1455 #endif /* ALSA_HAS_STANDARD_WAY_OF_RETURNING_TIMECODE */ 1456 1456 1457 - static struct snd_kcontrol_new snd_rme9652_controls[] = { 1457 + static const struct snd_kcontrol_new snd_rme9652_controls[] = { 1458 1458 { 1459 1459 .iface = SNDRV_CTL_ELEM_IFACE_PCM, 1460 1460 .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), ··· 1509 1509 RME9652_PASSTHRU("Passthru", 0) 1510 1510 }; 1511 1511 1512 - static struct snd_kcontrol_new snd_rme9652_adat3_check = 1512 + static const struct snd_kcontrol_new snd_rme9652_adat3_check = 1513 1513 RME9652_ADAT_SYNC("ADAT3 Sync Check", 0, 2); 1514 1514 1515 - static struct snd_kcontrol_new snd_rme9652_adat1_input = 1515 + static const struct snd_kcontrol_new snd_rme9652_adat1_input = 1516 1516 RME9652_ADAT1_IN("ADAT1 Input Source", 0); 1517 1517 1518 1518 static int snd_rme9652_create_controls(struct snd_card *card, struct snd_rme9652 *rme9652)
+3 -3
sound/pci/sonicvibes.c
··· 1050 1050 return change; 1051 1051 } 1052 1052 1053 - static struct snd_kcontrol_new snd_sonicvibes_controls[] = { 1053 + static const struct snd_kcontrol_new snd_sonicvibes_controls[] = { 1054 1054 SONICVIBES_DOUBLE("Capture Volume", 0, SV_IREG_LEFT_ADC, SV_IREG_RIGHT_ADC, 0, 0, 15, 0), 1055 1055 SONICVIBES_DOUBLE("Aux Playback Switch", 0, SV_IREG_LEFT_AUX1, SV_IREG_RIGHT_AUX1, 7, 7, 1, 1), 1056 1056 SONICVIBES_DOUBLE("Aux Playback Volume", 0, SV_IREG_LEFT_AUX1, SV_IREG_RIGHT_AUX1, 0, 0, 31, 1), ··· 1149 1149 */ 1150 1150 1151 1151 #ifdef SUPPORT_JOYSTICK 1152 - static struct snd_kcontrol_new snd_sonicvibes_game_control = 1152 + static const struct snd_kcontrol_new snd_sonicvibes_game_control = 1153 1153 SONICVIBES_SINGLE("Joystick Speed", 0, SV_IREG_GAME_PORT, 1, 15, 0); 1154 1154 1155 1155 static int snd_sonicvibes_create_gameport(struct sonicvibes *sonic) ··· 1375 1375 * MIDI section 1376 1376 */ 1377 1377 1378 - static struct snd_kcontrol_new snd_sonicvibes_midi_controls[] = { 1378 + static const struct snd_kcontrol_new snd_sonicvibes_midi_controls[] = { 1379 1379 SONICVIBES_SINGLE("SonicVibes Wave Source RAM", 0, SV_IREG_WAVE_SOURCE, 0, 1, 0), 1380 1380 SONICVIBES_SINGLE("SonicVibes Wave Source RAM+ROM", 0, SV_IREG_WAVE_SOURCE, 1, 1, 0), 1381 1381 SONICVIBES_SINGLE("SonicVibes Onboard Synth", 0, SV_IREG_MPU401, 0, 1, 0),
+1 -1
sound/pci/ymfpci/ymfpci_main.c
··· 1588 1588 .put = snd_ymfpci_put_dup4ch, 1589 1589 }; 1590 1590 1591 - static struct snd_kcontrol_new snd_ymfpci_controls[] = { 1591 + static const struct snd_kcontrol_new snd_ymfpci_controls[] = { 1592 1592 { 1593 1593 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 1594 1594 .name = "Wave Playback Volume",