PERFORCE change 123607 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Jul 16 18:30:15 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123607
Change 123607 by hselasky at hselasky_mini_itx on 2007/07/16 18:29:26
Apply correct locking for USB audio mixer commands.
Affected files ...
.. //depot/projects/usb/src/sys/dev/sound/usb/uaudio_pcm.c#6 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio_pcm.c#6 (text+ko) ====
@@ -127,14 +127,22 @@
static int
ua_mixer_set(struct snd_mixer *m, unsigned type, unsigned left, unsigned right)
{
+ struct mtx *mtx = mixer_get_lock(m);
+ snd_mtxlock(mtx); /* XXX */
uaudio_mixer_set(mix_getdevinfo(m), type, left, right);
+ snd_mtxunlock(mtx); /* XXX */
return (left | (right << 8));
}
static int
ua_mixer_setrecsrc(struct snd_mixer *m, u_int32_t src)
{
- return uaudio_mixer_setrecsrc(mix_getdevinfo(m), src);
+ struct mtx *mtx = mixer_get_lock(m);
+ int retval;
+ snd_mtxlock(mtx); /* XXX */
+ retval = uaudio_mixer_setrecsrc(mix_getdevinfo(m), src);
+ snd_mtxunlock(mtx); /* XXX */
+ return retval;
}
static int
More information about the p4-projects
mailing list