tag | line | file | source code |
devc | 132 | drivers/block/hd.c | char devc; |
devc | 134 | drivers/block/hd.c | devc = CURRENT ? 'a' + DEVICE_NR(CURRENT->dev) : '?'; |
devc | 137 | drivers/block/hd.c | printk("hd%c: %s: status=0x%02x { ", devc, msg, stat & 0xff); |
devc | 151 | drivers/block/hd.c | printk("hd%c: %s: error=0x%02x { ", devc, msg, hd_error & 0xff); |
devc | 120 | drivers/sound/ad1848.c | ad_read (ad1848_info * devc, int reg) |
devc | 126 | drivers/sound/ad1848.c | while (timeout > 0 && INB (devc->base) == 0x80) /*Are we initializing */ |
devc | 130 | drivers/sound/ad1848.c | OUTB ((unsigned char) (reg & 0xff) | devc->MCE_bit, io_Index_Addr (devc)); |
devc | 131 | drivers/sound/ad1848.c | x = INB (io_Indexed_Data (devc)); |
devc | 139 | drivers/sound/ad1848.c | ad_write (ad1848_info * devc, int reg, int data) |
devc | 144 | drivers/sound/ad1848.c | while (timeout > 0 && INB (devc->base) == 0x80) /*Are we initializing */ |
devc | 148 | drivers/sound/ad1848.c | OUTB ((unsigned char) (reg & 0xff) | devc->MCE_bit, io_Index_Addr (devc)); |
devc | 149 | drivers/sound/ad1848.c | OUTB ((unsigned char) (data & 0xff), io_Indexed_Data (devc)); |
devc | 155 | drivers/sound/ad1848.c | wait_for_calibration (ad1848_info * devc) |
devc | 167 | drivers/sound/ad1848.c | while (timeout > 0 && INB (devc->base) & 0x80) |
devc | 169 | drivers/sound/ad1848.c | if (INB (devc->base) & 0x80) |
devc | 173 | drivers/sound/ad1848.c | while (timeout > 0 && !(ad_read (devc, 11) & 0x20)) |
devc | 175 | drivers/sound/ad1848.c | if (!(ad_read (devc, 11) & 0x20)) |
devc | 179 | drivers/sound/ad1848.c | while (timeout > 0 && ad_read (devc, 11) & 0x20) |
devc | 181 | drivers/sound/ad1848.c | if (ad_read (devc, 11) & 0x20) |
devc | 186 | drivers/sound/ad1848.c | ad_mute (ad1848_info * devc) |
devc | 196 | drivers/sound/ad1848.c | prev = devc->saved_regs[i] = ad_read (devc, i); |
devc | 197 | drivers/sound/ad1848.c | ad_write (devc, i, prev | 0x80); |
devc | 202 | drivers/sound/ad1848.c | ad_unmute (ad1848_info * devc) |
devc | 211 | drivers/sound/ad1848.c | ad_write (devc, i, devc->saved_regs[i] & ~0x80); |
devc | 216 | drivers/sound/ad1848.c | ad_enter_MCE (ad1848_info * devc) |
devc | 222 | drivers/sound/ad1848.c | while (timeout > 0 && INB (devc->base) == 0x80) /*Are we initializing */ |
devc | 227 | drivers/sound/ad1848.c | devc->MCE_bit = 0x40; |
devc | 228 | drivers/sound/ad1848.c | prev = INB (io_Index_Addr (devc)); |
devc | 235 | drivers/sound/ad1848.c | OUTB (devc->MCE_bit, io_Index_Addr (devc)); |
devc | 240 | drivers/sound/ad1848.c | ad_leave_MCE (ad1848_info * devc) |
devc | 246 | drivers/sound/ad1848.c | while (timeout > 0 && INB (devc->base) == 0x80) /*Are we initializing */ |
devc | 251 | drivers/sound/ad1848.c | devc->MCE_bit = 0x00; |
devc | 252 | drivers/sound/ad1848.c | prev = INB (io_Index_Addr (devc)); |
devc | 253 | drivers/sound/ad1848.c | OUTB (0x00, io_Index_Addr (devc)); /* Clear the MCE bit */ |
devc | 261 | drivers/sound/ad1848.c | OUTB (0x00, io_Index_Addr (devc)); /* Clear the MCE bit */ |
devc | 262 | drivers/sound/ad1848.c | wait_for_calibration (devc); |
devc | 268 | drivers/sound/ad1848.c | ad1848_set_recmask (ad1848_info * devc, int mask) |
devc | 273 | drivers/sound/ad1848.c | mask &= devc->supported_rec_devices; |
devc | 284 | drivers/sound/ad1848.c | mask &= ~devc->recmask; /* Filter out active settings */ |
devc | 317 | drivers/sound/ad1848.c | ad_write (devc, 0, (ad_read (devc, 0) & 0x3f) | recdev); |
devc | 318 | drivers/sound/ad1848.c | ad_write (devc, 1, (ad_read (devc, 1) & 0x3f) | recdev); |
devc | 320 | drivers/sound/ad1848.c | devc->recmask = mask; |
devc | 342 | drivers/sound/ad1848.c | ad1848_mixer_get (ad1848_info * devc, int dev) |
devc | 344 | drivers/sound/ad1848.c | if (!((1 << dev) & devc->supported_devices)) |
devc | 347 | drivers/sound/ad1848.c | return devc->levels[dev]; |
devc | 351 | drivers/sound/ad1848.c | ad1848_mixer_set (ad1848_info * devc, int dev, int value) |
devc | 367 | drivers/sound/ad1848.c | if (!(devc->supported_devices & (1 << dev))) |
devc | 378 | drivers/sound/ad1848.c | val = ad_read (devc, regoffs); |
devc | 380 | drivers/sound/ad1848.c | devc->levels[dev] = left | (left << 8); |
devc | 381 | drivers/sound/ad1848.c | ad_write (devc, regoffs, val); |
devc | 382 | drivers/sound/ad1848.c | devc->saved_regs[regoffs] = val; |
devc | 392 | drivers/sound/ad1848.c | val = ad_read (devc, regoffs); |
devc | 394 | drivers/sound/ad1848.c | ad_write (devc, regoffs, val); |
devc | 395 | drivers/sound/ad1848.c | devc->saved_regs[regoffs] = val; |
devc | 397 | drivers/sound/ad1848.c | devc->levels[dev] = left | (right << 8); |
devc | 402 | drivers/sound/ad1848.c | ad1848_mixer_reset (ad1848_info * devc) |
devc | 406 | drivers/sound/ad1848.c | devc->recmask = 0; |
devc | 407 | drivers/sound/ad1848.c | if (devc->mode == 2) |
devc | 408 | drivers/sound/ad1848.c | devc->supported_devices = MODE2_MIXER_DEVICES; |
devc | 410 | drivers/sound/ad1848.c | devc->supported_devices = MODE1_MIXER_DEVICES; |
devc | 412 | drivers/sound/ad1848.c | devc->supported_rec_devices = MODE1_REC_DEVICES; |
devc | 415 | drivers/sound/ad1848.c | ad1848_mixer_set (devc, i, devc->levels[i] = default_mixer_levels[i]); |
devc | 416 | drivers/sound/ad1848.c | ad1848_set_recmask (devc, SOUND_MASK_MIC); |
devc | 422 | drivers/sound/ad1848.c | ad1848_info *devc; |
devc | 431 | drivers/sound/ad1848.c | devc = (ad1848_info *) audio_devs[codec_dev]->devc; |
devc | 439 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, ad1848_set_recmask (devc, IOCTL_IN (arg))); |
devc | 443 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, ad1848_mixer_set (devc, cmd & 0xff, IOCTL_IN (arg))); |
devc | 452 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, devc->recmask); |
devc | 456 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, devc->supported_devices); |
devc | 460 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, devc->supported_devices & |
devc | 465 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, devc->supported_rec_devices); |
devc | 473 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, ad1848_mixer_get (devc, cmd & 0xff)); |
devc | 510 | drivers/sound/ad1848.c | ad1848_info *devc = NULL; |
devc | 518 | drivers/sound/ad1848.c | devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 521 | drivers/sound/ad1848.c | if (devc->opened) |
devc | 528 | drivers/sound/ad1848.c | if (devc->irq) /* Not managed by another driver */ |
devc | 529 | drivers/sound/ad1848.c | if ((err = snd_set_irq_handler (devc->irq, ad1848_interrupt, |
devc | 542 | drivers/sound/ad1848.c | audio_devs[dev]->dmachan = devc->dma_playback; |
devc | 544 | drivers/sound/ad1848.c | audio_devs[dev]->dmachan = devc->dma_capture; |
devc | 549 | drivers/sound/ad1848.c | if (devc->irq) /* Don't leave IRQ reserved */ |
devc | 550 | drivers/sound/ad1848.c | snd_release_irq (devc->irq); |
devc | 556 | drivers/sound/ad1848.c | devc->dual_dma = 0; |
devc | 558 | drivers/sound/ad1848.c | if (devc->dma_capture != devc->dma_playback && mode == OPEN_READWRITE) |
devc | 560 | drivers/sound/ad1848.c | devc->dual_dma = 1; |
devc | 562 | drivers/sound/ad1848.c | if (ALLOC_DMA_CHN (devc->dma_capture, "Sound System (capture)")) |
devc | 564 | drivers/sound/ad1848.c | if (devc->irq) /* Don't leave IRQ reserved */ |
devc | 565 | drivers/sound/ad1848.c | snd_release_irq (devc->irq); |
devc | 571 | drivers/sound/ad1848.c | devc->intr_active = 0; |
devc | 572 | drivers/sound/ad1848.c | devc->opened = 1; |
devc | 577 | drivers/sound/ad1848.c | ad_mute (devc); |
devc | 586 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 592 | drivers/sound/ad1848.c | devc->intr_active = 0; |
devc | 593 | drivers/sound/ad1848.c | if (devc->irq) /* Not managed by another driver */ |
devc | 594 | drivers/sound/ad1848.c | snd_release_irq (devc->irq); |
devc | 598 | drivers/sound/ad1848.c | if (devc->dual_dma) /* Release the second DMA channel */ |
devc | 600 | drivers/sound/ad1848.c | if (audio_devs[dev]->dmachan == devc->dma_playback) |
devc | 601 | drivers/sound/ad1848.c | RELEASE_DMA_CHN (devc->dma_capture); |
devc | 603 | drivers/sound/ad1848.c | RELEASE_DMA_CHN (devc->dma_playback); |
devc | 606 | drivers/sound/ad1848.c | devc->opened = 0; |
devc | 608 | drivers/sound/ad1848.c | ad_unmute (devc); |
devc | 613 | drivers/sound/ad1848.c | set_speed (ad1848_info * devc, int arg) |
devc | 680 | drivers/sound/ad1848.c | devc->speed = speed_table[selected].speed; |
devc | 681 | drivers/sound/ad1848.c | devc->speed_bits = speed_table[selected].bits; |
devc | 682 | drivers/sound/ad1848.c | return devc->speed; |
devc | 686 | drivers/sound/ad1848.c | set_channels (ad1848_info * devc, int arg) |
devc | 689 | drivers/sound/ad1848.c | return devc->channels; |
devc | 691 | drivers/sound/ad1848.c | devc->channels = arg; |
devc | 696 | drivers/sound/ad1848.c | set_format (ad1848_info * devc, int arg) |
devc | 748 | drivers/sound/ad1848.c | if (!(arg & ad_format_mask[devc->mode])) |
devc | 751 | drivers/sound/ad1848.c | devc->audio_format = arg; |
devc | 756 | drivers/sound/ad1848.c | if ((devc->format_bits = format2bits[i].bits) == 0) |
devc | 757 | drivers/sound/ad1848.c | return devc->audio_format = AFMT_U8; /* Was not supported */ |
devc | 763 | drivers/sound/ad1848.c | devc->format_bits = 0; |
devc | 764 | drivers/sound/ad1848.c | return devc->audio_format = AFMT_U8; |
devc | 770 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 776 | drivers/sound/ad1848.c | return set_speed (devc, arg); |
devc | 777 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, set_speed (devc, IOCTL_IN (arg))); |
devc | 781 | drivers/sound/ad1848.c | return devc->speed; |
devc | 782 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, devc->speed); |
devc | 786 | drivers/sound/ad1848.c | return set_channels (devc, arg + 1) - 1; |
devc | 787 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, set_channels (devc, IOCTL_IN (arg) + 1) - 1); |
devc | 791 | drivers/sound/ad1848.c | return set_channels (devc, arg); |
devc | 792 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, set_channels (devc, IOCTL_IN (arg))); |
devc | 796 | drivers/sound/ad1848.c | return devc->channels; |
devc | 797 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, devc->channels); |
devc | 801 | drivers/sound/ad1848.c | return set_format (devc, arg); |
devc | 802 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, set_format (devc, IOCTL_IN (arg))); |
devc | 806 | drivers/sound/ad1848.c | return devc->audio_format; |
devc | 807 | drivers/sound/ad1848.c | return IOCTL_OUT (arg, devc->audio_format); |
devc | 818 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 822 | drivers/sound/ad1848.c | audio_devs[dev]->dmachan = devc->dma_playback; |
devc | 824 | drivers/sound/ad1848.c | if (devc->audio_format == AFMT_IMA_ADPCM) |
devc | 830 | drivers/sound/ad1848.c | if (devc->audio_format & (AFMT_S16_LE | AFMT_S16_BE)) /* 16 bit data */ |
devc | 833 | drivers/sound/ad1848.c | if (devc->channels > 1) |
devc | 839 | drivers/sound/ad1848.c | cnt == devc->xfer_count) |
devc | 841 | drivers/sound/ad1848.c | devc->irq_mode = IMODE_OUTPUT; |
devc | 842 | drivers/sound/ad1848.c | devc->intr_active = 1; |
devc | 855 | drivers/sound/ad1848.c | ad_enter_MCE (devc); |
devc | 857 | drivers/sound/ad1848.c | ad_write (devc, 15, (unsigned char) (cnt & 0xff)); |
devc | 858 | drivers/sound/ad1848.c | ad_write (devc, 14, (unsigned char) ((cnt >> 8) & 0xff)); |
devc | 860 | drivers/sound/ad1848.c | if (devc->dma_playback == devc->dma_capture) |
devc | 862 | drivers/sound/ad1848.c | ad_write (devc, 9, 0x0d); /* |
devc | 869 | drivers/sound/ad1848.c | ad_write (devc, 9, 0x09); /* |
devc | 875 | drivers/sound/ad1848.c | ad_leave_MCE (devc); /* |
devc | 879 | drivers/sound/ad1848.c | ad_unmute (devc); |
devc | 881 | drivers/sound/ad1848.c | devc->xfer_count = cnt; |
devc | 882 | drivers/sound/ad1848.c | devc->irq_mode = IMODE_OUTPUT; |
devc | 883 | drivers/sound/ad1848.c | devc->intr_active = 1; |
devc | 884 | drivers/sound/ad1848.c | INB (io_Status (devc)); |
devc | 885 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear pending interrupts */ |
devc | 894 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 896 | drivers/sound/ad1848.c | audio_devs[dev]->dmachan = devc->dma_capture; |
devc | 899 | drivers/sound/ad1848.c | if (devc->audio_format == AFMT_IMA_ADPCM) |
devc | 905 | drivers/sound/ad1848.c | if (devc->audio_format & (AFMT_S16_LE | AFMT_S16_BE)) /* 16 bit data */ |
devc | 908 | drivers/sound/ad1848.c | if (devc->channels > 1) |
devc | 914 | drivers/sound/ad1848.c | cnt == devc->xfer_count) |
devc | 916 | drivers/sound/ad1848.c | devc->irq_mode = IMODE_INPUT; |
devc | 917 | drivers/sound/ad1848.c | devc->intr_active = 1; |
devc | 930 | drivers/sound/ad1848.c | ad_enter_MCE (devc); |
devc | 932 | drivers/sound/ad1848.c | if (devc->dma_playback == devc->dma_capture) /* Single DMA channel mode */ |
devc | 934 | drivers/sound/ad1848.c | ad_write (devc, 15, (unsigned char) (cnt & 0xff)); |
devc | 935 | drivers/sound/ad1848.c | ad_write (devc, 14, (unsigned char) ((cnt >> 8) & 0xff)); |
devc | 937 | drivers/sound/ad1848.c | ad_write (devc, 9, 0x0e); /* |
devc | 945 | drivers/sound/ad1848.c | ad_write (devc, 31, (unsigned char) (cnt & 0xff)); |
devc | 946 | drivers/sound/ad1848.c | ad_write (devc, 30, (unsigned char) ((cnt >> 8) & 0xff)); |
devc | 948 | drivers/sound/ad1848.c | ad_write (devc, 9, 0x0a); /* |
devc | 954 | drivers/sound/ad1848.c | ad_leave_MCE (devc); /* |
devc | 958 | drivers/sound/ad1848.c | ad_unmute (devc); |
devc | 960 | drivers/sound/ad1848.c | devc->xfer_count = cnt; |
devc | 961 | drivers/sound/ad1848.c | devc->irq_mode = IMODE_INPUT; |
devc | 962 | drivers/sound/ad1848.c | devc->intr_active = 1; |
devc | 963 | drivers/sound/ad1848.c | INB (io_Status (devc)); |
devc | 964 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear interrupt status */ |
devc | 974 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 977 | drivers/sound/ad1848.c | ad_enter_MCE (devc); /* Enables changes to the format select reg */ |
devc | 978 | drivers/sound/ad1848.c | fs = devc->speed_bits | (devc->format_bits << 5); |
devc | 980 | drivers/sound/ad1848.c | if (devc->channels > 1) |
devc | 983 | drivers/sound/ad1848.c | ad_write (devc, 8, fs); |
devc | 988 | drivers/sound/ad1848.c | while (timeout > 0 && INB (devc->base) == 0x80) |
devc | 994 | drivers/sound/ad1848.c | if (devc->mode == 2) |
devc | 996 | drivers/sound/ad1848.c | ad_write (devc, 28, fs); |
devc | 1002 | drivers/sound/ad1848.c | while (timeout > 0 && INB (devc->base) == 0x80) |
devc | 1007 | drivers/sound/ad1848.c | ad_leave_MCE (devc); /* |
devc | 1011 | drivers/sound/ad1848.c | devc->xfer_count = 0; |
devc | 1024 | drivers/sound/ad1848.c | ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 1026 | drivers/sound/ad1848.c | ad_mute (devc); |
devc | 1027 | drivers/sound/ad1848.c | ad_write (devc, 9, ad_read (devc, 9) & ~0x03); /* Stop DMA */ |
devc | 1028 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear interrupt status */ |
devc | 1030 | drivers/sound/ad1848.c | ad_enter_MCE (devc); |
devc | 1031 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear interrupt status */ |
devc | 1032 | drivers/sound/ad1848.c | ad_write (devc, 15, 0); /* Clear DMA counter */ |
devc | 1033 | drivers/sound/ad1848.c | ad_write (devc, 14, 0); /* Clear DMA counter */ |
devc | 1035 | drivers/sound/ad1848.c | if (devc->mode == 2) |
devc | 1037 | drivers/sound/ad1848.c | ad_write (devc, 30, 0); /* Clear DMA counter */ |
devc | 1038 | drivers/sound/ad1848.c | ad_write (devc, 31, 0); /* Clear DMA counter */ |
devc | 1041 | drivers/sound/ad1848.c | ad_write (devc, 9, ad_read (devc, 9) & ~0x03); /* Stop DMA */ |
devc | 1043 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear interrupt status */ |
devc | 1044 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear interrupt status */ |
devc | 1045 | drivers/sound/ad1848.c | ad_leave_MCE (devc); |
devc | 1056 | drivers/sound/ad1848.c | ad1848_info *devc = &dev_info[nr_ad1848_devs]; |
devc | 1065 | drivers/sound/ad1848.c | devc->base = io_base; |
devc | 1066 | drivers/sound/ad1848.c | devc->MCE_bit = 0x40; |
devc | 1067 | drivers/sound/ad1848.c | devc->irq = 0; |
devc | 1068 | drivers/sound/ad1848.c | devc->dma_capture = 0; |
devc | 1069 | drivers/sound/ad1848.c | devc->dma_playback = 0; |
devc | 1070 | drivers/sound/ad1848.c | devc->opened = 0; |
devc | 1071 | drivers/sound/ad1848.c | devc->chip_name = "AD1848"; |
devc | 1072 | drivers/sound/ad1848.c | devc->mode = 1; /* MODE1 = original AD1848 */ |
devc | 1084 | drivers/sound/ad1848.c | if ((INB (devc->base) & 0x80) != 0x00) /* Not a AD1884 */ |
devc | 1096 | drivers/sound/ad1848.c | ad_write (devc, 0, 0xaa); |
devc | 1097 | drivers/sound/ad1848.c | ad_write (devc, 1, 0x45); /* 0x55 with bit 0x10 clear */ |
devc | 1099 | drivers/sound/ad1848.c | if ((tmp1 = ad_read (devc, 0)) != 0xaa || (tmp2 = ad_read (devc, 1)) != 0x45) |
devc | 1105 | drivers/sound/ad1848.c | ad_write (devc, 0, 0x45); |
devc | 1106 | drivers/sound/ad1848.c | ad_write (devc, 1, 0xaa); |
devc | 1108 | drivers/sound/ad1848.c | if ((tmp1 = ad_read (devc, 0)) != 0x45 || (tmp2 = ad_read (devc, 1)) != 0xaa) |
devc | 1119 | drivers/sound/ad1848.c | tmp = ad_read (devc, 12); |
devc | 1120 | drivers/sound/ad1848.c | ad_write (devc, 12, (~tmp) & 0x0f); |
devc | 1122 | drivers/sound/ad1848.c | if ((tmp & 0x0f) != ((tmp1 = ad_read (devc, 12)) & 0x0f)) |
devc | 1140 | drivers/sound/ad1848.c | ad_write (devc, 12, 0); /* Mode2=disabled */ |
devc | 1143 | drivers/sound/ad1848.c | if ((tmp1 = ad_read (devc, i)) != (tmp2 = ad_read (devc, i + 16))) |
devc | 1154 | drivers/sound/ad1848.c | ad_write (devc, 12, 0x40); /* Set mode2, clear 0x80 */ |
devc | 1156 | drivers/sound/ad1848.c | tmp1 = ad_read (devc, 12); |
devc | 1158 | drivers/sound/ad1848.c | devc->chip_name = "CS4248"; /* Our best knowledge just now */ |
devc | 1167 | drivers/sound/ad1848.c | ad_write (devc, 16, 0); /* Set I16 to known value */ |
devc | 1169 | drivers/sound/ad1848.c | ad_write (devc, 0, 0x45); |
devc | 1170 | drivers/sound/ad1848.c | if ((tmp1 = ad_read (devc, 16)) != 0x45) /* No change -> CS4231? */ |
devc | 1173 | drivers/sound/ad1848.c | ad_write (devc, 0, 0xaa); |
devc | 1174 | drivers/sound/ad1848.c | if ((tmp1 = ad_read (devc, 16)) == 0xaa) /* Rotten bits? */ |
devc | 1184 | drivers/sound/ad1848.c | tmp1 = ad_read (devc, 25); /* Original bits */ |
devc | 1185 | drivers/sound/ad1848.c | ad_write (devc, 25, ~tmp1); /* Invert all bits */ |
devc | 1186 | drivers/sound/ad1848.c | if ((ad_read (devc, 25) & 0xe7) == (tmp1 & 0xe7)) |
devc | 1191 | drivers/sound/ad1848.c | devc->chip_name = "CS4231"; |
devc | 1194 | drivers/sound/ad1848.c | if (devc->base != MOZART_PORT + 4) |
devc | 1196 | drivers/sound/ad1848.c | devc->mode = 2; |
devc | 1204 | drivers/sound/ad1848.c | if ((ad_read (devc, 25) & 0xe7) == 0xa0) |
devc | 1206 | drivers/sound/ad1848.c | devc->chip_name = "CS4231A"; |
devc | 1208 | drivers/sound/ad1848.c | else if ((ad_read (devc, 25) & 0xe7) == 0x80) |
devc | 1217 | drivers/sound/ad1848.c | unsigned char tmp = ad_read (devc, 23); |
devc | 1219 | drivers/sound/ad1848.c | ad_write (devc, 23, ~tmp); |
devc | 1220 | drivers/sound/ad1848.c | if (ad_read (devc, 23) != tmp) /* AD1845 ? */ |
devc | 1222 | drivers/sound/ad1848.c | devc->chip_name = "AD1845"; |
devc | 1225 | drivers/sound/ad1848.c | ad_write (devc, 23, tmp); /* Restore */ |
devc | 1230 | drivers/sound/ad1848.c | ad_write (devc, 25, tmp1); /* Restore bits */ |
devc | 1259 | drivers/sound/ad1848.c | ad1848_info *devc = &dev_info[nr_ad1848_devs]; |
devc | 1264 | drivers/sound/ad1848.c | devc->irq = (irq > 0) ? irq : 0; |
devc | 1265 | drivers/sound/ad1848.c | devc->dma_playback = dma_playback; |
devc | 1267 | drivers/sound/ad1848.c | if (devc->mode == 2) |
devc | 1268 | drivers/sound/ad1848.c | devc->dma_capture = dma_capture; |
devc | 1270 | drivers/sound/ad1848.c | devc->dma_capture = dma_playback; /* Use just single DMA */ |
devc | 1272 | drivers/sound/ad1848.c | devc->opened = 0; |
devc | 1282 | drivers/sound/ad1848.c | ad_write (devc, i, init_values[i]); |
devc | 1284 | drivers/sound/ad1848.c | ad_mute (devc); /* Initialize some variables */ |
devc | 1285 | drivers/sound/ad1848.c | ad_unmute (devc); /* Leave it unmuted now */ |
devc | 1287 | drivers/sound/ad1848.c | if (devc->mode == 2) |
devc | 1289 | drivers/sound/ad1848.c | ad_write (devc, 12, ad_read (devc, 12) | 0x40); /* Mode2 = enabled */ |
devc | 1291 | drivers/sound/ad1848.c | ad_write (devc, i, init_values[i]); |
devc | 1294 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear pending interrupts */ |
devc | 1298 | drivers/sound/ad1848.c | "%s (%s)", name, devc->chip_name); |
devc | 1301 | drivers/sound/ad1848.c | "Generic audio codec (%s)", devc->chip_name); |
devc | 1316 | drivers/sound/ad1848.c | audio_devs[my_dev]->devc = devc; |
devc | 1317 | drivers/sound/ad1848.c | audio_devs[my_dev]->format_mask = ad_format_mask[devc->mode]; |
devc | 1324 | drivers/sound/ad1848.c | ad_enter_MCE (devc); /* In case the bit was off */ |
devc | 1325 | drivers/sound/ad1848.c | ad_leave_MCE (devc); |
devc | 1332 | drivers/sound/ad1848.c | ad1848_mixer_reset (devc); |
devc | 1343 | drivers/sound/ad1848.c | ad1848_info *devc; |
devc | 1352 | drivers/sound/ad1848.c | devc = (ad1848_info *) audio_devs[dev]->devc; |
devc | 1353 | drivers/sound/ad1848.c | status = INB (io_Status (devc)); |
devc | 1360 | drivers/sound/ad1848.c | if (devc->opened && devc->irq_mode == IMODE_OUTPUT) |
devc | 1365 | drivers/sound/ad1848.c | if (devc->opened && devc->irq_mode == IMODE_INPUT) |
devc | 1369 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Clear interrupt status */ |
devc | 1371 | drivers/sound/ad1848.c | status = INB (io_Status (devc)); |
devc | 1375 | drivers/sound/ad1848.c | OUTB (0, io_Status (devc)); /* Try again */ |
devc | 106 | drivers/sound/audio.c | open (audio_devs[dev]->coproc->devc, COPR_PCM)) < 0) |
devc | 153 | drivers/sound/audio.c | audio_devs[dev]->coproc->close (audio_devs[dev]->coproc->devc, COPR_PCM); |
devc | 360 | drivers/sound/audio.c | return audio_devs[dev]->coproc->ioctl (audio_devs[dev]->coproc->devc, cmd, arg, 0); |
devc | 116 | drivers/sound/dev_table.h | int (*open) (void *devc, int sub_device); |
devc | 117 | drivers/sound/dev_table.h | void (*close) (void *devc, int sub_device); |
devc | 118 | drivers/sound/dev_table.h | int (*ioctl) (void *devc, unsigned int cmd, unsigned int arg, int local); |
devc | 119 | drivers/sound/dev_table.h | void (*reset) (void *devc); |
devc | 121 | drivers/sound/dev_table.h | void *devc; /* Driver specific info */ |
devc | 131 | drivers/sound/dev_table.h | void *devc; /* Driver specific info */ |
devc | 385 | drivers/sound/midibuf.c | return midi_devs[dev]->coproc->ioctl (midi_devs[dev]->coproc->devc, cmd, arg, 0); |
devc | 112 | drivers/sound/mpu401.c | static int reset_mpu401 (struct mpu_config *devc); |
devc | 113 | drivers/sound/mpu401.c | static void set_uart_mode (int dev, struct mpu_config *devc, int arg); |
devc | 116 | drivers/sound/mpu401.c | static void timer_ext_event (struct mpu_config *devc, int event, int parm); |
devc | 162 | drivers/sound/mpu401.c | mpu_input_scanner (struct mpu_config *devc, unsigned char midic) |
devc | 165 | drivers/sound/mpu401.c | switch (devc->m_state) |
devc | 179 | drivers/sound/mpu401.c | if (devc->timer_flag) |
devc | 203 | drivers/sound/mpu401.c | devc->m_state = ST_SYSMSG; |
devc | 210 | drivers/sound/mpu401.c | devc->m_state = ST_TIMED; |
devc | 221 | drivers/sound/mpu401.c | devc->m_state = ST_DATABYTE; |
devc | 226 | drivers/sound/mpu401.c | msg = (devc->last_status & 0xf0) >> 4; |
devc | 228 | drivers/sound/mpu401.c | devc->m_left = len_tab[msg] - 1; |
devc | 230 | drivers/sound/mpu401.c | devc->m_ptr = 2; |
devc | 231 | drivers/sound/mpu401.c | devc->m_buf[0] = devc->last_status; |
devc | 232 | drivers/sound/mpu401.c | devc->m_buf[1] = midic; |
devc | 234 | drivers/sound/mpu401.c | if (devc->m_left <= 0) |
devc | 236 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 237 | drivers/sound/mpu401.c | do_midi_msg (devc->synthno, devc->m_buf, devc->m_ptr); |
devc | 238 | drivers/sound/mpu401.c | devc->m_ptr = 0; |
devc | 243 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 265 | drivers/sound/mpu401.c | devc->last_status = midic; |
devc | 268 | drivers/sound/mpu401.c | devc->m_left = len_tab[msg]; |
devc | 270 | drivers/sound/mpu401.c | devc->m_ptr = 1; |
devc | 271 | drivers/sound/mpu401.c | devc->m_buf[0] = midic; |
devc | 273 | drivers/sound/mpu401.c | if (devc->m_left <= 0) |
devc | 275 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 276 | drivers/sound/mpu401.c | do_midi_msg (devc->synthno, devc->m_buf, devc->m_ptr); |
devc | 277 | drivers/sound/mpu401.c | devc->m_ptr = 0; |
devc | 288 | drivers/sound/mpu401.c | devc->m_state = ST_SYSEX; |
devc | 292 | drivers/sound/mpu401.c | devc->m_state = ST_MTC; |
devc | 296 | drivers/sound/mpu401.c | devc->m_state = ST_SONGPOS; |
devc | 297 | drivers/sound/mpu401.c | devc->m_ptr = 0; |
devc | 301 | drivers/sound/mpu401.c | devc->m_state = ST_SONGSEL; |
devc | 306 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 313 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 314 | drivers/sound/mpu401.c | timer_ext_event (devc, TMR_CLOCK, 0); |
devc | 318 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 319 | drivers/sound/mpu401.c | timer_ext_event (devc, TMR_START, 0); |
devc | 323 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 324 | drivers/sound/mpu401.c | timer_ext_event (devc, TMR_CONTINUE, 0); |
devc | 328 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 329 | drivers/sound/mpu401.c | timer_ext_event (devc, TMR_STOP, 0); |
devc | 334 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 339 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 344 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 349 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 357 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 364 | drivers/sound/mpu401.c | BUFTEST (devc); |
devc | 365 | drivers/sound/mpu401.c | devc->m_buf[devc->m_ptr++] = midic; |
devc | 366 | drivers/sound/mpu401.c | if (devc->m_ptr == 2) |
devc | 368 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 369 | drivers/sound/mpu401.c | devc->m_ptr = 0; |
devc | 370 | drivers/sound/mpu401.c | timer_ext_event (devc, TMR_SPP, |
devc | 371 | drivers/sound/mpu401.c | ((devc->m_buf[1] & 0x7f) << 7) | |
devc | 372 | drivers/sound/mpu401.c | (devc->m_buf[0] & 0x7f)); |
devc | 377 | drivers/sound/mpu401.c | BUFTEST (devc); |
devc | 378 | drivers/sound/mpu401.c | devc->m_buf[devc->m_ptr++] = midic; |
devc | 379 | drivers/sound/mpu401.c | if ((--devc->m_left) <= 0) |
devc | 381 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 382 | drivers/sound/mpu401.c | do_midi_msg (devc->synthno, devc->m_buf, devc->m_ptr); |
devc | 383 | drivers/sound/mpu401.c | devc->m_ptr = 0; |
devc | 388 | drivers/sound/mpu401.c | printk ("Bad state %d ", devc->m_state); |
devc | 389 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 396 | drivers/sound/mpu401.c | mpu401_input_loop (struct mpu_config *devc) |
devc | 403 | drivers/sound/mpu401.c | busy = devc->m_busy; |
devc | 404 | drivers/sound/mpu401.c | devc->m_busy = 1; |
devc | 412 | drivers/sound/mpu401.c | while (input_avail (devc->base) && n-- > 0) |
devc | 414 | drivers/sound/mpu401.c | unsigned char c = read_data (devc->base); |
devc | 416 | drivers/sound/mpu401.c | if (devc->mode == MODE_SYNTH) |
devc | 418 | drivers/sound/mpu401.c | mpu_input_scanner (devc, c); |
devc | 420 | drivers/sound/mpu401.c | else if (devc->opened & OPEN_READ && devc->inputintr != NULL) |
devc | 421 | drivers/sound/mpu401.c | devc->inputintr (devc->devno, c); |
devc | 424 | drivers/sound/mpu401.c | devc->m_busy = 0; |
devc | 430 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 450 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
devc | 452 | drivers/sound/mpu401.c | if (input_avail (devc->base)) |
devc | 453 | drivers/sound/mpu401.c | if (devc->base != 0 && (devc->opened & OPEN_READ || devc->mode == MODE_SYNTH)) |
devc | 454 | drivers/sound/mpu401.c | mpu401_input_loop (devc); |
devc | 458 | drivers/sound/mpu401.c | read_data (devc->base); |
devc | 470 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 475 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
devc | 477 | drivers/sound/mpu401.c | if (devc->opened) |
devc | 490 | drivers/sound/mpu401.c | if (!devc->initialized) |
devc | 492 | drivers/sound/mpu401.c | if (mpu401_status (devc->base) == 0xff) /* Bus float */ |
devc | 497 | drivers/sound/mpu401.c | reset_mpu401 (devc); |
devc | 500 | drivers/sound/mpu401.c | irq2dev[devc->irq] = dev; |
devc | 501 | drivers/sound/mpu401.c | if (devc->shared_irq == 0) |
devc | 502 | drivers/sound/mpu401.c | if ((err = snd_set_irq_handler (devc->irq, mpuintr, midi_devs[dev]->info.name) < 0)) |
devc | 509 | drivers/sound/mpu401.c | open (midi_devs[dev]->coproc->devc, COPR_MIDI)) < 0) |
devc | 511 | drivers/sound/mpu401.c | if (devc->shared_irq == 0) |
devc | 512 | drivers/sound/mpu401.c | snd_release_irq (devc->irq); |
devc | 518 | drivers/sound/mpu401.c | set_uart_mode (dev, devc, 1); |
devc | 519 | drivers/sound/mpu401.c | devc->mode = MODE_MIDI; |
devc | 520 | drivers/sound/mpu401.c | devc->synthno = 0; |
devc | 522 | drivers/sound/mpu401.c | mpu401_input_loop (devc); |
devc | 524 | drivers/sound/mpu401.c | devc->inputintr = input; |
devc | 525 | drivers/sound/mpu401.c | devc->opened = mode; |
devc | 533 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 535 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
devc | 537 | drivers/sound/mpu401.c | if (devc->uart_mode) |
devc | 538 | drivers/sound/mpu401.c | reset_mpu401 (devc); /* |
devc | 541 | drivers/sound/mpu401.c | devc->mode = 0; |
devc | 543 | drivers/sound/mpu401.c | if (devc->shared_irq == 0) |
devc | 544 | drivers/sound/mpu401.c | snd_release_irq (devc->irq); |
devc | 545 | drivers/sound/mpu401.c | devc->inputintr = NULL; |
devc | 548 | drivers/sound/mpu401.c | midi_devs[dev]->coproc->close (midi_devs[dev]->coproc->devc, COPR_MIDI); |
devc | 549 | drivers/sound/mpu401.c | devc->opened = 0; |
devc | 558 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 560 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
devc | 567 | drivers/sound/mpu401.c | if (input_avail (devc->base)) |
devc | 569 | drivers/sound/mpu401.c | mpu401_input_loop (devc); |
devc | 577 | drivers/sound/mpu401.c | for (timeout = 3000; timeout > 0 && !output_ready (devc->base); timeout--); |
devc | 580 | drivers/sound/mpu401.c | if (!output_ready (devc->base)) |
devc | 587 | drivers/sound/mpu401.c | write_data (devc->base, midi_byte); |
devc | 598 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 600 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
devc | 602 | drivers/sound/mpu401.c | if (devc->uart_mode) /* |
devc | 613 | drivers/sound/mpu401.c | if (input_avail (devc->base)) |
devc | 614 | drivers/sound/mpu401.c | mpu401_input_loop (devc); |
devc | 631 | drivers/sound/mpu401.c | if (!output_ready (devc->base)) |
devc | 637 | drivers/sound/mpu401.c | write_command (devc->base, cmd->cmd); |
devc | 640 | drivers/sound/mpu401.c | if (input_avail (devc->base)) |
devc | 641 | drivers/sound/mpu401.c | if (devc->opened && devc->mode == MODE_SYNTH) |
devc | 643 | drivers/sound/mpu401.c | if (mpu_input_scanner (devc, read_data (devc->base)) == MPU_ACK) |
devc | 648 | drivers/sound/mpu401.c | if (read_data (devc->base) == MPU_ACK) |
devc | 662 | drivers/sound/mpu401.c | for (timeout = 3000; timeout > 0 && !output_ready (devc->base); timeout--); |
devc | 680 | drivers/sound/mpu401.c | if (input_avail (devc->base)) |
devc | 682 | drivers/sound/mpu401.c | cmd->data[i] = read_data (devc->base); |
devc | 719 | drivers/sound/mpu401.c | struct mpu_config *devc = &dev_conf[dev]; |
devc | 721 | drivers/sound/mpu401.c | if (devc->uart_mode) |
devc | 763 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 765 | drivers/sound/mpu401.c | devc = &dev_conf[dev]; |
devc | 775 | drivers/sound/mpu401.c | if (devc->version == 0) |
devc | 780 | drivers/sound/mpu401.c | set_uart_mode (dev, devc, !IOCTL_IN (arg)); |
devc | 822 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 829 | drivers/sound/mpu401.c | devc = &dev_conf[midi_dev]; |
devc | 854 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 863 | drivers/sound/mpu401.c | devc = &dev_conf[midi_dev]; |
devc | 872 | drivers/sound/mpu401.c | if (!devc->initialized) |
devc | 874 | drivers/sound/mpu401.c | if (mpu401_status (devc->base) == 0xff) /* Bus float */ |
devc | 879 | drivers/sound/mpu401.c | reset_mpu401 (devc); |
devc | 882 | drivers/sound/mpu401.c | if (devc->opened) |
devc | 888 | drivers/sound/mpu401.c | devc->mode = MODE_SYNTH; |
devc | 889 | drivers/sound/mpu401.c | devc->synthno = dev; |
devc | 891 | drivers/sound/mpu401.c | devc->inputintr = NULL; |
devc | 892 | drivers/sound/mpu401.c | irq2dev[devc->irq] = midi_dev; |
devc | 893 | drivers/sound/mpu401.c | if (devc->shared_irq == 0) |
devc | 894 | drivers/sound/mpu401.c | if ((err = snd_set_irq_handler (devc->irq, mpuintr, midi_devs[midi_dev]->info.name) < 0)) |
devc | 901 | drivers/sound/mpu401.c | open (midi_devs[midi_dev]->coproc->devc, COPR_MIDI)) < 0) |
devc | 903 | drivers/sound/mpu401.c | if (devc->shared_irq == 0) |
devc | 904 | drivers/sound/mpu401.c | snd_release_irq (devc->irq); |
devc | 910 | drivers/sound/mpu401.c | devc->opened = mode; |
devc | 911 | drivers/sound/mpu401.c | reset_mpu401 (devc); |
devc | 926 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 930 | drivers/sound/mpu401.c | devc = &dev_conf[midi_dev]; |
devc | 934 | drivers/sound/mpu401.c | if (devc->shared_irq == 0) |
devc | 935 | drivers/sound/mpu401.c | snd_release_irq (devc->irq); |
devc | 936 | drivers/sound/mpu401.c | devc->inputintr = NULL; |
devc | 939 | drivers/sound/mpu401.c | midi_devs[midi_dev]->coproc->close (midi_devs[midi_dev]->coproc->devc, COPR_MIDI); |
devc | 940 | drivers/sound/mpu401.c | devc->opened = 0; |
devc | 941 | drivers/sound/mpu401.c | devc->mode = 0; |
devc | 995 | drivers/sound/mpu401.c | mpu401_chk_version (struct mpu_config *devc) |
devc | 999 | drivers/sound/mpu401.c | devc->version = devc->revision = 0; |
devc | 1007 | drivers/sound/mpu401.c | devc->version = tmp; |
devc | 1011 | drivers/sound/mpu401.c | devc->version = 0; |
devc | 1014 | drivers/sound/mpu401.c | devc->revision = tmp; |
devc | 1023 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 1031 | drivers/sound/mpu401.c | devc = &dev_conf[num_midis]; |
devc | 1033 | drivers/sound/mpu401.c | devc->base = hw_config->io_base; |
devc | 1034 | drivers/sound/mpu401.c | devc->irq = hw_config->irq; |
devc | 1035 | drivers/sound/mpu401.c | devc->opened = 0; |
devc | 1036 | drivers/sound/mpu401.c | devc->uart_mode = 0; |
devc | 1037 | drivers/sound/mpu401.c | devc->initialized = 0; |
devc | 1038 | drivers/sound/mpu401.c | devc->version = 0; |
devc | 1039 | drivers/sound/mpu401.c | devc->revision = 0; |
devc | 1040 | drivers/sound/mpu401.c | devc->capabilities = 0; |
devc | 1041 | drivers/sound/mpu401.c | devc->timer_flag = 0; |
devc | 1042 | drivers/sound/mpu401.c | devc->m_busy = 0; |
devc | 1043 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 1044 | drivers/sound/mpu401.c | devc->shared_irq = hw_config->always_detect; |
devc | 1049 | drivers/sound/mpu401.c | if (!reset_mpu401 (devc)) |
devc | 1053 | drivers/sound/mpu401.c | mpu401_chk_version (devc); |
devc | 1054 | drivers/sound/mpu401.c | if (devc->version == 0) |
devc | 1055 | drivers/sound/mpu401.c | mpu401_chk_version (devc); |
devc | 1059 | drivers/sound/mpu401.c | if (devc->version == 0) |
devc | 1067 | drivers/sound/mpu401.c | devc->capabilities |= MPU_CAP_INTLG; /* Supports intelligent mode */ |
devc | 1086 | drivers/sound/mpu401.c | if (devc->version == 0x20 && devc->revision >= 0x07) /* MusicQuest interface */ |
devc | 1088 | drivers/sound/mpu401.c | int ports = (devc->revision & 0x08) ? 32 : 16; |
devc | 1090 | drivers/sound/mpu401.c | devc->capabilities |= MPU_CAP_SYNC | MPU_CAP_SMPTE | |
devc | 1093 | drivers/sound/mpu401.c | revision_char = (devc->revision == 0x7f) ? 'M' : ' '; |
devc | 1106 | drivers/sound/mpu401.c | revision_char = devc->revision ? devc->revision + '@' : ' '; |
devc | 1107 | drivers/sound/mpu401.c | if (devc->revision > ('Z' - '@')) |
devc | 1110 | drivers/sound/mpu401.c | devc->capabilities |= MPU_CAP_SYNC | MPU_CAP_FSK; |
devc | 1113 | drivers/sound/mpu401.c | (devc->version & 0xf0) >> 4, |
devc | 1114 | drivers/sound/mpu401.c | devc->version & 0x0f, |
devc | 1118 | drivers/sound/mpu401.c | (devc->version & 0xf0) >> 4, |
devc | 1119 | drivers/sound/mpu401.c | devc->version & 0x0f, |
devc | 1127 | drivers/sound/mpu401.c | mpu401_synth_operations[num_midis].midi_dev = devc->devno = num_midis; |
devc | 1128 | drivers/sound/mpu401.c | mpu401_synth_operations[devc->devno].info = |
devc | 1129 | drivers/sound/mpu401.c | &mpu_synth_info[devc->devno]; |
devc | 1131 | drivers/sound/mpu401.c | if (devc->capabilities & MPU_CAP_INTLG) /* Has timer */ |
devc | 1134 | drivers/sound/mpu401.c | irq2dev[devc->irq] = num_midis; |
devc | 1135 | drivers/sound/mpu401.c | midi_devs[num_midis++] = &mpu401_midi_operations[devc->devno]; |
devc | 1140 | drivers/sound/mpu401.c | reset_mpu401 (struct mpu_config *devc) |
devc | 1153 | drivers/sound/mpu401.c | timeout_limit = devc->initialized ? 30000 : 100000; |
devc | 1154 | drivers/sound/mpu401.c | devc->initialized = 1; |
devc | 1159 | drivers/sound/mpu401.c | ok = output_ready (devc->base); |
devc | 1161 | drivers/sound/mpu401.c | write_command (devc->base, MPU_RESET); /* |
devc | 1173 | drivers/sound/mpu401.c | if (input_avail (devc->base)) |
devc | 1174 | drivers/sound/mpu401.c | if (read_data (devc->base) == MPU_ACK) |
devc | 1181 | drivers/sound/mpu401.c | devc->m_state = ST_INIT; |
devc | 1182 | drivers/sound/mpu401.c | devc->m_ptr = 0; |
devc | 1183 | drivers/sound/mpu401.c | devc->m_left = 0; |
devc | 1184 | drivers/sound/mpu401.c | devc->last_status = 0; |
devc | 1185 | drivers/sound/mpu401.c | devc->uart_mode = 0; |
devc | 1191 | drivers/sound/mpu401.c | set_uart_mode (int dev, struct mpu_config *devc, int arg) |
devc | 1194 | drivers/sound/mpu401.c | if (!arg && devc->version == 0) |
devc | 1199 | drivers/sound/mpu401.c | if ((devc->uart_mode == 0) == (arg == 0)) |
devc | 1204 | drivers/sound/mpu401.c | reset_mpu401 (devc); /* This exits the uart mode */ |
devc | 1210 | drivers/sound/mpu401.c | printk ("MPU%d: Can't enter UART mode\n", devc->devno); |
devc | 1211 | drivers/sound/mpu401.c | devc->uart_mode = 0; |
devc | 1215 | drivers/sound/mpu401.c | devc->uart_mode = arg; |
devc | 1660 | drivers/sound/mpu401.c | timer_ext_event (struct mpu_config *devc, int event, int parm) |
devc | 1662 | drivers/sound/mpu401.c | int midi_dev = devc->devno; |
devc | 1664 | drivers/sound/mpu401.c | if (!devc->timer_flag) |
devc | 1718 | drivers/sound/mpu401.c | struct mpu_config *devc; |
devc | 1721 | drivers/sound/mpu401.c | devc = &dev_conf[midi_dev]; |
devc | 1741 | drivers/sound/mpu401.c | if (devc->version < 0x20) /* Original MPU-401 */ |
devc | 1753 | drivers/sound/mpu401.c | if (devc->revision) |
devc | 1756 | drivers/sound/mpu401.c | if (devc->revision & 0x02) |
devc | 1760 | drivers/sound/mpu401.c | if (devc->revision & 0x04) |
devc | 1764 | drivers/sound/mpu401.c | if (devc->revision & 0x40) |
devc | 37 | drivers/sound/pss.c | #define REG(x) (devc->base+x) |
devc | 77 | drivers/sound/pss.c | static pss_config *devc = &pss_data; |
devc | 88 | drivers/sound/pss.c | devc->base = hw_config->io_base; |
devc | 89 | drivers/sound/pss.c | irq = devc->irq = hw_config->irq; |
devc | 90 | drivers/sound/pss.c | dma = devc->dma = hw_config->dma; |
devc | 92 | drivers/sound/pss.c | if (devc->base != 0x220 && devc->base != 0x240) |
devc | 93 | drivers/sound/pss.c | if (devc->base != 0x230 && devc->base != 0x250) /* Some cards use these */ |
devc | 106 | drivers/sound/pss.c | printk ("No PSS signature detected at 0x%x (0x%x)\n", devc->base, id); |
devc | 114 | drivers/sound/pss.c | set_irq (pss_config * devc, int dev, int irq) |
devc | 142 | drivers/sound/pss.c | set_io_base (pss_config * devc, int dev, int base) |
devc | 153 | drivers/sound/pss.c | set_dma (pss_config * devc, int dev, int dma) |
devc | 179 | drivers/sound/pss.c | pss_reset_dsp (pss_config * devc) |
devc | 194 | drivers/sound/pss.c | pss_put_dspword (pss_config * devc, unsigned short word) |
devc | 211 | drivers/sound/pss.c | pss_get_dspword (pss_config * devc, unsigned short *word) |
devc | 229 | drivers/sound/pss.c | pss_download_boot (pss_config * devc, unsigned char *block, int size, int flags) |
devc | 246 | drivers/sound/pss.c | pss_reset_dsp (devc); |
devc | 317 | drivers/sound/pss.c | devc->base = hw_config->io_base; |
devc | 318 | drivers/sound/pss.c | devc->irq = hw_config->irq; |
devc | 319 | drivers/sound/pss.c | devc->dma = hw_config->dma; |
devc | 335 | drivers/sound/pss.c | if (!set_irq (devc, CONF_PSS, devc->irq)) |
devc | 341 | drivers/sound/pss.c | if (!set_dma (devc, CONF_PSS, devc->dma)) |
devc | 361 | drivers/sound/pss.c | if (!set_io_base (devc, CONF_MIDI, hw_config->io_base)) |
devc | 367 | drivers/sound/pss.c | if (!set_irq (devc, CONF_MIDI, hw_config->irq)) |
devc | 379 | drivers/sound/pss.c | if (!pss_download_boot (devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) |
devc | 419 | drivers/sound/pss.c | if (!pss_download_boot (devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) |
devc | 442 | drivers/sound/pss.c | if (!pss_download_boot (devc, pss_synth, pss_synthLen, CPF_FIRST | CPF_LAST)) |
devc | 455 | drivers/sound/pss.c | if (!pss_download_boot (devc, buf->data, buf->len, buf->flags)) |
devc | 499 | drivers/sound/pss.c | if (!pss_put_dspword (devc, 0x00d0)) |
devc | 505 | drivers/sound/pss.c | if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff))) |
devc | 511 | drivers/sound/pss.c | if (!pss_get_dspword (devc, &tmp)) |
devc | 534 | drivers/sound/pss.c | if (!pss_put_dspword (devc, 0x00d1)) |
devc | 540 | drivers/sound/pss.c | if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff))) |
devc | 547 | drivers/sound/pss.c | if (!pss_put_dspword (devc, tmp)) |
devc | 567 | drivers/sound/pss.c | if (!pss_put_dspword (devc, 0x00d3)) |
devc | 573 | drivers/sound/pss.c | if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff))) |
devc | 580 | drivers/sound/pss.c | if (!pss_put_dspword (devc, tmp)) |
devc | 587 | drivers/sound/pss.c | if (!pss_put_dspword (devc, tmp)) |
devc | 607 | drivers/sound/pss.c | if (!pss_put_dspword (devc, 0x00d2)) |
devc | 613 | drivers/sound/pss.c | if (!pss_put_dspword (devc, (unsigned short) (buf.parm1 & 0xffff))) |
devc | 619 | drivers/sound/pss.c | if (!pss_get_dspword (devc, &tmp)) /* Read msb */ |
devc | 627 | drivers/sound/pss.c | if (!pss_get_dspword (devc, &tmp)) /* Read lsb */ |
devc | 683 | drivers/sound/pss.c | if (!set_io_base (devc, CONF_WSS, hw_config->io_base)) |
devc | 689 | drivers/sound/pss.c | if (!set_irq (devc, CONF_WSS, hw_config->irq)) |
devc | 695 | drivers/sound/pss.c | if (!set_dma (devc, CONF_WSS, hw_config->dma)) |
devc | 68 | drivers/sound/sscape.c | #define PORT(name) (devc->base+name) |
devc | 97 | drivers/sound/sscape.c | static struct sscape_info *devc = &dev_info; |
devc | 119 | drivers/sound/sscape.c | sscape_read (struct sscape_info *devc, int reg) |
devc | 132 | drivers/sound/sscape.c | sscape_write (struct sscape_info *devc, int reg, int data) |
devc | 143 | drivers/sound/sscape.c | host_open (struct sscape_info *devc) |
devc | 149 | drivers/sound/sscape.c | host_close (struct sscape_info *devc) |
devc | 155 | drivers/sound/sscape.c | host_write (struct sscape_info *devc, unsigned char *data, int count) |
devc | 188 | drivers/sound/sscape.c | host_read (struct sscape_info *devc) |
devc | 218 | drivers/sound/sscape.c | host_command1 (struct sscape_info *devc, int cmd) |
devc | 224 | drivers/sound/sscape.c | return host_write (devc, buf, 1); |
devc | 228 | drivers/sound/sscape.c | host_command2 (struct sscape_info *devc, int cmd, int parm1) |
devc | 235 | drivers/sound/sscape.c | return host_write (devc, buf, 2); |
devc | 239 | drivers/sound/sscape.c | host_command3 (struct sscape_info *devc, int cmd, int parm1, int parm2) |
devc | 247 | drivers/sound/sscape.c | return host_write (devc, buf, 3); |
devc | 251 | drivers/sound/sscape.c | set_mt32 (struct sscape_info *devc, int value) |
devc | 253 | drivers/sound/sscape.c | host_open (devc); |
devc | 254 | drivers/sound/sscape.c | host_command2 (devc, CMD_SET_MT32, |
devc | 256 | drivers/sound/sscape.c | if (host_read (devc) != CMD_ACK) |
devc | 260 | drivers/sound/sscape.c | host_close (devc); |
devc | 264 | drivers/sound/sscape.c | get_board_type (struct sscape_info *devc) |
devc | 268 | drivers/sound/sscape.c | host_open (devc); |
devc | 269 | drivers/sound/sscape.c | if (!host_command1 (devc, CMD_GET_BOARD_TYPE)) |
devc | 272 | drivers/sound/sscape.c | tmp = host_read (devc); |
devc | 273 | drivers/sound/sscape.c | host_close (devc); |
devc | 283 | drivers/sound/sscape.c | printk ("sscapeintr(0x%02x)\n", (bits = sscape_read (devc, GA_INTSTAT_REG))); |
devc | 291 | drivers/sound/sscape.c | printk ("SSCAPE: Host interrupt, data=%02x\n", host_read (devc)); |
devc | 300 | drivers/sound/sscape.c | sscape_write (devc, GA_INTENA_REG, 0x00); /* Disable all interrupts */ |
devc | 309 | drivers/sound/sscape.c | tmp = sscape_read (devc, GA_INTENA_REG); |
devc | 310 | drivers/sound/sscape.c | sscape_write (devc, GA_INTENA_REG, (~bits & 0x0e) | (tmp & 0xf1)); |
devc | 315 | drivers/sound/sscape.c | sscape_enable_intr (struct sscape_info *devc, unsigned intr_bits) |
devc | 319 | drivers/sound/sscape.c | temp = orig = sscape_read (devc, GA_INTENA_REG); |
devc | 326 | drivers/sound/sscape.c | sscape_write (devc, GA_INTENA_REG, temp); |
devc | 330 | drivers/sound/sscape.c | sscape_disable_intr (struct sscape_info *devc, unsigned intr_bits) |
devc | 334 | drivers/sound/sscape.c | temp = orig = sscape_read (devc, GA_INTENA_REG); |
devc | 341 | drivers/sound/sscape.c | sscape_write (devc, GA_INTENA_REG, temp); |
devc | 345 | drivers/sound/sscape.c | do_dma (struct sscape_info *devc, int dma_chan, unsigned long buf, int blk_size, int mode) |
devc | 355 | drivers/sound/sscape.c | DMAbuf_start_dma (devc->my_audiodev, |
devc | 359 | drivers/sound/sscape.c | temp = devc->dma << 4; /* Setup DMA channel select bits */ |
devc | 360 | drivers/sound/sscape.c | if (devc->dma <= 3) |
devc | 364 | drivers/sound/sscape.c | sscape_write (devc, GA_DMAA_REG, temp); |
devc | 366 | drivers/sound/sscape.c | sscape_write (devc, GA_DMAA_REG, temp); |
devc | 370 | drivers/sound/sscape.c | verify_mpu (struct sscape_info *devc) |
devc | 386 | drivers/sound/sscape.c | if (INB (devc->base + HOST_CTRL) & 0x80) |
devc | 389 | drivers/sound/sscape.c | if (INB (devc->base) != 0x00) |
devc | 402 | drivers/sound/sscape.c | set_mt32 (devc, 0); |
devc | 403 | drivers/sound/sscape.c | if (!verify_mpu (devc)) |
devc | 413 | drivers/sound/sscape.c | struct sscape_info *devc = dev_info; |
devc | 417 | drivers/sound/sscape.c | if (devc->dma_allocated) |
devc | 419 | drivers/sound/sscape.c | sscape_write (devc, GA_DMAA_REG, 0x20); /* DMA channel disabled */ |
devc | 421 | drivers/sound/sscape.c | DMAbuf_close_dma (devc->my_audiodev); |
devc | 423 | drivers/sound/sscape.c | devc->dma_allocated = 0; |
devc | 437 | drivers/sound/sscape.c | sscape_download_boot (struct sscape_info *devc, unsigned char *block, int size, int flag) |
devc | 451 | drivers/sound/sscape.c | if (devc->dma_allocated == 0) |
devc | 454 | drivers/sound/sscape.c | if (DMAbuf_open_dma (devc->my_audiodev) < 0) |
devc | 461 | drivers/sound/sscape.c | devc->dma_allocated = 1; |
devc | 465 | drivers/sound/sscape.c | sscape_write (devc, GA_HMCTL_REG, |
devc | 466 | drivers/sound/sscape.c | (temp = sscape_read (devc, GA_HMCTL_REG)) & 0x3f); /*Reset */ |
devc | 469 | drivers/sound/sscape.c | sscape_read (devc, GA_HMCTL_REG); /* Delay */ |
devc | 472 | drivers/sound/sscape.c | sscape_write (devc, GA_HMCTL_REG, |
devc | 473 | drivers/sound/sscape.c | (temp = sscape_read (devc, GA_HMCTL_REG)) | 0x80); |
devc | 479 | drivers/sound/sscape.c | memcpy (audio_devs[devc->my_audiodev]->dmap->raw_buf[0], block, size); |
devc | 483 | drivers/sound/sscape.c | do_dma (devc, SSCAPE_DMA_A, |
devc | 484 | drivers/sound/sscape.c | audio_devs[devc->my_audiodev]->dmap->raw_buf_phys[0], |
devc | 498 | drivers/sound/sscape.c | clear_dma_ff (devc->dma); |
devc | 499 | drivers/sound/sscape.c | if ((resid = get_dma_residue (devc->dma)) == 0) |
devc | 515 | drivers/sound/sscape.c | temp = sscape_read (devc, GA_HMCTL_REG); |
devc | 517 | drivers/sound/sscape.c | sscape_write (devc, GA_HMCTL_REG, temp); /* Kickstart the board */ |
devc | 556 | drivers/sound/sscape.c | get_board_type (devc)); |
devc | 567 | drivers/sound/sscape.c | printk ("I%d = %02x (new value)\n", i, sscape_read (devc, i)); |
devc | 582 | drivers/sound/sscape.c | if (!sscape_download_boot (devc, buf->data, buf->len, buf->flags)) |
devc | 636 | drivers/sound/sscape.c | sscape_info *devc = (sscape_info *) audio_devs[dev]->devc; |
devc | 639 | drivers/sound/sscape.c | if (devc->opened) |
devc | 645 | drivers/sound/sscape.c | if (devc->dma_allocated == 0) |
devc | 649 | drivers/sound/sscape.c | if ((err = DMAbuf_open_dma (devc->my_audiodev)) < 0) |
devc | 655 | drivers/sound/sscape.c | devc->dma_allocated = 1; |
devc | 658 | drivers/sound/sscape.c | devc->opened = 1; |
devc | 669 | drivers/sound/sscape.c | printk ("I%d = %02x\n", i, sscape_read (devc, i)); |
devc | 680 | drivers/sound/sscape.c | sscape_info *devc = (sscape_info *) audio_devs[dev]->devc; |
devc | 686 | drivers/sound/sscape.c | if (devc->dma_allocated) |
devc | 688 | drivers/sound/sscape.c | sscape_write (devc, GA_DMAA_REG, 0x20); /* DMA channel disabled */ |
devc | 690 | drivers/sound/sscape.c | devc->dma_allocated = 0; |
devc | 692 | drivers/sound/sscape.c | devc->opened = 0; |
devc | 698 | drivers/sound/sscape.c | set_speed (sscape_info * devc, int arg) |
devc | 704 | drivers/sound/sscape.c | set_channels (sscape_info * devc, int arg) |
devc | 710 | drivers/sound/sscape.c | set_format (sscape_info * devc, int arg) |
devc | 718 | drivers/sound/sscape.c | sscape_info *devc = (sscape_info *) audio_devs[dev]->devc; |
devc | 724 | drivers/sound/sscape.c | return set_speed (devc, arg); |
devc | 725 | drivers/sound/sscape.c | return IOCTL_OUT (arg, set_speed (devc, IOCTL_IN (arg))); |
devc | 734 | drivers/sound/sscape.c | return set_channels (devc, arg + 1) - 1; |
devc | 735 | drivers/sound/sscape.c | return IOCTL_OUT (arg, set_channels (devc, IOCTL_IN (arg) + 1) - 1); |
devc | 739 | drivers/sound/sscape.c | return set_channels (devc, arg); |
devc | 740 | drivers/sound/sscape.c | return IOCTL_OUT (arg, set_channels (devc, IOCTL_IN (arg))); |
devc | 749 | drivers/sound/sscape.c | return set_format (devc, arg); |
devc | 750 | drivers/sound/sscape.c | return IOCTL_OUT (arg, set_format (devc, IOCTL_IN (arg))); |
devc | 882 | drivers/sound/sscape.c | sscape_write (devc, i, 0xf0); /* All interrupts enabled */ |
devc | 887 | drivers/sound/sscape.c | sscape_write (devc, i, 0x20); /* DMA channel disabled */ |
devc | 891 | drivers/sound/sscape.c | sscape_write (devc, i, 0xf0 | (irq_bits << 2) | irq_bits); |
devc | 895 | drivers/sound/sscape.c | sscape_write (devc, i, (regs[i] & 0x3f) | |
devc | 896 | drivers/sound/sscape.c | (sscape_read (devc, i) & 0xc0)); |
devc | 903 | drivers/sound/sscape.c | sscape_write (devc, i, |
devc | 904 | drivers/sound/sscape.c | (sscape_read (devc, i) & 0xf0) | 0x00); |
devc | 908 | drivers/sound/sscape.c | sscape_write (devc, i, regs[i]); |
devc | 922 | drivers/sound/sscape.c | printk ("I%d = %02x (new value)\n", i, sscape_read (devc, i)); |
devc | 950 | drivers/sound/sscape.c | audio_devs[my_dev]->devc = devc; |
devc | 951 | drivers/sound/sscape.c | devc->my_audiodev = my_dev; |
devc | 952 | drivers/sound/sscape.c | devc->opened = 0; |
devc | 957 | drivers/sound/sscape.c | sscape_write (devc, GA_INTENA_REG, 0x80); /* Master IRQ enable */ |
devc | 963 | drivers/sound/sscape.c | devc->ok = 1; |
devc | 972 | drivers/sound/sscape.c | devc->base = hw_config->io_base; |
devc | 973 | drivers/sound/sscape.c | devc->irq = hw_config->irq; |
devc | 974 | drivers/sound/sscape.c | devc->dma = hw_config->dma; |
devc | 999 | drivers/sound/sscape.c | if (sscape_read (devc, 0) & 0x0c) |
devc | 1002 | drivers/sound/sscape.c | if (sscape_read (devc, 1) & 0x0f) |
devc | 1005 | drivers/sound/sscape.c | if (sscape_read (devc, 5) & 0x0f) |
devc | 1017 | drivers/sound/sscape.c | printk ("I%d = %02x (old value)\n", i, sscape_read (devc, i)); |
devc | 1026 | drivers/sound/sscape.c | if (!((tmp = sscape_read (devc, GA_HMCTL_REG)) & 0xc0)) |
devc | 1028 | drivers/sound/sscape.c | sscape_write (devc, GA_HMCTL_REG, tmp | 0x80); |
devc | 1030 | drivers/sound/sscape.c | INB (devc->base + ODIE_ADDR); |
devc | 1045 | drivers/sound/sscape.c | if (devc->ok == 0) |
devc | 1085 | drivers/sound/sscape.c | sscape_write (devc, GA_DMACFG_REG, 0x50); |
devc | 1090 | drivers/sound/sscape.c | sscape_write (devc, GA_DMAB_REG, 0x20); |
devc | 1103 | drivers/sound/sscape.c | sscape_write (devc, GA_CDCFG_REG, 0x89 | (hw_config->dma << 4) | |
devc | 1106 | drivers/sound/sscape.c | if (hw_config->irq == devc->irq) |
devc | 1127 | drivers/sound/sscape.c | printk ("I%d = %02x\n", i, sscape_read (devc, i)); |