OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [sound/] [pss.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
/*
2
 * sound/pss.c
3
 *
4
 * The low level driver for the Personal Sound System (ECHO ESC614).
5
 */
6
/*
7
 * Copyright (C) by Hannu Savolainen 1993-1996
8
 *
9
 * USS/Lite for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
10
 * Version 2 (June 1991). See the "COPYING" file distributed with this software
11
 * for more info.
12
 */
13
#include <linux/config.h>
14
 
15
 
16
#include "sound_config.h"
17
 
18
#if defined(CONFIG_PSS) && defined(CONFIG_AUDIO)
19
 
20
/*
21
 * PSS registers.
22
 */
23
#define REG(x)  (devc->base+x)
24
#define PSS_DATA        0
25
#define PSS_STATUS      2
26
#define PSS_CONTROL     2
27
#define PSS_ID          4
28
#define PSS_IRQACK      4
29
#define PSS_PIO         0x1a
30
 
31
/*
32
 * Config registers
33
 */
34
#define CONF_PSS        0x10
35
#define CONF_WSS        0x12
36
#define CONF_SB         0x13
37
#define CONF_CDROM      0x16
38
#define CONF_MIDI       0x18
39
 
40
/*
41
 * Status bits.
42
 */
43
#define PSS_FLAG3     0x0800
44
#define PSS_FLAG2     0x0400
45
#define PSS_FLAG1     0x1000
46
#define PSS_FLAG0     0x0800
47
#define PSS_WRITE_EMPTY  0x8000
48
#define PSS_READ_FULL    0x4000
49
 
50
#include "coproc.h"
51
 
52
#ifdef PSS_HAVE_LD
53
#include "synth-ld.h"
54
#else
55
static int      pss_synthLen = 0;
56
static unsigned char *pss_synth =
57
NULL;
58
 
59
#endif
60
 
61
typedef struct pss_confdata
62
  {
63
    int             base;
64
    int             irq;
65
    int             dma;
66
    int            *osp;
67
  }
68
 
69
pss_confdata;
70
 
71
static pss_confdata pss_data;
72
static pss_confdata *devc = &pss_data;
73
 
74
static int      pss_initialized = 0;
75
static int      nonstandard_microcode = 0;
76
 
77
int
78
probe_pss (struct address_info *hw_config)
79
{
80
  unsigned short  id;
81
  int             irq, dma;
82
 
83
  devc->base = hw_config->io_base;
84
  irq = devc->irq = hw_config->irq;
85
  dma = devc->dma = hw_config->dma;
86
  devc->osp = hw_config->osp;
87
 
88
  if (devc->base != 0x220 && devc->base != 0x240)
89
    if (devc->base != 0x230 && devc->base != 0x250)     /* Some cards use these */
90
      return 0;
91
 
92
  if (check_region (devc->base, 16))
93
    {
94
      printk ("PSS: I/O port conflict\n");
95
      return 0;
96
    }
97
 
98
  id = inw (REG (PSS_ID));
99
  if ((id >> 8) != 'E')
100
    {
101
      /* printk ("No PSS signature detected at 0x%x (0x%x)\n", devc->base, id); */
102
      return 0;
103
    }
104
 
105
  return 1;
106
}
107
 
108
static int
109
set_irq (pss_confdata * devc, int dev, int irq)
110
{
111
  static unsigned short irq_bits[16] =
112
  {
113
    0x0000, 0x0000, 0x0000, 0x0008,
114
    0x0000, 0x0010, 0x0000, 0x0018,
115
    0x0000, 0x0020, 0x0028, 0x0030,
116
    0x0038, 0x0000, 0x0000, 0x0000
117
  };
118
 
119
  unsigned short  tmp, bits;
120
 
121
  if (irq < 0 || irq > 15)
122
    return 0;
123
 
124
  tmp = inw (REG (dev)) & ~0x38;        /* Load confreg, mask IRQ bits out */
125
 
126
  if ((bits = irq_bits[irq]) == 0 && irq != 0)
127
    {
128
      printk ("PSS: Invalid IRQ %d\n", irq);
129
      return 0;
130
    }
131
 
132
  outw (tmp | bits, REG (dev));
133
  return 1;
134
}
135
 
136
static int
137
set_io_base (pss_confdata * devc, int dev, int base)
138
{
139
  unsigned short  tmp = inw (REG (dev)) & 0x003f;
140
  unsigned short  bits = (base & 0x0ffc) << 4;
141
 
142
  outw (bits | tmp, REG (dev));
143
 
144
  return 1;
145
}
146
 
147
static int
148
set_dma (pss_confdata * devc, int dev, int dma)
149
{
150
  static unsigned short dma_bits[8] =
151
  {
152
    0x0001, 0x0002, 0x0000, 0x0003,
153
    0x0000, 0x0005, 0x0006, 0x0007
154
  };
155
 
156
  unsigned short  tmp, bits;
157
 
158
  if (dma < 0 || dma > 7)
159
    return 0;
160
 
161
  tmp = inw (REG (dev)) & ~0x07;        /* Load confreg, mask DMA bits out */
162
 
163
  if ((bits = dma_bits[dma]) == 0 && dma != 4)
164
    {
165
      printk ("PSS: Invalid DMA %d\n", dma);
166
      return 0;
167
    }
168
 
169
  outw (tmp | bits, REG (dev));
170
  return 1;
171
}
172
 
173
static int
174
pss_reset_dsp (pss_confdata * devc)
175
{
176
  unsigned long   i, limit = jiffies + 10;
177
 
178
  outw (0x2000, REG (PSS_CONTROL));
179
 
180
  for (i = 0; i < 32768 && jiffies < limit; i++)
181
    inw (REG (PSS_CONTROL));
182
 
183
  outw (0x0000, REG (PSS_CONTROL));
184
 
185
  return 1;
186
}
187
 
188
static int
189
pss_put_dspword (pss_confdata * devc, unsigned short word)
190
{
191
  int             i, val;
192
 
193
  for (i = 0; i < 327680; i++)
194
    {
195
      val = inw (REG (PSS_STATUS));
196
      if (val & PSS_WRITE_EMPTY)
197
        {
198
          outw (word, REG (PSS_DATA));
199
          return 1;
200
        }
201
    }
202
  return 0;
203
}
204
 
205
static int
206
pss_get_dspword (pss_confdata * devc, unsigned short *word)
207
{
208
  int             i, val;
209
 
210
  for (i = 0; i < 327680; i++)
211
    {
212
      val = inw (REG (PSS_STATUS));
213
      if (val & PSS_READ_FULL)
214
        {
215
          *word = inw (REG (PSS_DATA));
216
          return 1;
217
        }
218
    }
219
 
220
  return 0;
221
}
222
 
223
static int
224
pss_download_boot (pss_confdata * devc, unsigned char *block, int size, int flags)
225
{
226
  int             i, limit, val, count;
227
 
228
  if (flags & CPF_FIRST)
229
    {
230
/*_____ Warn DSP software that a boot is coming */
231
      outw (0x00fe, REG (PSS_DATA));
232
 
233
      limit = jiffies + 10;
234
 
235
      for (i = 0; i < 32768 && jiffies < limit; i++)
236
        if (inw (REG (PSS_DATA)) == 0x5500)
237
          break;
238
 
239
      outw (*block++, REG (PSS_DATA));
240
 
241
      pss_reset_dsp (devc);
242
    }
243
 
244
  count = 1;
245
  while (1)
246
    {
247
      int             j;
248
 
249
      for (j = 0; j < 327670; j++)
250
        {
251
/*_____ Wait for BG to appear */
252
          if (inw (REG (PSS_STATUS)) & PSS_FLAG3)
253
            break;
254
        }
255
 
256
      if (j == 327670)
257
        {
258
          /* It's ok we timed out when the file was empty */
259
          if (count >= size && flags & CPF_LAST)
260
            break;
261
          else
262
            {
263
              printk ("\nPSS: Download timeout problems, byte %d=%d\n",
264
                      count, size);
265
              return 0;
266
            }
267
        }
268
/*_____ Send the next byte */
269
      outw (*block++, REG (PSS_DATA));
270
      count++;
271
    }
272
 
273
  if (flags & CPF_LAST)
274
    {
275
/*_____ Why */
276
      outw (0, REG (PSS_DATA));
277
 
278
      limit = jiffies + 10;
279
      for (i = 0; i < 32768 && jiffies < limit; i++)
280
        val = inw (REG (PSS_STATUS));
281
 
282
      limit = jiffies + 10;
283
      for (i = 0; i < 32768 && jiffies < limit; i++)
284
        {
285
          val = inw (REG (PSS_STATUS));
286
          if (val & 0x4000)
287
            break;
288
        }
289
 
290
      /* now read the version */
291
      for (i = 0; i < 32000; i++)
292
        {
293
          val = inw (REG (PSS_STATUS));
294
          if (val & PSS_READ_FULL)
295
            break;
296
        }
297
      if (i == 32000)
298
        return 0;
299
 
300
      val = inw (REG (PSS_DATA));
301
      /* printk("<PSS: microcode version %d.%d loaded>", val/16, val % 16); */
302
    }
303
 
304
  return 1;
305
}
306
 
307
void
308
attach_pss (struct address_info *hw_config)
309
{
310
  unsigned short  id;
311
  char            tmp[100];
312
 
313
  devc->base = hw_config->io_base;
314
  devc->irq = hw_config->irq;
315
  devc->dma = hw_config->dma;
316
  devc->osp = hw_config->osp;
317
 
318
  if (!probe_pss (hw_config))
319
    return;
320
 
321
  id = inw (REG (PSS_ID)) & 0x00ff;
322
 
323
  /*
324
     * Disable all emulations. Will be enabled later (if required).
325
   */
326
  outw (0x0000, REG (CONF_PSS));
327
  outw (0x0000, REG (CONF_WSS));
328
  outw (0x0000, REG (CONF_SB));
329
  outw (0x0000, REG (CONF_MIDI));
330
  outw (0x0000, REG (CONF_CDROM));
331
 
332
#if YOU_REALLY_WANT_TO_ALLOCATE_THESE_RESOURCES
333
  if (sound_alloc_dma (hw_config->dma, "PSS"))
334
    {
335
      printk ("pss.c: Can't allocate DMA channel\n");
336
      return;
337
    }
338
 
339
  if (!set_irq (devc, CONF_PSS, devc->irq))
340
    {
341
      printk ("PSS: IRQ error\n");
342
      return;
343
    }
344
 
345
  if (!set_dma (devc, CONF_PSS, devc->dma))
346
    {
347
      printk ("PSS: DRQ error\n");
348
      return;
349
    }
350
#endif
351
 
352
  pss_initialized = 1;
353
  sprintf (tmp, "ECHO-PSS  Rev. %d", id);
354
  conf_printf (tmp, hw_config);
355
}
356
 
357
int
358
probe_pss_mpu (struct address_info *hw_config)
359
{
360
  int             timeout;
361
 
362
  if (!pss_initialized)
363
    return 0;
364
 
365
  if (check_region (hw_config->io_base, 2))
366
    {
367
      printk ("PSS: MPU I/O port conflict\n");
368
      return 0;
369
    }
370
 
371
  if (!set_io_base (devc, CONF_MIDI, hw_config->io_base))
372
    {
373
      printk ("PSS: MIDI base error.\n");
374
      return 0;
375
    }
376
 
377
  if (!set_irq (devc, CONF_MIDI, hw_config->irq))
378
    {
379
      printk ("PSS: MIDI IRQ error.\n");
380
      return 0;
381
    }
382
 
383
  if (!pss_synthLen)
384
    {
385
      printk ("PSS: Can't enable MPU. MIDI synth microcode not available.\n");
386
      return 0;
387
    }
388
 
389
  if (!pss_download_boot (devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST))
390
    {
391
      printk ("PSS: Unable to load MIDI synth microcode to DSP.\n");
392
      return 0;
393
    }
394
 
395
/*
396
 * Finally wait until the DSP algorithm has initialized itself and
397
 * deactivates receive interrupt.
398
 */
399
 
400
  for (timeout = 900000; timeout > 0; timeout--)
401
    {
402
      if ((inb (hw_config->io_base + 1) & 0x80) == 0)    /* Input data avail */
403
        inb (hw_config->io_base);       /* Discard it */
404
      else
405
        break;                  /* No more input */
406
    }
407
 
408
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
409
  return probe_mpu401 (hw_config);
410
#else
411
  return 0;
412
#endif
413
}
414
 
415
static int
416
pss_coproc_open (void *dev_info, int sub_device)
417
{
418
  switch (sub_device)
419
    {
420
    case COPR_MIDI:
421
 
422
      if (pss_synthLen == 0)
423
        {
424
          printk ("PSS: MIDI synth microcode not available.\n");
425
          return -(EIO);
426
        }
427
 
428
      if (nonstandard_microcode)
429
        if (!pss_download_boot (devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST))
430
          {
431
            printk ("PSS: Unable to load MIDI synth microcode to DSP.\n");
432
            return -(EIO);
433
          }
434
      nonstandard_microcode = 0;
435
      break;
436
 
437
    default:;
438
    }
439
  return 0;
440
}
441
 
442
static void
443
pss_coproc_close (void *dev_info, int sub_device)
444
{
445
  return;
446
}
447
 
448
static void
449
pss_coproc_reset (void *dev_info)
450
{
451
  if (pss_synthLen)
452
    if (!pss_download_boot (devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST))
453
      {
454
        printk ("PSS: Unable to load MIDI synth microcode to DSP.\n");
455
      }
456
  nonstandard_microcode = 0;
457
}
458
 
459
static int
460
download_boot_block (void *dev_info, copr_buffer * buf)
461
{
462
  if (buf->len <= 0 || buf->len > sizeof (buf->data))
463
    return -(EINVAL);
464
 
465
  if (!pss_download_boot (devc, buf->data, buf->len, buf->flags))
466
    {
467
      printk ("PSS: Unable to load microcode block to DSP.\n");
468
      return -(EIO);
469
    }
470
  nonstandard_microcode = 1;    /* The MIDI microcode has been overwritten */
471
 
472
  return 0;
473
}
474
 
475
static int
476
pss_coproc_ioctl (void *dev_info, unsigned int cmd, caddr_t arg, int local)
477
{
478
  /* printk("PSS coproc ioctl %x %x %d\n", cmd, arg, local); */
479
 
480
  switch (cmd)
481
    {
482
    case SNDCTL_COPR_RESET:
483
      pss_coproc_reset (dev_info);
484
      return 0;
485
      break;
486
 
487
    case SNDCTL_COPR_LOAD:
488
      {
489
        copr_buffer    *buf;
490
        int             err;
491
 
492
        buf = (copr_buffer *) vmalloc (sizeof (copr_buffer));
493
        if (buf == NULL)
494
          return -(ENOSPC);
495
 
496
        memcpy_fromfs ((char *) buf, &((char *) arg)[0], sizeof (*buf));
497
        err = download_boot_block (dev_info, buf);
498
        vfree (buf);
499
        return err;
500
      }
501
      break;
502
 
503
    case SNDCTL_COPR_SENDMSG:
504
      {
505
        copr_msg       *buf;
506
        unsigned long   flags;
507
        unsigned short *data;
508
        int             i;
509
 
510
        buf = (copr_msg *) vmalloc (sizeof (copr_msg));
511
        if (buf == NULL)
512
          return -(ENOSPC);
513
 
514
        memcpy_fromfs ((char *) buf, &((char *) arg)[0], sizeof (*buf));
515
 
516
        data = (unsigned short *) (buf->data);
517
 
518
        save_flags (flags);
519
        cli ();
520
 
521
        for (i = 0; i < buf->len; i++)
522
          {
523
            if (!pss_put_dspword (devc, *data++))
524
              {
525
                restore_flags (flags);
526
                buf->len = i;   /* feed back number of WORDs sent */
527
                memcpy_tofs (&((char *) arg)[0], &buf, sizeof (buf));
528
                vfree (buf);
529
                return -(EIO);
530
              }
531
          }
532
 
533
        restore_flags (flags);
534
        vfree (buf);
535
 
536
        return 0;
537
      }
538
      break;
539
 
540
 
541
    case SNDCTL_COPR_RCVMSG:
542
      {
543
        copr_msg       *buf;
544
        unsigned long   flags;
545
        unsigned short *data;
546
        unsigned int    i;
547
        int             err = 0;
548
 
549
        buf = (copr_msg *) vmalloc (sizeof (copr_msg));
550
        if (buf == NULL)
551
          return -(ENOSPC);
552
 
553
 
554
        data = (unsigned short *) buf->data;
555
 
556
        save_flags (flags);
557
        cli ();
558
 
559
        for (i = 0; i < buf->len; i++)
560
          {
561
            buf->len = i;       /* feed back number of WORDs read */
562
            if (!pss_get_dspword (devc, data++))
563
              {
564
                if (i == 0)
565
                  err = -(EIO);
566
                break;
567
              }
568
          }
569
 
570
        restore_flags (flags);
571
 
572
        memcpy_tofs (&((char *) arg)[0], &buf, sizeof (buf));
573
        vfree (buf);
574
 
575
        return err;
576
      }
577
      break;
578
 
579
 
580
    case SNDCTL_COPR_RDATA:
581
      {
582
        copr_debug_buf  buf;
583
        unsigned long   flags;
584
        unsigned short  tmp;
585
 
586
        memcpy_fromfs ((char *) &buf, &((char *) arg)[0], sizeof (buf));
587
 
588
        save_flags (flags);
589
        cli ();
590
        if (!pss_put_dspword (devc, 0x00d0))
591
          {
592
            restore_flags (flags);
593
            return -(EIO);
594
          }
595
 
596
        if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff)))
597
          {
598
            restore_flags (flags);
599
            return -(EIO);
600
          }
601
 
602
        if (!pss_get_dspword (devc, &tmp))
603
          {
604
            restore_flags (flags);
605
            return -(EIO);
606
          }
607
 
608
        buf.parm1 = tmp;
609
        restore_flags (flags);
610
 
611
        memcpy_tofs (&((char *) arg)[0], &buf, sizeof (buf));
612
        return 0;
613
      }
