summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-alsa.h
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2010-01-30 14:27:29 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 15:10:50 -0300
commit83695009a439b86c520f9001c80cc5a042c2d940 (patch)
tree8519852135e4f1980114c5527092f070d0223bd6 /drivers/media/video/cx18/cx18-alsa.h
parent10e43d90da572f088f15cadfb5cc83cd762041c3 (diff)
V4L/DVB: cx18: Rename snd_cx18_mixer_lock to snd_cx18_lock and increase visibility
Rename snd_cx18_mixer_lock() to snd_cx18_lock() in anticpation of using it in the cx18-alsa-pcm.c file routines. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-alsa.h')
-rw-r--r--drivers/media/video/cx18/cx18-alsa.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-alsa.h b/drivers/media/video/cx18/cx18-alsa.h
index 2546779b731..88a1cde7540 100644
--- a/drivers/media/video/cx18/cx18-alsa.h
+++ b/drivers/media/video/cx18/cx18-alsa.h
@@ -32,6 +32,22 @@ struct snd_cx18_card {
extern int cx18_alsa_debug;
+/*
+ * File operations that manipulate the encoder or video or audio subdevices
+ * need to be serialized. Use the same lock we use for v4l2 file ops.
+ */
+static inline void snd_cx18_lock(struct snd_cx18_card *cxsc)
+{
+ struct cx18 *cx = to_cx18(cxsc->v4l2_dev);
+ mutex_lock(&cx->serialize_lock);
+}
+
+static inline void snd_cx18_unlock(struct snd_cx18_card *cxsc)
+{
+ struct cx18 *cx = to_cx18(cxsc->v4l2_dev);
+ mutex_unlock(&cx->serialize_lock);
+}
+
#define CX18_ALSA_DBGFLG_WARN (1 << 0)
#define CX18_ALSA_DBGFLG_WARN (1 << 0)
#define CX18_ALSA_DBGFLG_INFO (1 << 1)