Deleted Added
full compact
ds1.c (119362) ds1.c (119690)
1/*
2 * Copyright (c) 2000 Cameron Grant <cg@freebsd.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

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

28#include <dev/sound/pcm/ac97.h>
29
30#include <dev/pci/pcireg.h>
31#include <dev/pci/pcivar.h>
32
33#include <dev/sound/pci/ds1.h>
34#include <dev/sound/pci/ds1-fw.h>
35
1/*
2 * Copyright (c) 2000 Cameron Grant <cg@freebsd.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

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

28#include <dev/sound/pcm/ac97.h>
29
30#include <dev/pci/pcireg.h>
31#include <dev/pci/pcivar.h>
32
33#include <dev/sound/pci/ds1.h>
34#include <dev/sound/pci/ds1-fw.h>
35
36SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/ds1.c 119362 2003-08-23 13:00:48Z iedowse $");
36SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/ds1.c 119690 2003-09-02 17:30:40Z jhb $");
37
38/* -------------------------------------------------------------------- */
39
40#define DS1_CHANS 4
41#define DS1_RECPRIMARY 0
42#define DS1_IRQHZ ((48000 << 8) / 256)
43#define DS1_BUFFSIZE 4096
44

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

948 sc->type = ds_finddev(pci_get_devid(dev), subdev);
949 sc->rev = pci_get_revid(dev);
950
951 data = pci_read_config(dev, PCIR_COMMAND, 2);
952 data |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
953 pci_write_config(dev, PCIR_COMMAND, data, 2);
954 data = pci_read_config(dev, PCIR_COMMAND, 2);
955
37
38/* -------------------------------------------------------------------- */
39
40#define DS1_CHANS 4
41#define DS1_RECPRIMARY 0
42#define DS1_IRQHZ ((48000 << 8) / 256)
43#define DS1_BUFFSIZE 4096
44

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

948 sc->type = ds_finddev(pci_get_devid(dev), subdev);
949 sc->rev = pci_get_revid(dev);
950
951 data = pci_read_config(dev, PCIR_COMMAND, 2);
952 data |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
953 pci_write_config(dev, PCIR_COMMAND, data, 2);
954 data = pci_read_config(dev, PCIR_COMMAND, 2);
955
956 sc->regid = PCIR_MAPS;
956 sc->regid = PCIR_BAR(0);
957 sc->reg = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->regid,
958 0, ~0, 1, RF_ACTIVE);
959 if (!sc->reg) {
960 device_printf(dev, "unable to map register space\n");
961 goto bad;
962 }
963
964 sc->st = rman_get_bustag(sc->reg);

--- 124 unchanged lines hidden ---
957 sc->reg = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->regid,
958 0, ~0, 1, RF_ACTIVE);
959 if (!sc->reg) {
960 device_printf(dev, "unable to map register space\n");
961 goto bad;
962 }
963
964 sc->st = rman_get_bustag(sc->reg);

--- 124 unchanged lines hidden ---