rme96 248 sound/pci/rme96.c #define RME96_ISPLAYING(rme96) ((rme96)->wcreg & RME96_WCR_START) rme96 249 sound/pci/rme96.c #define RME96_ISRECORDING(rme96) ((rme96)->wcreg & RME96_WCR_START_2) rme96 250 sound/pci/rme96.c #define RME96_HAS_ANALOG_IN(rme96) ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST) rme96 251 sound/pci/rme96.c #define RME96_HAS_ANALOG_OUT(rme96) ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PRO || \ rme96 252 sound/pci/rme96.c (rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST) rme96 253 sound/pci/rme96.c #define RME96_DAC_IS_1852(rme96) (RME96_HAS_ANALOG_OUT(rme96) && (rme96)->rev >= 4) rme96 254 sound/pci/rme96.c #define RME96_DAC_IS_1855(rme96) (((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST && (rme96)->rev < 4) || \ rme96 255 sound/pci/rme96.c ((rme96)->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PRO && (rme96)->rev == 2)) rme96 256 sound/pci/rme96.c #define RME96_185X_MAX_OUT(rme96) ((1 << (RME96_DAC_IS_1852(rme96) ? RME96_AD1852_VOL_BITS : RME96_AD1855_VOL_BITS)) - 1) rme96 291 sound/pci/rme96.c return (readl(rme96->iobase + RME96_IO_GET_PLAY_POS) rme96 292 sound/pci/rme96.c & RME96_RCR_AUDIO_ADDR_MASK) >> rme96->playback_frlog; rme96 298 sound/pci/rme96.c return (readl(rme96->iobase + RME96_IO_GET_REC_POS) rme96 299 sound/pci/rme96.c & RME96_RCR_AUDIO_ADDR_MASK) >> rme96->capture_frlog; rme96 308 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 309 sound/pci/rme96.c count <<= rme96->playback_frlog; rme96 310 sound/pci/rme96.c pos <<= rme96->playback_frlog; rme96 311 sound/pci/rme96.c memset_io(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, rme96 323 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 324 sound/pci/rme96.c count <<= rme96->playback_frlog; rme96 325 sound/pci/rme96.c pos <<= rme96->playback_frlog; rme96 326 sound/pci/rme96.c copy_from_user_toio(rme96->iobase + RME96_IO_PLAY_BUFFER + pos, src, rme96 338 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 339 sound/pci/rme96.c count <<= rme96->capture_frlog; rme96 340 sound/pci/rme96.c pos <<= rme96->capture_frlog; rme96 341 sound/pci/rme96.c copy_to_user_fromio(dst, rme96->iobase + RME96_IO_REC_BUFFER + pos, rme96 473 sound/pci/rme96.c rme96->areg |= RME96_AR_CDATA; rme96 475 sound/pci/rme96.c rme96->areg &= ~RME96_AR_CDATA; rme96 477 sound/pci/rme96.c rme96->areg &= ~(RME96_AR_CCLK | RME96_AR_CLATCH); rme96 478 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 480 sound/pci/rme96.c rme96->areg |= RME96_AR_CCLK; rme96 481 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 485 sound/pci/rme96.c rme96->areg &= ~(RME96_AR_CCLK | RME96_AR_CDATA); rme96 486 sound/pci/rme96.c rme96->areg |= RME96_AR_CLATCH; rme96 487 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 489 sound/pci/rme96.c rme96->areg &= ~RME96_AR_CLATCH; rme96 490 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 496 sound/pci/rme96.c if (RME96_DAC_IS_1852(rme96)) { rme96 497 sound/pci/rme96.c snd_rme96_write_SPI(rme96, (rme96->vol[0] << 2) | 0x0); rme96 498 sound/pci/rme96.c snd_rme96_write_SPI(rme96, (rme96->vol[1] << 2) | 0x2); rme96 499 sound/pci/rme96.c } else if (RME96_DAC_IS_1855(rme96)) { rme96 500 sound/pci/rme96.c snd_rme96_write_SPI(rme96, (rme96->vol[0] & 0x3FF) | 0x000); rme96 501 sound/pci/rme96.c snd_rme96_write_SPI(rme96, (rme96->vol[1] & 0x3FF) | 0x400); rme96 508 sound/pci/rme96.c writel(rme96->wcreg | RME96_WCR_PD, rme96 509 sound/pci/rme96.c rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 510 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 516 sound/pci/rme96.c return ((rme96->wcreg >> RME96_WCR_BITPOS_MONITOR_0) & 1) + rme96 517 sound/pci/rme96.c (((rme96->wcreg >> RME96_WCR_BITPOS_MONITOR_1) & 1) << 1); rme96 525 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_MONITOR_0; rme96 527 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_MONITOR_0; rme96 530 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_MONITOR_1; rme96 532 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_MONITOR_1; rme96 534 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 541 sound/pci/rme96.c return ((rme96->wcreg >> RME96_WCR_BITPOS_GAIN_0) & 1) + rme96 542 sound/pci/rme96.c (((rme96->wcreg >> RME96_WCR_BITPOS_GAIN_1) & 1) << 1); rme96 551 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg & ~RME96_WCR_GAIN_0) & rme96 555 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_GAIN_0) & rme96 559 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg & ~RME96_WCR_GAIN_0) | rme96 563 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_GAIN_0) | rme96 569 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 580 sound/pci/rme96.c if (rme96->areg & RME96_AR_ANALOG) { rme96 582 sound/pci/rme96.c n = ((rme96->areg >> RME96_AR_BITPOS_F0) & 1) + rme96 583 sound/pci/rme96.c (((rme96->areg >> RME96_AR_BITPOS_F1) & 1) << 1); rme96 597 sound/pci/rme96.c return (rme96->areg & RME96_AR_BITPOS_F2) ? rate << 1 : rate; rme96 600 sound/pci/rme96.c rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 601 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_LOCK) { rme96 604 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_T_OUT) { rme96 610 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_VERF) { rme96 615 sound/pci/rme96.c n = ((rme96->rcreg >> RME96_RCR_BITPOS_F0) & 1) + rme96 616 sound/pci/rme96.c (((rme96->rcreg >> RME96_RCR_BITPOS_F1) & 1) << 1) + rme96 617 sound/pci/rme96.c (((rme96->rcreg >> RME96_RCR_BITPOS_F2) & 1) << 2); rme96 621 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_T_OUT) { rme96 641 sound/pci/rme96.c if (!(rme96->wcreg & RME96_WCR_MASTER) && rme96 642 sound/pci/rme96.c snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG && rme96 643 sound/pci/rme96.c (rate = snd_rme96_capture_getrate(rme96, &dummy)) > 0) rme96 648 sound/pci/rme96.c rate = ((rme96->wcreg >> RME96_WCR_BITPOS_FREQ_0) & 1) + rme96 649 sound/pci/rme96.c (((rme96->wcreg >> RME96_WCR_BITPOS_FREQ_1) & 1) << 1); rme96 663 sound/pci/rme96.c return (rme96->wcreg & RME96_WCR_DS) ? rate << 1 : rate; rme96 672 sound/pci/rme96.c ds = rme96->wcreg & RME96_WCR_DS; rme96 675 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_DS; rme96 676 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_FREQ_0) & rme96 680 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_DS; rme96 681 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_FREQ_1) & rme96 685 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_DS; rme96 686 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_FREQ_0) | rme96 690 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_DS; rme96 691 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_FREQ_0) & rme96 695 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_DS; rme96 696 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_FREQ_1) & rme96 700 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_DS; rme96 701 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_FREQ_0) | rme96 707 sound/pci/rme96.c if ((!ds && rme96->wcreg & RME96_WCR_DS) || rme96 708 sound/pci/rme96.c (ds && !(rme96->wcreg & RME96_WCR_DS))) rme96 711 sound/pci/rme96.c snd_rme96_reset_dac(rme96); rme96 713 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 724 sound/pci/rme96.c rme96->areg = ((rme96->areg | RME96_AR_FREQPAD_0) & rme96 728 sound/pci/rme96.c rme96->areg = ((rme96->areg & ~RME96_AR_FREQPAD_0) | rme96 732 sound/pci/rme96.c rme96->areg = ((rme96->areg | RME96_AR_FREQPAD_0) | rme96 736 sound/pci/rme96.c if (rme96->rev < 4) { rme96 739 sound/pci/rme96.c rme96->areg = ((rme96->areg | RME96_AR_FREQPAD_0) & rme96 743 sound/pci/rme96.c if (rme96->rev < 4) { rme96 746 sound/pci/rme96.c rme96->areg = ((rme96->areg & ~RME96_AR_FREQPAD_0) | rme96 750 sound/pci/rme96.c rme96->areg = ((rme96->areg | RME96_AR_FREQPAD_0) | rme96 756 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 767 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_MASTER; rme96 768 sound/pci/rme96.c rme96->areg &= ~RME96_AR_WSEL; rme96 772 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_MASTER; rme96 773 sound/pci/rme96.c rme96->areg &= ~RME96_AR_WSEL; rme96 777 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_MASTER; rme96 778 sound/pci/rme96.c rme96->areg |= RME96_AR_WSEL; rme96 783 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 784 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 791 sound/pci/rme96.c if (rme96->areg & RME96_AR_WSEL) { rme96 794 sound/pci/rme96.c return (rme96->wcreg & RME96_WCR_MASTER) ? RME96_CLOCKMODE_MASTER : rme96 806 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg & ~RME96_WCR_INP_0) & rme96 810 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_INP_0) & rme96 814 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg & ~RME96_WCR_INP_0) | rme96 818 sound/pci/rme96.c if ((rme96->pci->device != PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST && rme96 819 sound/pci/rme96.c rme96->pci->device != PCI_DEVICE_ID_RME_DIGI96_8_PRO) || rme96 820 sound/pci/rme96.c (rme96->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST && rme96 821 sound/pci/rme96.c rme96->rev > 4)) rme96 826 sound/pci/rme96.c rme96->wcreg = (rme96->wcreg | RME96_WCR_INP_0) | rme96 830 sound/pci/rme96.c if (!RME96_HAS_ANALOG_IN(rme96)) { rme96 833 sound/pci/rme96.c rme96->areg |= RME96_AR_ANALOG; rme96 834 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 835 sound/pci/rme96.c if (rme96->rev < 4) { rme96 840 sound/pci/rme96.c if (snd_rme96_capture_getrate(rme96, &n) == 88200) { rme96 841 sound/pci/rme96.c snd_rme96_capture_analog_setrate(rme96, 44100); rme96 843 sound/pci/rme96.c if (snd_rme96_capture_getrate(rme96, &n) == 64000) { rme96 844 sound/pci/rme96.c snd_rme96_capture_analog_setrate(rme96, 32000); rme96 851 sound/pci/rme96.c if (type != RME96_INPUT_ANALOG && RME96_HAS_ANALOG_IN(rme96)) { rme96 852 sound/pci/rme96.c rme96->areg &= ~RME96_AR_ANALOG; rme96 853 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 855 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 862 sound/pci/rme96.c if (rme96->areg & RME96_AR_ANALOG) { rme96 865 sound/pci/rme96.c return ((rme96->wcreg >> RME96_WCR_BITPOS_INP_0) & 1) + rme96 866 sound/pci/rme96.c (((rme96->wcreg >> RME96_WCR_BITPOS_INP_1) & 1) << 1); rme96 883 sound/pci/rme96.c frlog += (rme96->wcreg & RME96_WCR_MODE24) ? 2 : 1; rme96 884 sound/pci/rme96.c rme96->playback_frlog = frlog; rme96 886 sound/pci/rme96.c frlog += (rme96->wcreg & RME96_WCR_MODE24_2) ? 2 : 1; rme96 887 sound/pci/rme96.c rme96->capture_frlog = frlog; rme96 897 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_MODE24; rme96 900 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_MODE24; rme96 905 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 915 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_MODE24_2; rme96 918 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_MODE24_2; rme96 923 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 933 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_ISEL; rme96 936 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_ISEL; rme96 942 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_IDIS; rme96 943 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 950 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 954 sound/pci/rme96.c runtime->dma_area = (void __force *)(rme96->iobase + rme96 956 sound/pci/rme96.c runtime->dma_addr = rme96->port + RME96_IO_PLAY_BUFFER; rme96 959 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 960 sound/pci/rme96.c if (!(rme96->wcreg & RME96_WCR_MASTER) && rme96 961 sound/pci/rme96.c snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG && rme96 962 sound/pci/rme96.c (rate = snd_rme96_capture_getrate(rme96, &dummy)) > 0) rme96 966 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 969 sound/pci/rme96.c } else if ((err = snd_rme96_playback_setrate(rme96, params_rate(params))) < 0) { rme96 970 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 973 sound/pci/rme96.c if ((err = snd_rme96_playback_setformat(rme96, params_format(params))) < 0) { rme96 974 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 977 sound/pci/rme96.c snd_rme96_setframelog(rme96, params_channels(params), 1); rme96 978 sound/pci/rme96.c if (rme96->capture_periodsize != 0) { rme96 979 sound/pci/rme96.c if (params_period_size(params) << rme96->playback_frlog != rme96 980 sound/pci/rme96.c rme96->capture_periodsize) rme96 982 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 986 sound/pci/rme96.c rme96->playback_periodsize = rme96 987 sound/pci/rme96.c params_period_size(params) << rme96->playback_frlog; rme96 988 sound/pci/rme96.c snd_rme96_set_period_properties(rme96, rme96->playback_periodsize); rme96 990 sound/pci/rme96.c if ((rme96->wcreg & RME96_WCR_ADAT) == 0) { rme96 991 sound/pci/rme96.c rme96->wcreg &= ~(RME96_WCR_PRO | RME96_WCR_DOLBY | RME96_WCR_EMP); rme96 992 sound/pci/rme96.c writel(rme96->wcreg |= rme96->wcreg_spdif_stream, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 994 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1003 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1007 sound/pci/rme96.c runtime->dma_area = (void __force *)(rme96->iobase + rme96 1009 sound/pci/rme96.c runtime->dma_addr = rme96->port + RME96_IO_REC_BUFFER; rme96 1012 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1013 sound/pci/rme96.c if ((err = snd_rme96_capture_setformat(rme96, params_format(params))) < 0) { rme96 1014 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1017 sound/pci/rme96.c if (snd_rme96_getinputtype(rme96) == RME96_INPUT_ANALOG) { rme96 1018 sound/pci/rme96.c if ((err = snd_rme96_capture_analog_setrate(rme96, rme96 1021 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1024 sound/pci/rme96.c } else if ((rate = snd_rme96_capture_getrate(rme96, &isadat)) > 0) { rme96 1026 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1032 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1036 sound/pci/rme96.c snd_rme96_setframelog(rme96, params_channels(params), 0); rme96 1037 sound/pci/rme96.c if (rme96->playback_periodsize != 0) { rme96 1038 sound/pci/rme96.c if (params_period_size(params) << rme96->capture_frlog != rme96 1039 sound/pci/rme96.c rme96->playback_periodsize) rme96 1041 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1045 sound/pci/rme96.c rme96->capture_periodsize = rme96 1046 sound/pci/rme96.c params_period_size(params) << rme96->capture_frlog; rme96 1047 sound/pci/rme96.c snd_rme96_set_period_properties(rme96, rme96->capture_periodsize); rme96 1048 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1058 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_RESET_PLAY_POS); rme96 1061 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_START; rme96 1062 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1070 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_RESET_REC_POS); rme96 1073 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_START_2; rme96 1074 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1084 sound/pci/rme96.c rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1085 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_IRQ) { rme96 1086 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_CONFIRM_PLAY_IRQ); rme96 1088 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_START; rme96 1089 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1095 sound/pci/rme96.c rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1096 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_IRQ_2) { rme96 1097 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_CONFIRM_REC_IRQ); rme96 1099 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_START_2; rme96 1100 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1107 sound/pci/rme96.c struct rme96 *rme96 = (struct rme96 *)dev_id; rme96 1109 sound/pci/rme96.c rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1111 sound/pci/rme96.c if (!((rme96->rcreg & RME96_RCR_IRQ) || rme96 1112 sound/pci/rme96.c (rme96->rcreg & RME96_RCR_IRQ_2))) rme96 1117 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_IRQ) { rme96 1119 sound/pci/rme96.c snd_pcm_period_elapsed(rme96->playback_substream); rme96 1120 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_CONFIRM_PLAY_IRQ); rme96 1122 sound/pci/rme96.c if (rme96->rcreg & RME96_RCR_IRQ_2) { rme96 1124 sound/pci/rme96.c snd_pcm_period_elapsed(rme96->capture_substream); rme96 1125 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_CONFIRM_REC_IRQ); rme96 1146 sound/pci/rme96.c if ((size = rme96->playback_periodsize) != 0 || rme96 1147 sound/pci/rme96.c (size = rme96->capture_periodsize) != 0) rme96 1161 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1164 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1165 sound/pci/rme96.c if (rme96->playback_substream != NULL) { rme96 1166 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1169 sound/pci/rme96.c rme96->wcreg &= ~RME96_WCR_ADAT; rme96 1170 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1171 sound/pci/rme96.c rme96->playback_substream = substream; rme96 1172 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1175 sound/pci/rme96.c if (!(rme96->wcreg & RME96_WCR_MASTER) && rme96 1176 sound/pci/rme96.c snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG && rme96 1177 sound/pci/rme96.c (rate = snd_rme96_capture_getrate(rme96, &dummy)) > 0) rme96 1184 sound/pci/rme96.c rme96_set_buffer_size_constraint(rme96, runtime); rme96 1186 sound/pci/rme96.c rme96->wcreg_spdif_stream = rme96->wcreg_spdif; rme96 1187 sound/pci/rme96.c rme96->spdif_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; rme96 1188 sound/pci/rme96.c snd_ctl_notify(rme96->card, SNDRV_CTL_EVENT_MASK_VALUE | rme96 1189 sound/pci/rme96.c SNDRV_CTL_EVENT_MASK_INFO, &rme96->spdif_ctl->id); rme96 1197 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1201 sound/pci/rme96.c if (snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG && rme96 1202 sound/pci/rme96.c (rate = snd_rme96_capture_getrate(rme96, &isadat)) > 0) rme96 1212 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1213 sound/pci/rme96.c if (rme96->capture_substream != NULL) { rme96 1214 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1217 sound/pci/rme96.c rme96->capture_substream = substream; rme96 1218 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1220 sound/pci/rme96.c rme96_set_buffer_size_constraint(rme96, runtime); rme96 1228 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1231 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1232 sound/pci/rme96.c if (rme96->playback_substream != NULL) { rme96 1233 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1236 sound/pci/rme96.c rme96->wcreg |= RME96_WCR_ADAT; rme96 1237 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1238 sound/pci/rme96.c rme96->playback_substream = substream; rme96 1239 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1242 sound/pci/rme96.c if (!(rme96->wcreg & RME96_WCR_MASTER) && rme96 1243 sound/pci/rme96.c snd_rme96_getinputtype(rme96) != RME96_INPUT_ANALOG && rme96 1244 sound/pci/rme96.c (rate = snd_rme96_capture_getrate(rme96, &dummy)) > 0) rme96 1251 sound/pci/rme96.c rme96_set_buffer_size_constraint(rme96, runtime); rme96 1259 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1263 sound/pci/rme96.c if (snd_rme96_getinputtype(rme96) == RME96_INPUT_ANALOG) { rme96 1268 sound/pci/rme96.c if ((rate = snd_rme96_capture_getrate(rme96, &isadat)) > 0) { rme96 1277 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1278 sound/pci/rme96.c if (rme96->capture_substream != NULL) { rme96 1279 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1282 sound/pci/rme96.c rme96->capture_substream = substream; rme96 1283 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1285 sound/pci/rme96.c rme96_set_buffer_size_constraint(rme96, runtime); rme96 1292 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1295 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1296 sound/pci/rme96.c if (RME96_ISPLAYING(rme96)) { rme96 1297 sound/pci/rme96.c snd_rme96_playback_stop(rme96); rme96 1299 sound/pci/rme96.c rme96->playback_substream = NULL; rme96 1300 sound/pci/rme96.c rme96->playback_periodsize = 0; rme96 1301 sound/pci/rme96.c spdif = (rme96->wcreg & RME96_WCR_ADAT) == 0; rme96 1302 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1304 sound/pci/rme96.c rme96->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; rme96 1305 sound/pci/rme96.c snd_ctl_notify(rme96->card, SNDRV_CTL_EVENT_MASK_VALUE | rme96 1306 sound/pci/rme96.c SNDRV_CTL_EVENT_MASK_INFO, &rme96->spdif_ctl->id); rme96 1314 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1316 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1317 sound/pci/rme96.c if (RME96_ISRECORDING(rme96)) { rme96 1318 sound/pci/rme96.c snd_rme96_capture_stop(rme96); rme96 1320 sound/pci/rme96.c rme96->capture_substream = NULL; rme96 1321 sound/pci/rme96.c rme96->capture_periodsize = 0; rme96 1322 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1329 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1331 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1332 sound/pci/rme96.c if (RME96_ISPLAYING(rme96)) { rme96 1333 sound/pci/rme96.c snd_rme96_playback_stop(rme96); rme96 1335 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_RESET_PLAY_POS); rme96 1336 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1343 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1345 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1346 sound/pci/rme96.c if (RME96_ISRECORDING(rme96)) { rme96 1347 sound/pci/rme96.c snd_rme96_capture_stop(rme96); rme96 1349 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_RESET_REC_POS); rme96 1350 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1358 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1362 sound/pci/rme96.c if (!RME96_ISPLAYING(rme96)) { rme96 1363 sound/pci/rme96.c if (substream != rme96->playback_substream) { rme96 1366 sound/pci/rme96.c snd_rme96_playback_start(rme96, 0); rme96 1371 sound/pci/rme96.c if (RME96_ISPLAYING(rme96)) { rme96 1372 sound/pci/rme96.c if (substream != rme96->playback_substream) { rme96 1375 sound/pci/rme96.c snd_rme96_playback_stop(rme96); rme96 1380 sound/pci/rme96.c if (RME96_ISPLAYING(rme96)) { rme96 1381 sound/pci/rme96.c snd_rme96_playback_stop(rme96); rme96 1386 sound/pci/rme96.c if (!RME96_ISPLAYING(rme96)) { rme96 1387 sound/pci/rme96.c snd_rme96_playback_start(rme96, 1); rme96 1401 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1405 sound/pci/rme96.c if (!RME96_ISRECORDING(rme96)) { rme96 1406 sound/pci/rme96.c if (substream != rme96->capture_substream) { rme96 1409 sound/pci/rme96.c snd_rme96_capture_start(rme96, 0); rme96 1414 sound/pci/rme96.c if (RME96_ISRECORDING(rme96)) { rme96 1415 sound/pci/rme96.c if (substream != rme96->capture_substream) { rme96 1418 sound/pci/rme96.c snd_rme96_capture_stop(rme96); rme96 1423 sound/pci/rme96.c if (RME96_ISRECORDING(rme96)) { rme96 1424 sound/pci/rme96.c snd_rme96_capture_stop(rme96); rme96 1429 sound/pci/rme96.c if (!RME96_ISRECORDING(rme96)) { rme96 1430 sound/pci/rme96.c snd_rme96_capture_start(rme96, 1); rme96 1444 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1445 sound/pci/rme96.c return snd_rme96_playback_ptr(rme96); rme96 1451 sound/pci/rme96.c struct rme96 *rme96 = snd_pcm_substream_chip(substream); rme96 1452 sound/pci/rme96.c return snd_rme96_capture_ptr(rme96); rme96 1508 sound/pci/rme96.c struct rme96 *rme96 = (struct rme96 *)private_data; rme96 1510 sound/pci/rme96.c if (rme96 == NULL) { rme96 1513 sound/pci/rme96.c if (rme96->irq >= 0) { rme96 1514 sound/pci/rme96.c snd_rme96_playback_stop(rme96); rme96 1515 sound/pci/rme96.c snd_rme96_capture_stop(rme96); rme96 1516 sound/pci/rme96.c rme96->areg &= ~RME96_AR_DAC_EN; rme96 1517 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 1518 sound/pci/rme96.c free_irq(rme96->irq, (void *)rme96); rme96 1519 sound/pci/rme96.c rme96->irq = -1; rme96 1521 sound/pci/rme96.c if (rme96->iobase) { rme96 1522 sound/pci/rme96.c iounmap(rme96->iobase); rme96 1523 sound/pci/rme96.c rme96->iobase = NULL; rme96 1525 sound/pci/rme96.c if (rme96->port) { rme96 1526 sound/pci/rme96.c pci_release_regions(rme96->pci); rme96 1527 sound/pci/rme96.c rme96->port = 0; rme96 1529 sound/pci/rme96.c pci_disable_device(rme96->pci); rme96 1535 sound/pci/rme96.c struct rme96 *rme96 = (struct rme96 *) pcm->private_data; rme96 1536 sound/pci/rme96.c rme96->spdif_pcm = NULL; rme96 1542 sound/pci/rme96.c struct rme96 *rme96 = (struct rme96 *) pcm->private_data; rme96 1543 sound/pci/rme96.c rme96->adat_pcm = NULL; rme96 1549 sound/pci/rme96.c struct pci_dev *pci = rme96->pci; rme96 1552 sound/pci/rme96.c rme96->irq = -1; rme96 1553 sound/pci/rme96.c spin_lock_init(&rme96->lock); rme96 1560 sound/pci/rme96.c rme96->port = pci_resource_start(rme96->pci, 0); rme96 1562 sound/pci/rme96.c rme96->iobase = ioremap_nocache(rme96->port, RME96_IO_SIZE); rme96 1563 sound/pci/rme96.c if (!rme96->iobase) { rme96 1564 sound/pci/rme96.c snd_printk(KERN_ERR "unable to remap memory region 0x%lx-0x%lx\n", rme96->port, rme96->port + RME96_IO_SIZE - 1); rme96 1569 sound/pci/rme96.c "RME96", rme96)) { rme96 1573 sound/pci/rme96.c rme96->irq = pci->irq; rme96 1576 sound/pci/rme96.c pci_read_config_byte(pci, 8, &rme96->rev); rme96 1579 sound/pci/rme96.c if ((err = snd_pcm_new(rme96->card, "Digi96 IEC958", 0, rme96 1580 sound/pci/rme96.c 1, 1, &rme96->spdif_pcm)) < 0) rme96 1584 sound/pci/rme96.c rme96->spdif_pcm->private_data = rme96; rme96 1585 sound/pci/rme96.c rme96->spdif_pcm->private_free = snd_rme96_free_spdif_pcm; rme96 1586 sound/pci/rme96.c strcpy(rme96->spdif_pcm->name, "Digi96 IEC958"); rme96 1587 sound/pci/rme96.c snd_pcm_set_ops(rme96->spdif_pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_rme96_playback_spdif_ops); rme96 1588 sound/pci/rme96.c snd_pcm_set_ops(rme96->spdif_pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_rme96_capture_spdif_ops); rme96 1590 sound/pci/rme96.c rme96->spdif_pcm->info_flags = 0; rme96 1595 sound/pci/rme96.c rme96->adat_pcm = NULL; rme96 1597 sound/pci/rme96.c if ((err = snd_pcm_new(rme96->card, "Digi96 ADAT", 1, rme96 1598 sound/pci/rme96.c 1, 1, &rme96->adat_pcm)) < 0) rme96 1602 sound/pci/rme96.c rme96->adat_pcm->private_data = rme96; rme96 1603 sound/pci/rme96.c rme96->adat_pcm->private_free = snd_rme96_free_adat_pcm; rme96 1604 sound/pci/rme96.c strcpy(rme96->adat_pcm->name, "Digi96 ADAT"); rme96 1605 sound/pci/rme96.c snd_pcm_set_ops(rme96->adat_pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_rme96_playback_adat_ops); rme96 1606 sound/pci/rme96.c snd_pcm_set_ops(rme96->adat_pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_rme96_capture_adat_ops); rme96 1608 sound/pci/rme96.c rme96->adat_pcm->info_flags = 0; rme96 1611 sound/pci/rme96.c rme96->playback_periodsize = 0; rme96 1612 sound/pci/rme96.c rme96->capture_periodsize = 0; rme96 1615 sound/pci/rme96.c snd_rme96_playback_stop(rme96); rme96 1616 sound/pci/rme96.c snd_rme96_capture_stop(rme96); rme96 1619 sound/pci/rme96.c rme96->wcreg = rme96 1625 sound/pci/rme96.c rme96->areg = RME96_AR_FREQPAD_1; /* set 44.1 kHz analog capture */ rme96 1627 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1628 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 1631 sound/pci/rme96.c writel(rme96->areg | RME96_AR_PD2, rme96 1632 sound/pci/rme96.c rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 1633 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 1636 sound/pci/rme96.c snd_rme96_reset_dac(rme96); rme96 1637 sound/pci/rme96.c rme96->areg |= RME96_AR_DAC_EN; rme96 1638 sound/pci/rme96.c writel(rme96->areg, rme96->iobase + RME96_IO_ADDITIONAL_REG); rme96 1641 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_RESET_PLAY_POS); rme96 1642 sound/pci/rme96.c writel(0, rme96->iobase + RME96_IO_RESET_REC_POS); rme96 1645 sound/pci/rme96.c rme96->vol[0] = rme96->vol[1] = 0; rme96 1646 sound/pci/rme96.c if (RME96_HAS_ANALOG_OUT(rme96)) { rme96 1647 sound/pci/rme96.c snd_rme96_apply_dac_volume(rme96); rme96 1651 sound/pci/rme96.c if ((err = snd_rme96_create_switches(rme96->card, rme96)) < 0) { rme96 1656 sound/pci/rme96.c snd_rme96_proc_init(rme96); rme96 1669 sound/pci/rme96.c struct rme96 *rme96 = (struct rme96 *)entry->private_data; rme96 1671 sound/pci/rme96.c rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1673 sound/pci/rme96.c snd_iprintf(buffer, rme96->card->longname); rme96 1674 sound/pci/rme96.c snd_iprintf(buffer, " (index #%d)\n", rme96->card->number + 1); rme96 1677 sound/pci/rme96.c if (rme96->wcreg & RME96_WCR_IDIS) { rme96 1680 sound/pci/rme96.c } else if (rme96->wcreg & RME96_WCR_ISEL) { rme96 1686 sound/pci/rme96.c switch (snd_rme96_getinputtype(rme96)) { rme96 1703 sound/pci/rme96.c if (snd_rme96_capture_getrate(rme96, &n) < 0) { rme96 1712 sound/pci/rme96.c snd_rme96_capture_getrate(rme96, &n)); rme96 1714 sound/pci/rme96.c if (rme96->wcreg & RME96_WCR_MODE24_2) { rme96 1721 sound/pci/rme96.c if (rme96->wcreg & RME96_WCR_SEL) { rme96 1727 sound/pci/rme96.c snd_rme96_playback_getrate(rme96)); rme96 1728 sound/pci/rme96.c if (rme96->wcreg & RME96_WCR_MODE24) { rme96 1733 sound/pci/rme96.c if (rme96->areg & RME96_AR_WSEL) { rme96 1735 sound/pci/rme96.c } else if (rme96->wcreg & RME96_WCR_MASTER) { rme96 1737 sound/pci/rme96.c } else if (snd_rme96_getinputtype(rme96) == RME96_INPUT_ANALOG) { rme96 1739 sound/pci/rme96.c } else if (snd_rme96_capture_getrate(rme96, &n) < 0) { rme96 1744 sound/pci/rme96.c if (rme96->wcreg & RME96_WCR_PRO) { rme96 1749 sound/pci/rme96.c if (rme96->wcreg & RME96_WCR_EMP) { rme96 1754 sound/pci/rme96.c if (rme96->wcreg & RME96_WCR_DOLBY) { rme96 1759 sound/pci/rme96.c if (RME96_HAS_ANALOG_IN(rme96)) { rme96 1761 sound/pci/rme96.c switch (snd_rme96_getmontracks(rme96)) { rme96 1775 sound/pci/rme96.c switch (snd_rme96_getattenuation(rme96)) { rme96 1789 sound/pci/rme96.c snd_iprintf(buffer, " volume left: %u\n", rme96->vol[0]); rme96 1790 sound/pci/rme96.c snd_iprintf(buffer, " volume right: %u\n", rme96->vol[1]); rme96 1799 sound/pci/rme96.c if (! snd_card_proc_new(rme96->card, "rme96", &entry)) rme96 1800 sound/pci/rme96.c snd_info_set_text_ops(entry, rme96, snd_rme96_proc_read); rme96 1812 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 1814 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1815 sound/pci/rme96.c ucontrol->value.integer.value[0] = rme96->wcreg & RME96_WCR_SEL ? 0 : 1; rme96 1816 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1822 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 1827 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1828 sound/pci/rme96.c val = (rme96->wcreg & ~RME96_WCR_SEL) | val; rme96 1829 sound/pci/rme96.c change = val != rme96->wcreg; rme96 1830 sound/pci/rme96.c rme96->wcreg = val; rme96 1831 sound/pci/rme96.c writel(val, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 1832 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1840 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 1845 sound/pci/rme96.c switch (rme96->pci->device) { rme96 1854 sound/pci/rme96.c if (rme96->rev > 4) { rme96 1876 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 1879 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1880 sound/pci/rme96.c ucontrol->value.enumerated.item[0] = snd_rme96_getinputtype(rme96); rme96 1882 sound/pci/rme96.c switch (rme96->pci->device) { rme96 1891 sound/pci/rme96.c if (rme96->rev > 4) { rme96 1909 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1915 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 1919 sound/pci/rme96.c switch (rme96->pci->device) { rme96 1928 sound/pci/rme96.c if (rme96->rev > 4) { rme96 1941 sound/pci/rme96.c if (rme96->pci->device == PCI_DEVICE_ID_RME_DIGI96_8_PAD_OR_PST && rme96->rev > 4) { rme96 1947 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1948 sound/pci/rme96.c change = (int)val != snd_rme96_getinputtype(rme96); rme96 1949 sound/pci/rme96.c snd_rme96_setinputtype(rme96, val); rme96 1950 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1971 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 1973 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1974 sound/pci/rme96.c ucontrol->value.enumerated.item[0] = snd_rme96_getclockmode(rme96); rme96 1975 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 1981 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 1986 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 1987 sound/pci/rme96.c change = (int)val != snd_rme96_getclockmode(rme96); rme96 1988 sound/pci/rme96.c snd_rme96_setclockmode(rme96, val); rme96 1989 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2010 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2012 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2013 sound/pci/rme96.c ucontrol->value.enumerated.item[0] = snd_rme96_getattenuation(rme96); rme96 2014 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2020 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2025 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2027 sound/pci/rme96.c change = (int)val != snd_rme96_getattenuation(rme96); rme96 2028 sound/pci/rme96.c snd_rme96_setattenuation(rme96, val); rme96 2029 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2050 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2052 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2053 sound/pci/rme96.c ucontrol->value.enumerated.item[0] = snd_rme96_getmontracks(rme96); rme96 2054 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2060 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2065 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2066 sound/pci/rme96.c change = (int)val != snd_rme96_getmontracks(rme96); rme96 2067 sound/pci/rme96.c snd_rme96_setmontracks(rme96, val); rme96 2068 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2103 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2105 sound/pci/rme96.c snd_rme96_convert_to_aes(&ucontrol->value.iec958, rme96->wcreg_spdif); rme96 2111 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2116 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2117 sound/pci/rme96.c change = val != rme96->wcreg_spdif; rme96 2118 sound/pci/rme96.c rme96->wcreg_spdif = val; rme96 2119 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2132 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2134 sound/pci/rme96.c snd_rme96_convert_to_aes(&ucontrol->value.iec958, rme96->wcreg_spdif_stream); rme96 2140 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2145 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2146 sound/pci/rme96.c change = val != rme96->wcreg_spdif_stream; rme96 2147 sound/pci/rme96.c rme96->wcreg_spdif_stream = val; rme96 2148 sound/pci/rme96.c rme96->wcreg &= ~(RME96_WCR_PRO | RME96_WCR_DOLBY | RME96_WCR_EMP); rme96 2149 sound/pci/rme96.c rme96->wcreg |= val; rme96 2150 sound/pci/rme96.c writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER); rme96 2151 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2171 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2176 sound/pci/rme96.c uinfo->value.integer.max = RME96_185X_MAX_OUT(rme96); rme96 2183 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2185 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2186 sound/pci/rme96.c u->value.integer.value[0] = rme96->vol[0]; rme96 2187 sound/pci/rme96.c u->value.integer.value[1] = rme96->vol[1]; rme96 2188 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2196 sound/pci/rme96.c struct rme96 *rme96 = snd_kcontrol_chip(kcontrol); rme96 2201 sound/pci/rme96.c if (!RME96_HAS_ANALOG_OUT(rme96)) rme96 2203 sound/pci/rme96.c maxvol = RME96_185X_MAX_OUT(rme96); rme96 2204 sound/pci/rme96.c spin_lock_irq(&rme96->lock); rme96 2206 sound/pci/rme96.c if (vol != rme96->vol[0] && vol <= maxvol) { rme96 2207 sound/pci/rme96.c rme96->vol[0] = vol; rme96 2211 sound/pci/rme96.c if (vol != rme96->vol[1] && vol <= maxvol) { rme96 2212 sound/pci/rme96.c rme96->vol[1] = vol; rme96 2216 sound/pci/rme96.c snd_rme96_apply_dac_volume(rme96); rme96 2217 sound/pci/rme96.c spin_unlock_irq(&rme96->lock); rme96 2310 sound/pci/rme96.c if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_rme96_controls[idx], rme96))) < 0) rme96 2313 sound/pci/rme96.c rme96->spdif_ctl = kctl; rme96 2316 sound/pci/rme96.c if (RME96_HAS_ANALOG_OUT(rme96)) { rme96 2318 sound/pci/rme96.c if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_rme96_controls[idx], rme96))) < 0) rme96 2339 sound/pci/rme96.c struct rme96 *rme96; rme96 2352 sound/pci/rme96.c sizeof(struct rme96))) == NULL) rme96 2355 sound/pci/rme96.c rme96 = (struct rme96 *)card->private_data; rme96 2356 sound/pci/rme96.c rme96->card = card; rme96 2357 sound/pci/rme96.c rme96->pci = pci; rme96 2359 sound/pci/rme96.c if ((err = snd_rme96_create(rme96)) < 0) { rme96 2365 sound/pci/rme96.c switch (rme96->pci->device) { rme96 2376 sound/pci/rme96.c pci_read_config_byte(rme96->pci, 8, &val); rme96 2385 sound/pci/rme96.c rme96->port, rme96->irq);