summaryrefslogtreecommitdiff
path: root/sound/firewire/bebob/bebob_stream.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2014-04-25 22:45:25 +0900
committerTakashi Iwai <tiwai@suse.de>2014-05-26 14:32:03 +0200
commit9076c22ddd9d29a30426f0367dec2b40e12536de (patch)
tree8fd173e744c1080bdc13e0c9cdb486d4094fb2e4 /sound/firewire/bebob/bebob_stream.c
parent25784ec2d0347b715e354d92151734afe1296f02 (diff)
ALSA: bebob: Add support for M-Audio usual Firewire series
This commit allows this driver to support some models which M-Audio produces with DM1000/DM1000E with usual firmware. They are: - Firewire 410 - Firewire AudioPhile - Firewire Solo - Ozonic - NRV10 - FirewireLightBridge According to a person who worked in BridgeCo, some models are produced with 'Pre-BeBoB'. This means that these products were released before BeBoB was officially produced, and later BeBoB specification was formed. So these models have some quirks. M-Audio usual firmware quirks: - Just after powering on, 'Firewire 410' waits to download firmware. This state is changed when receiving cue. Then bus reset is generated and the device is recognized as a different model with the uploaded firmware. - 'Firewire Audiophile' also waits to download firmware but its vendor id/model id is the same as the one after loading firmware. - The information of channel mapping for MIDI conformant data channel is invalid against BridgeCo specification. This commit adds some codes for these quirks but don't support to upload firmware. This commit also adds specific operations to get metering information. The metering information also includes status of clock synchronization if the model supports to switch source of clock. The specification of FirewireLightBridge is unknown. So in this time, normal operations are applied for this model. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob_stream.c')
-rw-r--r--sound/firewire/bebob/bebob_stream.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c
index 4a21dcf95d95..5fc52706f7c5 100644
--- a/sound/firewire/bebob/bebob_stream.c
+++ b/sound/firewire/bebob/bebob_stream.c
@@ -252,6 +252,15 @@ map_data_channels(struct snd_bebob *bebob, struct amdtp_stream *s)
/* location of this channel in this section */
sec_loc = buf[pos++] - 1;
+ /*
+ * Basically the number of location is within the
+ * number of channels in this section. But some models
+ * of M-Audio don't follow this. Its location for MIDI
+ * is the position of MIDI channels in AMDTP packet.
+ */
+ if (sec_loc >= channels)
+ sec_loc = ch;
+
switch (type) {
/* for MIDI conformant data channel */
case 0x0a: