emu8000.c (99f664df4fead60e31d96cc2b5044c9b2fee0767) emu8000.c (fdd1f6fd328ff2e3723fe2a5c94378ef6f217edc)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
4 * and (c) 1999 Steve Ratcliffe <steve@parabola.demon.co.uk>
5 * Copyright (C) 1999-2000 Takashi Iwai <tiwai@suse.de>
6 *
7 * Routines for control of EMU8000 chip
8 */

--- 841 unchanged lines hidden (view full) ---

850 change = val1 != emu->bass_level;
851 emu->bass_level = val1;
852 }
853 spin_unlock_irqrestore(&emu->control_lock, flags);
854 snd_emu8000_update_equalizer(emu);
855 return change;
856}
857
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
4 * and (c) 1999 Steve Ratcliffe <steve@parabola.demon.co.uk>
5 * Copyright (C) 1999-2000 Takashi Iwai <tiwai@suse.de>
6 *
7 * Routines for control of EMU8000 chip
8 */

--- 841 unchanged lines hidden (view full) ---

850 change = val1 != emu->bass_level;
851 emu->bass_level = val1;
852 }
853 spin_unlock_irqrestore(&emu->control_lock, flags);
854 snd_emu8000_update_equalizer(emu);
855 return change;
856}
857
858static struct snd_kcontrol_new mixer_bass_control =
858static const struct snd_kcontrol_new mixer_bass_control =
859{
860 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
861 .name = "Synth Tone Control - Bass",
862 .info = mixer_bass_treble_info,
863 .get = mixer_bass_treble_get,
864 .put = mixer_bass_treble_put,
865 .private_value = 0,
866};
867
859{
860 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
861 .name = "Synth Tone Control - Bass",
862 .info = mixer_bass_treble_info,
863 .get = mixer_bass_treble_get,
864 .put = mixer_bass_treble_put,
865 .private_value = 0,
866};
867
868static struct snd_kcontrol_new mixer_treble_control =
868static const struct snd_kcontrol_new mixer_treble_control =
869{
870 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
871 .name = "Synth Tone Control - Treble",
872 .info = mixer_bass_treble_info,
873 .get = mixer_bass_treble_get,
874 .put = mixer_bass_treble_put,
875 .private_value = 1,
876};

--- 40 unchanged lines hidden (view full) ---

917 if (kcontrol->private_value)
918 snd_emu8000_update_chorus_mode(emu);
919 else
920 snd_emu8000_update_reverb_mode(emu);
921 }
922 return change;
923}
924
869{
870 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
871 .name = "Synth Tone Control - Treble",
872 .info = mixer_bass_treble_info,
873 .get = mixer_bass_treble_get,
874 .put = mixer_bass_treble_put,
875 .private_value = 1,
876};

--- 40 unchanged lines hidden (view full) ---

917 if (kcontrol->private_value)
918 snd_emu8000_update_chorus_mode(emu);
919 else
920 snd_emu8000_update_reverb_mode(emu);
921 }
922 return change;
923}
924
925static struct snd_kcontrol_new mixer_chorus_mode_control =
925static const struct snd_kcontrol_new mixer_chorus_mode_control =
926{
927 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
928 .name = "Chorus Mode",
929 .info = mixer_chorus_reverb_info,
930 .get = mixer_chorus_reverb_get,
931 .put = mixer_chorus_reverb_put,
932 .private_value = 1,
933};
934
926{
927 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
928 .name = "Chorus Mode",
929 .info = mixer_chorus_reverb_info,
930 .get = mixer_chorus_reverb_get,
931 .put = mixer_chorus_reverb_put,
932 .private_value = 1,
933};
934
935static struct snd_kcontrol_new mixer_reverb_mode_control =
935static const struct snd_kcontrol_new mixer_reverb_mode_control =
936{
937 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
938 .name = "Reverb Mode",
939 .info = mixer_chorus_reverb_info,
940 .get = mixer_chorus_reverb_get,
941 .put = mixer_chorus_reverb_put,
942 .private_value = 0,
943};

--- 35 unchanged lines hidden (view full) ---

979 emu->fm_reverb_depth = val1;
980 }
981 spin_unlock_irqrestore(&emu->control_lock, flags);
982 if (change)
983 snd_emu8000_init_fm(emu);
984 return change;
985}
986
936{
937 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
938 .name = "Reverb Mode",
939 .info = mixer_chorus_reverb_info,
940 .get = mixer_chorus_reverb_get,
941 .put = mixer_chorus_reverb_put,
942 .private_value = 0,
943};

--- 35 unchanged lines hidden (view full) ---

979 emu->fm_reverb_depth = val1;
980 }
981 spin_unlock_irqrestore(&emu->control_lock, flags);
982 if (change)
983 snd_emu8000_init_fm(emu);
984 return change;
985}
986
987static struct snd_kcontrol_new mixer_fm_chorus_depth_control =
987static const struct snd_kcontrol_new mixer_fm_chorus_depth_control =
988{
989 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
990 .name = "FM Chorus Depth",
991 .info = mixer_fm_depth_info,
992 .get = mixer_fm_depth_get,
993 .put = mixer_fm_depth_put,
994 .private_value = 1,
995};
996
988{
989 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
990 .name = "FM Chorus Depth",
991 .info = mixer_fm_depth_info,
992 .get = mixer_fm_depth_get,
993 .put = mixer_fm_depth_put,
994 .private_value = 1,
995};
996
997static struct snd_kcontrol_new mixer_fm_reverb_depth_control =
997static const struct snd_kcontrol_new mixer_fm_reverb_depth_control =
998{
999 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1000 .name = "FM Reverb Depth",
1001 .info = mixer_fm_depth_info,
1002 .get = mixer_fm_depth_get,
1003 .put = mixer_fm_depth_put,
1004 .private_value = 0,
1005};
1006
1007
998{
999 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
1000 .name = "FM Reverb Depth",
1001 .info = mixer_fm_depth_info,
1002 .get = mixer_fm_depth_get,
1003 .put = mixer_fm_depth_put,
1004 .private_value = 0,
1005};
1006
1007
1008static struct snd_kcontrol_new *mixer_defs[EMU8000_NUM_CONTROLS] = {
1008static const struct snd_kcontrol_new *mixer_defs[EMU8000_NUM_CONTROLS] = {
1009 &mixer_bass_control,
1010 &mixer_treble_control,
1011 &mixer_chorus_mode_control,
1012 &mixer_reverb_mode_control,
1013 &mixer_fm_chorus_depth_control,
1014 &mixer_fm_reverb_depth_control,
1015};
1016

--- 142 unchanged lines hidden ---
1009 &mixer_bass_control,
1010 &mixer_treble_control,
1011 &mixer_chorus_mode_control,
1012 &mixer_reverb_mode_control,
1013 &mixer_fm_chorus_depth_control,
1014 &mixer_fm_reverb_depth_control,
1015};
1016

--- 142 unchanged lines hidden ---