mirror of https://github.com/torvalds/linux.git
ALSA: firewire: add const qualifier to identifiers for read-only symbols
Drivers in ALSA firewire stack still includes some symbols which can be moved to a section for read-only symbols. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
241bc82e62
commit
782fbec745
|
|
@ -58,7 +58,7 @@ enum snd_bebob_clock_type {
|
||||||
struct snd_bebob_clock_spec {
|
struct snd_bebob_clock_spec {
|
||||||
unsigned int num;
|
unsigned int num;
|
||||||
const char *const *labels;
|
const char *const *labels;
|
||||||
enum snd_bebob_clock_type *types;
|
const enum snd_bebob_clock_type *types;
|
||||||
int (*get)(struct snd_bebob *bebob, unsigned int *id);
|
int (*get)(struct snd_bebob *bebob, unsigned int *id);
|
||||||
};
|
};
|
||||||
struct snd_bebob_rate_spec {
|
struct snd_bebob_rate_spec {
|
||||||
|
|
|
||||||
|
|
@ -103,12 +103,12 @@ saffire_write_quad(struct snd_bebob *bebob, u64 offset, u32 value)
|
||||||
&data, sizeof(__be32), 0);
|
&data, sizeof(__be32), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum snd_bebob_clock_type saffirepro_10_clk_src_types[] = {
|
static const enum snd_bebob_clock_type saffirepro_10_clk_src_types[] = {
|
||||||
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
|
||||||
};
|
};
|
||||||
static enum snd_bebob_clock_type saffirepro_26_clk_src_types[] = {
|
static const enum snd_bebob_clock_type saffirepro_26_clk_src_types[] = {
|
||||||
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* ADAT1 */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* ADAT1 */
|
||||||
|
|
@ -201,7 +201,7 @@ saffirepro_both_clk_src_get(struct snd_bebob *bebob, unsigned int *id)
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct snd_bebob_spec saffire_le_spec;
|
const struct snd_bebob_spec saffire_le_spec;
|
||||||
static enum snd_bebob_clock_type saffire_both_clk_src_types[] = {
|
static const enum snd_bebob_clock_type saffire_both_clk_src_types[] = {
|
||||||
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL,
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -340,7 +340,7 @@ static int special_set_rate(struct snd_bebob *bebob, unsigned int rate)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clock source control for special firmware */
|
/* Clock source control for special firmware */
|
||||||
static enum snd_bebob_clock_type special_clk_types[] = {
|
static const enum snd_bebob_clock_type special_clk_types[] = {
|
||||||
SND_BEBOB_CLOCK_TYPE_INTERNAL, /* With digital mute */
|
SND_BEBOB_CLOCK_TYPE_INTERNAL, /* With digital mute */
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* SPDIF/ADAT */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* SPDIF/ADAT */
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "./bebob.h"
|
#include "./bebob.h"
|
||||||
|
|
||||||
static enum snd_bebob_clock_type phase88_rack_clk_src_types[] = {
|
static const enum snd_bebob_clock_type phase88_rack_clk_src_types[] = {
|
||||||
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* Word Clock */
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
* Yamaha GO 44 and GO 46. Yamaha and Terratec had cooperated for these models.
|
* Yamaha GO 44 and GO 46. Yamaha and Terratec had cooperated for these models.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static enum snd_bebob_clock_type clk_src_types[] = {
|
static const enum snd_bebob_clock_type clk_src_types[] = {
|
||||||
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
SND_BEBOB_CLOCK_TYPE_INTERNAL,
|
||||||
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
SND_BEBOB_CLOCK_TYPE_EXTERNAL, /* S/PDIF */
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ MODULE_LICENSE("GPL v2");
|
||||||
*/
|
*/
|
||||||
static bool force_two_pcm_support(struct fw_unit *unit)
|
static bool force_two_pcm_support(struct fw_unit *unit)
|
||||||
{
|
{
|
||||||
const char *const models[] = {
|
static const char *const models[] = {
|
||||||
/* TC Electronic models. */
|
/* TC Electronic models. */
|
||||||
"StudioKonnekt48",
|
"StudioKonnekt48",
|
||||||
/* Focusrite models. */
|
/* Focusrite models. */
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ static void ff400_dump_clock_config(struct snd_ff *ff,
|
||||||
snd_iprintf(buffer, "Sync to clock source: %s\n", src);
|
snd_iprintf(buffer, "Sync to clock source: %s\n", src);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct snd_ff_protocol snd_ff_protocol_ff400 = {
|
const struct snd_ff_protocol snd_ff_protocol_ff400 = {
|
||||||
.get_clock = ff400_get_clock,
|
.get_clock = ff400_get_clock,
|
||||||
.begin_session = ff400_begin_session,
|
.begin_session = ff400_begin_session,
|
||||||
.finish_session = ff400_finish_session,
|
.finish_session = ff400_finish_session,
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ static void snd_ff_remove(struct fw_unit *unit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct snd_ff_spec spec_ff400 = {
|
static const struct snd_ff_spec spec_ff400 = {
|
||||||
.name = "Fireface400",
|
.name = "Fireface400",
|
||||||
.pcm_capture_channels = {18, 14, 10},
|
.pcm_capture_channels = {18, 14, 10},
|
||||||
.pcm_playback_channels = {18, 14, 10},
|
.pcm_playback_channels = {18, 14, 10},
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ struct snd_ff_spec {
|
||||||
unsigned int midi_in_ports;
|
unsigned int midi_in_ports;
|
||||||
unsigned int midi_out_ports;
|
unsigned int midi_out_ports;
|
||||||
|
|
||||||
struct snd_ff_protocol *protocol;
|
const struct snd_ff_protocol *protocol;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct snd_ff {
|
struct snd_ff {
|
||||||
|
|
@ -112,7 +112,7 @@ struct snd_ff_protocol {
|
||||||
u64 midi_rx_port_1_reg;
|
u64 midi_rx_port_1_reg;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct snd_ff_protocol snd_ff_protocol_ff400;
|
extern const struct snd_ff_protocol snd_ff_protocol_ff400;
|
||||||
|
|
||||||
int snd_ff_transaction_register(struct snd_ff *ff);
|
int snd_ff_transaction_register(struct snd_ff *ff);
|
||||||
int snd_ff_transaction_reregister(struct snd_ff *ff);
|
int snd_ff_transaction_reregister(struct snd_ff *ff);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
static inline const char*
|
static inline const char*
|
||||||
get_phys_name(struct snd_efw_phys_grp *grp, bool input)
|
get_phys_name(struct snd_efw_phys_grp *grp, bool input)
|
||||||
{
|
{
|
||||||
const char *const ch_type[] = {
|
static const char *const ch_type[] = {
|
||||||
"Analog", "S/PDIF", "ADAT", "S/PDIF or ADAT", "Mirroring",
|
"Analog", "S/PDIF", "ADAT", "S/PDIF or ADAT", "Mirroring",
|
||||||
"Headphones", "I2S", "Guitar", "Pirzo Guitar", "Guitar String",
|
"Headphones", "I2S", "Guitar", "Pirzo Guitar", "Guitar String",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ static void motu_bus_update(struct fw_unit *unit)
|
||||||
snd_motu_transaction_reregister(motu);
|
snd_motu_transaction_reregister(motu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct snd_motu_spec motu_828mk2 = {
|
static const struct snd_motu_spec motu_828mk2 = {
|
||||||
.name = "828mk2",
|
.name = "828mk2",
|
||||||
.protocol = &snd_motu_protocol_v2,
|
.protocol = &snd_motu_protocol_v2,
|
||||||
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
|
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
|
||||||
|
|
@ -208,7 +208,7 @@ static struct snd_motu_spec motu_828mk2 = {
|
||||||
.analog_out_ports = 8,
|
.analog_out_ports = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_motu_spec motu_828mk3 = {
|
static const struct snd_motu_spec motu_828mk3 = {
|
||||||
.name = "828mk3",
|
.name = "828mk3",
|
||||||
.protocol = &snd_motu_protocol_v3,
|
.protocol = &snd_motu_protocol_v3,
|
||||||
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
|
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
|
||||||
|
|
@ -225,7 +225,7 @@ static struct snd_motu_spec motu_828mk3 = {
|
||||||
.analog_out_ports = 8,
|
.analog_out_ports = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_motu_spec motu_audio_express = {
|
static const struct snd_motu_spec motu_audio_express = {
|
||||||
.name = "AudioExpress",
|
.name = "AudioExpress",
|
||||||
.protocol = &snd_motu_protocol_v3,
|
.protocol = &snd_motu_protocol_v3,
|
||||||
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
|
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
|
||||||
|
|
|
||||||
|
|
@ -297,12 +297,6 @@ static void midi_capture_trigger(struct snd_rawmidi_substream *stream, int up)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct snd_rawmidi_ops midi_capture_ops = {
|
|
||||||
.open = midi_capture_open,
|
|
||||||
.close = midi_capture_close,
|
|
||||||
.trigger = midi_capture_trigger,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int midi_playback_open(struct snd_rawmidi_substream *stream)
|
static int midi_playback_open(struct snd_rawmidi_substream *stream)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -363,6 +357,11 @@ void snd_oxfw_scs1x_update(struct snd_oxfw *oxfw)
|
||||||
|
|
||||||
int snd_oxfw_scs1x_add(struct snd_oxfw *oxfw)
|
int snd_oxfw_scs1x_add(struct snd_oxfw *oxfw)
|
||||||
{
|
{
|
||||||
|
static const struct snd_rawmidi_ops midi_capture_ops = {
|
||||||
|
.open = midi_capture_open,
|
||||||
|
.close = midi_capture_close,
|
||||||
|
.trigger = midi_capture_trigger,
|
||||||
|
};
|
||||||
static const struct snd_rawmidi_ops midi_playback_ops = {
|
static const struct snd_rawmidi_ops midi_playback_ops = {
|
||||||
.open = midi_playback_open,
|
.open = midi_playback_open,
|
||||||
.close = midi_playback_close,
|
.close = midi_playback_close,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ MODULE_DESCRIPTION("TASCAM FireWire series Driver");
|
||||||
MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>");
|
MODULE_AUTHOR("Takashi Sakamoto <o-takashi@sakamocchi.jp>");
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
|
||||||
static struct snd_tscm_spec model_specs[] = {
|
static const struct snd_tscm_spec model_specs[] = {
|
||||||
{
|
{
|
||||||
.name = "FW-1884",
|
.name = "FW-1884",
|
||||||
.has_adat = true,
|
.has_adat = true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue