2
* VoiceBus(tm) Interface Library.
4
* Written by Shaun Ruffell <sruffell@digium.com>
5
* and based on previous work by Mark Spencer <markster@digium.com>,
6
* Matthew Fredrickson <creslin@digium.com>, and
7
* Michael Spiceland <mspiceland@digium.com>
9
* Copyright (C) 2007-2009 Digium, Inc.
11
* All rights reserved.
16
* See http://www.asterisk.org for more information about
17
* the Asterisk project. Please do not directly contact
18
* any of the maintainers of this project for assistance;
19
* the project provides a web site, mailing lists and IRC
20
* channels for your use.
22
* This program is free software, distributed under the terms of
23
* the GNU General Public License Version 2 as published by the
24
* Free Software Foundation. See the LICENSE file included with
25
* this program for more details.
29
#ifndef __VOICEBUS_H__
30
#define __VOICEBUS_H__
34
#define VOICEBUS_DEFAULT_LATENCY 3
36
void voicebus_setdebuglevel(struct voicebus *vb, u32 level);
37
int voicebus_getdebuglevel(struct voicebus *vb);
38
struct pci_dev * voicebus_get_pci_dev(struct voicebus *vb);
39
int voicebus_init(struct pci_dev* pdev, u32 framesize,
40
const char *board_name,
41
void (*handle_receive)(void *buffer, void *context),
42
void (*handle_transmit)(void *buffer, void *context),
45
struct voicebus **vb_p);
46
void voicebus_get_handlers(struct voicebus *vb, void **handle_receive,
47
void **handle_transmit, void **context);
48
void voicebus_set_handlers(struct voicebus *vb,
49
void (*handle_receive)(void *buffer, void *context),
50
void (*handle_transmit)(void *buffer, void *context),
52
void voicebus_release(struct voicebus *vb);
53
int voicebus_start(struct voicebus *vb);
54
int voicebus_stop(struct voicebus *vb);
55
void * voicebus_alloc(struct voicebus* vb);
56
void voicebus_free(struct voicebus *vb, void *vbb);
57
int voicebus_transmit(struct voicebus *vb, void *vbb);
58
int voicebus_set_minlatency(struct voicebus *vb, unsigned int milliseconds);
59
int voicebus_current_latency(struct voicebus *vb) ;
61
#endif /* __VOICEBUS_H__ */