diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-03 17:16:28 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 14:05:53 -0300 |
commit | b17b86991a6a17560ddd97ed9a970fc38427217d (patch) | |
tree | 53cc71594e1b762d4977b5a98fb9ace969e7f4b8 /drivers/staging/tm6000/tm6000-core.c | |
parent | V4L/DVB: tm6000: Use an enum for extension type (diff) | |
download | linux-dev-b17b86991a6a17560ddd97ed9a970fc38427217d.tar.xz linux-dev-b17b86991a6a17560ddd97ed9a970fc38427217d.zip |
V4L/DVB: tm6000: Add a callback code for buffer fill
Implements a callback to be used by tm6000-alsa, in order to allow filling
audio data packets.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/tm6000/tm6000-core.c')
-rw-r--r-- | drivers/staging/tm6000/tm6000-core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 3d66f9bbfc59..6ddb7465a40c 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -653,6 +653,23 @@ void tm6000_add_into_devlist(struct tm6000_core *dev) static LIST_HEAD(tm6000_extension_devlist); static DEFINE_MUTEX(tm6000_extension_devlist_lock); +int tm6000_call_fillbuf(struct tm6000_core *dev, enum tm6000_ops_type type, + char *buf, int size) +{ + struct tm6000_ops *ops = NULL; + + /* FIXME: tm6000_extension_devlist_lock should be a spinlock */ + + if (!list_empty(&tm6000_extension_devlist)) { + list_for_each_entry(ops, &tm6000_extension_devlist, next) { + if (ops->fillbuf && ops->type == type) + ops->fillbuf(dev, buf, size); + } + } + + return 0; +} + int tm6000_register_extension(struct tm6000_ops *ops) { struct tm6000_core *dev = NULL; |