614
      break;
615
 
616
    case SNDCTL_COPR_WDATA:
617
      {
618
        copr_debug_buf  buf;
619
        unsigned long   flags;
620
        unsigned short  tmp;
621
 
622
        memcpy_fromfs ((char *) &buf, &((char *) arg)[0], sizeof (buf));
623
 
624
        save_flags (flags);
625
        cli ();
626
        if (!pss_put_dspword (devc, 0x00d1))
627
          {
628
            restore_flags (flags);
629
            return -(EIO);
630
          }
631
 
632
        if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff)))
633
          {
634
            restore_flags (flags);
635
            return -(EIO);
636
          }
637
 
638
        tmp = (unsigned int) buf.parm2 & 0xffff;
639
        if (!pss_put_dspword (devc, tmp))
640
          {
641
            restore_flags (flags);
642
            return -(EIO);
643
          }
644
 
645
        restore_flags (flags);
646
        return 0;
647
      }
648
      break;
649
 
650
    case SNDCTL_COPR_WCODE:
651
      {
652
        copr_debug_buf  buf;
653
        unsigned long   flags;
654
        unsigned short  tmp;
655
 
656
        memcpy_fromfs ((char *) &buf, &((char *) arg)[0], sizeof (buf));
657
 
658
        save_flags (flags);
659
        cli ();
660
        if (!pss_put_dspword (devc, 0x00d3))
661
          {
662
            restore_flags (flags);
663
            return -(EIO);
664
          }
665
 
666
        if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff)))
