diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-09-18 22:22:01 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-09-29 06:50:23 -0400 |
commit | 49c7b3fcd9f0a0125e8cd8212d5576382198eeb2 (patch) | |
tree | e01aa3798507d69328550d5a2c2b1759dfd4cfb8 | |
parent | 85130cb43e78a7bdb2ade10131563d89fbbddf9d (diff) |
ALSA: firewire-lib: rename macros with AM824 prefix
This commit renames some macros just related to AM824 format. In later
commit, they're moved to AM824 layer.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/firewire/amdtp-stream.c | 4 | ||||
-rw-r--r-- | sound/firewire/amdtp-stream.h | 14 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_pcm.c | 4 | ||||
-rw-r--r-- | sound/firewire/bebob/bebob_stream.c | 6 | ||||
-rw-r--r-- | sound/firewire/dice/dice-pcm.c | 4 | ||||
-rw-r--r-- | sound/firewire/fireworks/fireworks.c | 12 | ||||
-rw-r--r-- | sound/firewire/fireworks/fireworks_pcm.c | 4 | ||||
-rw-r--r-- | sound/firewire/oxfw/oxfw-pcm.c | 4 | ||||
-rw-r--r-- | sound/firewire/oxfw/oxfw-stream.c | 4 |
9 files changed, 28 insertions, 28 deletions
diff --git a/sound/firewire/amdtp-stream.c b/sound/firewire/amdtp-stream.c index 245002e9b0cb..c61e0ec5c0f5 100644 --- a/sound/firewire/amdtp-stream.c +++ b/sound/firewire/amdtp-stream.c | |||
@@ -202,8 +202,8 @@ int amdtp_stream_set_parameters(struct amdtp_stream *s, | |||
202 | midi_channels = DIV_ROUND_UP(midi_ports, 8); | 202 | midi_channels = DIV_ROUND_UP(midi_ports, 8); |
203 | 203 | ||
204 | if (WARN_ON(amdtp_stream_running(s)) || | 204 | if (WARN_ON(amdtp_stream_running(s)) || |
205 | WARN_ON(pcm_channels > AMDTP_MAX_CHANNELS_FOR_PCM) || | 205 | WARN_ON(pcm_channels > AM824_MAX_CHANNELS_FOR_PCM) || |
206 | WARN_ON(midi_channels > AMDTP_MAX_CHANNELS_FOR_MIDI)) | 206 | WARN_ON(midi_channels > AM824_MAX_CHANNELS_FOR_MIDI)) |
207 | return -EINVAL; | 207 | return -EINVAL; |
208 | 208 | ||
209 | for (sfc = 0; sfc < ARRAY_SIZE(amdtp_rate_table); ++sfc) { | 209 | for (sfc = 0; sfc < ARRAY_SIZE(amdtp_rate_table); ++sfc) { |
diff --git a/sound/firewire/amdtp-stream.h b/sound/firewire/amdtp-stream.h index 3fb82c753f7b..71f4f751fabc 100644 --- a/sound/firewire/amdtp-stream.h +++ b/sound/firewire/amdtp-stream.h | |||
@@ -81,9 +81,9 @@ enum cip_sfc { | |||
81 | CIP_SFC_COUNT | 81 | CIP_SFC_COUNT |
82 | }; | 82 | }; |
83 | 83 | ||
84 | #define AMDTP_IN_PCM_FORMAT_BITS SNDRV_PCM_FMTBIT_S32 | 84 | #define AM824_IN_PCM_FORMAT_BITS SNDRV_PCM_FMTBIT_S32 |
85 | 85 | ||
86 | #define AMDTP_OUT_PCM_FORMAT_BITS (SNDRV_PCM_FMTBIT_S16 | \ | 86 | #define AM824_OUT_PCM_FORMAT_BITS (SNDRV_PCM_FMTBIT_S16 | \ |
87 | SNDRV_PCM_FMTBIT_S32) | 87 | SNDRV_PCM_FMTBIT_S32) |
88 | 88 | ||
89 | 89 | ||
@@ -91,7 +91,7 @@ enum cip_sfc { | |||
91 | * This module supports maximum 64 PCM channels for one PCM stream | 91 | * This module supports maximum 64 PCM channels for one PCM stream |
92 | * This is for our convenience. | 92 | * This is for our convenience. |
93 | */ | 93 | */ |
94 | #define AMDTP_MAX_CHANNELS_FOR_PCM 64 | 94 | #define AM824_MAX_CHANNELS_FOR_PCM 64 |
95 | 95 | ||
96 | /* | 96 | /* |
97 | * AMDTP packet can include channels for MIDI conformant data. | 97 | * AMDTP packet can include channels for MIDI conformant data. |
@@ -101,7 +101,7 @@ enum cip_sfc { | |||
101 | * This module supports maximum 1 MIDI conformant data channels. | 101 | * This module supports maximum 1 MIDI conformant data channels. |
102 | * Then this AMDTP packets can transfer maximum 8 MIDI data streams. | 102 | * Then this AMDTP packets can transfer maximum 8 MIDI data streams. |
103 | */ | 103 | */ |
104 | #define AMDTP_MAX_CHANNELS_FOR_MIDI 1 | 104 | #define AM824_MAX_CHANNELS_FOR_MIDI 1 |
105 | 105 | ||
106 | struct fw_unit; | 106 | struct fw_unit; |
107 | struct fw_iso_context; | 107 | struct fw_iso_context; |
@@ -157,13 +157,13 @@ struct amdtp_stream { | |||
157 | struct amdtp_stream *sync_slave; | 157 | struct amdtp_stream *sync_slave; |
158 | 158 | ||
159 | /* For AM824 processing. */ | 159 | /* For AM824 processing. */ |
160 | struct snd_rawmidi_substream *midi[AMDTP_MAX_CHANNELS_FOR_MIDI * 8]; | 160 | struct snd_rawmidi_substream *midi[AM824_MAX_CHANNELS_FOR_MIDI * 8]; |
161 | int midi_fifo_limit; | 161 | int midi_fifo_limit; |
162 | int midi_fifo_used[AMDTP_MAX_CHANNELS_FOR_MIDI * 8]; | 162 | int midi_fifo_used[AM824_MAX_CHANNELS_FOR_MIDI * 8]; |
163 | unsigned int pcm_channels; | 163 | unsigned int pcm_channels; |
164 | unsigned int midi_ports; | 164 | unsigned int midi_ports; |
165 | 165 | ||
166 | u8 pcm_positions[AMDTP_MAX_CHANNELS_FOR_PCM]; | 166 | u8 pcm_positions[AM824_MAX_CHANNELS_FOR_PCM]; |
167 | u8 midi_position; | 167 | u8 midi_position; |
168 | 168 | ||
169 | void (*transfer_samples)(struct amdtp_stream *s, | 169 | void (*transfer_samples)(struct amdtp_stream *s, |
diff --git a/sound/firewire/bebob/bebob_pcm.c b/sound/firewire/bebob/bebob_pcm.c index 8d8de4c3bfb5..2fdc1f10a2c7 100644 --- a/sound/firewire/bebob/bebob_pcm.c +++ b/sound/firewire/bebob/bebob_pcm.c | |||
@@ -122,11 +122,11 @@ pcm_init_hw_params(struct snd_bebob *bebob, | |||
122 | SNDRV_PCM_INFO_MMAP_VALID; | 122 | SNDRV_PCM_INFO_MMAP_VALID; |
123 | 123 | ||
124 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 124 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
125 | runtime->hw.formats = AMDTP_IN_PCM_FORMAT_BITS; | 125 | runtime->hw.formats = AM824_IN_PCM_FORMAT_BITS; |
126 | s = &bebob->tx_stream; | 126 | s = &bebob->tx_stream; |
127 | formations = bebob->tx_stream_formations; | 127 | formations = bebob->tx_stream_formations; |
128 | } else { | 128 | } else { |
129 | runtime->hw.formats = AMDTP_OUT_PCM_FORMAT_BITS; | 129 | runtime->hw.formats = AM824_OUT_PCM_FORMAT_BITS; |
130 | s = &bebob->rx_stream; | 130 | s = &bebob->rx_stream; |
131 | formations = bebob->rx_stream_formations; | 131 | formations = bebob->rx_stream_formations; |
132 | } | 132 | } |
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c index cf6402d371e7..a2baa478d4ba 100644 --- a/sound/firewire/bebob/bebob_stream.c +++ b/sound/firewire/bebob/bebob_stream.c | |||
@@ -354,7 +354,7 @@ map_data_channels(struct snd_bebob *bebob, struct amdtp_stream *s) | |||
354 | case 0x09: /* Digital */ | 354 | case 0x09: /* Digital */ |
355 | default: | 355 | default: |
356 | location = pcm + sec_loc; | 356 | location = pcm + sec_loc; |
357 | if (location >= AMDTP_MAX_CHANNELS_FOR_PCM) { | 357 | if (location >= AM824_MAX_CHANNELS_FOR_PCM) { |
358 | err = -ENOSYS; | 358 | err = -ENOSYS; |
359 | goto end; | 359 | goto end; |
360 | } | 360 | } |
@@ -872,8 +872,8 @@ parse_stream_formation(u8 *buf, unsigned int len, | |||
872 | } | 872 | } |
873 | } | 873 | } |
874 | 874 | ||
875 | if (formation[i].pcm > AMDTP_MAX_CHANNELS_FOR_PCM || | 875 | if (formation[i].pcm > AM824_MAX_CHANNELS_FOR_PCM || |
876 | formation[i].midi > AMDTP_MAX_CHANNELS_FOR_MIDI) | 876 | formation[i].midi > AM824_MAX_CHANNELS_FOR_MIDI) |
877 | return -ENOSYS; | 877 | return -ENOSYS; |
878 | 878 | ||
879 | return 0; | 879 | return 0; |
diff --git a/sound/firewire/dice/dice-pcm.c b/sound/firewire/dice/dice-pcm.c index 8cbcd5d59b45..9b3431999fc8 100644 --- a/sound/firewire/dice/dice-pcm.c +++ b/sound/firewire/dice/dice-pcm.c | |||
@@ -133,11 +133,11 @@ static int init_hw_info(struct snd_dice *dice, | |||
133 | SNDRV_PCM_INFO_BLOCK_TRANSFER; | 133 | SNDRV_PCM_INFO_BLOCK_TRANSFER; |
134 | 134 | ||
135 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 135 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
136 | hw->formats = AMDTP_IN_PCM_FORMAT_BITS; | 136 | hw->formats = AM824_IN_PCM_FORMAT_BITS; |
137 | stream = &dice->tx_stream; | 137 | stream = &dice->tx_stream; |
138 | pcm_channels = dice->tx_channels; | 138 | pcm_channels = dice->tx_channels; |
139 | } else { | 139 | } else { |
140 | hw->formats = AMDTP_OUT_PCM_FORMAT_BITS; | 140 | hw->formats = AM824_OUT_PCM_FORMAT_BITS; |
141 | stream = &dice->rx_stream; | 141 | stream = &dice->rx_stream; |
142 | pcm_channels = dice->rx_channels; | 142 | pcm_channels = dice->rx_channels; |
143 | } | 143 | } |
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c index c94a432f7cc6..d5b19bc11e59 100644 --- a/sound/firewire/fireworks/fireworks.c +++ b/sound/firewire/fireworks/fireworks.c | |||
@@ -138,12 +138,12 @@ get_hardware_info(struct snd_efw *efw) | |||
138 | efw->midi_out_ports = hwinfo->midi_out_ports; | 138 | efw->midi_out_ports = hwinfo->midi_out_ports; |
139 | efw->midi_in_ports = hwinfo->midi_in_ports; | 139 | efw->midi_in_ports = hwinfo->midi_in_ports; |
140 | 140 | ||
141 | if (hwinfo->amdtp_tx_pcm_channels > AMDTP_MAX_CHANNELS_FOR_PCM || | 141 | if (hwinfo->amdtp_tx_pcm_channels > AM824_MAX_CHANNELS_FOR_PCM || |
142 | hwinfo->amdtp_tx_pcm_channels_2x > AMDTP_MAX_CHANNELS_FOR_PCM || | 142 | hwinfo->amdtp_tx_pcm_channels_2x > AM824_MAX_CHANNELS_FOR_PCM || |
143 | hwinfo->amdtp_tx_pcm_channels_4x > AMDTP_MAX_CHANNELS_FOR_PCM || | 143 | hwinfo->amdtp_tx_pcm_channels_4x > AM824_MAX_CHANNELS_FOR_PCM || |
144 | hwinfo->amdtp_rx_pcm_channels > AMDTP_MAX_CHANNELS_FOR_PCM || | 144 | hwinfo->amdtp_rx_pcm_channels > AM824_MAX_CHANNELS_FOR_PCM || |
145 | hwinfo->amdtp_rx_pcm_channels_2x > AMDTP_MAX_CHANNELS_FOR_PCM || | 145 | hwinfo->amdtp_rx_pcm_channels_2x > AM824_MAX_CHANNELS_FOR_PCM || |
146 | hwinfo->amdtp_rx_pcm_channels_4x > AMDTP_MAX_CHANNELS_FOR_PCM) { | 146 | hwinfo->amdtp_rx_pcm_channels_4x > AM824_MAX_CHANNELS_FOR_PCM) { |
147 | err = -ENOSYS; | 147 | err = -ENOSYS; |
148 | goto end; | 148 | goto end; |
149 | } | 149 | } |
diff --git a/sound/firewire/fireworks/fireworks_pcm.c b/sound/firewire/fireworks/fireworks_pcm.c index 109fb1bc8d9d..d27135bac513 100644 --- a/sound/firewire/fireworks/fireworks_pcm.c +++ b/sound/firewire/fireworks/fireworks_pcm.c | |||
@@ -159,11 +159,11 @@ pcm_init_hw_params(struct snd_efw *efw, | |||
159 | SNDRV_PCM_INFO_MMAP_VALID; | 159 | SNDRV_PCM_INFO_MMAP_VALID; |
160 | 160 | ||
161 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 161 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
162 | runtime->hw.formats = AMDTP_IN_PCM_FORMAT_BITS; | 162 | runtime->hw.formats = AM824_IN_PCM_FORMAT_BITS; |
163 | s = &efw->tx_stream; | 163 | s = &efw->tx_stream; |
164 | pcm_channels = efw->pcm_capture_channels; | 164 | pcm_channels = efw->pcm_capture_channels; |
165 | } else { | 165 | } else { |
166 | runtime->hw.formats = AMDTP_OUT_PCM_FORMAT_BITS; | 166 | runtime->hw.formats = AM824_OUT_PCM_FORMAT_BITS; |
167 | s = &efw->rx_stream; | 167 | s = &efw->rx_stream; |
168 | pcm_channels = efw->pcm_playback_channels; | 168 | pcm_channels = efw->pcm_playback_channels; |
169 | } | 169 | } |
diff --git a/sound/firewire/oxfw/oxfw-pcm.c b/sound/firewire/oxfw/oxfw-pcm.c index 217fe376b766..8d233417695d 100644 --- a/sound/firewire/oxfw/oxfw-pcm.c +++ b/sound/firewire/oxfw/oxfw-pcm.c | |||
@@ -134,11 +134,11 @@ static int init_hw_params(struct snd_oxfw *oxfw, | |||
134 | SNDRV_PCM_INFO_MMAP_VALID; | 134 | SNDRV_PCM_INFO_MMAP_VALID; |
135 | 135 | ||
136 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { | 136 | if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { |
137 | runtime->hw.formats = AMDTP_IN_PCM_FORMAT_BITS; | 137 | runtime->hw.formats = AM824_IN_PCM_FORMAT_BITS; |
138 | stream = &oxfw->tx_stream; | 138 | stream = &oxfw->tx_stream; |
139 | formats = oxfw->tx_stream_formats; | 139 | formats = oxfw->tx_stream_formats; |
140 | } else { | 140 | } else { |
141 | runtime->hw.formats = AMDTP_OUT_PCM_FORMAT_BITS; | 141 | runtime->hw.formats = AM824_OUT_PCM_FORMAT_BITS; |
142 | stream = &oxfw->rx_stream; | 142 | stream = &oxfw->rx_stream; |
143 | formats = oxfw->rx_stream_formats; | 143 | formats = oxfw->rx_stream_formats; |
144 | } | 144 | } |
diff --git a/sound/firewire/oxfw/oxfw-stream.c b/sound/firewire/oxfw/oxfw-stream.c index 4982befc9c25..0c40c00daf12 100644 --- a/sound/firewire/oxfw/oxfw-stream.c +++ b/sound/firewire/oxfw/oxfw-stream.c | |||
@@ -483,8 +483,8 @@ int snd_oxfw_stream_parse_format(u8 *format, | |||
483 | } | 483 | } |
484 | } | 484 | } |
485 | 485 | ||
486 | if (formation->pcm > AMDTP_MAX_CHANNELS_FOR_PCM || | 486 | if (formation->pcm > AM824_MAX_CHANNELS_FOR_PCM || |
487 | formation->midi > AMDTP_MAX_CHANNELS_FOR_MIDI) | 487 | formation->midi > AM824_MAX_CHANNELS_FOR_MIDI) |
488 | return -ENOSYS; | 488 | return -ENOSYS; |
489 | 489 | ||
490 | return 0; | 490 | return 0; |