]> git.hungrycats.org Git - linux/commit
[PATCH] trident OSS sound driver fixes
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:37:05 +0000 (18:37 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:37:05 +0000 (18:37 -0800)
commit0d7bcc300c5d164aa98a0be54b099faaac898af5
treea2b75e9d40665bef2ededc3149fcb2b2dea08fe2
parentcb2b15d1e1af3b2661c3a662e07fa3fb6b68e4af
[PATCH] trident OSS sound driver fixes

From: Muli Ben-Yehuda <mulix@mulix.org>

- switch lock_set_fmt() and unlock_set_fmt() from macros to inline
  functions.  Macros that call return() are EVIL.

- simplify lock_set_fmt() and implement it via test_and_set_bit() rather
  than a spinlock protecting an int.

- fix a bug wherein we would do an up() on a semaphore that hasn't been
  down()ed if a signal happened after timeout in trident_write().

- fix a bug where we would not release the open_sem on OOM.

- make the arguments for prog_dmabuf clearer (int -> enum), and add two
  wrapper functions around it, one for record and one for playback.

- fix a bug where we would call VALIDATE_STATE after lock_kernel().  Since
  VALIDATE_STATE does 'return' if validation fails, bad things can happen.
  Thanks to Dawson Engler <engler@stanford.edu> and the Stanford checker for
  spotting.

- remove the calls to lock_kernel() from trident_release() and
  trident_mmap().  trident_release() appears to be covered by the open_sem,
  and trident_mmap() is covered by state->sem.

- s/TRUE/1/, s/FALSE/0/
sound/oss/trident.c
sound/oss/trident.h