summaryrefslogtreecommitdiff
path: root/sound/firewire/tascam/tascam.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-10-01 22:02:14 +0900
committerTakashi Iwai <tiwai@suse.de>2015-10-02 18:17:01 +0200
commit47faeea25ef3a39f2224377a1fc76581cd18c044 (patch)
tree84cb01821612f287ecf3471caf15abb0f08d844d /sound/firewire/tascam/tascam.h
parent96e5fbb0dd128496378dbc404c2a894e49c1ac21 (diff)
ALSA: firewire-tascam: add data block processing layer
TASCAM FireWire series uses non-blocking transmission for AMDTP packet streaming, while the format of data blocks is unique. The CIP headers includes specific value in FMT field and no SYT information. In transmitted packets, the first data channel represents event counter, and the last data channel has status and control information. The rest has 24bit PCM samples with right padding. In received packets, all of data channels include 16, 24, 32bit PCM samples. There's no other kind of information. This commit adds support for this protocol. For convenience, the size of PCM samples in outgoing packet is limited by 16 and 24bit. The status and control information will be supported in future commits. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/tascam/tascam.h')
-rw-r--r--sound/firewire/tascam/tascam.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/firewire/tascam/tascam.h b/sound/firewire/tascam/tascam.h
index 9ecc5505723f..195be0bfb054 100644
--- a/sound/firewire/tascam/tascam.h
+++ b/sound/firewire/tascam/tascam.h
@@ -21,8 +21,11 @@
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/info.h>
+#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include "../lib.h"
+#include "../amdtp-stream.h"
struct snd_tscm_spec {
const char *const name;
@@ -51,6 +54,13 @@ struct snd_tscm {
#define TSCM_OFFSET_FIRMWARE_ARM 0x0008
#define TSCM_OFFSET_FIRMWARE_HW 0x000c
+int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit,
+ enum amdtp_stream_direction dir, unsigned int pcm_channels);
+int amdtp_tscm_set_parameters(struct amdtp_stream *s, unsigned int rate);
+int amdtp_tscm_add_pcm_hw_constraints(struct amdtp_stream *s,
+ struct snd_pcm_runtime *runtime);
+void amdtp_tscm_set_pcm_format(struct amdtp_stream *s, snd_pcm_format_t format);
+
void snd_tscm_proc_init(struct snd_tscm *tscm);
#endif