Commit 562f0c67 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: firewire-motu: drop protocol structure

Now protocol structure becomes useless. This commit drops it.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200519111641.123211-6-o-takashi@sakamocchi.jpSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ff222b7e
...@@ -296,13 +296,9 @@ int snd_motu_protocol_v2_cache_packet_formats(struct snd_motu *motu) ...@@ -296,13 +296,9 @@ int snd_motu_protocol_v2_cache_packet_formats(struct snd_motu *motu)
return 0; return 0;
} }
static const struct snd_motu_protocol snd_motu_protocol_v2 = {
};
const struct snd_motu_spec snd_motu_spec_828mk2 = { const struct snd_motu_spec snd_motu_spec_828mk2 = {
.name = "828mk2", .name = "828mk2",
.protocol_version = SND_MOTU_PROTOCOL_V2, .protocol_version = SND_MOTU_PROTOCOL_V2,
.protocol = &snd_motu_protocol_v2,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK | SND_MOTU_SPEC_TX_MICINST_CHUNK |
SND_MOTU_SPEC_TX_RETURN_CHUNK | SND_MOTU_SPEC_TX_RETURN_CHUNK |
...@@ -317,7 +313,6 @@ const struct snd_motu_spec snd_motu_spec_828mk2 = { ...@@ -317,7 +313,6 @@ const struct snd_motu_spec snd_motu_spec_828mk2 = {
const struct snd_motu_spec snd_motu_spec_traveler = { const struct snd_motu_spec snd_motu_spec_traveler = {
.name = "Traveler", .name = "Traveler",
.protocol = &snd_motu_protocol_v2,
.protocol_version = SND_MOTU_PROTOCOL_V2, .protocol_version = SND_MOTU_PROTOCOL_V2,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_SUPPORT_CLOCK_X4 | SND_MOTU_SPEC_SUPPORT_CLOCK_X4 |
...@@ -334,7 +329,6 @@ const struct snd_motu_spec snd_motu_spec_traveler = { ...@@ -334,7 +329,6 @@ const struct snd_motu_spec snd_motu_spec_traveler = {
const struct snd_motu_spec snd_motu_spec_ultralite = { const struct snd_motu_spec snd_motu_spec_ultralite = {
.name = "UltraLite", .name = "UltraLite",
.protocol_version = SND_MOTU_PROTOCOL_V2, .protocol_version = SND_MOTU_PROTOCOL_V2,
.protocol = &snd_motu_protocol_v2,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK | // padding. SND_MOTU_SPEC_TX_MICINST_CHUNK | // padding.
SND_MOTU_SPEC_TX_RETURN_CHUNK | SND_MOTU_SPEC_TX_RETURN_CHUNK |
...@@ -348,7 +342,6 @@ const struct snd_motu_spec snd_motu_spec_ultralite = { ...@@ -348,7 +342,6 @@ const struct snd_motu_spec snd_motu_spec_ultralite = {
const struct snd_motu_spec snd_motu_spec_8pre = { const struct snd_motu_spec snd_motu_spec_8pre = {
.name = "8pre", .name = "8pre",
.protocol_version = SND_MOTU_PROTOCOL_V2, .protocol_version = SND_MOTU_PROTOCOL_V2,
.protocol = &snd_motu_protocol_v2,
// In tx, use coax chunks for mix-return 1/2. In rx, use coax chunks for // In tx, use coax chunks for mix-return 1/2. In rx, use coax chunks for
// dummy 1/2. // dummy 1/2.
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
......
...@@ -310,13 +310,10 @@ int snd_motu_protocol_v3_cache_packet_formats(struct snd_motu *motu) ...@@ -310,13 +310,10 @@ int snd_motu_protocol_v3_cache_packet_formats(struct snd_motu *motu)
return 0; return 0;
} }
static const struct snd_motu_protocol snd_motu_protocol_v3 = {
};
const struct snd_motu_spec snd_motu_spec_828mk3 = { const struct snd_motu_spec snd_motu_spec_828mk3 = {
.name = "828mk3", .name = "828mk3",
.protocol_version = SND_MOTU_PROTOCOL_V3, .protocol_version = SND_MOTU_PROTOCOL_V3,
.protocol = &snd_motu_protocol_v3,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_SUPPORT_CLOCK_X4 | SND_MOTU_SPEC_SUPPORT_CLOCK_X4 |
SND_MOTU_SPEC_TX_MICINST_CHUNK | SND_MOTU_SPEC_TX_MICINST_CHUNK |
...@@ -335,7 +332,6 @@ const struct snd_motu_spec snd_motu_spec_828mk3 = { ...@@ -335,7 +332,6 @@ const struct snd_motu_spec snd_motu_spec_828mk3 = {
const struct snd_motu_spec snd_motu_spec_audio_express = { const struct snd_motu_spec snd_motu_spec_audio_express = {
.name = "AudioExpress", .name = "AudioExpress",
.protocol_version = SND_MOTU_PROTOCOL_V3, .protocol_version = SND_MOTU_PROTOCOL_V3,
.protocol = &snd_motu_protocol_v3,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK | SND_MOTU_SPEC_TX_MICINST_CHUNK |
SND_MOTU_SPEC_TX_RETURN_CHUNK | SND_MOTU_SPEC_TX_RETURN_CHUNK |
...@@ -349,7 +345,6 @@ const struct snd_motu_spec snd_motu_spec_audio_express = { ...@@ -349,7 +345,6 @@ const struct snd_motu_spec snd_motu_spec_audio_express = {
const struct snd_motu_spec snd_motu_spec_4pre = { const struct snd_motu_spec snd_motu_spec_4pre = {
.name = "4pre", .name = "4pre",
.protocol_version = SND_MOTU_PROTOCOL_V3, .protocol_version = SND_MOTU_PROTOCOL_V3,
.protocol = &snd_motu_protocol_v3,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 | .flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK | SND_MOTU_SPEC_TX_MICINST_CHUNK |
SND_MOTU_SPEC_TX_RETURN_CHUNK | SND_MOTU_SPEC_TX_RETURN_CHUNK |
......
...@@ -113,15 +113,6 @@ enum snd_motu_protocol_version { ...@@ -113,15 +113,6 @@ enum snd_motu_protocol_version {
SND_MOTU_PROTOCOL_V3, SND_MOTU_PROTOCOL_V3,
}; };
struct snd_motu_protocol {
int (*get_clock_rate)(struct snd_motu *motu, unsigned int *rate);
int (*set_clock_rate)(struct snd_motu *motu, unsigned int rate);
int (*get_clock_source)(struct snd_motu *motu,
enum snd_motu_clock_source *source);
int (*switch_fetching_mode)(struct snd_motu *motu, bool enable);
int (*cache_packet_formats)(struct snd_motu *motu);
};
struct snd_motu_spec { struct snd_motu_spec {
const char *const name; const char *const name;
enum snd_motu_protocol_version protocol_version; enum snd_motu_protocol_version protocol_version;
...@@ -129,8 +120,6 @@ struct snd_motu_spec { ...@@ -129,8 +120,6 @@ struct snd_motu_spec {
unsigned char analog_in_ports; unsigned char analog_in_ports;
unsigned char analog_out_ports; unsigned char analog_out_ports;
const struct snd_motu_protocol *const protocol;
}; };
extern const struct snd_motu_spec snd_motu_spec_828mk2; extern const struct snd_motu_spec snd_motu_spec_828mk2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment