3
Sun Audio API driver for Jack
4
Copyright (C) 2008 Jacob Meuser <jakemsr@sdf.lonestar.org>
5
Based heavily on oss_driver.h which came with the following
8
Copyright (C) 2003-2007 Jussi Laako <jussi@sonarnerd.net>
10
This program is free software; you can redistribute it and/or modify
11
it under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28
#ifndef __JACK_SUN_DRIVER_H__
29
#define __JACK_SUN_DRIVER_H__
31
#include <sys/types.h>
33
#include <semaphore.h>
35
#include <jack/types.h>
36
#include <jack/jslist.h>
37
#include <jack/driver.h>
38
#include <jack/jack.h>
41
#define SUN_DRIVER_DEF_DEV "/dev/audio"
42
#define SUN_DRIVER_DEF_FS 48000
43
#define SUN_DRIVER_DEF_BLKSIZE 1024
44
#define SUN_DRIVER_DEF_NPERIODS 2
45
#define SUN_DRIVER_DEF_BITS 16
46
#define SUN_DRIVER_DEF_INS 2
47
#define SUN_DRIVER_DEF_OUTS 2
50
typedef jack_default_audio_sample_t jack_sample_t;
52
typedef struct _sun_driver
56
jack_nframes_t sample_rate;
57
jack_nframes_t period_size;
58
unsigned int nperiods;
61
unsigned int capture_channels;
62
unsigned int playback_channels;
78
jack_time_t poll_last;
79
jack_time_t poll_next;
82
jack_nframes_t sys_in_latency;
83
jack_nframes_t sys_out_latency;
85
JSList *capture_ports;
86
JSList *playback_ports;
88
jack_client_t *client;