summaryrefslogtreecommitdiff
path: root/sound/firewire/amdtp-am824.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-09-19 11:22:02 +0900
committerTakashi Iwai <tiwai@suse.de>2015-09-29 12:51:20 +0200
commitdf075feefbd347f13fba5198294cda619532c237 (patch)
tree6fbde961132507f27c5fde6f5693139e6ac37ee4 /sound/firewire/amdtp-am824.h
parent49c7b3fcd9f0a0125e8cd8212d5576382198eeb2 (diff)
ALSA: firewire-lib: complete AM824 data block processing layer
This commit moves the codes related to data block processing from packet streaming layer to AM824 layer. Each driver initializes amdtp stream structure for AM824 data block by calling amdtp_am824_init(). Then, a memory block is allocated for AM824 specific structure. This memory block is released by calling amdtp_stream_destroy(). When setting streaming parameters, it calls amdtp_am824_set_parameters(). When starting packet streaming, it calls amdtp_stream_start(). When stopping packet streaming, it calls amdtp_stream_stop(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp-am824.h')
-rw-r--r--sound/firewire/amdtp-am824.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/firewire/amdtp-am824.h b/sound/firewire/amdtp-am824.h
index 65e6093a4460..73b07b3109db 100644
--- a/sound/firewire/amdtp-am824.h
+++ b/sound/firewire/amdtp-am824.h
@@ -6,6 +6,27 @@
#include "amdtp-stream.h"
+#define AM824_IN_PCM_FORMAT_BITS SNDRV_PCM_FMTBIT_S32
+
+#define AM824_OUT_PCM_FORMAT_BITS (SNDRV_PCM_FMTBIT_S16 | \
+ SNDRV_PCM_FMTBIT_S32)
+
+/*
+ * This module supports maximum 64 PCM channels for one PCM stream
+ * This is for our convenience.
+ */
+#define AM824_MAX_CHANNELS_FOR_PCM 64
+
+/*
+ * AMDTP packet can include channels for MIDI conformant data.
+ * Each MIDI conformant data channel includes 8 MPX-MIDI data stream.
+ * Each MPX-MIDI data stream includes one data stream from/to MIDI ports.
+ *
+ * This module supports maximum 1 MIDI conformant data channels.
+ * Then this AMDTP packets can transfer maximum 8 MIDI data streams.
+ */
+#define AM824_MAX_CHANNELS_FOR_MIDI 1
+
int amdtp_am824_set_parameters(struct amdtp_stream *s, unsigned int rate,
unsigned int pcm_channels,
unsigned int midi_ports,
@@ -20,6 +41,9 @@ void amdtp_am824_set_midi_position(struct amdtp_stream *s,
int amdtp_am824_add_pcm_hw_constraints(struct amdtp_stream *s,
struct snd_pcm_runtime *runtime);
+void amdtp_am824_set_pcm_format(struct amdtp_stream *s,
+ snd_pcm_format_t format);
+
void amdtp_am824_midi_trigger(struct amdtp_stream *s, unsigned int port,
struct snd_rawmidi_substream *midi);