emu10k1.c (64300) | emu10k1.c (64881) |
---|---|
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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHERIN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/sound/pci/emu10k1.c 64300 2000-08-06 18:10:05Z cg $ | 26 * $FreeBSD: head/sys/dev/sound/pci/emu10k1.c 64881 2000-08-20 22:18:56Z cg $ |
27 */ 28 29#include <dev/sound/pcm/sound.h> 30#include <dev/sound/pcm/ac97.h> 31#include <gnu/dev/sound/pci/emu10k1.h> 32 33#include <pci/pcireg.h> 34#include <pci/pcivar.h> --- 114 unchanged lines hidden (view full) --- 149#endif 150 151/* talk to the card */ 152static u_int32_t emu_rd(struct sc_info *, int, int); 153static void emu_wr(struct sc_info *, int, u_int32_t, int); 154 155/* -------------------------------------------------------------------- */ 156 | 27 */ 28 29#include <dev/sound/pcm/sound.h> 30#include <dev/sound/pcm/ac97.h> 31#include <gnu/dev/sound/pci/emu10k1.h> 32 33#include <pci/pcireg.h> 34#include <pci/pcivar.h> --- 114 unchanged lines hidden (view full) --- 149#endif 150 151/* talk to the card */ 152static u_int32_t emu_rd(struct sc_info *, int, int); 153static void emu_wr(struct sc_info *, int, u_int32_t, int); 154 155/* -------------------------------------------------------------------- */ 156 |
157static u_int32_t emu_rfmt_ac97[] = { 158 AFMT_S16_LE, 159 AFMT_STEREO | AFMT_S16_LE, 160 0 161}; 162 163static u_int32_t emu_rfmt_mic[] = { 164 AFMT_U8, 165 0 166}; 167 168static u_int32_t emu_rfmt_efx[] = { 169 AFMT_STEREO | AFMT_S16_LE, 170 0 171}; 172 |
|
157static pcmchan_caps emu_reccaps[3] = { | 173static pcmchan_caps emu_reccaps[3] = { |
158 {8000, 48000, AFMT_STEREO | AFMT_S16_LE, AFMT_STEREO | AFMT_S16_LE}, 159 {8000, 8000, AFMT_U8, AFMT_U8}, 160 {48000, 48000, AFMT_STEREO | AFMT_S16_LE, AFMT_STEREO | AFMT_S16_LE}, | 174 {8000, 48000, emu_rfmt_ac97, 0}, 175 {8000, 8000, emu_rfmt_mic, 0}, 176 {48000, 48000, emu_rfmt_efx, 0}, |
161}; 162 | 177}; 178 |
163static pcmchan_caps emu_playcaps = { 164 4000, 48000, 165 AFMT_STEREO | AFMT_U8 | AFMT_S16_LE, 166 AFMT_STEREO | AFMT_S16_LE | 179static u_int32_t emu_pfmt[] = { 180 AFMT_U8, 181 AFMT_STEREO | AFMT_U8, 182 AFMT_S16_LE, 183 AFMT_STEREO | AFMT_S16_LE, 184 0 |
167}; 168 | 185}; 186 |
187static pcmchan_caps emu_playcaps = {4000, 48000, emu_pfmt, 0}; 188 |
|
169static pcm_channel emu_chantemplate = { 170 emupchan_init, 171 emupchan_setdir, 172 emupchan_setformat, 173 emupchan_setspeed, 174 emupchan_setblocksize, 175 emupchan_trigger, 176 emupchan_getptr, --- 1305 unchanged lines hidden --- | 189static pcm_channel emu_chantemplate = { 190 emupchan_init, 191 emupchan_setdir, 192 emupchan_setformat, 193 emupchan_setspeed, 194 emupchan_setblocksize, 195 emupchan_trigger, 196 emupchan_getptr, --- 1305 unchanged lines hidden --- |