summaryrefslogtreecommitdiff
path: root/sound/firewire
AgeCommit message (Collapse)AuthorFilesLines
2013-10-22Merge branch 'dice-driver-playback-only' of ↵Takashi Iwai13-150/+2137
git://git.alsa-project.org/alsa-kprivate into for-next
2013-10-21ALSA: dice: restrict the driver to playback-only devicesClemens Ladisch2-4/+15
At the moment, this driver supports only playback, while FFADO supports (only) full-duplex devices. So, prevent conflicts by not claiming devices that would be better handled by FFADO. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: fix detection of Weiss devicesClemens Ladisch1-5/+12
While most DICE devices keep TCAT's default category ID of 0x04, Weiss devices identify themselves with 0x00. Reported-by: Rolf Anderegg <rolf.anderegg@weiss.ch> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: dice_proc_read: remove wrong typecastClemens Ladisch1-2/+1
Remove a wrong typecast that resulted from a copy-and-paste error. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: document quadlet alignmentClemens Ladisch1-3/+3
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: add a proc file to show device informationClemens Ladisch1-0/+246
For easier debugging, add a proc file to show the device's capabilities and current status. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: check clock change timeoutClemens Ladisch1-2/+3
Output a warning if the wait for the clock change notification times out. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: dynamic sample rate selectionClemens Ladisch1-35/+102
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: get rate-dependent parametersClemens Ladisch1-2/+90
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: allow notifications during initializationClemens Ladisch1-11/+11
Reorganize the initialization order so that the driver can receive notifications earlier. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: get clock capabilitiesClemens Ladisch1-2/+21
In preparation for sample rate selection support, ensure that the driver knows about the device's clock capabilities. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: make amdtp_rates[] constClemens Ladisch2-2/+2
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: fix lockingStefan Richter1-4/+4
Avoid a lock inversion between dice->mutex and pcm->open_mutex. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: remove superfluous fieldClemens Ladisch1-3/+1
The pcm field was not actually used. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: remove 10s period length limitClemens Ladisch1-1/+1
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: avoid superflous write at bus resetClemens Ladisch1-0/+5
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 <clemens@ladisch.de>
2013-10-21ALSA: firewire: extend snd_fw_transaction()Clemens Ladisch8-206/+137
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: optimize reading of consecutive registersClemens Ladisch1-16/+11
Instead of reading two consecutive register with two quadlet requests, use one block read request. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: support dual-wire stream format at 192 kHzClemens Ladisch4-67/+164
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: fix device detection for other vendorsClemens Ladisch1-18/+84
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: reorganize interface definitionsClemens Ladisch2-207/+373
Move the DICE interface symbols into a separate header file, and add more documentation. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: firewire: introduce amdtp_out_stream_running()Clemens Ladisch4-23/+18
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: clear device lock when closing hwdep deviceClemens Ladisch1-0/+13
Ensure that misbehaving or aborted userspace programs do not accidentally keep the lock. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: implement hwdep deviceClemens Ladisch1-22/+203
Implement the hwdep locking and notification mechanisms. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: fix hang when unplugging a running deviceClemens Ladisch1-2/+5
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 <clemens@ladisch.de>
2013-10-21ALSA: dice, firewire-lib: add blocking modeClemens Ladisch3-27/+36
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: reduce noisy loggingClemens Ladisch1-2/+2
The notification bits are not of general interest; log them only when debugging. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-21ALSA: dice: allow all sample ratesClemens Ladisch1-13/+42
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 <clemens@ladisch.de>
2013-10-21ALSA: dice: optimize bus reset handlingClemens Ladisch1-55/+93
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 <clemens@ladisch.de>
2013-10-17ALSA: add DICE driverClemens Ladisch3-0/+1023
As a start point for further development, this is an 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 Contains compilation fixes by Stefan Richter. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-09-26ALSA: firewire-lib: use inlune function to calculate frame bytesTakashi Sakamoto1-2/+2
Calculating frame bytes can be replaced with inline function in include/sound/pcm.h. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15Merge branch 'for-3.12' into for-nextTakashi Iwai1-3/+1
2013-07-10Merge tag 'firewire-updates' of ↵Linus Torvalds3-107/+82
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire updates from Stefan Richter: "Make struct ieee1394_device_id.driver_data actually avaliable to 1394 protocol drivers. This is especially useful to 1394 audio drivers for model-specific parameters and methods" * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: remove support of fw_driver.driver.probe and .remove methods firewire: introduce fw_driver.probe and .remove methods
2013-07-10ALSA: firewire-speakers: remove not-reused member from structureTakashi Sakamoto1-3/+1
"pcm" member in struct fwspk is used to set pcm operations but is not used again. This commit remove this member and set pcm operations with snd_pcm_set_ops(). Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-25ALSA: snd-firewire-lib: remove unused header inclusionTakashi Sakamoto1-1/+0
spinlock is not used in amdtp.h. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-18ALSA: firewire: fix error return code in scs_probe()Wei Yongjun1-1/+3
Fix to return -ENOMEM in the kmalloc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-09firewire: introduce fw_driver.probe and .remove methodsStefan Richter3-107/+82
FireWire upper layer drivers are converted from generic struct driver.probe() and .remove() to bus-specific struct fw_driver.probe() and .remove(). The new .probe() adds a const struct ieee1394_device_id *id argument, indicating the entry in the driver's device identifiers table which matched the fw_unit to be probed. This new argument is used by the snd-firewire-speakers driver to look up device-specific parameters and methods. There is at least one other FireWire audio driver currently in development in which this will be useful too. The new .remove() drops the unused error return code. Although all in-tree drivers are being converted to the new methods, support for the old methods is left in place in this commit. This allows public developer trees to merge this commit and then move to the new fw_driver methods. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Clemens Ladisch <clemens@ladisch.de> (for sound/firewire/) Cc: Peter Hurley <peter@hurleysoftware.com> (for drivers/staging/fwserial/)
2012-12-07ALSA: firewire-speakers: remove __dev* attributesBill Pemberton1-4/+4
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-12ALSA: firewire: add Stanton SCS.1d/1m driverClemens Ladisch3-0/+542
Add a MIDI driver for the Stanton FireWire DJ controllers. Tested-by: Sean M. Pappalardo - D.J. Pegasus <spappalardo@mixxx.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2012-05-24Merge tag 'firewire-updates' of ↵Linus Torvalds3-29/+2
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull IEEE 1394 (FireWire) subsystem updates from Stefan Richter: - Fix mismatch between DMA mapping direction (was wrong) and DMA synchronization direction (was correct) of isochronous reception buffers of userspace drivers if vma-mapped for R/W access. For example, libdc1394 was affected. - more consistent retry stategy in device discovery/ rediscovery, and improved failure diagnostics - various small cleanups, e.g. use SCSI layer's DMA mapping API in firewire-sbp2 * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: sbp2: document the absence of alignment requirements firewire: sbp2: remove superfluous blk_queue_max_segment_size() call firewire: sbp2: use scsi_dma_(un)map firewire: sbp2: give correct DMA device to scsi framework firewire: core: fw_device_refresh(): clean up error handling firewire: core: log config rom reading errors firewire: core: log error in case of failed bus manager lock firewire: move rcode_string() to core firewire: core: improve reread_config_rom() interface firewire: core: wait for inaccessible devices after bus reset firewire: ohci: omit spinlock IRQ flags where possible firewire: ohci: correct signedness of a local variable firewire: core: fix DMA mapping direction firewire: use module_pci_driver
2012-05-14ALSA: firewire-lib: optimize packet flushingClemens Ladisch2-1/+8
Trying to flush completed packets is pointless when the pointer callback was called from the packet completion callback; avoid it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-14ALSA: firewire-lib: flush completed packets when reading PCM positionClemens Ladisch2-12/+15
By flushing all completed but not yet reported packets before reading the PCM hardware position, the granularity of the pointer is improved from the interrupt interval to the packet size. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-14ALSA: firewire-lib: taskletize the snd_pcm_period_elapsed() callClemens Ladisch2-13/+31
The following patch might introduce this call chain: PCM .pointer callback + fw_iso_context_flush_completions + packet callback + snd_pcm_period_elapsed + PCM .pointer callback Recursive calls to the pointer callback are not possible due to the PCM group locking, so avoid this by moving the period notification into a separate tasklet. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-18firewire: move rcode_string() to coreClemens Ladisch3-29/+2
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 <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed sound/firewire/cmp.c)
2012-03-23Merge tag 'firewire-updates' of ↵Linus Torvalds2-7/+1
git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull IEEE 1394 (FireWire) subsystem updates post v3.3 from Stefan Richter: - Some SBP-2 initiator fixes, side product from ongoing work on a target. - Reintroduction of an isochronous I/O feature of the older ieee1394 driver stack (flush buffer completions); it was evidently rarely used but not actually unused. Matching libraw1394 code is already available. - Be sure to prefix all kernel log messages with device name or card name, and other logging related cleanups. - Misc other small cleanups, among them a small API change that affects sound/firewire/ too. Clemens Ladisch is aware of it. * tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: (26 commits) firewire: allow explicit flushing of iso packet completions firewire: prevent dropping of completed iso packet header data firewire: ohci: factor out iso completion flushing code firewire: ohci: simplify iso header pointer arithmetic firewire: ohci: optimize control bit checks firewire: ohci: remove unused excess_bytes field firewire: ohci: copy_iso_headers(): make comment match the code firewire: cdev: fix IR multichannel event documentation firewire: ohci: fix too-early completion of IR multichannel buffers firewire: ohci: move runtime debug facility out of #ifdef firewire: tone down some diagnostic log messages firewire: sbp2: replace a GFP_ATOMIC allocation firewire: sbp2: Fix SCSI sense data mangling firewire: sbp2: Ignore SBP-2 targets on the local node firewire: sbp2: Take into account Unit_Unique_ID firewire: nosy: Use the macro DMA_BIT_MASK(). firewire: core: convert AR-req handler lock from _irqsave to _bh firewire: core: fix race at address_handler unregistration firewire: core: remove obsolete comment firewire: core: prefix log messages with card name ...
2012-01-15firewire: move fw_device reference counting from drivers to coreStefan Richter2-7/+1
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 <stefanr@s5r6.in-berlin.de>
2011-11-07Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds2-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-11-01treewide: use __printf not __attribute__((format(printf,...)))Joe Perches1-1/+1
Standardize the style for compiler based printf format verification. Standardized the location of __printf too. Done via script and a little typing. $ grep -rPl --include=*.[ch] -w "__attribute__" * | \ grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \ xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }' [akpm@linux-foundation.org: revert arch bits] Signed-off-by: Joe Perches <joe@perches.com> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-01sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where neededPaul Gortmaker2-0/+2
These aren't modules, but they do make use of these macros, so they will need export.h to get that definition. Previously, they got it via the implicit module.h inclusion. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-04ALSA: firewire-speakers: fix lockingStefan Richter1-2/+3
There is a lock inversion between fwspk->mutex and pcm->open_mutex reported by lockdep when fwspk_hw_free is called. Fixed by copying the fix from the same former issue in the isight sound driver (commit f3f7c1837f6bcae3601fc535b339426868bf1549 "ALSA: isight: fix locking"). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>