1
0
Fork 0
Commit Graph

79 Commits (57ebbcafab0ce8cce4493c6a243ecdd7066e6ef1)

Author SHA1 Message Date
Takashi Iwai 06b45f00a4 ALSA: firewire: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14 08:13:31 +01:00
Dan Carpenter 4d6ff25085 ALSA: dice: fix array limits in dice_proc_read()
The array limits are supposed to be in units of u32 instead of in bytes.
The current code has a potential array overflow.

Fixes: c614475b0e ('ALSA: dice: add a proc file to show device information')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-29 10:23:04 +01:00
Takashi Iwai 049da9e8f8 Merge branch 'fix/firewire' into for-linus 2013-11-26 18:37:40 +01:00
Linus Torvalds e48f88a30d sound fixes #2 for 3.13-rc1
A collection of small fixes in HD-audio quirks and runtime PM, ASoC
 rcar, abs8500 and other codecs.  Most of commits are for stable
 kernels, too.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJSj0b6AAoJEGwxgFQ9KSmkPikP/RxVJr4XnKFXFVmRx/5W+GeL
 185TPqE6d0aS/+99+cVmUSG3m1X2AMsFWN4aStmttwNl8TqVW9KSpeOOAeP0nOHW
 vraV37A8Bfe5gjx2CGRTWzqmC+IjCPJ9foXc6zfFBFeJj0CYWJ7+RE2P6eHSCAFf
 2YDVYNKtvjaqg6sL7ngD3i3ubX0+WRAjqd27XS3sPSpQz4Ah2Uw2TPpExREcGy1x
 DgyX9XjTO5ChDnLvRe9FiLlFaiziUp97a7ueuMQMs9z/1ERCOLWOsY+dO/fk7Dg1
 RHkIz5yRuoVliPbJPqysuwG5c12b+eb2LJQyTqWiP4raG+83ZwejAs0+oMGBa015
 EHqxOJ7aJ2LFHUTUgioHjqGIS6aqIoFW5OaG3lKjjTPd3HlriojjQ/Vnm2kuFHQ2
 nZ8s1tNhnQwei5BNY7oZJPMMOB92Z11EuJfDtSscDGGUqiPNb2rubt0icULp1rOd
 RXjvpPR4Iw88Zsf8yXKBtE8VvH+GcqL18RfHS6TyM/apMY/5EftDGPA+OGl6YG7q
 UYdcyspg9RDexlww6/kL5b40I5JUQIZATjsReSrW/p6f4ze+4A9ZDAR0bucge1hr
 yHwPvrQ3x1DrpAyTCOzXvBujbidjUbN0hCxtHeSAyC6qmRtzUA+G1rGPaXgcCuMz
 oIfsn4cSGggRGYqlzxuf
 =zoMb
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull second set of sound fixes from Takashi Iwai:
 "A collection of small fixes in HD-audio quirks and runtime PM, ASoC
  rcar, abs8500 and other codecs.  Most of commits are for stable
  kernels, too"

* tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)
  ALSA: hda - Provide missing pin configs for VAIO with ALC260
  ALSA: hda - Add headset quirk for Dell Inspiron 3135
  ALSA: hda - Fix the headphone jack detection on Sony VAIO TX
  ALSA: hda - Fix missing bass speaker on ASUS N550
  ALSA: hda - Fix unbalanced runtime PM notification at resume
  ASoC: arizona: Set FLL to free-run before disabling
  ALSA: hda - A casual Dell Headset quirk
  ASoC: rcar: fixup dma_async_issue_pending() timing
  ASoC: rcar: off by one in rsnd_scu_set_route()
  ASoC: wm5110: Add post SYSCLK register patch for rev D chip
  ASoC: ab8500: Revert to using custom I/O functions
  ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup
  ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t
  ALSA: hda - Select FW_LOADER from CONFIG_SND_HDA_CODEC_CA0132_DSP
  ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Realtek codec
  ASoC: rcar: fixup mod access before checking
2013-11-22 10:57:31 -08:00
Takashi Sakamoto 82755abfe8 ALSA: firewire-lib: fix wrong value for FDF field as an empty packet
This commit fix out of specification about the value of FDF field in out packet
with 'no data'. This affects blocking mode.

According to IEC 61883-6, there is two way to generate AMDTP packets include no
data in blocking mode.

