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

« back to all changes in this revision

Viewing changes to attic/drv/oss_vortex/vortex.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 the Vortex driver
 
3
 */
 
4
/*
 
5
 *
 
6
 * This file is part of Open Sound System.
 
7
 *
 
8
 * Copyright (C) 4Front Technologies 1996-2008.
 
9
 *
 
10
 * This this source file is released under GPL v2 license (no other versions).
 
11
 * See the COPYING file included in the main directory of this source
 
12
 * distribution for the license terms and conditions.
 
13
 *
 
14
 */
 
15
#include "oss_vortex_cfg.h"
 
16
#include "midi_core.h"
 
17
#include <ac97.h>
 
18
#include <oss_pci.h>
 
19
 
 
20
#define MAX_PORTC 2
 
21
 
 
22
typedef struct
 
23
{
 
24
  int open_mode;
 
25
  int speed, bits, channels;
 
26
  int voice_chn;
 
27
  int audio_enabled;
 
28
  int trigger_bits;
 
29
  int audiodev;
 
30
}
 
31
vortex_portc;
 
32
 
 
33
 
 
34
typedef struct vortex_devc
 
35
{
 
36
  oss_device_t *osdev;
 
37
  unsigned int bar0addr;
 
38
  unsigned int *bar0virt;
 
39
  volatile unsigned int *dwRegister;
 
40
  unsigned int bar0_size;
 
41
  int irq;
 
42
  char *name;
 
43
  int id;                       /* Vortex1 or Vortex2 */
 
44
  oss_mutex_t mutex;
 
45
  oss_mutex_t low_mutex;
 
46
 
 
47
  /* Block pointers */
 
48
  oss_native_word global_base;
 
49
  oss_native_word dma_base;
 
50
  oss_native_word midi_base;
 
51
  oss_native_word fifo_base;
 
52
  oss_native_word adbarb_block_base;
 
53
  oss_native_word serial_block_base;
 
54
  oss_native_word parallel_base;
 
55
  oss_native_word src_base;
 
56
 
 
57
  /* Mixer parameters */
 
58
  ac97_devc ac97devc;
 
59
  int mixer_dev;
 
60
 
 
61
  /* Audio parameters */
 
62
  vortex_portc portc[MAX_PORTC];
 
63
  int open_mode;
 
64
  int origbufsize;
 
65
 
 
66
  oss_native_word sr_active;
 
67
  unsigned int tail_index[32];
 
68
  unsigned int dst_index[32];
 
69
  unsigned char sr_list[256];
 
70
  unsigned int dst_routed[256];
 
71
 
 
72
  /* MIDI */
 
73
  int midi_opened;
 
74
  int midi_dev;
 
75
  oss_midi_inputbyte_t midi_input_intr;
 
76
}
 
77
vortex_devc;
 
78
 
 
79
#define READL(a)        (devc->dwRegister[a>>2])
 
80
#define WRITEL(a, d)    (devc->dwRegister[a>>2]=d)