Archived
14
0
Fork 0
Commit graph

11 commits

Author SHA1 Message Date
Takashi Iwai
eea0579fc8 ALSA: pcsp - Fix starting the stream with HRTIMER_CB_IRQSAFE_UNLOCK
With the callback mode HRTIMER_CB_IRQSAFE_UNLOCK, the start of the
stream with zero delay doesn't work.  Since IRQSAFE mode is removed,
we have to change the pcsp start-up code.

This patch splits the callback function to two parts, the triggering
of the port and the calculation of the expire time, and the update of
the ALSA PCM core.  The first part is called both from the trigger-start
and the hrtimer callback while the latter is handled only in the
hrtimer callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-26 14:13:03 +01:00
Takashi Iwai
e7dd8c1bda Merge branch 'topic/misc' into topic/pcsp-fix
Conflicts:
	sound/drivers/pcsp/pcsp_lib.c
2008-11-26 14:12:42 +01:00
Takashi Iwai
96c7d478ef ALSA: pcsp - Fix locking messes in snd-pcsp
snd-pcsp driver takes chip->substream_lock together with PCM substream
lock.  These are even mixed up with hrtimer's lock, resulting in messy
lock depencies.  Right now, snd-pcsp driver resolves the deadlock by
using HRTIMER_CB_SOFTIRQ.  However, this isn't nice for a really fast
path like bit-flipping.

This patch introduces a tasklet for PCM period handling so that the
hrtimer callback can be handled fast.  This also reduce the use of
chip->substream_lock to avoid deadlocks.  It's still used in pointer
callback, but even this could be removed with a proper barrier.

Another good solution is to introduce async trigger callback.  But,
this will involve with a major rewrite of the PCM core code, so I
take first this easy fix.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-20 14:47:15 +02:00
Arjan van de Ven
5c73a7d041 hrtimer: convert sound/ to the new hrtimer apis
In order to be able to do range hrtimers we need to use accessor functions
to the "expire" member of the hrtimer struct.
This patch converts sound/ to these accessors.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
2008-09-05 21:35:23 -07:00
Stas Sergeev
4b7afb0d0d snd-pcsp: use HRTIMER_CB_SOFTIRQ
Change HRTIMER_CB_IRQSAFE to HRTIMER_CB_SOFTIRQ,
as suggested by Thomas Gleixner.
That solves the lock dependancy reported in
Bug #10701.
That also allows to call hrtimer_start()
directly, tasklet "stupid hack" removed.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-20 11:56:24 +02:00
Stas Sergeev
42ece6c1f8 snd-pcsp: silent misleading warning
It appears that alsa allows a sound buffer with size not
evenly devided by the period size. This triggers a warning in
snd-pcsp and floods the log. As a quick fix, the warning should
be disabled.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-19 12:06:44 +02:00
Stas Sergeev
4dfd79546d snd-pcsp: put back the compatibility code for the older alsa-libs
The attached patch adds back the compatibility code, allowing the
driver to work with older alsa-libs.
The removal was premature, it breaks the real-life configs.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-05-19 12:06:25 +02:00
Stas Sergeev
c81d80cbf6 [ALSA] pcsp: remove downsampling
pcsp: remove S16->U8 downsampling as dmix now supports U8 natively.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Stas Sergeev
1bc1f30565 [ALSA] pcsp: locking fix
pcsp: locking fix.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Stas Sergeev
a91605b86a [ALSA] pcsp - clean ups
- make pcsp_start_timer_tasklet static
- remove redundant includes. <asm/i8253.h> is not available on all platforms.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Stas Sergeev
9ab4d072ad [ALSA] Add PC-speaker sound driver
Added PC-speaker sound driver (snd-pcsp).

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00