Commit Graph

10 Commits

Author SHA1 Message Date
Clemens Ladisch f39d5a88ba 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 <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15 13:35:13 +02:00
Clemens Ladisch cf6f1ff17f ALSA: isight: adjust for new queueing API
Since commit 13882a82ee (optimize iso queueing by setting
wake only after the last packet), drivers are required to call
fw_iso_context_queue_flush() after queueing a batch of packets.
The missing call would have an effect only if the controller
queue underruns, but then the DMA would stop completely.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-17 11:37:29 +02:00
Clemens Ladisch f3f7c1837f ALSA: isight: fix locking
Lockdep complains about conflicts between isight->mutex,
ALSA's register_mutex, mm->mmap_sem, and pcm->open_mutex.

This can be fixed by moving the calls to isight_pcm_abort(),
snd_card_disconnect(), and fw_iso_resources_update() out of
isight->mutex.  These functions are designed to be called
asynchronously; the mutex needs to protect only the device
streaming state modified by isight_start/stop_streaming().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:53:09 +02:00
Clemens Ladisch aee7040018 ALSA: isight: 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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:53:08 +02:00
Stefan Richter ac34dad26e ALSA: isight: wrap up register accesses
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
[cl: removed superfluous variable]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:52:54 +02:00
Stefan Richter 8839eedafd ALSA: isight: add AudioEnable register write
which is needed to get the iSight to talk.

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>
2011-05-11 14:51:20 +02:00
Clemens Ladisch f2934cd499 ALSA: isight: fix divide error when queueing packets
Set the .header_size field when queueing packets to avoid a division by
zero.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:16 +02:00
Clemens Ladisch 898732d1f1 ALSA: isight: fix packet requeueing
After handling a received packet, we want to resubmit the same packet,
so do not increase the packet index too early.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:13 +02:00
Clemens Ladisch 03c29680d4 ALSA: isight: fix isight_pcm_abort() crashes
Fix crashes in isight_pcm_abort() that happen when the driver tries to
access isight->pcm->runtime which does not exist when the device is not
open.  Introduce a new field pcm_active to track this state.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:09 +02:00
Clemens Ladisch 3a691b28a0 ALSA: add Apple iSight microphone driver
This adds an experimental driver for the front and rear microphones of
the Apple iSight web camera.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-11 14:51:05 +02:00