From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: clemens@ladisch.de, tiwai@suse.de
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 05/14] ALSA: firewire-motu: drop protocol structure
Date: Tue, 19 May 2020 20:16:32 +0900 [thread overview]
Message-ID: <20200519111641.123211-6-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <20200519111641.123211-1-o-takashi@sakamocchi.jp>
Now protocol structure becomes useless. This commit drops it.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
sound/firewire/motu/motu-protocol-v2.c | 7 -------
sound/firewire/motu/motu-protocol-v3.c | 5 -----
sound/firewire/motu/motu.h | 11 -----------
3 files changed, 23 deletions(-)
diff --git a/sound/firewire/motu/motu-protocol-v2.c b/sound/firewire/motu/motu-protocol-v2.c
index 26534ed97fbc..e2913cb54da8 100644
--- a/sound/firewire/motu/motu-protocol-v2.c
+++ b/sound/firewire/motu/motu-protocol-v2.c
@@ -296,13 +296,9 @@ int snd_motu_protocol_v2_cache_packet_formats(struct snd_motu *motu)
return 0;
}
-static const struct snd_motu_protocol snd_motu_protocol_v2 = {
-};
-
const struct snd_motu_spec snd_motu_spec_828mk2 = {
.name = "828mk2",
.protocol_version = SND_MOTU_PROTOCOL_V2,
- .protocol = &snd_motu_protocol_v2,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK |
SND_MOTU_SPEC_TX_RETURN_CHUNK |
@@ -317,7 +313,6 @@ const struct snd_motu_spec snd_motu_spec_828mk2 = {
const struct snd_motu_spec snd_motu_spec_traveler = {
.name = "Traveler",
- .protocol = &snd_motu_protocol_v2,
.protocol_version = SND_MOTU_PROTOCOL_V2,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_SUPPORT_CLOCK_X4 |
@@ -334,7 +329,6 @@ const struct snd_motu_spec snd_motu_spec_traveler = {
const struct snd_motu_spec snd_motu_spec_ultralite = {
.name = "UltraLite",
.protocol_version = SND_MOTU_PROTOCOL_V2,
- .protocol = &snd_motu_protocol_v2,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK | // padding.
SND_MOTU_SPEC_TX_RETURN_CHUNK |
@@ -348,7 +342,6 @@ const struct snd_motu_spec snd_motu_spec_ultralite = {
const struct snd_motu_spec snd_motu_spec_8pre = {
.name = "8pre",
.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
// dummy 1/2.
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
diff --git a/sound/firewire/motu/motu-protocol-v3.c b/sound/firewire/motu/motu-protocol-v3.c
index d8b42d28304a..8192bcdd1b37 100644
--- a/sound/firewire/motu/motu-protocol-v3.c
+++ b/sound/firewire/motu/motu-protocol-v3.c
@@ -310,13 +310,10 @@ int snd_motu_protocol_v3_cache_packet_formats(struct snd_motu *motu)
return 0;
}
-static const struct snd_motu_protocol snd_motu_protocol_v3 = {
-};
const struct snd_motu_spec snd_motu_spec_828mk3 = {
.name = "828mk3",
.protocol_version = SND_MOTU_PROTOCOL_V3,
- .protocol = &snd_motu_protocol_v3,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_SUPPORT_CLOCK_X4 |
SND_MOTU_SPEC_TX_MICINST_CHUNK |
@@ -335,7 +332,6 @@ const struct snd_motu_spec snd_motu_spec_828mk3 = {
const struct snd_motu_spec snd_motu_spec_audio_express = {
.name = "AudioExpress",
.protocol_version = SND_MOTU_PROTOCOL_V3,
- .protocol = &snd_motu_protocol_v3,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK |
SND_MOTU_SPEC_TX_RETURN_CHUNK |
@@ -349,7 +345,6 @@ const struct snd_motu_spec snd_motu_spec_audio_express = {
const struct snd_motu_spec snd_motu_spec_4pre = {
.name = "4pre",
.protocol_version = SND_MOTU_PROTOCOL_V3,
- .protocol = &snd_motu_protocol_v3,
.flags = SND_MOTU_SPEC_SUPPORT_CLOCK_X2 |
SND_MOTU_SPEC_TX_MICINST_CHUNK |
SND_MOTU_SPEC_TX_RETURN_CHUNK |
diff --git a/sound/firewire/motu/motu.h b/sound/firewire/motu/motu.h
index d59841677596..f8274ed94766 100644
--- a/sound/firewire/motu/motu.h
+++ b/sound/firewire/motu/motu.h
@@ -113,15 +113,6 @@ enum snd_motu_protocol_version {
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 {
const char *const name;
enum snd_motu_protocol_version protocol_version;
@@ -129,8 +120,6 @@ struct snd_motu_spec {
unsigned char analog_in_ports;
unsigned char analog_out_ports;
-
- const struct snd_motu_protocol *const protocol;
};
extern const struct snd_motu_spec snd_motu_spec_828mk2;
--
2.25.1
next prev parent reply other threads:[~2020-05-19 11:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 11:16 [PATCH 00/14] ALSA: firewire-motu: code refactoring to obsolete protocol structure Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 01/14] ALSA: firewire-motu: move spec data to v2 protocol file Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 02/14] ALSA: firewire-motu: move spec data to v3 " Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 03/14] ALSA: firewire-motu: localize protocol data Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 04/14] ALSA: firewire-motu: add wrapper functions for protocol-dependent operations Takashi Sakamoto
2020-05-19 11:16 ` Takashi Sakamoto [this message]
2020-05-19 11:16 ` [PATCH 06/14] ALSA: firewire-motu: add model-specific table of chunk count Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 07/14] ALSA: firewire-motu: add alternative functions to detect packet format for protocol v2 Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 08/14] ALSA: firewire-motu: add alternative functions to detect packet format for protocol v3 Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 09/14] ALSA: firewire-motu: use table-based calculation of packet formats for proc Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 10/14] ALSA: firewire-motu: use table-based calculation of packet formats for stream management Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 11/14] ALSA: firewire-motu: remove obsoleted codes Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 12/14] ALSA: firewire-motu: refactoring protocol v2 for clock source getter Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 13/14] ALSA: firewire-motu: refactoring protocol v3 " Takashi Sakamoto
2020-05-19 11:16 ` [PATCH 14/14] ALSA: firewire-motu: refactoring protocol v2 for fetching mode switch Takashi Sakamoto
2020-05-22 14:53 ` [PATCH 00/14] ALSA: firewire-motu: code refactoring to obsolete protocol structure Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200519111641.123211-6-o-takashi@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).