Deleted Added
full compact
via82c686.c (70345) via82c686.c (70346)
1/*
2 * Copyright (c) 2000 David Jones <dej@ox.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*
2 * Copyright (c) 2000 David Jones <dej@ox.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/sound/pci/via82c686.c 70345 2000-12-25 02:21:16Z cg $
26 * $FreeBSD: head/sys/dev/sound/pci/via82c686.c 70346 2000-12-25 02:49:28Z cg $
27 */
28
29#include <dev/sound/pcm/sound.h>
30#include <dev/sound/pcm/ac97.h>
31
32#include <pci/pcireg.h>
33#include <pci/pcivar.h>
34#include <sys/sysctl.h>
35
36#include <dev/sound/pci/via82c686.h>
37
38#define VIA_PCI_ID 0x30581106
39#define NSEGS 16 /* Number of segments in SGD table */
40
41#define SEGS_PER_CHAN (NSEGS/2)
42
27 */
28
29#include <dev/sound/pcm/sound.h>
30#include <dev/sound/pcm/ac97.h>
31
32#include <pci/pcireg.h>
33#include <pci/pcivar.h>
34#include <sys/sysctl.h>
35
36#include <dev/sound/pci/via82c686.h>
37
38#define VIA_PCI_ID 0x30581106
39#define NSEGS 16 /* Number of segments in SGD table */
40
41#define SEGS_PER_CHAN (NSEGS/2)
42
43#define TIMEOUT 50
44#define VIA_BUFFSIZE 0x4000
45
43#undef DEB
44#define DEB(x)
45
46#undef DEB
47#define DEB(x)
48
49/* we rely on this struct being packed to 64 bits */
50struct via_dma_op {
51 u_int32_t ptr;
52 u_int32_t flags;
53#define VIA_DMAOP_EOL 0x80000000
54#define VIA_DMAOP_FLAG 0x40000000
55#define VIA_DMAOP_STOP 0x20000000
56#define VIA_DMAOP_COUNT(x) ((x)&0x00FFFFFF)
57};
58
46struct via_info;
47
48struct via_chinfo {
49 struct via_info *parent;
50 pcm_channel *channel;
51 snd_dbuf *buffer;
52 int dir;
53};

--- 623 unchanged lines hidden ---
59struct via_info;
60
61struct via_chinfo {
62 struct via_info *parent;
63 pcm_channel *channel;
64 snd_dbuf *buffer;
65 int dir;
66};

--- 623 unchanged lines hidden ---