Deleted Added
full compact
ds1.c (119690) ds1.c (126695)
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 119690 2003-09-02 17:30:40Z jhb $");
36SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/ds1.c 126695 2004-03-06 15:52:42Z matk $");
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

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

991 sc->irqid = 0;
992 sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
993 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
994 if (!sc->irq || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, ds_intr, sc, &sc->ih)) {
995 device_printf(dev, "unable to map interrupt\n");
996 goto bad;
997 }
998
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

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

991 sc->irqid = 0;
992 sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
993 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
994 if (!sc->irq || snd_setup_intr(dev, sc->irq, INTR_MPSAFE, ds_intr, sc, &sc->ih)) {
995 device_printf(dev, "unable to map interrupt\n");
996 goto bad;
997 }
998
999 snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld",
1000 rman_get_start(sc->reg), rman_get_start(sc->irq));
999 snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld %s",
1000 rman_get_start(sc->reg), rman_get_start(sc->irq),PCM_KLDSTRING(snd_ds1));
1001
1002 if (pcm_register(dev, sc, DS1_CHANS, 2))
1003 goto bad;
1004 for (i = 0; i < DS1_CHANS; i++)
1005 pcm_addchan(dev, PCMDIR_PLAY, &ds1pchan_class, sc);
1006 for (i = 0; i < 2; i++)
1007 pcm_addchan(dev, PCMDIR_REC, &ds1rchan_class, sc);
1008 pcm_setstatus(dev, status);

--- 80 unchanged lines hidden ---
1001
1002 if (pcm_register(dev, sc, DS1_CHANS, 2))
1003 goto bad;
1004 for (i = 0; i < DS1_CHANS; i++)
1005 pcm_addchan(dev, PCMDIR_PLAY, &ds1pchan_class, sc);
1006 for (i = 0; i < 2; i++)
1007 pcm_addchan(dev, PCMDIR_REC, &ds1rchan_class, sc);
1008 pcm_setstatus(dev, status);

--- 80 unchanged lines hidden ---