Way 1. an empty packet defined in IEC 61883-1
 - Size of packet is 2 quadlets.
 - The value of FDF is sfc.
 - The packet includes only CIP headers

Way 2. a special non-empty packet defined in IEC 61883-6
 - Size of packet is following to blocking mode
 - The value of FDF is 0xff. This value is 'NO-DATA'. This means 'The receiver'
   must ignore all the data in a CIP with this FDF code'.
 - The packet includes dummy data.

But current implementation is a combination of them.
 - Size of packet is 2 (way 1)
 - FDF = 0xff (way 2)
This causes BeBoB chipset cannot sound.

This patch applies Way 1.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-22 15:30:46 +01:00
Takashi Sakamoto 777fb574a5 ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t
'snd_pcm_format_t' is used by amdtp_out_stream_set_pcm_format().

Currently, when just including amdtp.h, compiler cannot find this type because
this type is defined in uapi/sound/asound.h and this header is not included by
amdtp.h.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-19 08:07:20 +01:00
Wolfram Sang 16735d022f tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.

[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:21 +09:00
Takashi Iwai 861e66d341 Merge branch 'dice-driver-playback-only' of git://git.alsa-project.org/alsa-kprivate into for-next 2013-10-22 10:02:57 +02:00
Clemens Ladisch b20be8de1b ALSA: dice: restrict the driver to playback-only devices
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-20 22:07:57 +02:00
Clemens Ladisch a471fcde8c 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 <rolf.anderegg@weiss.ch>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch ed7e48264c 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 61b8cf0222 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch c614475b0e 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 640d9b421d ALSA: dice: check clock change timeout
Output a warning if the wait for the clock change notification times
out.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 4edeb831f3 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 15a75c8bed 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 5ea4018e43 ALSA: dice: allow notifications during initialization
Reorganize the initialization order so that the driver can receive
notifications earlier.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch a0301998ae 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch c5280e996f ALSA: dice: make amdtp_rates[] const
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Stefan Richter a8c558f6a3 ALSA: dice: fix locking
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-20 22:07:57 +02:00
Clemens Ladisch 8709f1e4d6 ALSA: dice: remove superfluous field
The pcm field was not actually used.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 435a9be8bd ALSA: dice: remove 10s period length limit
Since commit f2b3614cef (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-20 22:07:57 +02:00
Clemens Ladisch eadce07faa 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 1b70485f13 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch a644a9473f 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch a7304e3bf0 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch cbab328ddc 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 54e72f0ba3 ALSA: dice: reorganize interface definitions
Move the DICE interface symbols into a separate header file, and add
more documentation.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 20b65dd040 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 9dd81e3143 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 0c29c9180f ALSA: dice: implement hwdep device
Implement the hwdep locking and notification mechanisms.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 4ed31f20bb 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch e84d15f619 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch d13109673a ALSA: dice: reduce noisy logging
The notification bits are not of general interest; log them only when
debugging.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 341682cd4f 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 6abce9e63d 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 <clemens@ladisch.de>
2013-10-20 22:07:57 +02:00
Clemens Ladisch 82fbb4f7b4 ALSA: add DICE driver
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-10-17 21:18:32 +02:00
Takashi Sakamoto e84841f9ba ALSA: firewire-lib: use inlune function to calculate frame bytes
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-09-26 10:36:52 +02:00
Takashi Iwai a067c035a0 Merge branch 'for-3.12' into for-next 2013-07-15 12:09:28 +02:00
Linus Torvalds bb93109e15 IEEE 1394 (FireWire) subsystem changes post v3.10:
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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQIcBAABAgAGBQJR2Sb3AAoJEHnzb7JUXXnQqqcQAOY/01VNTih1BuTnuDDtKQdq
 DQ9aO7zBc/aFY0baImrmbaZ7KUlwKKrFNaQMI63gj/ESyGIK6njRgPIS2I0eQSL1
 Wb+4FXsOqtyXlRnL2eCHOl0o5ZrVyZD/ZDpBh+AxTl7nZYM5hX1ARDSeRX4SD/og
 KWTrSV6GtTijJaTGLQ+d5AY5QndT754LvgRcqVStsL2/pt3aeCpuIEAo6osXrD7u
 IsaJS7FSmrNnOKQFA7JFJVvBLyF+xxjNW/XQAnZ5NGbLOmB9jnyCKjOk9YE97/Sb
 qAacO3FEo7GUT5qksV/awuaGZpIfWEVCb9oD3heui1F0XSxrPUq8RXTJHa/g/BK7
 q2feV1lv9ZAJWjLTePlB4TNgym+oVr1OqhsspHnM7mHhALKZwbDmDusxkFK8EH7P
 v7WNBwyik03qY3A6mgbTxUKcmiem9maCcyE1acPnHFqch0QafILwK6qPQb1oMG5Y
 BDdRNCXxNLGMasRsMDvKabHhs1u+KZ4/qUwooKdLbRL/WJuRHVU+UveTQ2f+90HY
 0UEgplUfphrX9QyWqm7NHxwxVW83NnihcgkDgdVw77ARblJDYB5nLyqS1eIYF6xa
 59h0b3DDM7SaaGVS9niOuwz9p8ZdXNY2VKn+byA5zyy/xNB06KVXlDydEXV2G7mv
 HZqMzX54d6zdf51v/UgT
 =8MqX
 -----END PGP SIGNATURE-----

Merge tag 'firewire-updates' of 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-10 11:02:58 -07:00
Takashi Sakamoto b6c44f4182 ALSA: firewire-speakers: remove not-reused member from structure
"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-07-10 17:50:58 +02:00
Takashi Sakamoto f02fe86199 ALSA: snd-firewire-lib: remove unused header inclusion
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-25 09:46:03 +02:00
Wei Yongjun 1389fd03b7 ALSA: firewire: fix error return code in scs_probe()
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-18 16:11:57 +02:00
Stefan Richter 94a87157cd firewire: introduce fw_driver.probe and .remove methods
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/)
2013-06-09 18:15:00 +02:00
Bill Pemberton 325fbfe090 ALSA: firewire-speakers: remove __dev* attributes
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-12-07 07:29:30 +01:00
Clemens Ladisch 1999c3a035 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 <spappalardo@mixxx.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2012-11-12 11:45:35 +01:00
Linus Torvalds 2f78d8e249 IEEE 1394 (FireWire) subsystem updates post v3.4:
- 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
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (GNU/Linux)
 
 iQIcBAABAgAGBQJPvoOWAAoJEHnzb7JUXXnQpG4P/j4u9kU+MDegDrRsAzZBdP+6
 in2FW8opUzSXZyLSzU/JYcO7P0luEEdLIE65fkaVRbP1x6m7aAjgaAO/0zbqZQPD
 QVyIAOPa8zcbEIi1cEnI75KU/AMyQpMk/eU9Et4FrbQszgyFvJNe+hS+MocMooPt
 vukqmWJuIPfH/G3FsX0eQWEXS7GktkYxmLJM/k6z4JpngAVmelM/Ce45VFg7tbN+
 IeV5N7+FF4zKmwgiKIpkw5tSO6If7mjoQQVH/Q8DiHJDhFlDUrKR9/TvaJesVtEg
 5n97BbfvXc8mu6EE8lbl1ats2R1I00JDpMylHPt4J6G1XDjb1/GvqSjXYXwPT77J
 O4xZwqT4C5JKnG9h2a4npf6PgDHBbMnUK9cDBxfA5ZPkTeZmGXWuP05zYJqeNJm9
 UrEusEjzEEspVWFqxOD+2/YLF/0rxqA/P1C7Luuw7Y9nIcCt3VskuW6iebYuf5Dk
 yNoykYVph8zDJE+Am7jtsgNCPfd4TomFttjMcc/0EVqNa1iVO/AuLlvYv+Ab75oU
 BpOUEg8Pq9nQeya3XjM585R0rF4PG5wsVrBe2ZzJ+cqNe6JH264/YuBgFv1bkUg3
 UtHNIG633KAk71P1jl7PeuvAQksLnCYak2JOviZ/oB79Yamoxifhcm4mNkwTeCv7
 paRqDNAzoaThqvqx723E
 =fulr
 -----END PGP SIGNATURE-----

Merge tag 'firewire-updates' of 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-24 12:57:47 -07:00
Clemens Ladisch 92b862c7d6 ALSA: firewire-lib: optimize packet flushing
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-14 10:43:43 +02:00
Clemens Ladisch e9148dddc3 ALSA: firewire-lib: flush completed packets when reading PCM position
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-14 10:43:36 +02:00
Clemens Ladisch 76fb878948 ALSA: firewire-lib: taskletize the snd_pcm_period_elapsed() call
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-05-14 10:43:30 +02:00