645ef9ef1f
The usage of the BKL in the OSS sound drivers is trivial, and each of them only locks against itself, so it can be turned into per-driver mutexes. This is the script that was used for the conversion: file=$1 name=$2 if grep -q lock_kernel ${file} ; then if grep -q 'include.*linux.mutex.h' ${file} ; then sed -i '/include.*<linux\/smp_lock.h>/d' ${file} else sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file} fi sed -i ${file} \ -e "/^#include.*linux.mutex.h/,$ { 1,/^\(static\|int\|long\)/ { /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex); } }" \ -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \ -e '/[ ]*cycle_kernel_lock();/d' else sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \ -e '/cycle_kernel_lock()/d' fi Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> |
||
---|---|---|
.. | ||
dmasound | ||
.gitignore | ||
ac97_codec.c | ||
ad1848_mixer.h | ||
ad1848.c | ||
ad1848.h | ||
aedsp16.c | ||
au1550_ac97.c | ||
audio.c | ||
bin2hex.c | ||
CHANGELOG | ||
coproc.h | ||
dev_table.c | ||
dev_table.h | ||
dmabuf.c | ||
hex2hex.c | ||
kahlua.c | ||
Kconfig | ||
Makefile | ||
midi_ctrl.h | ||
midi_synth.c | ||
midi_synth.h | ||
midibuf.c | ||
mpu401.c | ||
mpu401.h | ||
msnd_classic.c | ||
msnd_classic.h | ||
msnd_pinnacle.c | ||
msnd_pinnacle.h | ||
msnd.c | ||
msnd.h | ||
opl3_hw.h | ||
opl3.c | ||
os.h | ||
pas2_card.c | ||
pas2_midi.c | ||
pas2_mixer.c | ||
pas2_pcm.c | ||
pas2.h | ||
pss.c | ||
README.FIRST | ||
sb_audio.c | ||
sb_card.c | ||
sb_card.h | ||
sb_common.c | ||
sb_ess.c | ||
sb_ess.h | ||
sb_midi.c | ||
sb_mixer.c | ||
sb_mixer.h | ||
sb.h | ||
sequencer.c | ||
sh_dac_audio.c | ||
sound_calls.h | ||
sound_config.h | ||
sound_firmware.h | ||
sound_timer.c | ||
soundcard.c | ||
soundvers.h | ||
swarm_cs4297a.c | ||
sys_timer.c | ||
trix.c | ||
tuning.h | ||
uart401.c | ||
uart6850.c | ||
ulaw.h | ||
v_midi.c | ||
v_midi.h | ||
vidc_fill.S | ||
vidc.c | ||
vidc.h | ||
vwsnd.c | ||
waveartist.c | ||
waveartist.h |
The modular sound driver patches were funded by Red Hat Software (www.redhat.com). The sound driver here is thus a modified version of Hannu's code. Please bear that in mind when considering the appropriate forums for bug reporting. Alan Cox