667
          {
668
            restore_flags (flags);
669
            return -(EIO);
670
          }
671
 
672
        tmp = (unsigned int) buf.parm2 & 0x00ff;
673
        if (!pss_put_dspword (devc, tmp))
674
          {
675
            restore_flags (flags);
676
            return -(EIO);
677
          }
678
 
679
        tmp = ((unsigned int) buf.parm2 >> 8) & 0xffff;
680
        if (!pss_put_dspword (devc, tmp))
681
          {
682
            restore_flags (flags);
683
            return -(EIO);
684
          }
685
 
686
        restore_flags (flags);
687
        return 0;
688
      }
689
      break;
690
 
691
    case SNDCTL_COPR_RCODE:
692
      {
693
        copr_debug_buf  buf;
694
        unsigned long   flags;
695
        unsigned short  tmp;
696
 
697
        memcpy_fromfs ((char *) &buf, &((char *) arg)[0], sizeof (buf));
698
 
699
        save_flags (flags);
700
        cli ();
701
        if (!pss_put_dspword (devc, 0x00d2))
702
          {
703
            restore_flags (flags);
704
            return -(EIO);
705
          }
706
 
707
        if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff)))
708
          {
709
            restore_flags (flags);
710
            return -(EIO);
711
          }
712
 
713
        if (!pss_get_dspword (devc, &tmp))      /* Read MSB */
