2 * Copyright (c) 1999 Seigo Tanimura
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.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 #include <sys/soundcard.h>
32 #include <dev/sound/pcm/sound.h>
33 #include <dev/sound/pcm/ac97.h>
34 #include <dev/sound/chip.h>
35 #include <dev/sound/pci/csareg.h>
36 #include <dev/sound/pci/csavar.h>
38 #include <pci/pcireg.h>
39 #include <pci/pcivar.h>
41 SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/csapcm.c,v 1.8.2.7 2002/04/22 15:49:32 cg Exp $");
43 /* Buffer size on dma transfer. Fixed for CS416x. */
44 #define CS461x_BUFFSIZE (4 * 1024)
46 #define GOF_PER_SEC 200
48 /* device private data */
52 struct csa_info *parent;
53 struct pcm_channel *channel;
54 struct snd_dbuf *buffer;
61 csa_res res; /* resource */
62 void *ih; /* Interrupt cookie */
63 bus_dma_tag_t parent_dmat; /* DMA tag */
64 struct csa_bridgeinfo *binfo; /* The state of the parent. */
65 struct csa_card *card;
68 /* Contents of board's registers */
72 struct csa_chinfo pch, rch;
75 /* -------------------------------------------------------------------- */
78 static int csa_init(struct csa_info *);
79 static void csa_intr(void *);
80 static void csa_setplaysamplerate(csa_res *resp, u_long ulInRate);
81 static void csa_setcapturesamplerate(csa_res *resp, u_long ulOutRate);
82 static void csa_startplaydma(struct csa_info *csa);
83 static void csa_startcapturedma(struct csa_info *csa);
84 static void csa_stopplaydma(struct csa_info *csa);
85 static void csa_stopcapturedma(struct csa_info *csa);
86 static int csa_startdsp(csa_res *resp);
87 static int csa_allocres(struct csa_info *scp, device_t dev);
88 static void csa_releaseres(struct csa_info *scp, device_t dev);
90 static u_int32_t csa_playfmt[] = {
92 AFMT_STEREO | AFMT_U8,
94 AFMT_STEREO | AFMT_S8,
96 AFMT_STEREO | AFMT_S16_LE,
98 AFMT_STEREO | AFMT_S16_BE,
101 static struct pcmchan_caps csa_playcaps = {8000, 48000, csa_playfmt, 0};
103 static u_int32_t csa_recfmt[] = {
105 AFMT_STEREO | AFMT_S16_LE,
108 static struct pcmchan_caps csa_reccaps = {11025, 48000, csa_recfmt, 0};
110 /* -------------------------------------------------------------------- */
113 csa_active(struct csa_info *csa, int run)
120 if ((csa->active == 0 && old == 1) || (csa->active == 1 && old == 0)) {
122 if (csa->card->active)
123 return csa->card->active(go);
128 /* -------------------------------------------------------------------- */
132 csa_rdcd(kobj_t obj, void *devinfo, int regno)
135 struct csa_info *csa = (struct csa_info *)devinfo;
138 if (csa_readcodec(&csa->res, regno + BA0_AC97_RESET, &data))
146 csa_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data)
148 struct csa_info *csa = (struct csa_info *)devinfo;
151 csa_writecodec(&csa->res, regno + BA0_AC97_RESET, data);
157 static kobj_method_t csa_ac97_methods[] = {
158 KOBJMETHOD(ac97_read, csa_rdcd),
159 KOBJMETHOD(ac97_write, csa_wrcd),
162 AC97_DECLARE(csa_ac97);
165 csa_setplaysamplerate(csa_res *resp, u_long ulInRate)
167 u_long ulTemp1, ulTemp2;
169 u_long ulCorrectionPerGOF, ulCorrectionPerSec;
175 * Compute the values used to drive the actual sample rate conversion.
176 * The following formulas are being computed, using inline assembly
177 * since we need to use 64 bit arithmetic to compute the values:
179 * ulPhiIncr = floor((Fs,in * 2^26) / Fs,out)
180 * ulCorrectionPerGOF = floor((Fs,in * 2^26 - Fs,out * ulPhiIncr) /
182 * ulCorrectionPerSec = Fs,in * 2^26 - Fs,out * phiIncr -
183 * GOF_PER_SEC * ulCorrectionPerGOF
187 * ulPhiIncr:ulOther = dividend:remainder((Fs,in * 2^26) / Fs,out)
188 * ulCorrectionPerGOF:ulCorrectionPerSec =
189 * dividend:remainder(ulOther / GOF_PER_SEC)
191 ulTemp1 = ulInRate << 16;
192 ulPhiIncr = ulTemp1 / ulOutRate;
193 ulTemp1 -= ulPhiIncr * ulOutRate;
196 ulTemp2 = ulTemp1 / ulOutRate;
197 ulPhiIncr += ulTemp2;
198 ulTemp1 -= ulTemp2 * ulOutRate;
199 ulCorrectionPerGOF = ulTemp1 / GOF_PER_SEC;
200 ulTemp1 -= ulCorrectionPerGOF * GOF_PER_SEC;
201 ulCorrectionPerSec = ulTemp1;
204 * Fill in the SampleRateConverter control block.
206 csa_writemem(resp, BA1_PSRC, ((ulCorrectionPerSec << 16) & 0xFFFF0000) | (ulCorrectionPerGOF & 0xFFFF));
207 csa_writemem(resp, BA1_PPI, ulPhiIncr);
211 csa_setcapturesamplerate(csa_res *resp, u_long ulOutRate)
213 u_long ulPhiIncr, ulCoeffIncr, ulTemp1, ulTemp2;
214 u_long ulCorrectionPerGOF, ulCorrectionPerSec, ulInitialDelay;
215 u_long dwFrameGroupLength, dwCnt;
221 * We can only decimate by up to a factor of 1/9th the hardware rate.
222 * Return an error if an attempt is made to stray outside that limit.
224 if((ulOutRate * 9) < ulInRate)
228 * We can not capture at at rate greater than the Input Rate (48000).
229 * Return an error if an attempt is made to stray outside that limit.
231 if(ulOutRate > ulInRate)
235 * Compute the values used to drive the actual sample rate conversion.
236 * The following formulas are being computed, using inline assembly
237 * since we need to use 64 bit arithmetic to compute the values:
239 * ulCoeffIncr = -floor((Fs,out * 2^23) / Fs,in)
240 * ulPhiIncr = floor((Fs,in * 2^26) / Fs,out)
241 * ulCorrectionPerGOF = floor((Fs,in * 2^26 - Fs,out * ulPhiIncr) /
243 * ulCorrectionPerSec = Fs,in * 2^26 - Fs,out * phiIncr -
244 * GOF_PER_SEC * ulCorrectionPerGOF
245 * ulInitialDelay = ceil((24 * Fs,in) / Fs,out)
249 * ulCoeffIncr = neg(dividend((Fs,out * 2^23) / Fs,in))
250 * ulPhiIncr:ulOther = dividend:remainder((Fs,in * 2^26) / Fs,out)
251 * ulCorrectionPerGOF:ulCorrectionPerSec =
252 * dividend:remainder(ulOther / GOF_PER_SEC)
253 * ulInitialDelay = dividend(((24 * Fs,in) + Fs,out - 1) / Fs,out)
255 ulTemp1 = ulOutRate << 16;
256 ulCoeffIncr = ulTemp1 / ulInRate;
257 ulTemp1 -= ulCoeffIncr * ulInRate;
260 ulCoeffIncr += ulTemp1 / ulInRate;
261 ulCoeffIncr ^= 0xFFFFFFFF;
263 ulTemp1 = ulInRate << 16;
264 ulPhiIncr = ulTemp1 / ulOutRate;
265 ulTemp1 -= ulPhiIncr * ulOutRate;
268 ulTemp2 = ulTemp1 / ulOutRate;
269 ulPhiIncr += ulTemp2;
270 ulTemp1 -= ulTemp2 * ulOutRate;
271 ulCorrectionPerGOF = ulTemp1 / GOF_PER_SEC;
272 ulTemp1 -= ulCorrectionPerGOF * GOF_PER_SEC;
273 ulCorrectionPerSec = ulTemp1;
274 ulInitialDelay = ((ulInRate * 24) + ulOutRate - 1) / ulOutRate;
277 * Fill in the VariDecimate control block.
279 csa_writemem(resp, BA1_CSRC,
280 ((ulCorrectionPerSec << 16) & 0xFFFF0000) | (ulCorrectionPerGOF & 0xFFFF));
281 csa_writemem(resp, BA1_CCI, ulCoeffIncr);
282 csa_writemem(resp, BA1_CD,
283 (((BA1_VARIDEC_BUF_1 + (ulInitialDelay << 2)) << 16) & 0xFFFF0000) | 0x80);
284 csa_writemem(resp, BA1_CPI, ulPhiIncr);
287 * Figure out the frame group length for the write back task. Basically,
288 * this is just the factors of 24000 (2^6*3*5^3) that are not present in
289 * the output sample rate.
291 dwFrameGroupLength = 1;
292 for(dwCnt = 2; dwCnt <= 64; dwCnt *= 2)
294 if(((ulOutRate / dwCnt) * dwCnt) !=
297 dwFrameGroupLength *= 2;
300 if(((ulOutRate / 3) * 3) !=
303 dwFrameGroupLength *= 3;
305 for(dwCnt = 5; dwCnt <= 125; dwCnt *= 5)
307 if(((ulOutRate / dwCnt) * dwCnt) !=
310 dwFrameGroupLength *= 5;
315 * Fill in the WriteBack control block.
317 csa_writemem(resp, BA1_CFG1, dwFrameGroupLength);
318 csa_writemem(resp, BA1_CFG2, (0x00800000 | dwFrameGroupLength));
319 csa_writemem(resp, BA1_CCST, 0x0000FFFF);
320 csa_writemem(resp, BA1_CSPB, ((65536 * ulOutRate) / 24000));
321 csa_writemem(resp, (BA1_CSPB + 4), 0x0000FFFF);
325 csa_startplaydma(struct csa_info *csa)
332 ul = csa_readmem(resp, BA1_PCTL);
334 csa_writemem(resp, BA1_PCTL, ul | csa->pctl);
335 csa_writemem(resp, BA1_PVOL, 0x80008000);
341 csa_startcapturedma(struct csa_info *csa)
348 ul = csa_readmem(resp, BA1_CCTL);
350 csa_writemem(resp, BA1_CCTL, ul | csa->cctl);
351 csa_writemem(resp, BA1_CVOL, 0x80008000);
357 csa_stopplaydma(struct csa_info *csa)
364 ul = csa_readmem(resp, BA1_PCTL);
365 csa->pctl = ul & 0xffff0000;
366 csa_writemem(resp, BA1_PCTL, ul & 0x0000ffff);
367 csa_writemem(resp, BA1_PVOL, 0xffffffff);
371 * The bitwise pointer of the serial FIFO in the DSP
372 * seems to make an error upon starting or stopping the
373 * DSP. Clear the FIFO and correct the pointer if we
377 csa_clearserialfifos(resp);
378 csa_writeio(resp, BA0_SERBSP, 0);
384 csa_stopcapturedma(struct csa_info *csa)
391 ul = csa_readmem(resp, BA1_CCTL);
392 csa->cctl = ul & 0x0000ffff;
393 csa_writemem(resp, BA1_CCTL, ul & 0xffff0000);
394 csa_writemem(resp, BA1_CVOL, 0xffffffff);
398 * The bitwise pointer of the serial FIFO in the DSP
399 * seems to make an error upon starting or stopping the
400 * DSP. Clear the FIFO and correct the pointer if we
404 csa_clearserialfifos(resp);
405 csa_writeio(resp, BA0_SERBSP, 0);
411 csa_startdsp(csa_res *resp)
417 * Set the frame timer to reflect the number of cycles per frame.
419 csa_writemem(resp, BA1_FRMT, 0xadf);
422 * Turn on the run, run at frame, and DMA enable bits in the local copy of
423 * the SP control register.
425 csa_writemem(resp, BA1_SPCR, SPCR_RUN | SPCR_RUNFR | SPCR_DRQEN);
428 * Wait until the run at frame bit resets itself in the SP control
432 for (i = 0 ; i < 25 ; i++) {
434 * Wait a little bit, so we don't issue PCI reads too frequently.
438 * Fetch the current value of the SP status register.
440 ul = csa_readmem(resp, BA1_SPCR);
443 * If the run at frame bit has reset, then stop waiting.
445 if((ul & SPCR_RUNFR) == 0)
449 * If the run at frame bit never reset, then return an error.
451 if((ul & SPCR_RUNFR) != 0)
458 csa_setupchan(struct csa_chinfo *ch)
460 struct csa_info *csa = ch->parent;
461 csa_res *resp = &csa->res;
464 if (ch->dir == PCMDIR_PLAY) {
466 csa_writemem(resp, BA1_PBA, vtophys(sndbuf_getbuf(ch->buffer)));
469 csa->pfie = csa_readmem(resp, BA1_PFIE) & ~0x0000f03f;
470 if (!(ch->fmt & AFMT_SIGNED))
472 if (ch->fmt & AFMT_BIGENDIAN)
474 if (!(ch->fmt & AFMT_STEREO))
476 if (ch->fmt & AFMT_8BIT)
478 csa_writemem(resp, BA1_PFIE, csa->pfie);
481 if (ch->fmt & AFMT_16BIT)
483 if (ch->fmt & AFMT_STEREO)
487 pdtc = csa_readmem(resp, BA1_PDTC) & ~0x000001ff;
489 csa_writemem(resp, BA1_PDTC, pdtc);
492 csa_setplaysamplerate(resp, ch->spd);
493 } else if (ch->dir == PCMDIR_REC) {
495 csa_writemem(resp, BA1_CBA, vtophys(sndbuf_getbuf(ch->buffer)));
498 csa_writemem(resp, BA1_CIE, (csa_readmem(resp, BA1_CIE) & ~0x0000003f) | 0x00000001);
501 csa_setcapturesamplerate(resp, ch->spd);
506 /* -------------------------------------------------------------------- */
507 /* channel interface */
510 csachan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir)
512 struct csa_info *csa = devinfo;
513 struct csa_chinfo *ch = (dir == PCMDIR_PLAY)? &csa->pch : &csa->rch;
519 if (sndbuf_alloc(ch->buffer, csa->parent_dmat, CS461x_BUFFSIZE) == -1) return NULL;
524 csachan_setformat(kobj_t obj, void *data, u_int32_t format)
526 struct csa_chinfo *ch = data;
533 csachan_setspeed(kobj_t obj, void *data, u_int32_t speed)
535 struct csa_chinfo *ch = data;
538 return ch->spd; /* XXX calc real speed */
542 csachan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
544 return CS461x_BUFFSIZE / 2;
548 csachan_trigger(kobj_t obj, void *data, int go)
550 struct csa_chinfo *ch = data;
551 struct csa_info *csa = ch->parent;
553 if (go == PCMTRIG_EMLDMAWR || go == PCMTRIG_EMLDMARD)
556 if (go == PCMTRIG_START) {
559 if (ch->dir == PCMDIR_PLAY)
560 csa_startplaydma(csa);
562 csa_startcapturedma(csa);
564 if (ch->dir == PCMDIR_PLAY)
565 csa_stopplaydma(csa);
567 csa_stopcapturedma(csa);
574 csachan_getptr(kobj_t obj, void *data)
576 struct csa_chinfo *ch = data;
577 struct csa_info *csa = ch->parent;
583 if (ch->dir == PCMDIR_PLAY) {
584 ptr = csa_readmem(resp, BA1_PBA) - vtophys(sndbuf_getbuf(ch->buffer));
585 if ((ch->fmt & AFMT_U8) != 0 || (ch->fmt & AFMT_S8) != 0)
588 ptr = csa_readmem(resp, BA1_CBA) - vtophys(sndbuf_getbuf(ch->buffer));
589 if ((ch->fmt & AFMT_U8) != 0 || (ch->fmt & AFMT_S8) != 0)
596 static struct pcmchan_caps *
597 csachan_getcaps(kobj_t obj, void *data)
599 struct csa_chinfo *ch = data;
600 return (ch->dir == PCMDIR_PLAY)? &csa_playcaps : &csa_reccaps;
603 static kobj_method_t csachan_methods[] = {
604 KOBJMETHOD(channel_init, csachan_init),
605 KOBJMETHOD(channel_setformat, csachan_setformat),
606 KOBJMETHOD(channel_setspeed, csachan_setspeed),
607 KOBJMETHOD(channel_setblocksize, csachan_setblocksize),
608 KOBJMETHOD(channel_trigger, csachan_trigger),
609 KOBJMETHOD(channel_getptr, csachan_getptr),
610 KOBJMETHOD(channel_getcaps, csachan_getcaps),
613 CHANNEL_DECLARE(csachan);
615 /* -------------------------------------------------------------------- */
616 /* The interrupt handler */
620 struct csa_info *csa = p;
622 if ((csa->binfo->hisr & HISR_VC0) != 0)
623 chn_intr(csa->pch.channel);
624 if ((csa->binfo->hisr & HISR_VC1) != 0)
625 chn_intr(csa->rch.channel);
628 /* -------------------------------------------------------------------- */
631 * Probe and attach the card
635 csa_init(struct csa_info *csa)
642 csa_stopplaydma(csa);
643 csa_stopcapturedma(csa);
645 if (csa_startdsp(resp))
648 /* Crank up the power on the DAC and ADC. */
649 csa_setplaysamplerate(resp, 8000);
650 csa_setcapturesamplerate(resp, 8000);
655 /* Allocates resources. */
657 csa_allocres(struct csa_info *csa, device_t dev)
662 if (resp->io == NULL) {
663 resp->io = bus_alloc_resource(dev, SYS_RES_MEMORY, &resp->io_rid, 0, ~0, 1, RF_ACTIVE);
664 if (resp->io == NULL)
667 if (resp->mem == NULL) {
668 resp->mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &resp->mem_rid, 0, ~0, 1, RF_ACTIVE);
669 if (resp->mem == NULL)
672 if (resp->irq == NULL) {
673 resp->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &resp->irq_rid, 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
674 if (resp->irq == NULL)
677 if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/CS461x_BUFFSIZE, /*boundary*/CS461x_BUFFSIZE,
678 /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
679 /*highaddr*/BUS_SPACE_MAXADDR,
680 /*filter*/NULL, /*filterarg*/NULL,
681 /*maxsize*/CS461x_BUFFSIZE, /*nsegments*/1, /*maxsegz*/0x3ffff,
682 /*flags*/0, &csa->parent_dmat) != 0)
688 /* Releases resources. */
690 csa_releaseres(struct csa_info *csa, device_t dev)
695 if (resp->irq != NULL) {
697 bus_teardown_intr(dev, resp->irq, csa->ih);
698 bus_release_resource(dev, SYS_RES_IRQ, resp->irq_rid, resp->irq);
701 if (resp->io != NULL) {
702 bus_release_resource(dev, SYS_RES_MEMORY, resp->io_rid, resp->io);
705 if (resp->mem != NULL) {
706 bus_release_resource(dev, SYS_RES_MEMORY, resp->mem_rid, resp->mem);
709 if (csa->parent_dmat != NULL) {
710 bus_dma_tag_destroy(csa->parent_dmat);
711 csa->parent_dmat = NULL;
720 pcmcsa_probe(device_t dev)
723 struct sndcard_func *func;
725 /* The parent device has already been probed. */
727 func = device_get_ivars(dev);
728 if (func == NULL || func->func != SCF_PCM)
731 s = "CS461x PCM Audio";
733 device_set_desc(dev, s);
738 pcmcsa_attach(device_t dev)
740 struct csa_info *csa;
743 char status[SND_STATUSLEN];
744 struct ac97_info *codec;
745 struct sndcard_func *func;
747 csa = malloc(sizeof(*csa), M_DEVBUF, M_NOWAIT | M_ZERO);
750 unit = device_get_unit(dev);
751 func = device_get_ivars(dev);
752 csa->binfo = func->varinfo;
754 * Fake the status of DMA so that the initial value of
755 * PCTL and CCTL can be stored into csa->pctl and csa->cctl,
758 csa->pch.dma = csa->rch.dma = 1;
760 csa->card = csa->binfo->card;
762 /* Allocate the resources. */
764 resp->io_rid = PCIR_MAPS;
765 resp->mem_rid = PCIR_MAPS + 4;
767 if (csa_allocres(csa, dev)) {
768 csa_releaseres(csa, dev);
774 csa_releaseres(csa, dev);
777 codec = AC97_CREATE(dev, csa, csa_ac97);
779 csa_releaseres(csa, dev);
782 if (csa->card->inv_eapd)
783 ac97_setflags(codec, AC97_F_EAPD_INV);
784 if (mixer_init(dev, ac97_getmixerclass(), codec) == -1) {
786 csa_releaseres(csa, dev);
790 snprintf(status, SND_STATUSLEN, "at irq %ld", rman_get_start(resp->irq));
792 /* Enable interrupt. */
793 if (snd_setup_intr(dev, resp->irq, INTR_MPSAFE, csa_intr, csa, &csa->ih)) {
795 csa_releaseres(csa, dev);
798 csa_writemem(resp, BA1_PFIE, csa_readmem(resp, BA1_PFIE) & ~0x0000f03f);
799 csa_writemem(resp, BA1_CIE, (csa_readmem(resp, BA1_CIE) & ~0x0000003f) | 0x00000001);
802 if (pcm_register(dev, csa, 1, 1)) {
804 csa_releaseres(csa, dev);
807 pcm_addchan(dev, PCMDIR_REC, &csachan_class, csa);
808 pcm_addchan(dev, PCMDIR_PLAY, &csachan_class, csa);
809 pcm_setstatus(dev, status);
815 pcmcsa_detach(device_t dev)
818 struct csa_info *csa;
820 r = pcm_unregister(dev);
824 csa = pcm_getdevinfo(dev);
825 csa_releaseres(csa, dev);
830 static device_method_t pcmcsa_methods[] = {
831 /* Device interface */
832 DEVMETHOD(device_probe , pcmcsa_probe ),
833 DEVMETHOD(device_attach, pcmcsa_attach),
834 DEVMETHOD(device_detach, pcmcsa_detach),
839 static driver_t pcmcsa_driver = {
845 DRIVER_MODULE(snd_csapcm, csa, pcmcsa_driver, pcm_devclass, 0, 0);
846 MODULE_DEPEND(snd_csapcm, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER);
847 MODULE_DEPEND(snd_csapcm, snd_csa, 1, 1, 1);
848 MODULE_VERSION(snd_csapcm, 1);