IEEE 1394 updates for Linux 3.4.y (v1423 2012-12-02) Documentation/ABI/stable/sysfs-bus-firewire | 11 Documentation/ioctl/ioctl-number.txt | 1 Documentation/sound/alsa/ALSA-Configuration.txt | 7 MAINTAINERS | 9 drivers/firewire/core-card.c | 5 drivers/firewire/core-cdev.c | 51 drivers/firewire/core-device.c | 128 drivers/firewire/core-iso.c | 82 drivers/firewire/core-transaction.c | 91 drivers/firewire/core.h | 22 drivers/firewire/net.c | 13 drivers/firewire/nosy.c | 20 drivers/firewire/ohci.c | 100 drivers/firewire/sbp2.c | 28 drivers/target/Kconfig | 1 drivers/target/Makefile | 1 drivers/target/sbp/Kconfig | 11 drivers/target/sbp/Makefile | 1 drivers/target/sbp/sbp_target.c | 2620 ++++++++++++++++ drivers/target/sbp/sbp_target.h | 251 + include/linux/firewire.h | 33 include/sound/Kbuild | 1 include/sound/asound.h | 3 include/sound/firewire.h | 51 sound/firewire/Kconfig | 42 sound/firewire/Makefile | 6 sound/firewire/amdtp.c | 311 - sound/firewire/amdtp.h | 121 sound/firewire/cmp.c | 48 sound/firewire/dice-interface.h | 371 ++ sound/firewire/dice.c | 1615 +++++++++ sound/firewire/fcp.c | 2 sound/firewire/fireworks.c | 2284 +++++++++++++ sound/firewire/fireworks.h | 201 + sound/firewire/isight.c | 43 sound/firewire/lib.c | 50 sound/firewire/lib.h | 8 sound/firewire/scs1x.c | 527 +++ sound/firewire/speakers.c | 51 tools/firewire/nosy-dump.c | 4 40 files changed, 8675 insertions(+), 550 deletions(-) Date: Wed, 28 Nov 2012 20:04:32 +0100 From: Stephan Gatzka firewire: net: Fix handling of fragmented multicast/broadcast packets. This patch fixes both the transmit and receive portion of sending fragmented mutlicast and broadcast packets. The transmit section was broken because the offset for INTFRAG and LASTFRAG packets were just miscalculated by IEEE1394_GASP_HDR_SIZE (which was reserved with skb_push() in fwnet_send_packet). The receive section was broken because in fwnet_incoming_packet is a call to fwnet_peer_find_by_node_id(). Called with generation == -1 it will not find a peer and the partial datagrams are associated to a peer. [Stefan R: The fix to use context->card->generation is not perfect. It relies on the IR tasklet which processes packets from the prior bus generation to run before the self-ID-complete worklet which sets the current card generation. Alas, there is no simple way of a race-free implementation. Let's do it this way for now.] Signed-off-by: Stephan Gatzka Cc: stable Signed-off-by: Stefan Richter --- drivers/firewire/net.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) Date: Mon, 22 Oct 2012 15:17:17 +0200 From: Stefan Richter tools/firewire: nosy-dump: check for allocation failure Behavior of null pointer dereference is undefined in the C language. Portably implement the desired behavior. Reported-by: Yang Yeping Signed-off-by: Stefan Richter --- tools/firewire/nosy-dump.c | 4 ++++ 1 file changed, 4 insertions(+) Date: Sat, 26 May 2012 11:43:19 +0200 From: Clemens Ladisch ALSA: firewire: add Stanton SCS.1d/1m driver Add a MIDI driver for the Stanton FireWire DJ controllers. Tested-by: Sean M. Pappalardo - D.J. Pegasus Signed-off-by: Clemens Ladisch [[ Stefan R: rebased onto alsa-firewire-extend-snd_fw_transaction.patch ]] --- sound/firewire/Kconfig | 13 + sound/firewire/Makefile | 2 + sound/firewire/scs1x.c | 527 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 542 insertions(+) create mode 100644 sound/firewire/scs1x.c Date: Thu, 27 Sep 2012 21:46:09 +0200 From: Stefan Richter firewire: addendum to address handler RCU conversion Follow up on commit c285f6ff6787 "firewire: remove global lock around address handlers, convert to RCU": - address_handler_lock no longer serializes the address handler, only its function to serialize updates to the list of handlers remains. Rename the lock to address_handler_list_lock. - Callers of fw_core_remove_address_handler() must be able to sleep. Comment on this in the API documentation. - The counterpart fw_core_add_address_handler() is by nature something which is used in process context. Replace spin_lock_bh() by spin_lock() in fw_core_add_address_handler() and in fw_core_remove_address_handler(), and document that process context is now required for fw_core_add_address_handler(). - Extend the documentation of fw_address_callback_t. Signed-off-by: Stefan Richter --- drivers/firewire/core-transaction.c | 13 ++++++++----- include/linux/firewire.h | 12 ++++++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) Date: Sun, 19 Aug 2012 02:50:02 -0400 From: Peter Hurley firewire: remove global lock around address handlers, convert to RCU Upper-layer handlers for inbound requests were called with a spinlock held by firewire-core. Calling into upper layers with a lower layer lock held is generally a bad idea. What's more, since commit ea102d0ec475 "firewire: core: convert AR-req handler lock from _irqsave to _bh", a caller of fw_send_request() i.e. initiator of outbound request could no longer do that while having interrupts disabled, if the local node was addressed by that request. In order to make all this more flexible, convert the management of address ranges and handlers from a global lock around readers and writers to RCU (and a remaining global lock for writers). As a minor side effect, handling of inbound requests at different cards and of local requests is now no longer serialized. (There is still per-card serialization of remote requests since firewire-ohci uses a single DMA tasklet for inbound request events.) In other words, address handlers are now called in an RCU read-side critical section instead of from within a spin_lock_bh serialized section. (Changelog rewritten by Stefan R.) Signed-off-by: Peter Hurley Signed-off-by: Stefan Richter --- drivers/firewire/core-transaction.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) Date: Mon, 3 Sep 2012 21:17:50 +0200 From: Stephan Gatzka firewire: ohci: get IR bit from TSB41BA3D phy In case of a self constructed selfID packet this patch correctly determines the information if the TSB41BA3D phy initiated a bus reset. Signed-off-by: Stephan Gatzka Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) Date: Mon, 13 Aug 2012 09:08:41 +0200 From: Clemens Ladisch firewire: core: feed /dev/random with devices' GUIDs Send the GUIDs of newly registered controllers and devices to the /dev/random driver to help seed its pools. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 3 +++ 1 file changed, 3 insertions(+) Date: Fri, 21 Sep 2012 13:57:31 +0800 From: Wei Yongjun target: fix return value check in sbp_register_configfs() In case of error, the function target_fabric_configfs_init() returns ERR_PTR() not NULL pointer. The NULL test in the return value check should be replaced with IS_ERR(). dpatch engine is used to auto generated this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/target/sbp/sbp_target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Date: Wed, 5 Sep 2012 14:42:48 +0800 From: Wei Yongjun target: use list_move_tail instead of list_del/list_add_tail Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/target/sbp/sbp_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Date: Sun, 17 Jun 2012 19:57:23 +0200 From: Stefan Richter firewire: core: document is_local sysfs attribute Signed-off-by: Stefan Richter --- Documentation/ABI/stable/sysfs-bus-firewire | 11 +++++++++++ 1 file changed, 11 insertions(+) Date: Sun, 17 Jun 2012 16:40:36 +0200 From: Clemens Ladisch firewire: core: add is_local sysfs device attribute Making this information available in sysfs allows to differentiate between controllers in the local and remote Linux PCs, and thus is useful for servers that are started with udev rules. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 9 +++++++++ include/linux/firewire.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) Date: Wed, 13 Jun 2012 22:29:20 +0200 From: Clemens Ladisch firewire: ohci: initialize multiChanMode bits after reset OHCI 1.1 says: | Since the value of this bit is undefined after reset in all IR | contexts, software shall initialize this bit to zero in all contexts | whether or not active to maintain the exclusive nature of this bit. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 5 +++++ 1 file changed, 5 insertions(+) Date: Wed, 13 Jun 2012 22:28:24 +0200 From: Clemens Ladisch firewire: core: fix multichannel IR with buffers larger than 2 GB With a 32-bit i, computing i< Signed-off-by: Stefan Richter --- drivers/firewire/core-iso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Date: Mon, 04 Jun 2012 21:28:07 +0200 From: Clemens Ladisch firewire: ohci: sanity-check MMIO resource pci_request_region() does not fail on resources that have not been allocated by the BIOS or by the kernel, so to avoid accessing registers that are not there, we have to check for this explicitly. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 7 +++++++ 1 file changed, 7 insertions(+) Date: Thu, 24 May 2012 22:07:35 +0200 From: Stefan Richter sbp-target: rename a variable to avoid name clash 'int login_id' shadows 'static atomic_t login_id'. Seen as compilation warning on x86-32. Signed-off-by: Stefan Richter --- drivers/target/sbp/sbp_target.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Date: Thu, 24 May 2012 19:29:19 +0200 From: Clemens Ladisch firewire: ohci: lazy bus time initialization The Bus_Time CSR is virtually never used, so we can avoid burning CPU in interrupt context for 1 or 3 IsochronousCycleTimer accesses every minute by not tracking the bus time until the CSR is actually accessed for the first time. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) Date: Thu, 24 May 2012 19:28:58 +0200 From: Clemens Ladisch firewire: core: allocate the low memory region Prevent userspace applications from allocating low memory address ranges. Otherwise, if some application happens to allocate such a range and intends for a remote node to access it, and if that node also implements SBP-2 (which will become more likely with the upcoming SBP-2 target support), these accesses would be routed by the physical DMA unit to some wrong memory address. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-transaction.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) Date: Thu, 24 May 2012 19:28:17 +0200 From: Clemens Ladisch firewire: core: make address handler length 64 bits The type of the length field of the fw_address_handler structure was size_t, which restricted it to 32 bits on 32-bit architectures. While making it u32 would match the userspace API, all calculations on this field use 64 bits anyway, and the ability to use 4 GB or larger address ranges is useful in the kernel. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- include/linux/firewire.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) From a511ce3397803558a3591e55423f3ae6aa28c9db Mon Sep 17 00:00:00 2001 From: Chris Boot Date: Sat, 14 Apr 2012 17:50:35 -0700 sbp-target: Initial merge of firewire/ieee-1394 target mode support The FireWire SBP-2 Target is a driver for using an IEEE-1394 connection as a SCSI transport. This module uses the SCSI Target framework to expose LUNs to other machines attached to a FireWire bus, in effect acting as a FireWire hard disk similar to FireWire Target Disk mode on many Apple computers. This commit contains the squashed pull from Chris Boot's SBP-2-Target: https://github.com/bootc/Linux-SBP-2-Target.git patch-v3 firewire-sbp-target: Add sbp_base.h header firewire-sbp-target: Add sbp_configfs.c firewire-sbp-target: Add sbp_fabric.{c,h} firewire-sbp-target: Add sbp_management_agent.{c,h} firewire-sbp-target: Add sbp_login.{c,h} firewire-sbp-target: Add sbp_target_agent.{c,h} firewire-sbp-target: Add sbp_scsi_cmnd.{c,h} firewire-sbp-target: Add to target Kconfig and Makefile Also add bootc's entry to the MAINTAINERS file. Great work Chris !! Signed-off-by: Chris Boot Acked-by: Stefan Richter Cc: Andy Grover Cc: Clemens Ladisch Signed-off-by: Nicholas Bellinger --- MAINTAINERS | 9 + drivers/target/Kconfig | 1 + drivers/target/Makefile | 1 + drivers/target/sbp/Kconfig | 11 + drivers/target/sbp/Makefile | 1 + drivers/target/sbp/sbp_target.c | 2621 ++++++++++++++++++++++++++++++++ drivers/target/sbp/sbp_target.h | 251 +++ 7 files changed, 2895 insertions(+) create mode 100644 drivers/target/sbp/Kconfig create mode 100644 drivers/target/sbp/Makefile create mode 100644 drivers/target/sbp/sbp_target.c create mode 100644 drivers/target/sbp/sbp_target.h From fc5f80b152896c1ffded2a91d11dcb08ffcffebb Mon Sep 17 00:00:00 2001 From: Chris Boot Date: Wed, 1 Feb 2012 22:36:02 +0000 firewire: Move fw_card kref functions into linux/firewire.h When writing a firewire driver that doesn't deal with struct fw_device objects (e.g. it only publishes FireWire units and doesn't subscribe to them), you likely need to keep referenced to struct fw_card objects so that you can send messages to other nodes. This patch moves fw_card_put(), fw_card_get() and fw_card_release() into the public include/linux/firewire.h header instead of drivers/firewire/core.h, and adds EXPORT_SYMBOL_GPL(fw_card_release). The firewire-sbp-target module requires these so it can keep a reference to the fw_card object in order that it can fetch ORBs to execute and read/write related data and status information. Signed-off-by: Chris Boot Acked-by: Stefan Richter Cc: Clemens Ladisch Signed-off-by: Nicholas Bellinger --- drivers/firewire/core-card.c | 1 + drivers/firewire/core.h | 15 --------------- include/linux/firewire.h | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 15 deletions(-) From 253d92371ca29a470b2bbf91fb9824a9fef05657 Mon Sep 17 00:00:00 2001 From: Chris Boot Date: Thu, 16 Feb 2012 09:16:35 +0000 firewire: Add function to get speed from opaque struct fw_request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes it's useful to know the FireWire speed of the request that has just come in to a fw_address_handler callback. As struct fw_request is opaque we can't peek inside to get the speed out of the struct fw_packet that's just inside. For example, the SBP-2 spec says: "The speed at which the block write request to the MANAGEMENT_AGENT register is received shall determine the speed used by the target for all subsequent requests to read the initiator’s configuration ROM, fetch ORB’s from initiator memory or store status at the initiator’s status_FIFO. Command block ORB’s separately specify the speed for requests addressed to the data buffer or page table." [ ANSI T10/1155D Revision 4 page 53/54 ] Signed-off-by: Chris Boot Acked-by: Stefan Richter Cc: Clemens Ladisch Signed-off-by: Nicholas Bellinger --- drivers/firewire/core-transaction.c | 9 +++++++++ include/linux/firewire.h | 1 + 2 files changed, 10 insertions(+) Date: Fri, 18 May 2012 22:26:21 +0200 From: Clemens Ladisch firewire: sbp2: document the absence of alignment requirements The SBP-2/3 specifications do not require any alignment of data buffers; only their own data structures need to be quadlet-aligned [SR: or octlet-aligned]. Fix the comments to reflect this, but leave the actual alignment at 32 bits to avoid theoretical problems with target implementations that might handle this incorrectly. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Date: Fri, 18 May 2012 18:41:28 +0200 From: Clemens Ladisch firewire: sbp2: remove superfluous blk_queue_max_segment_size() call The SCSI framework automatically initializes the block queue's segment size with the DMA device's segment size. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 2 -- 1 file changed, 2 deletions(-) Date: Fri, 18 May 2012 18:40:19 +0200 From: Clemens Ladisch firewire: sbp2: use scsi_dma_(un)map Use the scsi_dma_map/scsi_dma_unmap helper to simplify the code a little. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) Date: Fri, 18 May 2012 18:39:39 +0200 From: Clemens Ladisch firewire: sbp2: give correct DMA device to scsi framework The sbp2 driver does DMA not on the unit but on the card device. The driver worked even with the wrong device because at the moment, it happens to reimplement the DMA functions of the SCSI framework. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/sbp2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) From 582610a1f45daeeceaa211a19d4e7a1a22cf7e90 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 15 Apr 2012 16:41:04 +0200 [PATCH 3/3] ALSA: dice: add support for M-Audio devices with many channels When using more than one receiver, i.e., more than 16 channels (8 at 192 kHz), the M-Audio firmware expects the data to arrive in one stream, but does not correctly reflect this in the DICE receiver description. Try to work around this by adjusting the description accordingly. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) From 48ea8420b80b35a15eeac4a6e3df6fdf256f8225 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 15 Apr 2012 16:36:52 +0200 [PATCH 2/3] ALSA: dice: add IDs to attach to M-Audio devices M-Audio devices do not use the DICE interface ID (probably because they do not fully conform to the DICE driver interface). Add the IDs so that the driver attaches anyway. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 6 ++++++ 1 file changed, 6 insertions(+) From 8b27ab78787261abe9b2ffa99e4980d16f849ab3 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Fri, 13 Apr 2012 23:25:35 +0200 [PATCH 1/3] ALSA: amdtp: rename amdtp_out_stream to amdtp_stream I originally planned to have separate output and input stream objects, but as Jay Fenlason's patch has shown, there is so much common code that it makes more sense to also have a common object for both directions. Signed-off-by: Clemens Ladisch --- sound/firewire/amdtp.c | 106 +++++++++++++++++++------------------- sound/firewire/amdtp.h | 74 +++++++++++++------------- sound/firewire/dice.c | 44 ++++++++-------- sound/firewire/speakers.c | 44 ++++++++-------- 4 files changed, 134 insertions(+), 134 deletions(-) From 00990a1764475ca6bc432b06cefed9c21ed2f56c Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 12 Apr 2012 15:53:31 +0200 [PATCH 4/4] ALSA: dice: support multiple streams Allow playback on devices with more than one receiver. Due to the chip's ability to extract quadlets from anywhere in a packet, this does not require multiple isochronous streams. This is probably required to enable playback on devices with more than 16 channels (or 8 at 192 kHz). Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 276 +++++++++++++++++++++++++++++------------- 1 file changed, 192 insertions(+), 84 deletions(-) From 4e79022315b81e3987033c61e3949a35f01a6661 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 12 Apr 2012 11:33:22 +0200 [PATCH 3/4] ALSA: amdtp: allow custom quadlet ordering Instead of requiring that packets contain the samples of all PCM channels in order, introduce an indirection to allow custom orderings. This makes the special dual-wire copy function unnecessary, and prepares for the upcoming DICE multi-receiver support. Signed-off-by: Clemens Ladisch --- sound/firewire/amdtp.c | 95 +++++++++++++++-------------------------- sound/firewire/amdtp.h | 12 +++-- sound/firewire/dice.c | 2 3 files changed, 42 insertions(+), 67 deletions(-) From fa478690ac74a0b48936f9d792142c3105195405 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 12 Apr 2012 11:44:19 +0200 [PATCH 2/4] ALSA: amdtp: remove S16 support Remove the code that converts AM824 samples to 16-bit samples. It's practically a duplicate of the 32-bit code, and just increases maintenance effort. Signed-off-by: Clemens Ladisch --- sound/firewire/amdtp.c | 119 ++++---------------------------------- sound/firewire/amdtp.h | 5 +- sound/firewire/dice.c | 4 - sound/firewire/speakers.c | 5 +- 4 files changed, 16 insertions(+), 117 deletions(-) From e329fc72622387d9cffa6fbe37f07377873a73a1 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Tue, 10 Apr 2012 18:41:17 +0200 [PATCH 1/4] ALSA: dice: do not use dual-wire for M-Audio devices Adjust the driver to work correctly at 192 kHz with M-Audio devices, which have their firmware compiled without dual-wire mode. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) Date: Wed, 11 Apr 2012 17:39:59 +0200 From: Clemens Ladisch firewire: core: fw_device_refresh(): clean up error handling In fw_device_init() and fw_device_refresh(), if a call to read_cofig_rom() fails, the operation is retried a few times, with these retries being controlled by the MAX_RETRIES and RETRY_DELAY symbols. fw_device_refresh() also reads part of the config rom by calling reread_config_rom(). Any errors from this call resulted in retries with MAX_RETRIES/2 and RETRY_DELAY/2. There is no reason to require that a device that has initiated a bus reset must react faster to read requests than a device that has just been plugged in. Furthermore, if the config rom has changed, any errors from the following read_config_rom() call are then handled with the normal retry count and delay. Remove this inconsistency by always using the normal retry count and delay. (This also makes the two error handlers identical and allows merging them.) Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) Date: Wed, 11 Apr 2012 17:39:19 +0200 From: Clemens Ladisch firewire: core: log config rom reading errors If reading or refreshing a config rom fails, also log the actual error that caused it to fail. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 42 +++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 15 deletions(-) Date: Wed, 11 Apr 2012 17:38:47 +0200 From: Clemens Ladisch firewire: core: log error in case of failed bus manager lock If the lock access to the bus manager register fails, also log the actual error that caused it to fail. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Date: Wed, 11 Apr 2012 17:38:10 +0200 From: Clemens Ladisch firewire: move rcode_string() to core There is nothing audio-specific about the rcode_string() helper, so move it from snd-firewire-lib into firewire-core to allow other code to use it. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-transaction.c | 26 ++++++++++++++++++++++++++ include/linux/firewire.h | 1 + sound/firewire/lib.c | 28 +--------------------------- sound/firewire/lib.h | 1 - 4 files changed, 28 insertions(+), 28 deletions(-) Date: Wed, 11 Apr 2012 17:37:36 +0200 From: Clemens Ladisch firewire: core: improve reread_config_rom() interface The return value of reread_config_rom() was a mixture of two pieces of information: whether the function succeeded, and whether the config rom had changed. To clarify the semantics, and to allow returning the actual error code, split the second information into a new output parameter. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 40 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 21 deletions(-) Date: Wed, 11 Apr 2012 17:36:39 +0200 From: Clemens Ladisch firewire: core: wait for inaccessible devices after bus reset When reread_config_rom() encountered a config rom that was marked as not yet accessible, that device would be treated as "gone". This would mean that that device would effectively vanish until the next bus reset. The correct way to handle this situation is the same as in read_config_rom(), to treat this like other errors and to retry the read later, when the (possibly changed) config rom is available. The device is marked "gone" only if it continues to return zero values after these retries. Signed-off-by: Clemens Ladisch Signed-off-by: Stefan Richter --- drivers/firewire/core-device.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) Date: Mon, 9 Apr 2012 21:40:33 +0200 From: Stefan Richter firewire: ohci: omit spinlock IRQ flags where possible bus_reset_work() is only called from workqueue thread context. ohci_set_config_rom() and ohci_allocate_iso_context() perform GFP_KERNEL memory allocations, therefore they must be called with interrupts enabled. Hence these functions may disable and enable local IRQs without having to track IRQ state. Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) Date: Mon, 9 Apr 2012 21:39:53 +0200 From: Stefan Richter firewire: ohci: correct signedness of a local variable bus_reset_work's reg is a bitfield. Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Date: Mon, 9 Apr 2012 20:51:18 +0200 From: Stefan Richter firewire: core: fix DMA mapping direction Seen with recent libdc1394: If a client mmap()s the buffer of an isochronous reception buffer with PROT_READ|PROT_WRITE instead of just PROT_READ, firewire-core sets the wrong DMA mapping direction during buffer initialization. The fix is to split fw_iso_buffer_init() into allocation and DMA mapping and to perform the latter after both buffer and DMA context were allocated. Buffer allocation and context allocation may happen in any order, but we need the context type (reception or transmission) in order to set the DMA direction of the buffer. Signed-off-by: Stefan Richter --- drivers/firewire/core-cdev.c | 51 ++++++++++++++++++---- drivers/firewire/core-iso.c | 80 +++++++++++++++++++++++------------ drivers/firewire/core.h | 7 +++ include/linux/firewire.h | 1 + 4 files changed, 100 insertions(+), 39 deletions(-) Date: Tue, 03 Apr 2012 10:07:01 +0800 From: Axel Lin firewire: use module_pci_driver This patch converts the drivers in drivers/firewire/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Signed-off-by: Stefan Richter --- drivers/firewire/nosy.c | 20 ++++---------------- drivers/firewire/ohci.c | 15 ++------------- 2 files changed, 6 insertions(+), 29 deletions(-) From 5ddae8789f428b608e22788ea601aa8bfa204758 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 13 Feb 2012 21:55:13 +0100 ALSA: dice: fix detection of Weiss devices While most DICE devices keep TCAT's default category ID of 0x04, Weiss devices identify themselves with 0x00. Reported-by: Rolf Anderegg Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) From 9eb69c0d98d33e17caabb532d66730ec34df1afd Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 22 Jan 2012 16:46:23 +0100 ALSA: dice: dice_proc_read: remove wrong typecast Remove a wrong typecast that resulted from a copy-and-paste error. Signed-off-by: Clemens Ladisch --- sound/firewire/dice.c | 3 +-- 1 file changed, 1 insertion(+), 2 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(-) 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: 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 - added #include - changed static int enable[] to static bool enable[] ] --- Documentation/sound/alsa/ALSA-Configuration.txt | 7 + sound/firewire/Kconfig | 15 + sound/firewire/Makefile | 2 + sound/firewire/fireworks.c | 607 ++++++++++++++++ sound/firewire/fireworks.h | 201 +++++ 5 files changed, 832 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 [StefanR: - forward-merge to 3.4: fw_device_get/put are obsolete ] --- 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 | 1012 +++++++++++++++++++++++++++ 7 files changed, 1082 insertions(+), 1 deletion(-) create mode 100644 include/sound/firewire.h create mode 100644 sound/firewire/dice.c