~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to include/oss_userdev_exports.h

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Purpose: Definitions for server applications using the oss_userdev driver.
 
3
 *
 
4
 * This file is part of the oss_userdev driver included in Open Sound
 
5
 * System. However this file is not part of the OSS API. 
 
6
 *
 
7
 * The ioctl calls defined in this file can only be used in dedicated server
 
8
 * applications that provide virtual audio device services to other
 
9
 * applications. For example the userdev driver can be used to create virtual
 
10
 * audio device that connects to the actual soundcard in another system
 
11
 * over internet.
 
12
 *
 
13
 * Applications that use the client devices will use only the OSS ioctl calls
 
14
 * defined in soundcard.h. They cannot use anything from this file.
 
15
 */
 
16
 
 
17
#ifndef OSS_USERDEV_EXPORTS_H
 
18
#define OSS_USERDEV_EXPORTS_H
 
19
/*
 
20
 *
 
21
 * This file is part of Open Sound System.
 
22
 *
 
23
 * Copyright (C) 4Front Technologies 1996-2008.
 
24
 *
 
25
 * This this source file is released under GPL v2 license (no other versions).
 
26
 * See the COPYING file included in the main directory of this source
 
27
 * distribution for the license terms and conditions.
 
28
 *
 
29
 */
 
30
 
 
31
typedef struct
 
32
{
 
33
        char name[50]; /* Audio device name to be shown to the users */
 
34
        unsigned int flags; /* Not suported for the time being */
 
35
#define USERDEV_F_VMIX_ATTACH           0x00000001      /* Attach vmix */
 
36
#define USERDEV_F_VMIX_PRECREATE        0x00000002      /* Precreate vmix channels */
 
37
#define USERDEV_F_ERROR_ON_NO_CLIENT    0x00000004      /* Return EIO from server read/write if no client is connected. */
 
38
#define USERDEV_F_VMIX_PRIVATENODE      0x00000008      /* Create private device file for the client */
 
39
 
 
40
        oss_devnode_t devnode;  /* Returns the device file name that clients should open */
 
41
 
 
42
        unsigned int match_method;
 
43
#define UD_MATCH_ANY                    0
 
44
#define UD_MATCH_UID                    1
 
45
#define UD_MATCH_GID                    2
 
46
#define UD_MATCH_PGID                   3
 
47
        unsigned int match_key;
 
48
 
 
49
        /*
 
50
         * Poll interval in milliseconds. Poll interval determines
 
51
         * the fragment size to be used by the device.
 
52
         */
 
53
        unsigned int poll_interval;
 
54
} userdev_create_t;
 
55
 
 
56
#define USERDEV_MAX_MIXERS      64
 
57
 
 
58
typedef struct
 
59
{
 
60
        char name[16];
 
61
        int parent;
 
62
        int num;        /* Return parameter */
 
63
} userdev_mixgroup_t;
 
64
 
 
65
typedef struct
 
66
{
 
67
        char name[16];
 
68
        int parent;
 
69
        int num;        /* Return parameter */
 
70
 
 
71
        int type;       /* MIXT_* */
 
72
        int flags;      /* MIXF_* */
 
73
        int index;      /* Index to the values[] array */
 
74
        int maxvalue;
 
75
        int offset;
 
76
        char enum_choises[2048];
 
77
        unsigned char enum_present[32]; /* Mask of allowed enum values */
 
78
        int control_no;         /* SOUND_MIXER_VOLUME..SOUND_MIXER_MIDI */
 
79
        int rgbcolor;           /* OSS_RGB_* */
 
80
} userdev_mixctl_t;
 
81
 
 
82
typedef struct
 
83
{
 
84
        int values[USERDEV_MAX_MIXERS];
 
85
} userdev_mixvalues_t;
 
86
 
 
87
#define USERDEV_CREATE_INSTANCE         __SIOWR('u', 1, userdev_create_t)
 
88
#define USERDEV_GET_CLIENTCOUNT         __SIOR ('u', 2, int)
 
89
 
 
90
#define USERDEV_CREATE_MIXGROUP         __SIOWR('u', 3, userdev_mixgroup_t)
 
91
#define USERDEV_CREATE_MIXCTL           __SIOWR('u', 4, userdev_mixctl_t)
 
92
#define USERDEV_GET_MIX_CHANGECOUNT     __SIOWR('u', 5, int)
 
93
#define USERDEV_SET_MIXERS              __SIOWR('u', 6, userdev_mixvalues_t)
 
94
#define USERDEV_GET_MIXERS              __SIOWR('u', 7, userdev_mixvalues_t)
 
95
 
 
96
#endif