003 File Manager
Current Path:
/usr/src/sys/dev/sound/pci
usr
/
src
/
sys
/
dev
/
sound
/
pci
/
📁
..
📄
allegro_code.h
(13.76 KB)
📄
allegro_reg.h
(30.68 KB)
📄
als4000.c
(22.2 KB)
📄
als4000.h
(3.25 KB)
📄
atiixp.c
(34.25 KB)
📄
atiixp.h
(7.19 KB)
📄
aureal.c
(16.97 KB)
📄
aureal.h
(2.99 KB)
📄
cmi.c
(28.03 KB)
📄
cmireg.h
(7.52 KB)
📄
cs4281.c
(25.15 KB)
📄
cs4281.h
(6.89 KB)
📄
cs461x_dsp.h
(173.89 KB)
📄
csa.c
(26.85 KB)
📄
csamidi.c
(7.12 KB)
📄
csapcm.c
(26.3 KB)
📄
csareg.h
(93.24 KB)
📄
csavar.h
(2.48 KB)
📄
ds1-fw.h
(63.96 KB)
📄
ds1.c
(27.72 KB)
📄
ds1.h
(5.08 KB)
📄
emu10k1.c
(58.37 KB)
📄
emu10kx-midi.c
(6.84 KB)
📄
emu10kx-pcm.c
(39.26 KB)
📄
emu10kx.c
(99.01 KB)
📄
emu10kx.h
(6.03 KB)
📄
emuxkireg.h
(23.3 KB)
📄
envy24.c
(65.65 KB)
📄
envy24.h
(23.28 KB)
📄
envy24ht.c
(65.45 KB)
📄
envy24ht.h
(8.41 KB)
📄
es137x.c
(52.28 KB)
📄
es137x.h
(8.33 KB)
📄
fm801.c
(19.85 KB)
📁
hda
📄
hdspe-pcm.c
(15.45 KB)
📄
hdspe.c
(9.22 KB)
📄
hdspe.h
(5.98 KB)
📄
ich.c
(31.78 KB)
📄
ich.h
(3.49 KB)
📄
maestro.c
(51.21 KB)
📄
maestro3.c
(48.51 KB)
📄
maestro_reg.h
(10.82 KB)
📄
neomagic-coeff.h
(302.31 KB)
📄
neomagic.c
(19.38 KB)
📄
neomagic.h
(3.98 KB)
📄
solo.c
(25.21 KB)
📄
spicds.c
(10.46 KB)
📄
spicds.h
(4.41 KB)
📄
t4dwave.c
(24.38 KB)
📄
t4dwave.h
(3.26 KB)
📄
via8233.c
(36.27 KB)
📄
via8233.h
(5.42 KB)
📄
via82c686.c
(17.23 KB)
📄
via82c686.h
(3.61 KB)
📄
vibes.c
(26.45 KB)
📄
vibes.h
(5.99 KB)
Editing: hdspe.h
/*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012-2016 Ruslan Bukin <br@bsdpad.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #define PCI_VENDOR_XILINX 0x10ee #define PCI_DEVICE_XILINX_HDSPE 0x3fc6 /* AIO, MADI, AES, RayDAT */ #define PCI_CLASS_REVISION 0x08 #define PCI_REVISION_AIO 212 #define PCI_REVISION_RAYDAT 211 #define AIO 0 #define RAYDAT 1 /* Hardware mixer */ #define HDSPE_OUT_ENABLE_BASE 512 #define HDSPE_IN_ENABLE_BASE 768 #define HDSPE_MIXER_BASE 32768 #define HDSPE_MAX_GAIN 32768 /* Buffer */ #define HDSPE_PAGE_ADDR_BUF_OUT 8192 #define HDSPE_PAGE_ADDR_BUF_IN (HDSPE_PAGE_ADDR_BUF_OUT + 64 * 16 * 4) #define HDSPE_BUF_POSITION_MASK 0x000FFC0 /* Frequency */ #define HDSPE_FREQ_0 (1 << 6) #define HDSPE_FREQ_1 (1 << 7) #define HDSPE_FREQ_DOUBLE (1 << 8) #define HDSPE_FREQ_QUAD (1 << 31) #define HDSPE_FREQ_32000 HDSPE_FREQ_0 #define HDSPE_FREQ_44100 HDSPE_FREQ_1 #define HDSPE_FREQ_48000 (HDSPE_FREQ_0 | HDSPE_FREQ_1) #define HDSPE_FREQ_MASK (HDSPE_FREQ_0 | HDSPE_FREQ_1 | \ HDSPE_FREQ_DOUBLE | HDSPE_FREQ_QUAD) #define HDSPE_FREQ_MASK_DEFAULT HDSPE_FREQ_48000 #define HDSPE_FREQ_REG 256 #define HDSPE_FREQ_AIO 104857600000000ULL #define HDSPE_SPEED_DEFAULT 48000 /* Latency */ #define HDSPE_LAT_0 (1 << 1) #define HDSPE_LAT_1 (1 << 2) #define HDSPE_LAT_2 (1 << 3) #define HDSPE_LAT_MASK (HDSPE_LAT_0 | HDSPE_LAT_1 | HDSPE_LAT_2) #define HDSPE_LAT_BYTES_MAX (4096 * 4) #define HDSPE_LAT_BYTES_MIN (32 * 4) #define hdspe_encode_latency(x) (((x)<<1) & HDSPE_LAT_MASK) /* Gain */ #define HDSP_ADGain0 (1 << 25) #define HDSP_ADGain1 (1 << 26) #define HDSP_DAGain0 (1 << 27) #define HDSP_DAGain1 (1 << 28) #define HDSP_PhoneGain0 (1 << 29) #define HDSP_PhoneGain1 (1 << 30) #define HDSP_ADGainMask (HDSP_ADGain0 | HDSP_ADGain1) #define HDSP_ADGainMinus10dBV (HDSP_ADGainMask) #define HDSP_ADGainPlus4dBu (HDSP_ADGain0) #define HDSP_ADGainLowGain 0 #define HDSP_DAGainMask (HDSP_DAGain0 | HDSP_DAGain1) #define HDSP_DAGainHighGain (HDSP_DAGainMask) #define HDSP_DAGainPlus4dBu (HDSP_DAGain0) #define HDSP_DAGainMinus10dBV 0 #define HDSP_PhoneGainMask (HDSP_PhoneGain0|HDSP_PhoneGain1) #define HDSP_PhoneGain0dB HDSP_PhoneGainMask #define HDSP_PhoneGainMinus6dB (HDSP_PhoneGain0) #define HDSP_PhoneGainMinus12dB 0 #define HDSPM_statusRegister 0 #define HDSPM_statusRegister2 192 /* Settings */ #define HDSPE_SETTINGS_REG 0 #define HDSPE_CONTROL_REG 64 #define HDSPE_STATUS_REG 0 #define HDSPE_ENABLE (1 << 0) #define HDSPM_CLOCK_MODE_MASTER (1 << 4) /* Interrupts */ #define HDSPE_AUDIO_IRQ_PENDING (1 << 0) #define HDSPE_AUDIO_INT_ENABLE (1 << 5) #define HDSPE_INTERRUPT_ACK 96 /* Channels */ #define HDSPE_MAX_SLOTS 64 /* Mono channels */ #define HDSPE_MAX_CHANS (HDSPE_MAX_SLOTS / 2) /* Stereo pairs */ #define HDSPE_CHANBUF_SAMPLES (16 * 1024) #define HDSPE_CHANBUF_SIZE (4 * HDSPE_CHANBUF_SAMPLES) #define HDSPE_DMASEGSIZE (HDSPE_CHANBUF_SIZE * HDSPE_MAX_SLOTS) struct hdspe_channel { uint32_t left; uint32_t right; char *descr; uint32_t play; uint32_t rec; }; static MALLOC_DEFINE(M_HDSPE, "hdspe", "hdspe audio"); /* Channel registers */ struct sc_chinfo { struct snd_dbuf *buffer; struct pcm_channel *channel; struct sc_pcminfo *parent; /* Channel information */ uint32_t dir; uint32_t format; uint32_t lslot; uint32_t rslot; uint32_t lvol; uint32_t rvol; /* Buffer */ uint32_t *data; uint32_t size; /* Flags */ uint32_t run; }; /* PCM device private data */ struct sc_pcminfo { device_t dev; uint32_t (*ih) (struct sc_pcminfo *scp); uint32_t chnum; struct sc_chinfo chan[HDSPE_MAX_CHANS]; struct sc_info *sc; struct hdspe_channel *hc; }; /* HDSPe device private data */ struct sc_info { device_t dev; struct mtx *lock; uint32_t ctrl_register; uint32_t settings_register; uint32_t type; /* Control/Status register */ struct resource *cs; int csid; bus_space_tag_t cst; bus_space_handle_t csh; struct resource *irq; int irqid; void *ih; bus_dma_tag_t dmat; /* Play/Record DMA buffers */ uint32_t *pbuf; uint32_t *rbuf; uint32_t bufsize; bus_dmamap_t pmap; bus_dmamap_t rmap; uint32_t period; uint32_t speed; }; #define hdspe_read_1(sc, regno) \ bus_space_read_1((sc)->cst, (sc)->csh, (regno)) #define hdspe_read_2(sc, regno) \ bus_space_read_2((sc)->cst, (sc)->csh, (regno)) #define hdspe_read_4(sc, regno) \ bus_space_read_4((sc)->cst, (sc)->csh, (regno)) #define hdspe_write_1(sc, regno, data) \ bus_space_write_1((sc)->cst, (sc)->csh, (regno), (data)) #define hdspe_write_2(sc, regno, data) \ bus_space_write_2((sc)->cst, (sc)->csh, (regno), (data)) #define hdspe_write_4(sc, regno, data) \ bus_space_write_4((sc)->cst, (sc)->csh, (regno), (data))
Upload File
Create Folder