~ubuntu-branches/ubuntu/wily/oss4/wily

« back to all changes in this revision

Viewing changes to kernel/drv/oss_userdev/userdev.h

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis, Samuel Thibault, Romain Beauxis, Sebastien NOEL
  • Date: 2011-06-14 10:06:56 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110614100656-cx4oc7u426zn812z
Tags: 4.2-build2004-1
[ Samuel Thibault ]
* debian/control: Add liboss4-salsa2, liboss4-salsa-dev and
  liboss4-salsa-asound2 packages, equivalent to (and will replace) those from
  the oss-libsalsa package (Closes: #589127).
* debian/patches/liboss4-salsa.patch: New patch to rename libsalsa into
  liboss4-salsa to avoid conflicts in the archive for no good reason.
* debian/rules: Make in libOSSlib and libsalsa.
* debian/liboss4-salsa-dev.install, debian/liboss4-salsa2.install,
  debian/liboss4-salsa-asound2.links, debian/liboss4-salsa-dev.links:
  Install liboss4-salsa libraries like was done in the oss-libsalsa package.
* include-alsa: Add a copy of ALSA 1.0.5 headers: Cf ALSA_1.0.* symbols in
  libsalsa, this is the roughly supported version.
* debian/copyright: Update for new include-alsa files.
* alsa.pc: New file for compatibility with libasound-dev.
* debian/control:
  - Add Vcs-Browser and Vcs-Svn fields.
  - Use linux-any instead of the list of Linux archs (Closes: #604679).
  - Make dkms dependency linux-any only.
* debian/patches/hurd_iot.patch: New patch to fix soundcard.h usage in
  libsalsa on hurd-i386.
* debian/patches/libsalsa_fixes.patch: New patch to fix some printf usages
  and ioctl declaration in libsalsa.
* debian/patches/no_EBADE.patch: New patch to cope with hurd-i386 not having
  EBADE.
* debian/patches/CFLAGS.patch: New patch to make oss4 take debian/rules
  CFLAGS into account.
* debian/patches/snd_asoundlib_version.patch: New patch to add
  snd_asoundlib_version().
* debian/patches/generic_srccconf.patch: New patch to fix source
  configuration on unknown archs.

[ Romain Beauxis ]
* Fixed README.Debian to only mention dkms' modules.
* Switch to dpkg-source 3.0 (quilt) format
* Added DM-Upload-Allowed: yes

[ Sebastien NOEL ]
* New upstream release (Closes: #595298, #619272).
* Fix typo in initscript (Closes: #627149).
* debian/control: adjust linux-headers dependencies (Closes: #628879).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Purpose: Definition file for the oss_userdev driver
 
3
 *
 
4
 */
 
5
/*
 
6
 *
 
7
 * This file is part of Open Sound System.
 
8
 *
 
9
 * Copyright (C) 4Front Technologies 1996-2008.
 
10
 *
 
11
 * This this source file is released under GPL v2 license (no other versions).
 
12
 * See the COPYING file included in the main directory of this source
 
13
 * distribution for the license terms and conditions.
 
14
 *
 
15
 */
 
16
#define MAX_RATE        192000
 
17
#define MAX_CHANNELS    64
 
18
#define SUPPORTED_FORMATS       (AFMT_S16_NE|AFMT_S32_NE)
 
19
 
 
20
typedef struct _userdev_devc_t userdev_devc_t;
 
21
typedef struct _userdev_portc_t userdev_portc_t;
 
22
 
 
23
struct _userdev_portc_t
 
24
{
 
25
  userdev_devc_t *devc;
 
26
  userdev_portc_t *peer;
 
27
  int audio_dev;
 
28
  int open_mode;
 
29
  int port_type;
 
30
#define PT_CLIENT       1
 
31
#define PT_SERVER       2
 
32
 
 
33
  /* State variables */
 
34
  int input_triggered, output_triggered;
 
35
};
 
36
 
 
37
struct _userdev_devc_t
 
38
{
 
39
  oss_device_t *osdev;
 
40
  int active;
 
41
  oss_mutex_t mutex;
 
42
 
 
43
  int open_count;       /* 0=not in use, 2=both client and server in use */
 
44
 
 
45
  int create_flags;     /* Flags from ioctl(USERDEV_CREATE_INSTANCE) */
 
46
 
 
47
  unsigned int poll_ticks; /* Number of clock tickes (OSS_HZ) between polls. */
 
48
 
 
49
  unsigned int match_method;
 
50
  unsigned int match_key;
 
51
  int mixer_dev;
 
52
 
 
53
  userdev_devc_t *next_instance;
 
54
 
 
55
  int rate;
 
56
  int channels;
 
57
  unsigned int fmt, fmt_bytes;
 
58
  timeout_id_t timeout_id;
 
59
 
 
60
  userdev_portc_t client_portc;
 
61
  userdev_portc_t server_portc;
 
62
 
 
63
  /*
 
64
   * Mixer related fields
 
65
   */
 
66
  int modify_counter;
 
67
  int mixer_values[USERDEV_MAX_MIXERS];
 
68
};
 
69
 
 
70
extern oss_device_t *userdev_osdev;
 
71
extern oss_mutex_t userdev_global_mutex;
 
72
extern userdev_devc_t *userdev_active_device_list;
 
73
extern userdev_devc_t *userdev_free_device_list;
 
74
 
 
75
extern int userdev_create_device_pair(void);
 
76
extern void userdev_delete_device_pair(userdev_devc_t *devc);
 
77
extern int usrdev_find_free_device_pair(void);
 
78
extern void userdev_reinit_instance(userdev_devc_t *devc);
 
79
 
 
80
extern char *userdev_client_devnode;
 
81
extern char *userdev_server_devnode;