t4dwave.c (105308) | t4dwave.c (107285) |
---|---|
1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 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 <pci/pcireg.h> 32#include <pci/pcivar.h> 33 | 1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 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 <pci/pcireg.h> 32#include <pci/pcivar.h> 33 |
34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/t4dwave.c 105308 2002-10-17 03:45:34Z marcel $"); | 34SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/t4dwave.c 107285 2002-11-26 18:16:27Z cg $"); |
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 --- 33 unchanged lines hidden (view full) --- 76 bus_space_tag_t st; 77 bus_space_handle_t sh; 78 bus_dma_tag_t parent_dmat; 79 80 struct resource *reg, *irq; 81 int regtype, regid, irqid; 82 void *ih; 83 | 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 --- 33 unchanged lines hidden (view full) --- 76 bus_space_tag_t st; 77 bus_space_handle_t sh; 78 bus_dma_tag_t parent_dmat; 79 80 struct resource *reg, *irq; 81 int regtype, regid, irqid; 82 void *ih; 83 |
84 void *lock; | 84 struct mtx *lock; |
85 86 u_int32_t playchns; 87 unsigned int bufsz; 88 89 struct tr_chinfo chinfo[TR_MAXPLAYCH]; 90 struct tr_rchinfo recchinfo; 91}; 92 --- 164 unchanged lines hidden (view full) --- 257 chk1 = tr_rd(tr, 0xc8, 4); 258 chk2 = tr_rd(tr, 0xc8, 4); 259 for (i = TR_TIMEOUT_CDC; (i > 0) && (chk1 == chk2); 260 i--) 261 chk2 = tr_rd(tr, 0xc8, 4); 262 } 263 } 264 if (tr->type != ALI_PCI_ID || i > 0) { | 85 86 u_int32_t playchns; 87 unsigned int bufsz; 88 89 struct tr_chinfo chinfo[TR_MAXPLAYCH]; 90 struct tr_rchinfo recchinfo; 91}; 92 --- 164 unchanged lines hidden (view full) --- 257 chk1 = tr_rd(tr, 0xc8, 4); 258 chk2 = tr_rd(tr, 0xc8, 4); 259 for (i = TR_TIMEOUT_CDC; (i > 0) && (chk1 == chk2); 260 i--) 261 chk2 = tr_rd(tr, 0xc8, 4); 262 } 263 } 264 if (tr->type != ALI_PCI_ID || i > 0) { |
265 for (i=TR_TIMEOUT_CDC; (i>0) && (j & trw); i--) | 265 for (i=TR_TIMEOUT_CDC; (i>0) && (j & trw); i--) |
266 j=tr_rd(tr, treg, 4); 267 if (tr->type == ALI_PCI_ID && tr->rev > 0x01) 268 trw |= 0x0100; 269 tr_wr(tr, treg, (data << TR_CDC_DATA) | regno | trw, 4); 270 } 271#if 0 272 printf(" - wrote %x, now %x\n", data, tr_rdcd(devinfo, regno)); 273#endif --- 704 unchanged lines hidden --- | 266 j=tr_rd(tr, treg, 4); 267 if (tr->type == ALI_PCI_ID && tr->rev > 0x01) 268 trw |= 0x0100; 269 tr_wr(tr, treg, (data << TR_CDC_DATA) | regno | trw, 4); 270 } 271#if 0 272 printf(" - wrote %x, now %x\n", data, tr_rdcd(devinfo, regno)); 273#endif --- 704 unchanged lines hidden --- |