via8233.c (166278) | via8233.c (166904) |
---|---|
1/*- 2 * Copyright (c) 2002 Orion Hodson <orion@freebsd.org> 3 * Portions of this code derived from via82c686.c: 4 * Copyright (c) 2000 David Jones <dej@ox.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 30 unchanged lines hidden (view full) --- 39#include <dev/sound/pcm/ac97.h> 40 41#include <dev/pci/pcireg.h> 42#include <dev/pci/pcivar.h> 43#include <sys/sysctl.h> 44 45#include <dev/sound/pci/via8233.h> 46 | 1/*- 2 * Copyright (c) 2002 Orion Hodson <orion@freebsd.org> 3 * Portions of this code derived from via82c686.c: 4 * Copyright (c) 2000 David Jones <dej@ox.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 30 unchanged lines hidden (view full) --- 39#include <dev/sound/pcm/ac97.h> 40 41#include <dev/pci/pcireg.h> 42#include <dev/pci/pcivar.h> 43#include <sys/sysctl.h> 44 45#include <dev/sound/pci/via8233.h> 46 |
47SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/via8233.c 166278 2007-01-27 07:35:05Z ariff $"); | 47SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/via8233.c 166904 2007-02-23 13:47:34Z netchild $"); |
48 49#define VIA8233_PCI_ID 0x30591106 50 51#define VIA8233_REV_ID_8233PRE 0x10 52#define VIA8233_REV_ID_8233C 0x20 53#define VIA8233_REV_ID_8233 0x30 54#define VIA8233_REV_ID_8233A 0x40 55#define VIA8233_REV_ID_8235 0x50 --- 1176 unchanged lines hidden (view full) --- 1232 device_get_unit(dev), "via_dxs_src", &via_dxs_src) == 0) 1233 via->dxs_src = (via_dxs_src > 0) ? 1 : 0; 1234 else 1235 via->dxs_src = 0; 1236 1237 nsegs = (via_dxs_chnum + via_sgd_chnum + NWRCHANS) * via->blkcnt; 1238 1239 /* DMA tag for buffers */ | 48 49#define VIA8233_PCI_ID 0x30591106 50 51#define VIA8233_REV_ID_8233PRE 0x10 52#define VIA8233_REV_ID_8233C 0x20 53#define VIA8233_REV_ID_8233 0x30 54#define VIA8233_REV_ID_8233A 0x40 55#define VIA8233_REV_ID_8235 0x50 --- 1176 unchanged lines hidden (view full) --- 1232 device_get_unit(dev), "via_dxs_src", &via_dxs_src) == 0) 1233 via->dxs_src = (via_dxs_src > 0) ? 1 : 0; 1234 else 1235 via->dxs_src = 0; 1236 1237 nsegs = (via_dxs_chnum + via_sgd_chnum + NWRCHANS) * via->blkcnt; 1238 1239 /* DMA tag for buffers */ |
1240 if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0, | 1240 if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/2, 1241 /*boundary*/0, |
1241 /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, 1242 /*highaddr*/BUS_SPACE_MAXADDR, 1243 /*filter*/NULL, /*filterarg*/NULL, 1244 /*maxsize*/via->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, 1245 /*flags*/0, /*lockfunc*/NULL, 1246 /*lockarg*/NULL, &via->parent_dmat) != 0) { 1247 device_printf(dev, "unable to create dma tag\n"); 1248 goto bad; 1249 } 1250 1251 /* 1252 * DMA tag for SGD table. The 686 uses scatter/gather DMA and 1253 * requires a list in memory of work to do. We need only 16 bytes 1254 * for this list, and it is wasteful to allocate 16K. 1255 */ | 1242 /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, 1243 /*highaddr*/BUS_SPACE_MAXADDR, 1244 /*filter*/NULL, /*filterarg*/NULL, 1245 /*maxsize*/via->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, 1246 /*flags*/0, /*lockfunc*/NULL, 1247 /*lockarg*/NULL, &via->parent_dmat) != 0) { 1248 device_printf(dev, "unable to create dma tag\n"); 1249 goto bad; 1250 } 1251 1252 /* 1253 * DMA tag for SGD table. The 686 uses scatter/gather DMA and 1254 * requires a list in memory of work to do. We need only 16 bytes 1255 * for this list, and it is wasteful to allocate 16K. 1256 */ |
1256 if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0, | 1257 if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/2, 1258 /*boundary*/0, |
1257 /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, 1258 /*highaddr*/BUS_SPACE_MAXADDR, 1259 /*filter*/NULL, /*filterarg*/NULL, 1260 /*maxsize*/nsegs * sizeof(struct via_dma_op), 1261 /*nsegments*/1, /*maxsegz*/0x3ffff, 1262 /*flags*/0, /*lockfunc*/NULL, 1263 /*lockarg*/NULL, &via->sgd_dmat) != 0) { 1264 device_printf(dev, "unable to create dma tag\n"); --- 114 unchanged lines hidden --- | 1259 /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, 1260 /*highaddr*/BUS_SPACE_MAXADDR, 1261 /*filter*/NULL, /*filterarg*/NULL, 1262 /*maxsize*/nsegs * sizeof(struct via_dma_op), 1263 /*nsegments*/1, /*maxsegz*/0x3ffff, 1264 /*flags*/0, /*lockfunc*/NULL, 1265 /*lockarg*/NULL, &via->sgd_dmat) != 0) { 1266 device_printf(dev, "unable to create dma tag\n"); --- 114 unchanged lines hidden --- |