csa.c (147626) | csa.c (153084) |
---|---|
1/*- 2 * Copyright (c) 1999 Seigo Tanimura 3 * All rights reserved. 4 * 5 * Portions of this source are based on cwcealdr.cpp and dhwiface.cpp in 6 * cwcealdr1.zip, the sample sources by Crystal Semiconductor. 7 * Copyright (c) 1996-1998 Crystal Semiconductor Corp. 8 * --- 34 unchanged lines hidden (view full) --- 43#include <dev/sound/pci/csareg.h> 44#include <dev/sound/pci/csavar.h> 45 46#include <dev/pci/pcireg.h> 47#include <dev/pci/pcivar.h> 48 49#include <gnu/dev/sound/pci/csaimg.h> 50 | 1/*- 2 * Copyright (c) 1999 Seigo Tanimura 3 * All rights reserved. 4 * 5 * Portions of this source are based on cwcealdr.cpp and dhwiface.cpp in 6 * cwcealdr1.zip, the sample sources by Crystal Semiconductor. 7 * Copyright (c) 1996-1998 Crystal Semiconductor Corp. 8 * --- 34 unchanged lines hidden (view full) --- 43#include <dev/sound/pci/csareg.h> 44#include <dev/sound/pci/csavar.h> 45 46#include <dev/pci/pcireg.h> 47#include <dev/pci/pcivar.h> 48 49#include <gnu/dev/sound/pci/csaimg.h> 50 |
51SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/csa.c 147626 2005-06-27 07:43:57Z glebius $"); | 51SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/csa.c 153084 2005-12-04 10:06:06Z ru $"); |
52 53/* This is the pci device id. */ 54#define CS4610_PCI_ID 0x60011013 55#define CS4614_PCI_ID 0x60031013 56#define CS4615_PCI_ID 0x60041013 57 58/* Here is the parameter structure per a device. */ 59struct csa_softc { --- 579 unchanged lines hidden (view full) --- 639 /* 640 * Fill the serial port FIFOs with silence. 641 */ 642 csa_clearserialfifos(resp); 643 644 /* 645 * Set the serial port FIFO pointer to the first sample in the FIFO. 646 */ | 52 53/* This is the pci device id. */ 54#define CS4610_PCI_ID 0x60011013 55#define CS4614_PCI_ID 0x60031013 56#define CS4615_PCI_ID 0x60041013 57 58/* Here is the parameter structure per a device. */ 59struct csa_softc { --- 579 unchanged lines hidden (view full) --- 639 /* 640 * Fill the serial port FIFOs with silence. 641 */ 642 csa_clearserialfifos(resp); 643 644 /* 645 * Set the serial port FIFO pointer to the first sample in the FIFO. 646 */ |
647#if notdef | 647#ifdef notdef |
648 csa_writeio(resp, BA0_SERBSP, 0); 649#endif /* notdef */ 650 651 /* 652 * Write the serial port configuration to the part. The master 653 * enable bit is not set until all other values have been written. 654 */ 655 csa_writeio(resp, BA0_SERC1, SERC1_SO1F_AC97 | SERC1_SO1EN); --- 37 unchanged lines hidden (view full) --- 693 * the codec is pumping ADC data across the AC-link. 694 */ 695 acisv = 0; 696 for (i = 0 ; i < 1000 ; i++) { 697 /* 698 * First, lets wait a short while to let things settle out a bit, 699 * and to prevent retrying the read too quickly. 700 */ | 648 csa_writeio(resp, BA0_SERBSP, 0); 649#endif /* notdef */ 650 651 /* 652 * Write the serial port configuration to the part. The master 653 * enable bit is not set until all other values have been written. 654 */ 655 csa_writeio(resp, BA0_SERC1, SERC1_SO1F_AC97 | SERC1_SO1EN); --- 37 unchanged lines hidden (view full) --- 693 * the codec is pumping ADC data across the AC-link. 694 */ 695 acisv = 0; 696 for (i = 0 ; i < 1000 ; i++) { 697 /* 698 * First, lets wait a short while to let things settle out a bit, 699 * and to prevent retrying the read too quickly. 700 */ |
701#if notdef | 701#ifdef notdef |
702 DELAY(10000000L); /* clw */ 703#else 704 DELAY(1000); 705#endif /* notdef */ 706 /* 707 * Read the input slot valid register and see if input slots 3 and 708 * 4 are valid yet. 709 */ --- 13 unchanged lines hidden (view full) --- 723 * commense the transfer of digital audio data to the AC97 codec. 724 */ 725 csa_writeio(resp, BA0_ACOSV, ACOSV_SLV3 | ACOSV_SLV4); 726 727 /* 728 * Power down the DAC and ADC. We will power them up (if) when we need 729 * them. 730 */ | 702 DELAY(10000000L); /* clw */ 703#else 704 DELAY(1000); 705#endif /* notdef */ 706 /* 707 * Read the input slot valid register and see if input slots 3 and 708 * 4 are valid yet. 709 */ --- 13 unchanged lines hidden (view full) --- 723 * commense the transfer of digital audio data to the AC97 codec. 724 */ 725 csa_writeio(resp, BA0_ACOSV, ACOSV_SLV3 | ACOSV_SLV4); 726 727 /* 728 * Power down the DAC and ADC. We will power them up (if) when we need 729 * them. 730 */ |
731#if notdef | 731#ifdef notdef |
732 csa_writeio(resp, BA0_AC97_POWERDOWN, 0x300); 733#endif /* notdef */ 734 735 /* 736 * Turn off the Processor by turning off the software clock enable flag in 737 * the clock control register. 738 */ | 732 csa_writeio(resp, BA0_AC97_POWERDOWN, 0x300); 733#endif /* notdef */ 734 735 /* 736 * Turn off the Processor by turning off the software clock enable flag in 737 * the clock control register. 738 */ |
739#if notdef | 739#ifdef notdef |
740 clkcr1 = csa_readio(resp, BA0_CLKCR1) & ~CLKCR1_SWCE; 741 csa_writeio(resp, BA0_CLKCR1, clkcr1); 742#endif /* notdef */ 743 744 /* 745 * Enable interrupts on the part. 746 */ 747#if 0 --- 329 unchanged lines hidden --- | 740 clkcr1 = csa_readio(resp, BA0_CLKCR1) & ~CLKCR1_SWCE; 741 csa_writeio(resp, BA0_CLKCR1, clkcr1); 742#endif /* notdef */ 743 744 /* 745 * Enable interrupts on the part. 746 */ 747#if 0 --- 329 unchanged lines hidden --- |