Skip to contentSkip to conversation

ALSA locking bug...

DISCUSSION Jeff Garzik 1 participant 1 message Feb 16, 2002

lore
Share & tools
lore
#0 lore raw

Andrew spotted this one... ALSA needs to be using a standard kernel primitive... semaphore maybe? :)

include/sound/core.h:

Quoted 9 lines

static inline void snd_power_lock(snd_card_t *card, int can_schedule)

{
        while (test_and_set_bit(0, &card->power_lock)) {
                if (can_schedule) {
                        set_current_state(TASK_INTERRUPTIBLE);
                        schedule_timeout(1);
                }
        }
}

Thanks much for all the ALSA work, as a [former] audio driver hacker, it is a relief in many ways :)

Jeff

Signature · 4 lines
Jeff Garzik      | "Why is it that attractive girls like you
Building 1024    |  always seem to have a boyfriend?"
MandrakeSoft     | "Because I'm a nympho that owns a brewery?"
                 |             - BBC TV show "Coupling"