~ubuntu-branches/ubuntu/trusty/jack-audio-connection-kit/trusty

« back to all changes in this revision

Viewing changes to drivers/sun/sun_driver.h

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-12-06 11:05:15 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20081206110515-xa9v9pajr9jqvfvg
Tags: 0.115.6-1ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  - Redirect stderr in bash completion (Debian #504488).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 
 
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
 
6
        copyright notice.
 
7
 
 
8
        Copyright (C) 2003-2007 Jussi Laako <jussi@sonarnerd.net>
 
9
 
 
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.
 
14
 
 
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.
 
19
 
 
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,
 
23
        MA  02111-1307  USA
 
24
 
 
25
*/
 
26
 
 
27
 
 
28
#ifndef __JACK_SUN_DRIVER_H__
 
29
#define __JACK_SUN_DRIVER_H__
 
30
 
 
31
#include <sys/types.h>
 
32
#include <pthread.h>
 
33
#include <semaphore.h>
 
34
 
 
35
#include <jack/types.h>
 
36
#include <jack/jslist.h>
 
37
#include <jack/driver.h>
 
38
#include <jack/jack.h>
 
39
 
 
40
 
 
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
 
48
 
 
49
 
 
50
typedef jack_default_audio_sample_t jack_sample_t;
 
51
 
 
52
typedef struct _sun_driver
 
53
{
 
54
        JACK_DRIVER_NT_DECL
 
55
 
 
56
        jack_nframes_t sample_rate;
 
57
        jack_nframes_t period_size;
 
58
        unsigned int nperiods;
 
59
        int bits;
 
60
        int sample_bytes;
 
61
        unsigned int capture_channels;
 
62
        unsigned int playback_channels;
 
63
 
 
64
        char *indev;
 
65
        char *outdev;
 
66
        int infd;
 
67
        int outfd;
 
68
        int format;
 
69
        int ignorehwbuf;
 
70
 
 
71
        size_t indevbufsize;
 
72
        size_t outdevbufsize;
 
73
        size_t portbufsize;
 
74
        void *indevbuf;
 
75
        void *outdevbuf;
 
76
 
 
77
        int poll_timeout;
 
78
        jack_time_t poll_last;
 
79
        jack_time_t poll_next;
 
80
        float iodelay;
 
81
 
 
82
        jack_nframes_t sys_in_latency;
 
83
        jack_nframes_t sys_out_latency;
 
84
 
 
85
        JSList *capture_ports;
 
86
        JSList *playback_ports;
 
87
 
 
88
        jack_client_t *client;
 
89
 
 
90
        int playback_drops;
 
91
        int capture_drops;
 
92
 
 
93
} sun_driver_t;
 
94
 
 
95
 
 
96
#endif
 
97