IEEE 1394 updates for Linux 3.1 (v1349 2012-01-20) Documentation/ioctl/ioctl-number.txt | 1 Documentation/sound/alsa/ALSA-Configuration.txt | 7 drivers/firewire/core-device.c | 2 drivers/firewire/core-transaction.c | 4 drivers/firewire/core.h | 13 drivers/firewire/net.c | 15 drivers/firewire/ohci.c | 426 ++ drivers/firewire/sbp2.c | 343 +- include/asm-generic/dma-mapping-common.h | 14 include/linux/firewire.h | 12 include/sound/Kbuild | 1 include/sound/asound.h | 3 include/sound/firewire.h | 51 sound/firewire/Kconfig | 29 sound/firewire/Makefile | 4 sound/firewire/amdtp.c | 211 + sound/firewire/amdtp.h | 46 sound/firewire/cmp.c | 48 sound/firewire/dice-interface.h | 371 ++ sound/firewire/dice.c | 1485 ++++++++++ sound/firewire/fcp.c | 2 sound/firewire/fireworks.c | 2283 ++++++++++++++++ sound/firewire/fireworks.h | 201 + sound/firewire/isight.c | 48 sound/firewire/lib.c | 24 sound/firewire/lib.h | 7 sound/firewire/speakers.c | 20 27 files changed, 5219 insertions(+), 452 deletions(-) Date: Tue, 20 Dec 2011 21:34:12 +0100 From: Stefan Richter firewire: sbp2: use dev_printk API All messages are uniformly prefixed by driver name and device name now. Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 93 ++++++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 42 deletions(-) Date: Tue, 20 Dec 2011 21:32:46 +0100 From: Stefan Richter firewire: ohci: use dev_printk API All messages are uniformly prefixed by driver name and device name now. Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 185 +++++++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 79 deletions(-) Date: Sat, 27 Aug 2011 18:53:03 +0200 From: Stefan Richter firewire: move fw_device reference counting from drivers to core fw_unit device drivers invariably need to talk to the fw_unit's parent (an fw_device) and grandparent (an fw_card). firewire-core already maintains an fw_card reference for the entire lifetime of an fw_device. Likewise, let firewire-core maintain an fw_device reference for the entire lifetime of an fw_unit so that fw_unit drivers don't have to. Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 2 ++ drivers/firewire/core.h | 13 +++++++++++++ include/linux/firewire.h | 12 ------------ sound/firewire/dice.c | 5 ----- sound/firewire/isight.c | 4 +--- sound/firewire/speakers.c | 4 ---- 6 files changed, 16 insertions(+), 24 deletions(-) From 526795d69f5be6d058bdf89a65a303a1ee136aba Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 8 Jan 2012 22:18:00 +0100 [PATCH 9/9] ALSA: dice: document quadlet alignment Doing accesses without quadlet alignment is a bad idea because the firmware's byte-swapping would garble the data; clarify this in the documentation. Signed-off-by: Clemens Ladisch --- sound/firewire/dice-interface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) From e27d3a9eb7b1faad9df75de68db9879ea54efd19 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 5 Jan 2012 22:36:08 +0100 [PATCH 8/9] ALSA: dice: add a proc file to show device information For easier debugging, add a proc file to show the device's capabilities and current status. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 246 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) From 1684cef612a7295667fcb8348257eaabb54cf29e Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 5 Jan 2012 22:16:24 +0100 [PATCH 7/9] ALSA: dice: check clock change timeout Output a warning if the wait for the clock change notification times out. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) From 5e36fef41579d62c45111dd5bde2f9685b301b0e Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 4 Dec 2011 22:07:01 +0100 [PATCH 5/9] ALSA: dice: dynamic sample rate selection Instead of relying of some control panel application to configure some fixed sample rate, allow applications to set it automatically. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 137 +++++++++++++++++++++++++++++++----------- 1 file changed, 102 insertions(+), 35 deletions(-) From 4eedb5b4f608f4a932a23967186aa87f8b41293a Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 4 Dec 2011 22:23:59 +0100 [PATCH 4/9] ALSA: dice: get rate-dependent parameters In preparation for sample rate selection support, read the stream parameters that might change when running at different sample rates. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 93 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) From ed30098478b23478e2bed0d4b8e526216edbdd67 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 5 Dec 2011 22:09:42 +0100 [PATCH 3/9] ALSA: dice: allow notifications during initialization Reorganize the initialization order so that the driver can receive notifications earlier. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) From 4cacc66e7690c21a837f52e868c76baa42f344b3 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 4 Dec 2011 21:47:00 +0100 [PATCH 2/9] ALSA: dice: get clock capabilities In preparation for sample rate selection support, ensure that the driver knows about the device's clock capabilities. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) From 018d4b379496d2530095993d696acb0c4191f323 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 16 Oct 2011 21:39:00 +0200 [PATCH 1/9] ALSA: dice: make amdtp_rates[] const Signed-off-by: Clemens Ladisch --- sound/firewire/amdtp.c | 2 +- sound/firewire/amdtp.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) From f29bf150b7ba0624142496c84bb48ddba561c0e2 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Sat, 27 Aug 2011 20:05:15 +0200 ALSA: dice: fix locking Avoid a lock inversion between dice->mutex and pcm->open_mutex. Signed-off-by: Stefan Richter Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) From d79b51cb3e1ff55e0d7d87a0b57e54e16fcf29ab Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 11 Oct 2011 17:51:16 +0200 ALSA: dice: remove superfluous field The pcm field was not actually used. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Date: Sat, 15 Oct 2011 23:12:23 +0200 From: Clemens Ladisch firewire: ohci: fix isochronous DMA synchronization Add the dma_sync_single_* calls necessary to ensure proper cache synchronization for isochronous data buffers on non-coherent architectures. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) Date: Sat, 15 Oct 2011 23:09:51 +0200 From: Clemens Ladisch dma-mapping: fix sync_single_range_* DMA debugging Commit 5fd75a7850b5 (dma-mapping: remove unnecessary sync_single_range_* in dma_map_ops) unified not only the dma_map_ops but also the corresponding debug_dma_sync_* calls. This led to spurious WARN()ings like the following because the DMA debug code was no longer able to detect the DMA buffer base address without the separate offset parameter: WARNING: at lib/dma-debug.c:911 check_sync+0xce/0x446() firewire_ohci 0000:04:00.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x00000000cedaa400] [size=1024 bytes] Call Trace: ... [] check_sync+0xce/0x446 [] debug_dma_sync_single_for_device+0x39/0x3b [] ohci_queue_iso+0x4f3/0x77d [firewire_ohci] ... To fix this, unshare the sync_single_* and sync_single_range_* implementations so that we are able to call the correct debug_dma_sync_* functions. Signed-off-by: Clemens Ladisch --- include/asm-generic/dma-mapping-common.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) Date: Sat, 15 Oct 2011 18:14:39 +0200 From: Clemens Ladisch firewire: ohci: work around selfID junk due to wrong gap count If a device's firmware initiates a bus reset by setting the IBR bit in PHY register 1 without resetting the gap count field to 63 (and without having sent a PHY configuration packet beforehand), the gap count of this node will remain at the old value after the bus reset and thus be inconsistent with the gap count on all other nodes. The bus manager is supposed to detect the inconsistent gap count values in the self ID packets and correct them by issuing another bus reset. However, if the buggy device happens to be the cycle master, and if it sends a cycle start packet immediately after the bus reset (which is likely after a long bus reset), then the time between the end of the selfID phase and the start of the cycle start packet will be based on the too-small gap count value, so this gap will be too short to be detected as a subaction gap by the other nodes. This means that the cycle start packet will be assumed to be self ID data, and will be stored after the actual self ID quadlets in the self ID buffer. This garbage in the self ID buffer made firewire-core ignore all of the self ID data, and thus prevented the Linux bus manager from correcting the problem. Furthermore, because the bus reset handling was aborted completely, asynchronous transfers would be no longer handled correctly, and fw_run_transaction() would hang until the next bus reset. To fix this, make the detection of inconsistent self IDs more discriminating: If the invalid data in the self ID buffer looks like a cycle start packet, we can assume that the previous data in the buffer is correctly received self ID information, and process it normally. (We inspect only the first quadlet of the cycle start packet, because this value is different enough from any valid self ID quadlet, and many controllers do not store the cycle start packet in five quadlets because they expect self ID data to have an even number of quadlets.) This bug has been observed when a bus-powered DesktopKonnekt6 is switched off with its power button. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) Date: Mon, 26 Sep 2011 21:44:30 +0200 From: Stephan Gatzka firewire: net: Use posted writes Change memory region to ohci "middle address space". This effectively reduces the number of packets by 50%. [Stefan R.:] This eliminates 1394 ack packets and improved throughput by a few percent in some tests with an S400a connection with and without gap count optimization. Since firewire-net taxes the AR-req DMA unit of a FireWire controller much more than firewire-sbp2 (which uses the middle address space with PCI posted writes too), this commit also changes a related error printk into a ratelimited one as a precaution. Side note: The IPv4-over-1394 drivers of Mac OS X 10.4, Windows XP SP3, and the Thesycon 1394 bus driver for Windows all use the middle address space too. Signed-off-by: Stephan Gatzka Signed-off-by: Stefan Richter --- drivers/firewire/net.c | 9 ++------- drivers/firewire/ohci.c | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) Date: Sun, 19 Jun 2011 10:10:43 +0000 (+0200) From: Clemens Ladisch ALSA: isight: remove superfluous field Remove a field that is not used at all. This remained from earlier tests, but the current driver has decided not to handle iris notifications. Signed-off-by: Clemens Ladisch --- sound/firewire/isight.c | 1 - 1 file changed, 1 deletion(-) Date: Mon, 19 Sep 2011 00:20:48 +0200 From: Stefan Richter firewire: use clamp and min3 macros Use kernel.h's convenience macros. Also omit a printk that should never happen and won't matter much if it ever happened. Signed-off-by: Stefan Richter --- drivers/firewire/core-transaction.c | 4 ++-- drivers/firewire/net.c | 6 +----- drivers/firewire/sbp2.c | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) Date: Mon, 19 Sep 2011 09:29:30 +0200 From: Stefan Richter firewire: ohci: optimize TSB41BA3D detection Takes less source code and machine code, and less runtime with PHYs other than TSB41BA3D (e.g. TSB81BA3 with device ID 0x831304 which takes one instead of six read_paged_phy_reg now). Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) Date: Mon, 19 Sep 2011 00:17:37 +0200 From: Stefan Richter firewire: ohci: TSB41BA3D support tweaks Fix: phy_reg_mutex must be held over the write/read_phy_reg pair which gets PHY port status. Only print to the log when a TSB41BA3D was found. By far most TSB82AA2 cards have a TSB81BA3, and firewire-ohci can keep quiet about that. Shorten some strings and comments. Change some whitespace. Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 74 ++++++++++++---------------------------- 1 file changed, 23 insertions(+), 51 deletions(-) Date: Mon, 12 Sep 2011 22:23:53 +0200 From: Stephan Gatzka firewire: ohci: Add support for TSB41BA3D phy This patch implements a work around for the Texas Instruments PHY TSB41BA3D. This phy has a bug at least in combination with the TI LLCs TSB82AA2B and TSB12LV26. The selfid coming from the locally connected phy is not propagated into the selfid buffer of the OHCI (see http://www.ti.com/litv/pdf/sllz059 for details). The main idea is to construct the selfid ourselves. Signed-off-by: Stephan Gatzka Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 185 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+), 2 deletions(-) Date: Mon, 25 Jul 2011 22:16:24 +0200 From: Stephan Gatzka firewire: ohci: Move code from the bus reset tasklet into a workqueue Code inside bus_reset_work may now sleep. This is a prerequisite to support a phy from Texas Instruments cleanly. The patch to support this phy will be submitted later. Signed-off-by: Stephan Gatzka Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) From fdc9cca4a7ffb213425fee7cdc3bf16ca5e72313 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 19 Jun 2011 19:02:32 +0200 [PATCH 8/8] ALSA: dice: remove 10s period length limit Since commit f2b3614cefb6 (Don't check DMA time-out too shortly), we need no longer to restrict the period length to less than 10 s. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From 87406ea1b9c8486c4e16d2c6c61f0fe3e3c20d53 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 19 Jun 2011 18:32:44 +0200 [PATCH 7/8] ALSA: dice: avoid superflous write at bus reset When a bus reset happens, the enable register is automatically cleared, so we do not need to clear it manually when stopping the stream. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 5 +++++ 1 file changed, 5 insertions(+) From 7f5cede774247f6a5cb0d32083ed104dfaeb1212 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 19 Jun 2011 18:25:54 +0200 [PATCH 6/8] ALSA: firewire: extend snd_fw_transaction() Add a flag to snd_fw_transaction() to allow it to abort when a bus reset happens. This removes most of the duplicated error handling loops that were required around calls to the low-level fw_run_transaction(). Also add a flag to suppress error messages; errors are expected when we attempt to clean up after the device was unplugged. Signed-off-by: Clemens Ladisch --- sound/firewire/cmp.c | 48 ++++----- sound/firewire/dice.c | 207 ++++++++++++-------------------------- sound/firewire/fcp.c | 2 sound/firewire/isight.c | 43 ++++---- sound/firewire/lib.c | 24 +++- sound/firewire/lib.h | 7 + sound/firewire/speakers.c | 2 7 files changed, 130 insertions(+), 203 deletions(-) From 3c5079443753f50618422e9a0203781f06a1a89a Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 19 Jun 2011 18:12:28 +0200 [PATCH 5/8] ALSA: dice: optimize reading of consecutive registers Instead of reading two consecutive register with two quadlet requests, use one block read request. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) From 30aea89da4b916306c602f34c5b19f5bc5dfeca5 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sat, 25 Jun 2011 21:43:10 +0200 [PATCH 4/8] ALSA: dice: support dual-wire stream format at 192 kHz Change the AMDTP streaming code to handle the non-standard stream format that DICE devices use at sample rates greater than 96 kHz. Signed-off-by: Clemens Ladisch --- sound/firewire/amdtp.c | 157 +++++++++++++++++++++++++++++++------- sound/firewire/amdtp.h | 41 +++------- sound/firewire/dice.c | 29 +++++-- sound/firewire/speakers.c | 6 + 4 files changed, 165 insertions(+), 68 deletions(-) From f9e0df98ff3ad1146ee67738ed061386727f1991 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 19 Jun 2011 17:29:29 +0200 [PATCH 3/8] ALSA: dice: fix device detection for other vendors DICE devices do not have a unique specifier ID in their unit directory (it's always the same as the device vendor's ID), so rely on just the version ID for driver loading, and use a heuristic in the probe callback to detect actual DICE devices. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 102 +++++++++++++++++++++++++++++++++++------- 1 file changed, 84 insertions(+), 18 deletions(-) From 5d3de9436c06691a22d0605fa373302eab985cb3 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 19 Jun 2011 17:18:48 +0200 [PATCH 2/8] ALSA: dice: reorganize interface definitions Move the DICE interface symbols into a separate header file, and add more documentation. Signed-off-by: Clemens Ladisch --- sound/firewire/dice-interface.h | 371 ++++++++++++++++++++++++++++++++ sound/firewire/dice.c | 209 ------------------ 2 files changed, 373 insertions(+), 207 deletions(-) create mode 100644 sound/firewire/dice-interface.h From 5ac97683122b2d326d1d644a42f8343f85fdfd70 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 19 Jun 2011 15:23:04 +0200 [PATCH 1/8] ALSA: firewire: introduce amdtp_out_stream_running() Introduce the helper function amdtp_out_stream_running(). This makes many checks in amdtp.c clearer and frees the device drivers from having to track this with a separate variable. Signed-off-by: Clemens Ladisch --- sound/firewire/amdtp.c | 10 +++++----- sound/firewire/amdtp.h | 6 ++++++ sound/firewire/dice.c | 17 +++++------------ sound/firewire/speakers.c | 8 ++------ 4 files changed, 18 insertions(+), 23 deletions(-) Date: Sat, 27 Aug 2011 15:35:23 +0200 From: Stefan Richter firewire: sbp2: fold two functions into one sbp2_release_target() is folded into its primary user, sbp2_remove(). The only other caller, a failure path in sbp2_probe(), now uses sbp2_remove(). This adds unnecessary cancel_delayed_work_sync() calls to that failure path but results in less code and text. Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) Date: Sat, 27 Aug 2011 15:34:32 +0200 From: Stefan Richter firewire: sbp2: move some code to more sensible places Implement sbp2_queue_work(), which is now a very simple accessor to one of the struct sbp2_logical_unit members, right after the definition of struct sbp2_logical_unit. Put the sbp2_reconnect() implementation right after the sbp2_login() implementation. They are both part of the SBP-2 access protocol. Implement the driver methods sbp2_probe(), spp2_update(), sbp2_remove() in this order, reflecting the lifetime of an SBP-2 target. Place the sbp2_release_target() implementation right next to sbp2_remove() which is its primary user, and after sbp2_probe() which is the counterpart to sbp2_release_target(). There are no changes to the implementations here, or at least not meant to be. Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 213 ++++++++++++++++++++-------------------- 1 file changed, 107 insertions(+), 106 deletions(-) Date: Sat, 27 Aug 2011 15:33:34 +0200 From: Stefan Richter firewire: sbp2: remove obsolete reference counting Since commit 0278ccd9d53e07c4e699432b2fed9de6c56f506c "firewire: sbp2: fix panic after rmmod with slow targets", the lifetime of an sbp2_target instance does no longer extent past the return of sbp2_remove(). Therefore it is no longer necessary to call fw_unit_get/put() and fw_device_get/put() in sbp2_probe/remove(). Furthermore, said commit also ensures that lu->work is not going to be executed or requeued at a time when the sbp2_target is no longer in use. Hence there is no need for sbp2_target reference counting for lu->work. Other concurrent contexts: - Processes which access the sysfs of the SCSI host device or of one of its subdevices are safe because these interfaces are all removed by scsi_remove_device/host() in sbp2_release_target(). - SBP-2 command block ORB transactions are finished when scsi_remove_device() in sbp2_release_target() returns. - SBP-2 management ORB transactions are finished when cancel_delayed_work_sync(&lu->work) before sbp2_release_target() returns. Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 57 ++++++++++++---------------------------- 1 file changed, 17 insertions(+), 40 deletions(-) Date: Wed, 22 Jun 2011 20:39:03 +0200 From: Stefan Richter ALSA: fireworks: adjust for new queueing API --- sound/firewire/fireworks.c | 6 ++++++ 1 file changed, 6 insertions(+) Date: Sun, 12 Jun 2011 17:00:56 +0200 From: Stefan Richter ALSA: fireworks: avoid duplicate variable name 'index' Pointed out by sparse: "symbol 'index' shadows an earlier one". Could also be fixed by static int interface_index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; module_param_array_named(index, interface_index, int, NULL, 0444); [...] err = snd_card_create(interface_index[card_index], id[card_index], THIS_MODULE, --- sound/firewire/fireworks.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Date: Sun, 12 Jun 2011 17:00:56 +0200 From: Stefan Richter ALSA: fireworks: fix lock imbalance in an error path Pointed out by sparse: "context imbalance in 'capture_iso_callback' - different lock contexts for basic block". --- sound/firewire/fireworks.c | 1 + 1 file changed, 1 insertion(+) From 2a2405fac5f900608eff5ea89926480aad475877 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:49:53 +0200 [PATCH 12/12] ALSA: fireworks: add MIDI output --- sound/firewire/fireworks.c | 195 ++++++++++++++++++++++++++++++------- 1 file changed, 158 insertions(+), 37 deletions(-) From 331f4c14546bbfd5ab42dc646b087898bc18df62 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:49:42 +0200 [PATCH 11/12] ALSA: fireworks: allow PCM streams to be started synchronously --- sound/firewire/fireworks.c | 75 ++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 42 deletions(-) From bad1f8034d68fd4c7d722cf7cd27573d4d556277 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:49:31 +0200 [PATCH 10/12] ALSA: fireworks: add PCM playback --- sound/firewire/fireworks.c | 627 ++++++++++++++++++++++++++++++++++++- 1 file changed, 617 insertions(+), 10 deletions(-) From 513450c9e03dbf56f238019f232dcad2b6016470 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:49:19 +0200 [PATCH 09/12] ALSA: fireworks: check received CIP headers for consistency --- sound/firewire/fireworks.c | 97 ++++++++++++++++++++++++++++++------- 1 file changed, 78 insertions(+), 19 deletions(-) From 4c0e62d5d862d187b2e92070e6016a7037380da9 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:49:07 +0200 [PATCH 08/12] ALSA: fireworks: add identify control --- sound/firewire/fireworks.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) From b5fcebfec4f6e6a8858e708d97979d83d2ccb471 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:48:55 +0200 [PATCH 07/12] ALSA: fireworks: add polled values control --- sound/firewire/fireworks.c | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) From 86b939359167083c1e6d6edc3181ee2fb3229a66 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:48:43 +0200 [PATCH 06/12] ALSA: fireworks: add hardware capabilities control --- sound/firewire/fireworks.c | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) From dd80a554f38649b8768717e772e8b0d0b8dd0e49 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:48:26 +0200 [PATCH 05/12] ALSA: fireworks: synchronize PCM stream start with fw data --- sound/firewire/fireworks.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) From 6afe12c0d1ef003fb6e57e6d34df01b1f391a50d Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:48:10 +0200 [PATCH 04/12] ALSA: fireworks: add PCM capture --- sound/firewire/fireworks.c | 236 +++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) From 38d7d9f0974b2265ba50931b9d0be3066d0bb210 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:47:49 +0200 [PATCH 03/12] ALSA: fireworks: fix bus reset handling --- sound/firewire/fireworks.c | 74 +++++++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 4 deletions(-) From bfd3510a4340c9cf2d3722baf262d84756acd970 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:46:27 +0200 [PATCH 02/12] ALSA: fireworks: add MIDI capture --- sound/firewire/fireworks.c | 431 +++++++++++++++++++++++++++++++++++++ 1 file changed, 431 insertions(+) From fb9ed6a705e827f49f65de123d698171ad72d6e3 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 30 Sep 2010 14:46:10 +0200 [PATCH 01/12] ALSA: add Echo Fireworks support skeleton driver only [StefanR: - forward-merge to 2.6.39 + firewire patches + snd-dice patches, - added #include ] --- Documentation/sound/alsa/ALSA-Configuration.txt | 7 + sound/firewire/Kconfig | 15 + sound/firewire/Makefile | 2 + sound/firewire/fireworks.c | 606 ++++++++++++++++ sound/firewire/fireworks.h | 201 +++++ 5 files changed, 831 insertions(+) create mode 100644 sound/firewire/Kconfig create mode 100644 sound/firewire/Makefile create mode 100644 sound/firewire/fireworks.c create mode 100644 sound/firewire/fireworks.h From ed4d975dde2fd0ea129d7043f0c98c90b96dcb2e Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 28 Apr 2011 08:03:43 +0200 ALSA: dice: clear device lock when closing hwdep device Ensure that misbehaving or aborted userspace programs do not accidentally keep the lock. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) From 619f53e05526e5edaf8ac0c198f25cc650161524 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 4 Apr 2011 08:48:06 +0200 ALSA: dice: implement hwdep device Implement the hwdep locking and notification mechanisms. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 225 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 203 insertions(+), 22 deletions(-) From 4546822e8450e4d13a19c447f4c544d575df16c2 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 4 Apr 2011 08:44:30 +0200 ALSA: dice: fix typo in firewire.h Signed-off-by: Clemens Ladisch --- include/sound/firewire.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From f8e8bb824aac9472b0a40d195e14f13877715c4b Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 31 Mar 2011 08:07:13 +0200 ALSA: dice: change ioctl numbers Change the (fortunately not yet implemented) ioctl numbers from F1..F3 to F8..FA to prevent a conflict with the new hid-roccat driver. Signed-off-by: Clemens Ladisch --- Documentation/ioctl/ioctl-number.txt | 2 +- include/sound/firewire.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) From f075c67d8bd5736fd612e5cec5ceafa4d58ef47d Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Wed, 30 Mar 2011 08:28:09 +0200 ALSA: dice: fix hang when unplugging a running device When aborting a PCM stream, the xrun is signaled only if the stream is running. When disconnecting a PCM stream, calling snd_card_disconnect() too early would change the stream into a non-running state and thus prevent the xrun from being noticed by user space. To prevent this, move the snd_card_disconnect() call after the xrun. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) From 7365ec51bd8653d141bc98b5632f2c53580d2b36 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 29 Mar 2011 10:12:55 +0200 ALSA: dice, firewire-lib: add blocking mode Allow AMDTP output streams to use blocking mode. Use it for DICE devices, because the old DICE-II chip will in some cases not be able to lock to non-blocking streams (erratum E7). Signed-off-by: Clemens Ladisch --- sound/firewire/amdtp.c | 54 ++++++++++++++++++++++------------------- sound/firewire/amdtp.h | 7 ++++- sound/firewire/dice.c | 2 +- 3 files changed, 36 insertions(+), 27 deletions(-) From bc0bfef119e31d419e65b6758260e9d26e4828f8 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 29 Mar 2011 10:11:40 +0200 ALSA: dice: reduce noisy logging The notification bits are not of general interest; log them only when debugging. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) From 00725b6b475b19d1146543003675e76b5d01d926 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 29 Mar 2011 10:11:15 +0200 ALSA: dice: allow all sample rates Instead of forcing a constant 44.1 kHz, read the current sample rate from the device when opening the PCM device. Actually changing the sample rate requires some separate controller application. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 55 ++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 13 deletions(-) From 5f2e1b69fadb9dbe23215e3cdee4643ceec41dbf Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Fri, 18 Mar 2011 11:12:50 +0100 ALSA: dice: optimize bus reset handling After a bus reset, do not stop the stream completely to avoid having to reconfigure the device when restarting the stream. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 148 ++++++++++++++++++++++++++---------------- 1 file changed, 93 insertions(+), 55 deletions(-) From 49120234746353325aedf5148f71997a264fda6f Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Mon, 21 Mar 2011 08:34:20 +0100 ALSA: dice: depends on snd_hwdep Signed-off-by: Stefan Richter Signed-off-by: Clemens Ladisch --- sound/firewire/Kconfig | 1 + 1 file changed, 1 insertion(+) From 793175a06225da8a2c06102092bf7ab97c8eeb8c Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Wed, 13 Apr 2011 08:25:04 +0200 ALSA: dice: msleep needs delay.h build requirement on 2.6.39 x86-64 Signed-off-by: Stefan Richter Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 1 + 1 file changed, 1 insertion(+) From c9d4b44721322a091f358466342fcee1b7ba0e4e Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 17 Mar 2011 08:39:29 +0100 ALSA: add DICE driver incomplete driver for DICE devices: * only playback (so no clock source except the bus clock) * only 44.1 kHz * no MIDI * recovery after bus reset is slow * hwdep device is created, but not actually implemented Signed-off-by: Clemens Ladisch --- Documentation/ioctl/ioctl-number.txt | 1 + include/sound/Kbuild | 1 + include/sound/asound.h | 3 + include/sound/firewire.h | 51 + sound/firewire/Kconfig | 13 + sound/firewire/Makefile | 2 + sound/firewire/dice.c | 1017 +++++++++++++++++++++++++++ 7 files changed, 1087 insertions(+), 1 deletion(-) create mode 100644 include/sound/firewire.h create mode 100644 sound/firewire/dice.c