via82c686.c (119690) | via82c686.c (126695) |
---|---|
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 --- 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#include <sys/sysctl.h> 33 34#include <dev/sound/pci/via82c686.h> 35 | 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 --- 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#include <sys/sysctl.h> 33 34#include <dev/sound/pci/via82c686.h> 35 |
36SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/via82c686.c 119690 2003-09-02 17:30:40Z jhb $"); | 36SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/via82c686.c 126695 2004-03-06 15:52:42Z matk $"); |
37 38#define VIA_PCI_ID 0x30581106 39#define NSEGS 4 /* Number of segments in SGD table */ 40 41#define SEGS_PER_CHAN (NSEGS/2) 42 43#define TIMEOUT 50 44#define VIA_DEFAULT_BUFSZ 0x1000 --- 522 unchanged lines hidden (view full) --- 567 goto bad; 568 } 569 570 if (bus_dmamem_alloc(via->sgd_dmat, (void **)&via->sgd_table, BUS_DMA_NOWAIT, &via->sgd_dmamap) == -1) 571 goto bad; 572 if (bus_dmamap_load(via->sgd_dmat, via->sgd_dmamap, via->sgd_table, NSEGS * sizeof(struct via_dma_op), dma_cb, via, 0)) 573 goto bad; 574 | 37 38#define VIA_PCI_ID 0x30581106 39#define NSEGS 4 /* Number of segments in SGD table */ 40 41#define SEGS_PER_CHAN (NSEGS/2) 42 43#define TIMEOUT 50 44#define VIA_DEFAULT_BUFSZ 0x1000 --- 522 unchanged lines hidden (view full) --- 567 goto bad; 568 } 569 570 if (bus_dmamem_alloc(via->sgd_dmat, (void **)&via->sgd_table, BUS_DMA_NOWAIT, &via->sgd_dmamap) == -1) 571 goto bad; 572 if (bus_dmamap_load(via->sgd_dmat, via->sgd_dmamap, via->sgd_table, NSEGS * sizeof(struct via_dma_op), dma_cb, via, 0)) 573 goto bad; 574 |
575 snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld", rman_get_start(via->reg), rman_get_start(via->irq)); | 575 snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld %s", 576 rman_get_start(via->reg), rman_get_start(via->irq), 577 PCM_KLDSTRING(snd_via82c686)); |
576 577 /* Register */ 578 if (pcm_register(dev, via, 1, 1)) goto bad; 579 pcm_addchan(dev, PCMDIR_PLAY, &viachan_class, via); 580 pcm_addchan(dev, PCMDIR_REC, &viachan_class, via); 581 pcm_setstatus(dev, status); 582 return 0; 583bad: --- 49 unchanged lines hidden --- | 578 579 /* Register */ 580 if (pcm_register(dev, via, 1, 1)) goto bad; 581 pcm_addchan(dev, PCMDIR_PLAY, &viachan_class, via); 582 pcm_addchan(dev, PCMDIR_REC, &viachan_class, via); 583 pcm_setstatus(dev, status); 584 return 0; 585bad: --- 49 unchanged lines hidden --- |