714
          {
715
            restore_flags (flags);
716
            return -(EIO);
717
          }
718
 
719
        buf.parm1 = tmp << 8;
720
 
721
        if (!pss_get_dspword (devc, &tmp))      /* Read LSB */
722
          {
723
            restore_flags (flags);
724
            return -(EIO);
725
          }
726
 
727
        buf.parm1 |= tmp & 0x00ff;
728
 
729
        restore_flags (flags);
730
 
731
        memcpy_tofs (&((char *) arg)[0], &buf, sizeof (buf));
732
        return 0;
733
      }
734
      break;
735
 
736
    default:
737
      return -(EINVAL);
738
    }
739
 
740
  return -(EINVAL);
741
}
742
 
743
static coproc_operations pss_coproc_operations =
744
{
745
  "ADSP-2115",
746
  pss_coproc_open,
747
  pss_coproc_close,
748
  pss_coproc_ioctl,
749
  pss_coproc_reset,
750
  &pss_data
751
};
752
 
753
void
754
attach_pss_mpu (struct address_info *hw_config)
755
{
756
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
757
  {
758
    int             prev_devs;
759
 
760
    prev_devs = num_midis;
761
    attach_mpu401 (hw_config);
762
 
763
    if (num_midis == (prev_devs + 1))   /* The MPU driver installed itself */
764
      midi_devs[prev_devs]->coproc = &pss_coproc_operations;
765
  }
766
#endif
767
}
768
 
