summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-10-10 14:00:47 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-10-10 14:00:47 +0000
commit63d96f858b3c4ae806dc19ebcf66e5bac7777a63 (patch)
tree3e633fee227ec1298a0a412a5c9f387780b48f04 /sys/dev/pci/azalia.c
parentff283259e9a1b32d31553b40c1b4e068fd410882 (diff)
missing spl() for codec command setting/retrieval
from NetBSD via Alexey Suslikov, thanks "looks good" ratchov@
Diffstat (limited to 'sys/dev/pci/azalia.c')
-rw-r--r--sys/dev/pci/azalia.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 293d3d7cb9d..a00295d8294 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.55 2008/09/24 19:09:05 chl Exp $ */
+/* $OpenBSD: azalia.c,v 1.56 2008/10/10 14:00:46 jakemsr Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -1473,12 +1473,16 @@ int
azalia_codec_comresp(const codec_t *codec, nid_t nid, uint32_t control,
uint32_t param, uint32_t* result)
{
- int err;
+ int err, s;
+ s = splaudio();
err = azalia_set_command(codec->az, codec->address, nid, control, param);
if (err)
- return err;
- return azalia_get_response(codec->az, result);
+ goto exit;
+ err = azalia_get_response(codec->az, result);
+exit:
+ splx(s);
+ return err;
}
int