Deleted Added
full compact
t4dwave.c (119853) t4dwave.c (126695)
1/*
2 * Copyright (c) 1999 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

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

26
27#include <dev/sound/pcm/sound.h>
28#include <dev/sound/pcm/ac97.h>
29#include <dev/sound/pci/t4dwave.h>
30
31#include <dev/pci/pcireg.h>
32#include <dev/pci/pcivar.h>
33
1/*
2 * Copyright (c) 1999 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

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

26
27#include <dev/sound/pcm/sound.h>
28#include <dev/sound/pcm/ac97.h>
29#include <dev/sound/pci/t4dwave.h>
30
31#include <dev/pci/pcireg.h>
32#include <dev/pci/pcivar.h>
33
34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/t4dwave.c 119853 2003-09-07 16:28:03Z cg $");
34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/t4dwave.c 126695 2004-03-06 15:52:42Z matk $");
35
36/* -------------------------------------------------------------------- */
37
38#define TDX_PCI_ID 0x20001023
39#define TNX_PCI_ID 0x20011023
40#define ALI_PCI_ID 0x545110b9
41#define SPA_PCI_ID 0x70181039
42

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

855 /*filter*/NULL, /*filterarg*/NULL,
856 /*maxsize*/tr->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff,
857 /*flags*/0, /*lockfunc*/busdma_lock_mutex,
858 /*lockarg*/&Giant, &tr->parent_dmat) != 0) {
859 device_printf(dev, "unable to create dma tag\n");
860 goto bad;
861 }
862
35
36/* -------------------------------------------------------------------- */
37
38#define TDX_PCI_ID 0x20001023
39#define TNX_PCI_ID 0x20011023
40#define ALI_PCI_ID 0x545110b9
41#define SPA_PCI_ID 0x70181039
42

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

855 /*filter*/NULL, /*filterarg*/NULL,
856 /*maxsize*/tr->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff,
857 /*flags*/0, /*lockfunc*/busdma_lock_mutex,
858 /*lockarg*/&Giant, &tr->parent_dmat) != 0) {
859 device_printf(dev, "unable to create dma tag\n");
860 goto bad;
861 }
862
863 snprintf(status, 64, "at io 0x%lx irq %ld",
864 rman_get_start(tr->reg), rman_get_start(tr->irq));
863 snprintf(status, 64, "at io 0x%lx irq %ld %s",
864 rman_get_start(tr->reg), rman_get_start(tr->irq),PCM_KLDSTRING(snd_t4dwave));
865
866 if (pcm_register(dev, tr, TR_MAXPLAYCH, 1)) goto bad;
867 pcm_addchan(dev, PCMDIR_REC, &trrchan_class, tr);
868 for (i = 0; i < TR_MAXPLAYCH; i++)
869 pcm_addchan(dev, PCMDIR_PLAY, &trpchan_class, tr);
870 pcm_setstatus(dev, status);
871
872 return 0;

--- 106 unchanged lines hidden ---
865
866 if (pcm_register(dev, tr, TR_MAXPLAYCH, 1)) goto bad;
867 pcm_addchan(dev, PCMDIR_REC, &trrchan_class, tr);
868 for (i = 0; i < TR_MAXPLAYCH; i++)
869 pcm_addchan(dev, PCMDIR_PLAY, &trpchan_class, tr);
870 pcm_setstatus(dev, status);
871
872 return 0;

--- 106 unchanged lines hidden ---