summaryrefslogtreecommitdiffstats
path: root/sound/firewire/bebob/bebob.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2014-04-25 22:45:14 +0900
committerTakashi Iwai <tiwai@suse.de>2014-05-26 14:29:12 +0200
commitfd6f4b0dc167c6329a153ceeeb95bc41307156f3 (patch)
tree807ca55af550baaf2e40e0bc7e8f8f671318444d /sound/firewire/bebob/bebob.h
parent555e8a8f7f149544eb7d4aa3a6420bc4c3055638 (diff)
ALSA: bebob: Add skelton for BeBoB based devices
This commit adds a new driver for BeBoB based devices with no specific operations. Currently this driver just create/remove card instance according to callbacks. BeBoB is 'BridgeCo enhanced Breakout Box'. This is installed to firewire devices with DM1000/DM1100/DM1500 chipset. It gives common way for host system to handle BeBoB based devices. Current supported devices: - Edirol FA-66/FA-101 - PreSonus FIREBOX/FIREPOD/FP10/Inspire1394 - BridgeCo RDAudio1/Audio5 - Mackie Onyx 1220/1620/1640 (Firewire I/O Card) - Mackie d.2 (Firewire Option) - Stanton FinalScratch 2 (ScratchAmp) - Tascam IF-FW DM - Behringer XENIX UFX 1204/1604 - Behringer Digital Mixer X32 series (X-UF Card) - Apogee Rosetta 200/Rosetta 400 (X-FireWire card) - Apogee DA-16X/AD-16X/DD-16X (X-FireWire card) - Apogee Ensemble - ESI Quotafire610 - AcousticReality eARMasterOne - CME MatrixKFW - Phonix Helix Board 12 MkII/18 MkII/24 MkII - Phonic Helix Board 12 Universal/18 Universal/24 Universal - Lynx Aurora 8/16 (LT-FW) - ICON FireXon - PrismSound Orpheus/ADA-8XR Devices possible to be supported if identifying IDs: - Apogee Mini-Me Firewire/Mini-DAC Firewire - Behringer F-Control Audio 610/1616 - Cakewalk Sonar Power Studio 66 - CME UF400e - ESI Quotafire XL - Infrasonic DewX/Windy6 - Mackie Digital X Bus x.200/400 - Phonic Helix Board 12/18/24 - Phonic FireFly 202/302 - Rolf Spuler Firewire Guitar Tested-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob.h')
-rw-r--r--sound/firewire/bebob/bebob.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/sound/firewire/bebob/bebob.h b/sound/firewire/bebob/bebob.h
new file mode 100644
index 000000000000..862f756ec281
--- /dev/null
+++ b/sound/firewire/bebob/bebob.h
@@ -0,0 +1,64 @@
+/*
+ * bebob.h - a part of driver for BeBoB based devices
+ *
+ * Copyright (c) 2013-2014 Takashi Sakamoto
+ *
+ * Licensed under the terms of the GNU General Public License, version 2.
+ */
+
+#ifndef SOUND_BEBOB_H_INCLUDED
+#define SOUND_BEBOB_H_INCLUDED
+
+#include <linux/compat.h>
+#include <linux/device.h>
+#include <linux/firewire.h>
+#include <linux/firewire-constants.h>
+#include <linux/module.h>
+#include <linux/mod_devicetable.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+
+#include <sound/core.h>
+#include <sound/initval.h>
+
+#include "../lib.h"
+#include "../fcp.h"
+
+/* basic register addresses on DM1000/DM1100/DM1500 */
+#define BEBOB_ADDR_REG_INFO 0xffffc8020000
+#define BEBOB_ADDR_REG_REQ 0xffffc8021000
+
+struct snd_bebob {
+ struct snd_card *card;
+ struct fw_unit *unit;
+ int card_index;
+
+ struct mutex mutex;
+ spinlock_t lock;
+};
+
+static inline int
+snd_bebob_read_block(struct fw_unit *unit, u64 addr, void *buf, int size)
+{
+ return snd_fw_transaction(unit, TCODE_READ_BLOCK_REQUEST,
+ BEBOB_ADDR_REG_INFO + addr,
+ buf, size, 0);
+}
+
+static inline int
+snd_bebob_read_quad(struct fw_unit *unit, u64 addr, u32 *buf)
+{
+ return snd_fw_transaction(unit, TCODE_READ_QUADLET_REQUEST,
+ BEBOB_ADDR_REG_INFO + addr,
+ (void *)buf, sizeof(u32), 0);
+}
+
+#define SND_BEBOB_DEV_ENTRY(vendor, model) \
+{ \
+ .match_flags = IEEE1394_MATCH_VENDOR_ID | \
+ IEEE1394_MATCH_MODEL_ID, \
+ .vendor_id = vendor, \
+ .model_id = model, \
+}
+
+#endif