rme32 223 sound/pci/rme32.c #define RME32_ISWORKING(rme32) ((rme32)->wcreg & RME32_WCR_START) rme32 224 sound/pci/rme32.c #define RME32_PRO_WITH_8414(rme32) ((rme32)->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO && (rme32)->rev == RME32_PRO_REVISION_WITH_8414) rme32 232 sound/pci/rme32.c static void snd_rme32_proc_init(struct rme32 * rme32); rme32 234 sound/pci/rme32.c static int snd_rme32_create_switches(struct snd_card *card, struct rme32 * rme32); rme32 236 sound/pci/rme32.c static inline unsigned int snd_rme32_pcm_byteptr(struct rme32 * rme32) rme32 238 sound/pci/rme32.c return (readl(rme32->iobase + RME32_IO_GET_POS) rme32 247 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 249 sound/pci/rme32.c memset_io(rme32->iobase + RME32_IO_DATA_BUFFER + pos, 0, count); rme32 258 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 260 sound/pci/rme32.c if (copy_from_user_toio(rme32->iobase + RME32_IO_DATA_BUFFER + pos, rme32 270 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 272 sound/pci/rme32.c memcpy_toio(rme32->iobase + RME32_IO_DATA_BUFFER + pos, src, count); rme32 281 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 284 sound/pci/rme32.c rme32->iobase + RME32_IO_DATA_BUFFER + pos, rme32 294 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 296 sound/pci/rme32.c memcpy_fromio(dst, rme32->iobase + RME32_IO_DATA_BUFFER + pos, count); rme32 406 sound/pci/rme32.c static void snd_rme32_reset_dac(struct rme32 *rme32) rme32 408 sound/pci/rme32.c writel(rme32->wcreg | RME32_WCR_PD, rme32 409 sound/pci/rme32.c rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 410 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 413 sound/pci/rme32.c static int snd_rme32_playback_getrate(struct rme32 * rme32) rme32 417 sound/pci/rme32.c rate = ((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_0) & 1) + rme32 418 sound/pci/rme32.c (((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_1) & 1) << 1); rme32 432 sound/pci/rme32.c return (rme32->wcreg & RME32_WCR_DS_BM) ? rate << 1 : rate; rme32 435 sound/pci/rme32.c static int snd_rme32_capture_getrate(struct rme32 * rme32, int *is_adat) rme32 440 sound/pci/rme32.c if (rme32->rcreg & RME32_RCR_LOCK) { rme32 444 sound/pci/rme32.c if (rme32->rcreg & RME32_RCR_ERF) { rme32 449 sound/pci/rme32.c n = ((rme32->rcreg >> RME32_RCR_BITPOS_F0) & 1) + rme32 450 sound/pci/rme32.c (((rme32->rcreg >> RME32_RCR_BITPOS_F1) & 1) << 1) + rme32 451 sound/pci/rme32.c (((rme32->rcreg >> RME32_RCR_BITPOS_F2) & 1) << 2); rme32 453 sound/pci/rme32.c if (RME32_PRO_WITH_8414(rme32)) rme32 497 sound/pci/rme32.c static int snd_rme32_playback_setrate(struct rme32 * rme32, int rate) rme32 501 sound/pci/rme32.c ds = rme32->wcreg & RME32_WCR_DS_BM; rme32 504 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_DS_BM; rme32 505 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) & rme32 509 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_DS_BM; rme32 510 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_1) & rme32 514 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_DS_BM; rme32 515 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) | rme32 519 sound/pci/rme32.c if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO) rme32 521 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_DS_BM; rme32 522 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) & rme32 526 sound/pci/rme32.c if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO) rme32 528 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_DS_BM; rme32 529 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_1) & rme32 533 sound/pci/rme32.c if (rme32->pci->device != PCI_DEVICE_ID_RME_DIGI32_PRO) rme32 535 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_DS_BM; rme32 536 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) | rme32 542 sound/pci/rme32.c if ((!ds && rme32->wcreg & RME32_WCR_DS_BM) || rme32 543 sound/pci/rme32.c (ds && !(rme32->wcreg & RME32_WCR_DS_BM))) rme32 546 sound/pci/rme32.c snd_rme32_reset_dac(rme32); rme32 548 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 553 sound/pci/rme32.c static int snd_rme32_setclockmode(struct rme32 * rme32, int mode) rme32 558 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg & ~RME32_WCR_FREQ_0) & rme32 563 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) & rme32 568 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg & ~RME32_WCR_FREQ_0) | rme32 573 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_FREQ_0) | rme32 579 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 583 sound/pci/rme32.c static int snd_rme32_getclockmode(struct rme32 * rme32) rme32 585 sound/pci/rme32.c return ((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_0) & 1) + rme32 586 sound/pci/rme32.c (((rme32->wcreg >> RME32_WCR_BITPOS_FREQ_1) & 1) << 1); rme32 589 sound/pci/rme32.c static int snd_rme32_setinputtype(struct rme32 * rme32, int type) rme32 593 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg & ~RME32_WCR_INP_0) & rme32 597 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_INP_0) & rme32 601 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg & ~RME32_WCR_INP_0) | rme32 605 sound/pci/rme32.c rme32->wcreg = (rme32->wcreg | RME32_WCR_INP_0) | rme32 611 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 615 sound/pci/rme32.c static int snd_rme32_getinputtype(struct rme32 * rme32) rme32 617 sound/pci/rme32.c return ((rme32->wcreg >> RME32_WCR_BITPOS_INP_0) & 1) + rme32 618 sound/pci/rme32.c (((rme32->wcreg >> RME32_WCR_BITPOS_INP_1) & 1) << 1); rme32 622 sound/pci/rme32.c snd_rme32_setframelog(struct rme32 * rme32, int n_channels, int is_playback) rme32 633 sound/pci/rme32.c frlog += (rme32->wcreg & RME32_WCR_MODE24) ? 2 : 1; rme32 634 sound/pci/rme32.c rme32->playback_frlog = frlog; rme32 636 sound/pci/rme32.c frlog += (rme32->wcreg & RME32_WCR_MODE24) ? 2 : 1; rme32 637 sound/pci/rme32.c rme32->capture_frlog = frlog; rme32 641 sound/pci/rme32.c static int snd_rme32_setformat(struct rme32 *rme32, snd_pcm_format_t format) rme32 645 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_MODE24; rme32 648 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_MODE24; rme32 653 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 662 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 665 sound/pci/rme32.c if (rme32->fullduplex_mode) { rme32 670 sound/pci/rme32.c runtime->dma_area = (void __force *)(rme32->iobase + rme32 672 sound/pci/rme32.c runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; rme32 676 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 677 sound/pci/rme32.c if ((rme32->rcreg & RME32_RCR_KMODE) && rme32 678 sound/pci/rme32.c (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) { rme32 681 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 684 sound/pci/rme32.c } else if ((err = snd_rme32_playback_setrate(rme32, params_rate(params))) < 0) { rme32 685 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 688 sound/pci/rme32.c if ((err = snd_rme32_setformat(rme32, params_format(params))) < 0) { rme32 689 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 693 sound/pci/rme32.c snd_rme32_setframelog(rme32, params_channels(params), 1); rme32 694 sound/pci/rme32.c if (rme32->capture_periodsize != 0) { rme32 695 sound/pci/rme32.c if (params_period_size(params) << rme32->playback_frlog != rme32->capture_periodsize) { rme32 696 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 700 sound/pci/rme32.c rme32->playback_periodsize = params_period_size(params) << rme32->playback_frlog; rme32 702 sound/pci/rme32.c if ((rme32->wcreg & RME32_WCR_ADAT) == 0) { rme32 703 sound/pci/rme32.c rme32->wcreg &= ~(RME32_WCR_PRO | RME32_WCR_EMP); rme32 704 sound/pci/rme32.c rme32->wcreg |= rme32->wcreg_spdif_stream; rme32 705 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 707 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 717 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 720 sound/pci/rme32.c if (rme32->fullduplex_mode) { rme32 725 sound/pci/rme32.c runtime->dma_area = (void __force *)rme32->iobase + rme32 727 sound/pci/rme32.c runtime->dma_addr = rme32->port + RME32_IO_DATA_BUFFER; rme32 731 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 733 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_AUTOSYNC; rme32 734 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 736 sound/pci/rme32.c if ((err = snd_rme32_setformat(rme32, params_format(params))) < 0) { rme32 737 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 740 sound/pci/rme32.c if ((err = snd_rme32_playback_setrate(rme32, params_rate(params))) < 0) { rme32 741 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 744 sound/pci/rme32.c if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) { rme32 746 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 751 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 756 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_AUTOSYNC; rme32 757 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 759 sound/pci/rme32.c snd_rme32_setframelog(rme32, params_channels(params), 0); rme32 760 sound/pci/rme32.c if (rme32->playback_periodsize != 0) { rme32 761 sound/pci/rme32.c if (params_period_size(params) << rme32->capture_frlog != rme32 762 sound/pci/rme32.c rme32->playback_periodsize) { rme32 763 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 767 sound/pci/rme32.c rme32->capture_periodsize = rme32 768 sound/pci/rme32.c params_period_size(params) << rme32->capture_frlog; rme32 769 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 776 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 777 sound/pci/rme32.c if (! rme32->fullduplex_mode) rme32 782 sound/pci/rme32.c static void snd_rme32_pcm_start(struct rme32 * rme32, int from_pause) rme32 785 sound/pci/rme32.c writel(0, rme32->iobase + RME32_IO_RESET_POS); rme32 788 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_START; rme32 789 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 792 sound/pci/rme32.c static void snd_rme32_pcm_stop(struct rme32 * rme32, int to_pause) rme32 798 sound/pci/rme32.c rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 799 sound/pci/rme32.c if (rme32->rcreg & RME32_RCR_IRQ) { rme32 800 sound/pci/rme32.c writel(0, rme32->iobase + RME32_IO_CONFIRM_ACTION_IRQ); rme32 802 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_START; rme32 803 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_SEL) rme32 804 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_MUTE; rme32 805 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 807 sound/pci/rme32.c writel(0, rme32->iobase + RME32_IO_RESET_POS); rme32 812 sound/pci/rme32.c struct rme32 *rme32 = (struct rme32 *) dev_id; rme32 814 sound/pci/rme32.c rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 815 sound/pci/rme32.c if (!(rme32->rcreg & RME32_RCR_IRQ)) { rme32 818 sound/pci/rme32.c if (rme32->capture_substream) { rme32 819 sound/pci/rme32.c snd_pcm_period_elapsed(rme32->capture_substream); rme32 821 sound/pci/rme32.c if (rme32->playback_substream) { rme32 822 sound/pci/rme32.c snd_pcm_period_elapsed(rme32->playback_substream); rme32 824 sound/pci/rme32.c writel(0, rme32->iobase + RME32_IO_CONFIRM_ACTION_IRQ); rme32 837 sound/pci/rme32.c static void snd_rme32_set_buffer_constraint(struct rme32 *rme32, struct snd_pcm_runtime *runtime) rme32 839 sound/pci/rme32.c if (! rme32->fullduplex_mode) { rme32 852 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 857 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 858 sound/pci/rme32.c if (rme32->playback_substream != NULL) { rme32 859 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 862 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_ADAT; rme32 863 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 864 sound/pci/rme32.c rme32->playback_substream = substream; rme32 865 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 867 sound/pci/rme32.c if (rme32->fullduplex_mode) rme32 871 sound/pci/rme32.c if (rme32->pci->device == PCI_DEVICE_ID_RME_DIGI32_PRO) { rme32 875 sound/pci/rme32.c if ((rme32->rcreg & RME32_RCR_KMODE) && rme32 876 sound/pci/rme32.c (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) { rme32 883 sound/pci/rme32.c snd_rme32_set_buffer_constraint(rme32, runtime); rme32 885 sound/pci/rme32.c rme32->wcreg_spdif_stream = rme32->wcreg_spdif; rme32 886 sound/pci/rme32.c rme32->spdif_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; rme32 887 sound/pci/rme32.c snd_ctl_notify(rme32->card, SNDRV_CTL_EVENT_MASK_VALUE | rme32 888 sound/pci/rme32.c SNDRV_CTL_EVENT_MASK_INFO, &rme32->spdif_ctl->id); rme32 895 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 900 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 901 sound/pci/rme32.c if (rme32->capture_substream != NULL) { rme32 902 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 905 sound/pci/rme32.c rme32->capture_substream = substream; rme32 906 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 908 sound/pci/rme32.c if (rme32->fullduplex_mode) rme32 912 sound/pci/rme32.c if (RME32_PRO_WITH_8414(rme32)) { rme32 916 sound/pci/rme32.c if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) { rme32 925 sound/pci/rme32.c snd_rme32_set_buffer_constraint(rme32, runtime); rme32 934 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 939 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 940 sound/pci/rme32.c if (rme32->playback_substream != NULL) { rme32 941 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 944 sound/pci/rme32.c rme32->wcreg |= RME32_WCR_ADAT; rme32 945 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 946 sound/pci/rme32.c rme32->playback_substream = substream; rme32 947 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 949 sound/pci/rme32.c if (rme32->fullduplex_mode) rme32 953 sound/pci/rme32.c if ((rme32->rcreg & RME32_RCR_KMODE) && rme32 954 sound/pci/rme32.c (rate = snd_rme32_capture_getrate(rme32, &dummy)) > 0) { rme32 961 sound/pci/rme32.c snd_rme32_set_buffer_constraint(rme32, runtime); rme32 969 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 972 sound/pci/rme32.c if (rme32->fullduplex_mode) rme32 976 sound/pci/rme32.c if ((rate = snd_rme32_capture_getrate(rme32, &isadat)) > 0) { rme32 987 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 988 sound/pci/rme32.c if (rme32->capture_substream != NULL) { rme32 989 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 992 sound/pci/rme32.c rme32->capture_substream = substream; rme32 993 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 995 sound/pci/rme32.c snd_rme32_set_buffer_constraint(rme32, runtime); rme32 1001 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1004 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1005 sound/pci/rme32.c rme32->playback_substream = NULL; rme32 1006 sound/pci/rme32.c rme32->playback_periodsize = 0; rme32 1007 sound/pci/rme32.c spdif = (rme32->wcreg & RME32_WCR_ADAT) == 0; rme32 1008 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1010 sound/pci/rme32.c rme32->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; rme32 1011 sound/pci/rme32.c snd_ctl_notify(rme32->card, SNDRV_CTL_EVENT_MASK_VALUE | rme32 1013 sound/pci/rme32.c &rme32->spdif_ctl->id); rme32 1020 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1022 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1023 sound/pci/rme32.c rme32->capture_substream = NULL; rme32 1024 sound/pci/rme32.c rme32->capture_periodsize = 0; rme32 1025 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1031 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1033 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1034 sound/pci/rme32.c if (rme32->fullduplex_mode) { rme32 1035 sound/pci/rme32.c memset(&rme32->playback_pcm, 0, sizeof(rme32->playback_pcm)); rme32 1036 sound/pci/rme32.c rme32->playback_pcm.hw_buffer_size = RME32_BUFFER_SIZE; rme32 1037 sound/pci/rme32.c rme32->playback_pcm.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); rme32 1039 sound/pci/rme32.c writel(0, rme32->iobase + RME32_IO_RESET_POS); rme32 1041 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_SEL) rme32 1042 sound/pci/rme32.c rme32->wcreg &= ~RME32_WCR_MUTE; rme32 1043 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 1044 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1050 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1052 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1053 sound/pci/rme32.c if (rme32->fullduplex_mode) { rme32 1054 sound/pci/rme32.c memset(&rme32->capture_pcm, 0, sizeof(rme32->capture_pcm)); rme32 1055 sound/pci/rme32.c rme32->capture_pcm.hw_buffer_size = RME32_BUFFER_SIZE; rme32 1056 sound/pci/rme32.c rme32->capture_pcm.hw_queue_size = RME32_BUFFER_SIZE / 2; rme32 1057 sound/pci/rme32.c rme32->capture_pcm.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); rme32 1059 sound/pci/rme32.c writel(0, rme32->iobase + RME32_IO_RESET_POS); rme32 1061 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1068 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1071 sound/pci/rme32.c spin_lock(&rme32->lock); rme32 1073 sound/pci/rme32.c if (s != rme32->playback_substream && rme32 1074 sound/pci/rme32.c s != rme32->capture_substream) rme32 1078 sound/pci/rme32.c rme32->running |= (1 << s->stream); rme32 1079 sound/pci/rme32.c if (rme32->fullduplex_mode) { rme32 1081 sound/pci/rme32.c if (s == rme32->playback_substream) { rme32 1082 sound/pci/rme32.c rme32->playback_pcm.hw_io = rme32 1083 sound/pci/rme32.c rme32->playback_pcm.hw_data = snd_rme32_pcm_byteptr(rme32); rme32 1085 sound/pci/rme32.c rme32->capture_pcm.hw_io = rme32 1086 sound/pci/rme32.c rme32->capture_pcm.hw_data = snd_rme32_pcm_byteptr(rme32); rme32 1091 sound/pci/rme32.c rme32->running &= ~(1 << s->stream); rme32 1099 sound/pci/rme32.c if (rme32->running && ! RME32_ISWORKING(rme32)) rme32 1100 sound/pci/rme32.c snd_rme32_pcm_start(rme32, 0); rme32 1103 sound/pci/rme32.c if (! rme32->running && RME32_ISWORKING(rme32)) rme32 1104 sound/pci/rme32.c snd_rme32_pcm_stop(rme32, 0); rme32 1107 sound/pci/rme32.c if (rme32->running && RME32_ISWORKING(rme32)) rme32 1108 sound/pci/rme32.c snd_rme32_pcm_stop(rme32, 1); rme32 1111 sound/pci/rme32.c if (rme32->running && ! RME32_ISWORKING(rme32)) rme32 1112 sound/pci/rme32.c snd_rme32_pcm_start(rme32, 1); rme32 1115 sound/pci/rme32.c spin_unlock(&rme32->lock); rme32 1123 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1124 sound/pci/rme32.c return snd_rme32_pcm_byteptr(rme32) >> rme32->playback_frlog; rme32 1130 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1131 sound/pci/rme32.c return snd_rme32_pcm_byteptr(rme32) >> rme32->capture_frlog; rme32 1139 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1140 sound/pci/rme32.c memcpy_toio(rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, rme32 1146 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1149 sound/pci/rme32.c rec = &rme32->playback_pcm; rme32 1150 sound/pci/rme32.c cprec = &rme32->capture_pcm; rme32 1151 sound/pci/rme32.c spin_lock(&rme32->lock); rme32 1153 sound/pci/rme32.c if (rme32->running & (1 << SNDRV_PCM_STREAM_CAPTURE)) rme32 1155 sound/pci/rme32.c spin_unlock(&rme32->lock); rme32 1163 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1165 sound/pci/rme32.c rme32->iobase + RME32_IO_DATA_BUFFER + rec->hw_data, rme32 1171 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1172 sound/pci/rme32.c return snd_pcm_indirect_capture_transfer(substream, &rme32->capture_pcm, rme32 1179 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1180 sound/pci/rme32.c return snd_pcm_indirect_playback_pointer(substream, &rme32->playback_pcm, rme32 1181 sound/pci/rme32.c snd_rme32_pcm_byteptr(rme32)); rme32 1187 sound/pci/rme32.c struct rme32 *rme32 = snd_pcm_substream_chip(substream); rme32 1188 sound/pci/rme32.c return snd_pcm_indirect_capture_pointer(substream, &rme32->capture_pcm, rme32 1189 sound/pci/rme32.c snd_rme32_pcm_byteptr(rme32)); rme32 1298 sound/pci/rme32.c struct rme32 *rme32 = (struct rme32 *) private_data; rme32 1300 sound/pci/rme32.c if (rme32 == NULL) { rme32 1303 sound/pci/rme32.c if (rme32->irq >= 0) { rme32 1304 sound/pci/rme32.c snd_rme32_pcm_stop(rme32, 0); rme32 1305 sound/pci/rme32.c free_irq(rme32->irq, (void *) rme32); rme32 1306 sound/pci/rme32.c rme32->irq = -1; rme32 1308 sound/pci/rme32.c if (rme32->iobase) { rme32 1309 sound/pci/rme32.c iounmap(rme32->iobase); rme32 1310 sound/pci/rme32.c rme32->iobase = NULL; rme32 1312 sound/pci/rme32.c if (rme32->port) { rme32 1313 sound/pci/rme32.c pci_release_regions(rme32->pci); rme32 1314 sound/pci/rme32.c rme32->port = 0; rme32 1316 sound/pci/rme32.c pci_disable_device(rme32->pci); rme32 1321 sound/pci/rme32.c struct rme32 *rme32 = (struct rme32 *) pcm->private_data; rme32 1322 sound/pci/rme32.c rme32->spdif_pcm = NULL; rme32 1328 sound/pci/rme32.c struct rme32 *rme32 = (struct rme32 *) pcm->private_data; rme32 1329 sound/pci/rme32.c rme32->adat_pcm = NULL; rme32 1332 sound/pci/rme32.c static int snd_rme32_create(struct rme32 *rme32) rme32 1334 sound/pci/rme32.c struct pci_dev *pci = rme32->pci; rme32 1337 sound/pci/rme32.c rme32->irq = -1; rme32 1338 sound/pci/rme32.c spin_lock_init(&rme32->lock); rme32 1345 sound/pci/rme32.c rme32->port = pci_resource_start(rme32->pci, 0); rme32 1347 sound/pci/rme32.c rme32->iobase = ioremap_nocache(rme32->port, RME32_IO_SIZE); rme32 1348 sound/pci/rme32.c if (!rme32->iobase) { rme32 1349 sound/pci/rme32.c dev_err(rme32->card->dev, rme32 1351 sound/pci/rme32.c rme32->port, rme32->port + RME32_IO_SIZE - 1); rme32 1356 sound/pci/rme32.c KBUILD_MODNAME, rme32)) { rme32 1357 sound/pci/rme32.c dev_err(rme32->card->dev, "unable to grab IRQ %d\n", pci->irq); rme32 1360 sound/pci/rme32.c rme32->irq = pci->irq; rme32 1363 sound/pci/rme32.c pci_read_config_byte(pci, 8, &rme32->rev); rme32 1366 sound/pci/rme32.c if ((err = snd_pcm_new(rme32->card, "Digi32 IEC958", 0, 1, 1, &rme32->spdif_pcm)) < 0) { rme32 1369 sound/pci/rme32.c rme32->spdif_pcm->private_data = rme32; rme32 1370 sound/pci/rme32.c rme32->spdif_pcm->private_free = snd_rme32_free_spdif_pcm; rme32 1371 sound/pci/rme32.c strcpy(rme32->spdif_pcm->name, "Digi32 IEC958"); rme32 1372 sound/pci/rme32.c if (rme32->fullduplex_mode) { rme32 1373 sound/pci/rme32.c snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK, rme32 1375 sound/pci/rme32.c snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE, rme32 1377 sound/pci/rme32.c snd_pcm_lib_preallocate_pages_for_all(rme32->spdif_pcm, SNDRV_DMA_TYPE_CONTINUOUS, rme32 1380 sound/pci/rme32.c rme32->spdif_pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; rme32 1382 sound/pci/rme32.c snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK, rme32 1384 sound/pci/rme32.c snd_pcm_set_ops(rme32->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE, rme32 1386 sound/pci/rme32.c rme32->spdif_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; rme32 1393 sound/pci/rme32.c rme32->adat_pcm = NULL; rme32 1396 sound/pci/rme32.c if ((err = snd_pcm_new(rme32->card, "Digi32 ADAT", 1, rme32 1397 sound/pci/rme32.c 1, 1, &rme32->adat_pcm)) < 0) rme32 1401 sound/pci/rme32.c rme32->adat_pcm->private_data = rme32; rme32 1402 sound/pci/rme32.c rme32->adat_pcm->private_free = snd_rme32_free_adat_pcm; rme32 1403 sound/pci/rme32.c strcpy(rme32->adat_pcm->name, "Digi32 ADAT"); rme32 1404 sound/pci/rme32.c if (rme32->fullduplex_mode) { rme32 1405 sound/pci/rme32.c snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, rme32 1407 sound/pci/rme32.c snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, rme32 1409 sound/pci/rme32.c snd_pcm_lib_preallocate_pages_for_all(rme32->adat_pcm, SNDRV_DMA_TYPE_CONTINUOUS, rme32 1412 sound/pci/rme32.c rme32->adat_pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; rme32 1414 sound/pci/rme32.c snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, rme32 1416 sound/pci/rme32.c snd_pcm_set_ops(rme32->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, rme32 1418 sound/pci/rme32.c rme32->adat_pcm->info_flags = SNDRV_PCM_INFO_HALF_DUPLEX; rme32 1423 sound/pci/rme32.c rme32->playback_periodsize = 0; rme32 1424 sound/pci/rme32.c rme32->capture_periodsize = 0; rme32 1427 sound/pci/rme32.c snd_rme32_pcm_stop(rme32, 0); rme32 1430 sound/pci/rme32.c snd_rme32_reset_dac(rme32); rme32 1433 sound/pci/rme32.c writel(0, rme32->iobase + RME32_IO_RESET_POS); rme32 1436 sound/pci/rme32.c rme32->wcreg = RME32_WCR_SEL | /* normal playback */ rme32 1439 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 1443 sound/pci/rme32.c if ((err = snd_rme32_create_switches(rme32->card, rme32)) < 0) { rme32 1448 sound/pci/rme32.c snd_rme32_proc_init(rme32); rme32 1450 sound/pci/rme32.c rme32->capture_substream = NULL; rme32 1451 sound/pci/rme32.c rme32->playback_substream = NULL; rme32 1464 sound/pci/rme32.c struct rme32 *rme32 = (struct rme32 *) entry->private_data; rme32 1466 sound/pci/rme32.c rme32->rcreg = readl(rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 1468 sound/pci/rme32.c snd_iprintf(buffer, rme32->card->longname); rme32 1469 sound/pci/rme32.c snd_iprintf(buffer, " (index #%d)\n", rme32->card->number + 1); rme32 1472 sound/pci/rme32.c if (rme32->fullduplex_mode) rme32 1476 sound/pci/rme32.c if (RME32_PRO_WITH_8414(rme32)) { rme32 1481 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_MODE24) { rme32 1486 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_MONO) { rme32 1493 sound/pci/rme32.c switch (snd_rme32_getinputtype(rme32)) { rme32 1507 sound/pci/rme32.c if (snd_rme32_capture_getrate(rme32, &n) < 0) { rme32 1516 sound/pci/rme32.c snd_rme32_capture_getrate(rme32, &n)); rme32 1520 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_SEL) { rme32 1525 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_MUTE) { rme32 1533 sound/pci/rme32.c ((!(rme32->wcreg & RME32_WCR_FREQ_0)) rme32 1534 sound/pci/rme32.c && (!(rme32->wcreg & RME32_WCR_FREQ_1)))) { rme32 1536 sound/pci/rme32.c snd_rme32_playback_getrate(rme32)); rme32 1538 sound/pci/rme32.c if (rme32->rcreg & RME32_RCR_KMODE) { rme32 1543 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_PRO) { rme32 1548 sound/pci/rme32.c if (rme32->wcreg & RME32_WCR_EMP) { rme32 1555 sound/pci/rme32.c static void snd_rme32_proc_init(struct rme32 *rme32) rme32 1557 sound/pci/rme32.c snd_card_ro_proc_new(rme32->card, "rme32", rme32, snd_rme32_proc_read); rme32 1570 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1572 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1574 sound/pci/rme32.c rme32->wcreg & RME32_WCR_SEL ? 0 : 1; rme32 1575 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1582 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1587 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1588 sound/pci/rme32.c val = (rme32->wcreg & ~RME32_WCR_SEL) | val; rme32 1589 sound/pci/rme32.c change = val != rme32->wcreg; rme32 1594 sound/pci/rme32.c rme32->wcreg = val; rme32 1595 sound/pci/rme32.c writel(val, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 1596 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1604 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1610 sound/pci/rme32.c switch (rme32->pci->device) { rme32 1628 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1631 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1632 sound/pci/rme32.c ucontrol->value.enumerated.item[0] = snd_rme32_getinputtype(rme32); rme32 1634 sound/pci/rme32.c switch (rme32->pci->device) { rme32 1650 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1657 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1661 sound/pci/rme32.c switch (rme32->pci->device) { rme32 1675 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1676 sound/pci/rme32.c change = val != (unsigned int)snd_rme32_getinputtype(rme32); rme32 1677 sound/pci/rme32.c snd_rme32_setinputtype(rme32, val); rme32 1678 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1697 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1699 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1700 sound/pci/rme32.c ucontrol->value.enumerated.item[0] = snd_rme32_getclockmode(rme32); rme32 1701 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1708 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1713 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1714 sound/pci/rme32.c change = val != (unsigned int)snd_rme32_getclockmode(rme32); rme32 1715 sound/pci/rme32.c snd_rme32_setclockmode(rme32, val); rme32 1716 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1751 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1754 sound/pci/rme32.c rme32->wcreg_spdif); rme32 1761 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1766 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1767 sound/pci/rme32.c change = val != rme32->wcreg_spdif; rme32 1768 sound/pci/rme32.c rme32->wcreg_spdif = val; rme32 1769 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1785 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1788 sound/pci/rme32.c rme32->wcreg_spdif_stream); rme32 1796 sound/pci/rme32.c struct rme32 *rme32 = snd_kcontrol_chip(kcontrol); rme32 1801 sound/pci/rme32.c spin_lock_irq(&rme32->lock); rme32 1802 sound/pci/rme32.c change = val != rme32->wcreg_spdif_stream; rme32 1803 sound/pci/rme32.c rme32->wcreg_spdif_stream = val; rme32 1804 sound/pci/rme32.c rme32->wcreg &= ~(RME32_WCR_PRO | RME32_WCR_EMP); rme32 1805 sound/pci/rme32.c rme32->wcreg |= val; rme32 1806 sound/pci/rme32.c writel(rme32->wcreg, rme32->iobase + RME32_IO_CONTROL_REGISTER); rme32 1807 sound/pci/rme32.c spin_unlock_irq(&rme32->lock); rme32 1882 sound/pci/rme32.c static int snd_rme32_create_switches(struct snd_card *card, struct rme32 * rme32) rme32 1888 sound/pci/rme32.c if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme32_controls[idx], rme32))) < 0) rme32 1891 sound/pci/rme32.c rme32->spdif_ctl = kctl; rme32 1910 sound/pci/rme32.c struct rme32 *rme32; rme32 1923 sound/pci/rme32.c sizeof(struct rme32), &card); rme32 1927 sound/pci/rme32.c rme32 = (struct rme32 *) card->private_data; rme32 1928 sound/pci/rme32.c rme32->card = card; rme32 1929 sound/pci/rme32.c rme32->pci = pci; rme32 1931 sound/pci/rme32.c rme32->fullduplex_mode = 1; rme32 1932 sound/pci/rme32.c if ((err = snd_rme32_create(rme32)) < 0) { rme32 1938 sound/pci/rme32.c switch (rme32->pci->device) { rme32 1950 sound/pci/rme32.c card->shortname, rme32->rev, rme32->port, rme32->irq);