diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-04-25 13:44:50 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-26 12:14:41 (GMT) |
commit | 77d2a8a4f61c158ca34db167e5a9d57ceec0f0df (patch) | |
tree | 6fc94490618aba36989424ab3fc294db6eff2307 /sound/firewire/amdtp.h | |
parent | 7b3b0d8583c926547fed8e493344cd8b30aa847d (diff) | |
download | linux-77d2a8a4f61c158ca34db167e5a9d57ceec0f0df.tar.xz |
ALSA: firewire-lib: Add support for channel mapping
Some devices arrange the position of PCM/MIDI data channel in AMDTP packet.
This commit allows drivers to set channel mapping.
To be simple, the mapping table is an array with fixed length. Then the number
of channels for PCM is restricted by 64 channels.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp.h')
-rw-r--r-- | sound/firewire/amdtp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h index 2bd3b27..e8d62ac 100644 --- a/sound/firewire/amdtp.h +++ b/sound/firewire/amdtp.h @@ -51,6 +51,12 @@ enum cip_sfc { /* + * This module supports maximum 64 PCM channels for one PCM stream + * This is for our convenience. + */ +#define AMDTP_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. @@ -85,6 +91,8 @@ struct amdtp_stream { void (*transfer_samples)(struct amdtp_stream *s, struct snd_pcm_substream *pcm, __be32 *buffer, unsigned int frames); + u8 pcm_positions[AMDTP_MAX_CHANNELS_FOR_PCM]; + u8 midi_position; unsigned int syt_interval; unsigned int transfer_delay; |