769
int
770
probe_pss_mss (struct address_info *hw_config)
771
{
772
  int             timeout;
773
 
774
  if (!pss_initialized)
775
    return 0;
776
 
777
  if (check_region (hw_config->io_base, 8))
778
    {
779
      printk ("PSS: WSS I/O port conflict\n");
780
      return 0;
781
    }
782
 
783
  if (!set_io_base (devc, CONF_WSS, hw_config->io_base))
784
    {
785
      printk ("PSS: WSS base error.\n");
786
      return 0;
787
    }
788
 
789
  if (!set_irq (devc, CONF_WSS, hw_config->irq))
790
    {
791
      printk ("PSS: WSS IRQ error.\n");
792
      return 0;
793
    }
794
 
795
  if (!set_dma (devc, CONF_WSS, hw_config->dma))
796
    {
797
      printk ("PSS: WSS DRQ error\n");
798
      return 0;
799
    }
800
 
801
  /*
802
     * For some reason the card returns 0xff in the WSS status register
803
     * immediately after boot. Probably MIDI+SB emulation algorithm
804
     * downloaded to the ADSP2115 spends some time initializing the card.
805
     * Let's try to wait until it finishes this task.
806
   */
807
  for (timeout = 0;
808
       timeout < 100000 && (inb (hw_config->io_base + 3) & 0x3f) != 0x04;
809
       timeout++);
810
 
811
  outb (0x0b, hw_config->io_base + 4);  /* Required by some cards */
812
  return probe_ms_sound (hw_config);
813
}
814
 
815
void
816
attach_pss_mss (struct address_info *hw_config)
817
{
818
  int             prev_devs;
819
 
820
  prev_devs = num_audiodevs;
821
  attach_ms_sound (hw_config);
822
 
823
  if (num_audiodevs == (prev_devs + 1))         /* The MSS driver installed itself */
824
    audio_devs[prev_devs]->coproc = &pss_coproc_operations;
825
}
826
 
827
void
828
unload_pss (struct address_info *hw_config)
829
{
830
}
831
 
832
void
833
unload_pss_mpu (struct address_info *hw_config)
834
{
835
#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
836
  unload_mpu401 (hw_config);
837
#endif
838
}
839
 
840
void
841
unload_pss_mss (struct address_info *hw_config)
842
{
843
  unload_ms_sound (hw_config);
844
}
845
 
846
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.