hdsp 434 sound/pci/rme9652/hdsp.c struct hdsp *hdsp; hdsp 600 sound/pci/rme9652/hdsp.c static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp); hdsp 601 sound/pci/rme9652/hdsp.c static int snd_hdsp_create_pcm(struct snd_card *card, struct hdsp *hdsp); hdsp 602 sound/pci/rme9652/hdsp.c static int snd_hdsp_enable_io (struct hdsp *hdsp); hdsp 603 sound/pci/rme9652/hdsp.c static void snd_hdsp_initialize_midi_flush (struct hdsp *hdsp); hdsp 604 sound/pci/rme9652/hdsp.c static void snd_hdsp_initialize_channels (struct hdsp *hdsp); hdsp 605 sound/pci/rme9652/hdsp.c static int hdsp_fifo_wait(struct hdsp *hdsp, int count, int timeout); hdsp 606 sound/pci/rme9652/hdsp.c static int hdsp_autosync_ref(struct hdsp *hdsp); hdsp 607 sound/pci/rme9652/hdsp.c static int snd_hdsp_set_defaults(struct hdsp *hdsp); hdsp 608 sound/pci/rme9652/hdsp.c static void snd_hdsp_9652_enable_mixer (struct hdsp *hdsp); hdsp 610 sound/pci/rme9652/hdsp.c static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out) hdsp 612 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 617 sound/pci/rme9652/hdsp.c if (hdsp->firmware_rev == 0xa) hdsp 628 sound/pci/rme9652/hdsp.c static int hdsp_input_to_output_key (struct hdsp *hdsp, int in, int out) hdsp 630 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 635 sound/pci/rme9652/hdsp.c if (hdsp->firmware_rev == 0xa) hdsp 646 sound/pci/rme9652/hdsp.c static void hdsp_write(struct hdsp *hdsp, int reg, int val) hdsp 648 sound/pci/rme9652/hdsp.c writel(val, hdsp->iobase + reg); hdsp 651 sound/pci/rme9652/hdsp.c static unsigned int hdsp_read(struct hdsp *hdsp, int reg) hdsp 653 sound/pci/rme9652/hdsp.c return readl (hdsp->iobase + reg); hdsp 656 sound/pci/rme9652/hdsp.c static int hdsp_check_for_iobox (struct hdsp *hdsp) hdsp 660 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return 0; hdsp 662 sound/pci/rme9652/hdsp.c if (0 == (hdsp_read(hdsp, HDSP_statusRegister) & hdsp 665 sound/pci/rme9652/hdsp.c dev_dbg(hdsp->card->dev, hdsp 673 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, "no IO box connected!\n"); hdsp 674 sound/pci/rme9652/hdsp.c hdsp->state &= ~HDSP_FirmwareLoaded; hdsp 678 sound/pci/rme9652/hdsp.c static int hdsp_wait_for_iobox(struct hdsp *hdsp, unsigned int loops, hdsp 683 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) hdsp 687 sound/pci/rme9652/hdsp.c if (hdsp_read(hdsp, HDSP_statusRegister) & HDSP_ConfigError) hdsp 690 sound/pci/rme9652/hdsp.c dev_dbg(hdsp->card->dev, "iobox found after %ums!\n", hdsp 696 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, "no IO box connected!\n"); hdsp 697 sound/pci/rme9652/hdsp.c hdsp->state &= ~HDSP_FirmwareLoaded; hdsp 701 sound/pci/rme9652/hdsp.c static int snd_hdsp_load_firmware_from_cache(struct hdsp *hdsp) { hdsp 707 sound/pci/rme9652/hdsp.c if (hdsp->fw_uploaded) hdsp 708 sound/pci/rme9652/hdsp.c cache = hdsp->fw_uploaded; hdsp 710 sound/pci/rme9652/hdsp.c if (!hdsp->firmware) hdsp 712 sound/pci/rme9652/hdsp.c cache = (u32 *)hdsp->firmware->data; hdsp 717 sound/pci/rme9652/hdsp.c if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { hdsp 719 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, "loading firmware\n"); hdsp 721 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_control2Reg, HDSP_S_PROGRAM); hdsp 722 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_fifoData, 0); hdsp 724 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait (hdsp, 0, HDSP_LONG_WAIT)) { hdsp 725 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 727 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S200); hdsp 731 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_control2Reg, HDSP_S_LOAD); hdsp 734 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_fifoData, cache[i]); hdsp 735 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait (hdsp, 127, HDSP_LONG_WAIT)) { hdsp 736 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 738 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S200); hdsp 743 sound/pci/rme9652/hdsp.c hdsp_fifo_wait(hdsp, 3, HDSP_LONG_WAIT); hdsp 744 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S200); hdsp 748 sound/pci/rme9652/hdsp.c hdsp->control2_register = HDSP_BIGENDIAN_MODE; hdsp 750 sound/pci/rme9652/hdsp.c hdsp->control2_register = 0; hdsp 752 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register); hdsp 753 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, "finished firmware loading\n"); hdsp 756 sound/pci/rme9652/hdsp.c if (hdsp->state & HDSP_InitializationComplete) { hdsp 757 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 759 sound/pci/rme9652/hdsp.c spin_lock_irqsave(&hdsp->lock, flags); hdsp 760 sound/pci/rme9652/hdsp.c snd_hdsp_set_defaults(hdsp); hdsp 761 sound/pci/rme9652/hdsp.c spin_unlock_irqrestore(&hdsp->lock, flags); hdsp 764 sound/pci/rme9652/hdsp.c hdsp->state |= HDSP_FirmwareLoaded; hdsp 769 sound/pci/rme9652/hdsp.c static int hdsp_get_iobox_version (struct hdsp *hdsp) hdsp 771 sound/pci/rme9652/hdsp.c if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { hdsp 773 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S_LOAD); hdsp 774 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_fifoData, 0); hdsp 776 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait(hdsp, 0, HDSP_SHORT_WAIT) < 0) { hdsp 777 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S300); hdsp 778 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S_LOAD); hdsp 781 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S200 | HDSP_PROGRAM); hdsp 782 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_fifoData, 0); hdsp 783 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait(hdsp, 0, HDSP_SHORT_WAIT) < 0) hdsp 786 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S_LOAD); hdsp 787 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_fifoData, 0); hdsp 788 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait(hdsp, 0, HDSP_SHORT_WAIT) == 0) { hdsp 789 sound/pci/rme9652/hdsp.c hdsp->io_type = Digiface; hdsp 790 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, "Digiface found\n"); hdsp 794 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S300); hdsp 795 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S_LOAD); hdsp 796 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_fifoData, 0); hdsp 797 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait(hdsp, 0, HDSP_SHORT_WAIT) == 0) hdsp 800 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S300); hdsp 801 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_control2Reg, HDSP_S_LOAD); hdsp 802 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_fifoData, 0); hdsp 803 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait(hdsp, 0, HDSP_SHORT_WAIT) < 0) hdsp 806 sound/pci/rme9652/hdsp.c hdsp->io_type = RPM; hdsp 807 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, "RPM found\n"); hdsp 811 sound/pci/rme9652/hdsp.c if (hdsp_read(hdsp, HDSP_status2Register) & HDSP_version2) hdsp 812 sound/pci/rme9652/hdsp.c hdsp->io_type = RPM; hdsp 813 sound/pci/rme9652/hdsp.c else if (hdsp_read(hdsp, HDSP_status2Register) & HDSP_version1) hdsp 814 sound/pci/rme9652/hdsp.c hdsp->io_type = Multiface; hdsp 816 sound/pci/rme9652/hdsp.c hdsp->io_type = Digiface; hdsp 821 sound/pci/rme9652/hdsp.c hdsp->io_type = Multiface; hdsp 822 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, "Multiface found\n"); hdsp 827 sound/pci/rme9652/hdsp.c static int hdsp_request_fw_loader(struct hdsp *hdsp); hdsp 829 sound/pci/rme9652/hdsp.c static int hdsp_check_for_firmware (struct hdsp *hdsp, int load_on_demand) hdsp 831 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) hdsp 833 sound/pci/rme9652/hdsp.c if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { hdsp 834 sound/pci/rme9652/hdsp.c hdsp->state &= ~HDSP_FirmwareLoaded; hdsp 837 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, "firmware not present.\n"); hdsp 839 sound/pci/rme9652/hdsp.c if (! (hdsp->state & HDSP_FirmwareCached)) { hdsp 840 sound/pci/rme9652/hdsp.c if (! hdsp_request_fw_loader(hdsp)) hdsp 842 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 846 sound/pci/rme9652/hdsp.c if (snd_hdsp_load_firmware_from_cache(hdsp) != 0) { hdsp 847 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 856 sound/pci/rme9652/hdsp.c static int hdsp_fifo_wait(struct hdsp *hdsp, int count, int timeout) hdsp 866 sound/pci/rme9652/hdsp.c if ((int)(hdsp_read (hdsp, HDSP_fifoStatus) & 0xff) <= count) hdsp 876 sound/pci/rme9652/hdsp.c dev_warn(hdsp->card->dev, hdsp 882 sound/pci/rme9652/hdsp.c static int hdsp_read_gain (struct hdsp *hdsp, unsigned int addr) hdsp 887 sound/pci/rme9652/hdsp.c return hdsp->mixer_matrix[addr]; hdsp 890 sound/pci/rme9652/hdsp.c static int hdsp_write_gain(struct hdsp *hdsp, unsigned int addr, unsigned short data) hdsp 897 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) { hdsp 911 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632 && addr >= 512) hdsp 914 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 && addr >= 1352) hdsp 917 sound/pci/rme9652/hdsp.c hdsp->mixer_matrix[addr] = data; hdsp 929 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, 4096 + (ad*4), hdsp 930 sound/pci/rme9652/hdsp.c (hdsp->mixer_matrix[(addr&0x7fe)+1] << 16) + hdsp 931 sound/pci/rme9652/hdsp.c hdsp->mixer_matrix[addr&0x7fe]); hdsp 939 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait(hdsp, 127, HDSP_LONG_WAIT)) hdsp 942 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_fifoData, ad); hdsp 943 sound/pci/rme9652/hdsp.c hdsp->mixer_matrix[addr] = data; hdsp 950 sound/pci/rme9652/hdsp.c static int snd_hdsp_use_is_exclusive(struct hdsp *hdsp) hdsp 955 sound/pci/rme9652/hdsp.c spin_lock_irqsave(&hdsp->lock, flags); hdsp 956 sound/pci/rme9652/hdsp.c if ((hdsp->playback_pid != hdsp->capture_pid) && hdsp 957 sound/pci/rme9652/hdsp.c (hdsp->playback_pid >= 0) && (hdsp->capture_pid >= 0)) hdsp 959 sound/pci/rme9652/hdsp.c spin_unlock_irqrestore(&hdsp->lock, flags); hdsp 963 sound/pci/rme9652/hdsp.c static int hdsp_spdif_sample_rate(struct hdsp *hdsp) hdsp 965 sound/pci/rme9652/hdsp.c unsigned int status = hdsp_read(hdsp, HDSP_statusRegister); hdsp 969 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) hdsp 983 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) return 128000; hdsp 986 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) return 176400; hdsp 989 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) return 192000; hdsp 994 sound/pci/rme9652/hdsp.c dev_warn(hdsp->card->dev, hdsp 1000 sound/pci/rme9652/hdsp.c static int hdsp_external_sample_rate(struct hdsp *hdsp) hdsp 1002 sound/pci/rme9652/hdsp.c unsigned int status2 = hdsp_read(hdsp, HDSP_status2Register); hdsp 1009 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632 && hdsp 1010 sound/pci/rme9652/hdsp.c hdsp_autosync_ref(hdsp) == HDSP_AUTOSYNC_FROM_SPDIF) hdsp 1011 sound/pci/rme9652/hdsp.c return hdsp_spdif_sample_rate(hdsp); hdsp 1025 sound/pci/rme9652/hdsp.c static void hdsp_compute_period_size(struct hdsp *hdsp) hdsp 1027 sound/pci/rme9652/hdsp.c hdsp->period_bytes = 1 << ((hdsp_decode_latency(hdsp->control_register) + 8)); hdsp 1030 sound/pci/rme9652/hdsp.c static snd_pcm_uframes_t hdsp_hw_pointer(struct hdsp *hdsp) hdsp 1034 sound/pci/rme9652/hdsp.c position = hdsp_read(hdsp, HDSP_statusRegister); hdsp 1036 sound/pci/rme9652/hdsp.c if (!hdsp->precise_ptr) hdsp 1037 sound/pci/rme9652/hdsp.c return (position & HDSP_BufferID) ? (hdsp->period_bytes / 4) : 0; hdsp 1041 sound/pci/rme9652/hdsp.c position &= (hdsp->period_bytes/2) - 1; hdsp 1045 sound/pci/rme9652/hdsp.c static void hdsp_reset_hw_pointer(struct hdsp *hdsp) hdsp 1047 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_resetPointer, 0); hdsp 1048 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632 && hdsp->firmware_rev >= 152) hdsp 1052 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_freqReg, hdsp->dds_value); hdsp 1055 sound/pci/rme9652/hdsp.c static void hdsp_start_audio(struct hdsp *s) hdsp 1061 sound/pci/rme9652/hdsp.c static void hdsp_stop_audio(struct hdsp *s) hdsp 1067 sound/pci/rme9652/hdsp.c static void hdsp_silence_playback(struct hdsp *hdsp) hdsp 1069 sound/pci/rme9652/hdsp.c memset(hdsp->playback_buffer, 0, HDSP_DMA_AREA_BYTES); hdsp 1072 sound/pci/rme9652/hdsp.c static int hdsp_set_interrupt_interval(struct hdsp *s, unsigned int frames) hdsp 1097 sound/pci/rme9652/hdsp.c static void hdsp_set_dds_value(struct hdsp *hdsp, int rate) hdsp 1112 sound/pci/rme9652/hdsp.c hdsp->dds_value = n; hdsp 1113 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_freqReg, hdsp->dds_value); hdsp 1116 sound/pci/rme9652/hdsp.c static int hdsp_set_rate(struct hdsp *hdsp, int rate, int called_internally) hdsp 1127 sound/pci/rme9652/hdsp.c if (!(hdsp->control_register & HDSP_ClockModeMaster)) { hdsp 1130 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 1135 sound/pci/rme9652/hdsp.c int external_freq = hdsp_external_sample_rate(hdsp); hdsp 1136 sound/pci/rme9652/hdsp.c int spdif_freq = hdsp_spdif_sample_rate(hdsp); hdsp 1138 sound/pci/rme9652/hdsp.c if ((spdif_freq == external_freq*2) && (hdsp_autosync_ref(hdsp) >= HDSP_AUTOSYNC_FROM_ADAT1)) hdsp 1139 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 1141 sound/pci/rme9652/hdsp.c else if (hdsp->io_type == H9632 && (spdif_freq == external_freq*4) && (hdsp_autosync_ref(hdsp) >= HDSP_AUTOSYNC_FROM_ADAT1)) hdsp 1142 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 1145 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 1152 sound/pci/rme9652/hdsp.c current_rate = hdsp->system_sample_rate; hdsp 1164 sound/pci/rme9652/hdsp.c if (rate > 96000 && hdsp->io_type != H9632) hdsp 1217 sound/pci/rme9652/hdsp.c if (reject_if_open && (hdsp->capture_pid >= 0 || hdsp->playback_pid >= 0)) { hdsp 1218 sound/pci/rme9652/hdsp.c dev_warn(hdsp->card->dev, hdsp 1220 sound/pci/rme9652/hdsp.c hdsp->capture_pid, hdsp 1221 sound/pci/rme9652/hdsp.c hdsp->playback_pid); hdsp 1225 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_FrequencyMask; hdsp 1226 sound/pci/rme9652/hdsp.c hdsp->control_register |= rate_bits; hdsp 1227 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 1230 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632 && hdsp->firmware_rev >= 152) hdsp 1231 sound/pci/rme9652/hdsp.c hdsp_set_dds_value(hdsp, rate); hdsp 1234 sound/pci/rme9652/hdsp.c hdsp->channel_map = channel_map_H9632_qs; hdsp 1236 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) hdsp 1237 sound/pci/rme9652/hdsp.c hdsp->channel_map = channel_map_H9632_ds; hdsp 1239 sound/pci/rme9652/hdsp.c hdsp->channel_map = channel_map_ds; hdsp 1241 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 1244 sound/pci/rme9652/hdsp.c hdsp->channel_map = channel_map_mf_ss; hdsp 1248 sound/pci/rme9652/hdsp.c hdsp->channel_map = channel_map_df_ss; hdsp 1251 sound/pci/rme9652/hdsp.c hdsp->channel_map = channel_map_H9632_ss; hdsp 1259 sound/pci/rme9652/hdsp.c hdsp->system_sample_rate = rate; hdsp 1268 sound/pci/rme9652/hdsp.c static unsigned char snd_hdsp_midi_read_byte (struct hdsp *hdsp, int id) hdsp 1272 sound/pci/rme9652/hdsp.c return hdsp_read(hdsp, HDSP_midiDataIn1); hdsp 1274 sound/pci/rme9652/hdsp.c return hdsp_read(hdsp, HDSP_midiDataIn0); hdsp 1277 sound/pci/rme9652/hdsp.c static void snd_hdsp_midi_write_byte (struct hdsp *hdsp, int id, int val) hdsp 1281 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_midiDataOut1, val); hdsp 1283 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_midiDataOut0, val); hdsp 1286 sound/pci/rme9652/hdsp.c static int snd_hdsp_midi_input_available (struct hdsp *hdsp, int id) hdsp 1289 sound/pci/rme9652/hdsp.c return (hdsp_read(hdsp, HDSP_midiStatusIn1) & 0xff); hdsp 1291 sound/pci/rme9652/hdsp.c return (hdsp_read(hdsp, HDSP_midiStatusIn0) & 0xff); hdsp 1294 sound/pci/rme9652/hdsp.c static int snd_hdsp_midi_output_possible (struct hdsp *hdsp, int id) hdsp 1299 sound/pci/rme9652/hdsp.c fifo_bytes_used = hdsp_read(hdsp, HDSP_midiStatusOut1) & 0xff; hdsp 1301 sound/pci/rme9652/hdsp.c fifo_bytes_used = hdsp_read(hdsp, HDSP_midiStatusOut0) & 0xff; hdsp 1309 sound/pci/rme9652/hdsp.c static void snd_hdsp_flush_midi_input (struct hdsp *hdsp, int id) hdsp 1311 sound/pci/rme9652/hdsp.c while (snd_hdsp_midi_input_available (hdsp, id)) hdsp 1312 sound/pci/rme9652/hdsp.c snd_hdsp_midi_read_byte (hdsp, id); hdsp 1328 sound/pci/rme9652/hdsp.c if ((n_pending = snd_hdsp_midi_output_possible (hmidi->hdsp, hmidi->id)) > 0) { hdsp 1334 sound/pci/rme9652/hdsp.c snd_hdsp_midi_write_byte (hmidi->hdsp, hmidi->id, buf[i]); hdsp 1351 sound/pci/rme9652/hdsp.c if ((n_pending = snd_hdsp_midi_input_available (hmidi->hdsp, hmidi->id)) > 0) { hdsp 1356 sound/pci/rme9652/hdsp.c buf[i] = snd_hdsp_midi_read_byte (hmidi->hdsp, hmidi->id); hdsp 1362 sound/pci/rme9652/hdsp.c snd_hdsp_midi_read_byte (hmidi->hdsp, hmidi->id); hdsp 1367 sound/pci/rme9652/hdsp.c hmidi->hdsp->control_register |= HDSP_Midi1InterruptEnable; hdsp 1369 sound/pci/rme9652/hdsp.c hmidi->hdsp->control_register |= HDSP_Midi0InterruptEnable; hdsp 1370 sound/pci/rme9652/hdsp.c hdsp_write(hmidi->hdsp, HDSP_controlRegister, hmidi->hdsp->control_register); hdsp 1377 sound/pci/rme9652/hdsp.c struct hdsp *hdsp; hdsp 1383 sound/pci/rme9652/hdsp.c hdsp = hmidi->hdsp; hdsp 1385 sound/pci/rme9652/hdsp.c spin_lock_irqsave (&hdsp->lock, flags); hdsp 1387 sound/pci/rme9652/hdsp.c if (!(hdsp->control_register & ie)) { hdsp 1388 sound/pci/rme9652/hdsp.c snd_hdsp_flush_midi_input (hdsp, hmidi->id); hdsp 1389 sound/pci/rme9652/hdsp.c hdsp->control_register |= ie; hdsp 1392 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~ie; hdsp 1393 sound/pci/rme9652/hdsp.c tasklet_kill(&hdsp->midi_tasklet); hdsp 1396 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 1397 sound/pci/rme9652/hdsp.c spin_unlock_irqrestore (&hdsp->lock, flags); hdsp 1449 sound/pci/rme9652/hdsp.c snd_hdsp_flush_midi_input (hmidi->hdsp, hmidi->id); hdsp 1510 sound/pci/rme9652/hdsp.c static int snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id) hdsp 1514 sound/pci/rme9652/hdsp.c hdsp->midi[id].id = id; hdsp 1515 sound/pci/rme9652/hdsp.c hdsp->midi[id].rmidi = NULL; hdsp 1516 sound/pci/rme9652/hdsp.c hdsp->midi[id].input = NULL; hdsp 1517 sound/pci/rme9652/hdsp.c hdsp->midi[id].output = NULL; hdsp 1518 sound/pci/rme9652/hdsp.c hdsp->midi[id].hdsp = hdsp; hdsp 1519 sound/pci/rme9652/hdsp.c hdsp->midi[id].istimer = 0; hdsp 1520 sound/pci/rme9652/hdsp.c hdsp->midi[id].pending = 0; hdsp 1521 sound/pci/rme9652/hdsp.c spin_lock_init (&hdsp->midi[id].lock); hdsp 1524 sound/pci/rme9652/hdsp.c if (snd_rawmidi_new (card, buf, id, 1, 1, &hdsp->midi[id].rmidi) < 0) hdsp 1527 sound/pci/rme9652/hdsp.c sprintf(hdsp->midi[id].rmidi->name, "HDSP MIDI %d", id+1); hdsp 1528 sound/pci/rme9652/hdsp.c hdsp->midi[id].rmidi->private_data = &hdsp->midi[id]; hdsp 1530 sound/pci/rme9652/hdsp.c snd_rawmidi_set_ops (hdsp->midi[id].rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_hdsp_midi_output); hdsp 1531 sound/pci/rme9652/hdsp.c snd_rawmidi_set_ops (hdsp->midi[id].rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_hdsp_midi_input); hdsp 1533 sound/pci/rme9652/hdsp.c hdsp->midi[id].rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | hdsp 1575 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1577 sound/pci/rme9652/hdsp.c snd_hdsp_convert_to_aes(&ucontrol->value.iec958, hdsp->creg_spdif); hdsp 1583 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1588 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 1589 sound/pci/rme9652/hdsp.c change = val != hdsp->creg_spdif; hdsp 1590 sound/pci/rme9652/hdsp.c hdsp->creg_spdif = val; hdsp 1591 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 1604 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1606 sound/pci/rme9652/hdsp.c snd_hdsp_convert_to_aes(&ucontrol->value.iec958, hdsp->creg_spdif_stream); hdsp 1612 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1617 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 1618 sound/pci/rme9652/hdsp.c change = val != hdsp->creg_spdif_stream; hdsp 1619 sound/pci/rme9652/hdsp.c hdsp->creg_spdif_stream = val; hdsp 1620 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~(HDSP_SPDIFProfessional | HDSP_SPDIFNonAudio | HDSP_SPDIFEmphasis); hdsp 1621 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register |= val); hdsp 1622 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 1647 sound/pci/rme9652/hdsp.c static unsigned int hdsp_spdif_in(struct hdsp *hdsp) hdsp 1649 sound/pci/rme9652/hdsp.c return hdsp_decode_spdif_in(hdsp->control_register & HDSP_SPDIFInputMask); hdsp 1652 sound/pci/rme9652/hdsp.c static int hdsp_set_spdif_input(struct hdsp *hdsp, int in) hdsp 1654 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_SPDIFInputMask; hdsp 1655 sound/pci/rme9652/hdsp.c hdsp->control_register |= hdsp_encode_spdif_in(in); hdsp 1656 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 1665 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1667 sound/pci/rme9652/hdsp.c return snd_ctl_enum_info(uinfo, 1, (hdsp->io_type == H9632) ? 4 : 3, hdsp 1673 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1675 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_spdif_in(hdsp); hdsp 1681 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1685 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 1687 sound/pci/rme9652/hdsp.c val = ucontrol->value.enumerated.item[0] % ((hdsp->io_type == H9632) ? 4 : 3); hdsp 1688 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 1689 sound/pci/rme9652/hdsp.c change = val != hdsp_spdif_in(hdsp); hdsp 1691 sound/pci/rme9652/hdsp.c hdsp_set_spdif_input(hdsp, val); hdsp 1692 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 1705 sound/pci/rme9652/hdsp.c static int hdsp_toggle_setting(struct hdsp *hdsp, u32 regmask) hdsp 1707 sound/pci/rme9652/hdsp.c return (hdsp->control_register & regmask) ? 1 : 0; hdsp 1710 sound/pci/rme9652/hdsp.c static int hdsp_set_toggle_setting(struct hdsp *hdsp, u32 regmask, int out) hdsp 1713 sound/pci/rme9652/hdsp.c hdsp->control_register |= regmask; hdsp 1715 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~regmask; hdsp 1716 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 1726 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1729 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 1730 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[0] = hdsp_toggle_setting(hdsp, regmask); hdsp 1731 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 1738 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1743 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 1746 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 1747 sound/pci/rme9652/hdsp.c change = (int) val != hdsp_toggle_setting(hdsp, regmask); hdsp 1749 sound/pci/rme9652/hdsp.c hdsp_set_toggle_setting(hdsp, regmask, val); hdsp 1750 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 1769 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1771 sound/pci/rme9652/hdsp.c return snd_ctl_enum_info(uinfo, 1, (hdsp->io_type == H9632) ? 10 : 7, hdsp 1777 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1779 sound/pci/rme9652/hdsp.c switch (hdsp_spdif_sample_rate(hdsp)) { hdsp 1831 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1833 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp->system_sample_rate; hdsp 1848 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1854 sound/pci/rme9652/hdsp.c return snd_ctl_enum_info(uinfo, 1, (hdsp->io_type == H9632) ? 10 : 7, hdsp 1860 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1862 sound/pci/rme9652/hdsp.c switch (hdsp_external_sample_rate(hdsp)) { hdsp 1905 sound/pci/rme9652/hdsp.c static int hdsp_system_clock_mode(struct hdsp *hdsp) hdsp 1907 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_ClockModeMaster) hdsp 1909 sound/pci/rme9652/hdsp.c else if (hdsp_external_sample_rate(hdsp) != hdsp->system_sample_rate) hdsp 1923 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 1925 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_system_clock_mode(hdsp); hdsp 1938 sound/pci/rme9652/hdsp.c static int hdsp_clock_source(struct hdsp *hdsp) hdsp 1940 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_ClockModeMaster) { hdsp 1941 sound/pci/rme9652/hdsp.c switch (hdsp->system_sample_rate) { hdsp 1968 sound/pci/rme9652/hdsp.c static int hdsp_set_clock_source(struct hdsp *hdsp, int mode) hdsp 1973 sound/pci/rme9652/hdsp.c if (hdsp_external_sample_rate(hdsp) != 0) { hdsp 1974 sound/pci/rme9652/hdsp.c if (!hdsp_set_rate(hdsp, hdsp_external_sample_rate(hdsp), 1)) { hdsp 1975 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_ClockModeMaster; hdsp 1976 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 2011 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_ClockModeMaster; hdsp 2012 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 2013 sound/pci/rme9652/hdsp.c hdsp_set_rate(hdsp, rate, 1); hdsp 2025 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2027 sound/pci/rme9652/hdsp.c return snd_ctl_enum_info(uinfo, 1, (hdsp->io_type == H9632) ? 10 : 7, hdsp 2033 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2035 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_clock_source(hdsp); hdsp 2041 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2045 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2049 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 2056 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2057 sound/pci/rme9652/hdsp.c if (val != hdsp_clock_source(hdsp)) hdsp 2058 sound/pci/rme9652/hdsp.c change = (hdsp_set_clock_source(hdsp, val) == 0) ? 1 : 0; hdsp 2061 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2069 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2071 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[0] = hdsp->clock_source_locked; hdsp 2077 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2080 sound/pci/rme9652/hdsp.c change = (int)ucontrol->value.integer.value[0] != hdsp->clock_source_locked; hdsp 2082 sound/pci/rme9652/hdsp.c hdsp->clock_source_locked = !!ucontrol->value.integer.value[0]; hdsp 2095 sound/pci/rme9652/hdsp.c static int hdsp_da_gain(struct hdsp *hdsp) hdsp 2097 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_DAGainMask) { hdsp 2109 sound/pci/rme9652/hdsp.c static int hdsp_set_da_gain(struct hdsp *hdsp, int mode) hdsp 2111 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_DAGainMask; hdsp 2114 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_DAGainHighGain; hdsp 2117 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_DAGainPlus4dBu; hdsp 2120 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_DAGainMinus10dBV; hdsp 2126 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 2139 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2141 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_da_gain(hdsp); hdsp 2147 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2151 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2156 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2157 sound/pci/rme9652/hdsp.c if (val != hdsp_da_gain(hdsp)) hdsp 2158 sound/pci/rme9652/hdsp.c change = (hdsp_set_da_gain(hdsp, val) == 0) ? 1 : 0; hdsp 2161 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2174 sound/pci/rme9652/hdsp.c static int hdsp_ad_gain(struct hdsp *hdsp) hdsp 2176 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_ADGainMask) { hdsp 2188 sound/pci/rme9652/hdsp.c static int hdsp_set_ad_gain(struct hdsp *hdsp, int mode) hdsp 2190 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_ADGainMask; hdsp 2193 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_ADGainMinus10dBV; hdsp 2196 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_ADGainPlus4dBu; hdsp 2199 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_ADGainLowGain; hdsp 2205 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 2218 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2220 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_ad_gain(hdsp); hdsp 2226 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2230 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2235 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2236 sound/pci/rme9652/hdsp.c if (val != hdsp_ad_gain(hdsp)) hdsp 2237 sound/pci/rme9652/hdsp.c change = (hdsp_set_ad_gain(hdsp, val) == 0) ? 1 : 0; hdsp 2240 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2253 sound/pci/rme9652/hdsp.c static int hdsp_phone_gain(struct hdsp *hdsp) hdsp 2255 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_PhoneGainMask) { hdsp 2267 sound/pci/rme9652/hdsp.c static int hdsp_set_phone_gain(struct hdsp *hdsp, int mode) hdsp 2269 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_PhoneGainMask; hdsp 2272 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_PhoneGain0dB; hdsp 2275 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_PhoneGainMinus6dB; hdsp 2278 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_PhoneGainMinus12dB; hdsp 2284 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 2297 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2299 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_phone_gain(hdsp); hdsp 2305 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2309 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2314 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2315 sound/pci/rme9652/hdsp.c if (val != hdsp_phone_gain(hdsp)) hdsp 2316 sound/pci/rme9652/hdsp.c change = (hdsp_set_phone_gain(hdsp, val) == 0) ? 1 : 0; hdsp 2319 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2332 sound/pci/rme9652/hdsp.c static int hdsp_pref_sync_ref(struct hdsp *hdsp) hdsp 2338 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_SyncRefMask) { hdsp 2357 sound/pci/rme9652/hdsp.c static int hdsp_set_pref_sync_ref(struct hdsp *hdsp, int pref) hdsp 2359 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_SyncRefMask; hdsp 2362 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_SyncRefMask; /* clear SyncRef bits */ hdsp 2365 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_SyncRef_ADAT2; hdsp 2368 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_SyncRef_ADAT3; hdsp 2371 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_SyncRef_SPDIF; hdsp 2374 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_SyncRef_WORD; hdsp 2377 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_SyncRef_ADAT_SYNC; hdsp 2382 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 2391 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2394 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 2414 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2416 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_pref_sync_ref(hdsp); hdsp 2422 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2426 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2429 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 2445 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2446 sound/pci/rme9652/hdsp.c change = (int)val != hdsp_pref_sync_ref(hdsp); hdsp 2447 sound/pci/rme9652/hdsp.c hdsp_set_pref_sync_ref(hdsp, val); hdsp 2448 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2461 sound/pci/rme9652/hdsp.c static int hdsp_autosync_ref(struct hdsp *hdsp) hdsp 2464 sound/pci/rme9652/hdsp.c unsigned int status2 = hdsp_read(hdsp, HDSP_status2Register); hdsp 2498 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2500 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_autosync_ref(hdsp); hdsp 2513 sound/pci/rme9652/hdsp.c static int hdsp_set_precise_pointer(struct hdsp *hdsp, int precise) hdsp 2516 sound/pci/rme9652/hdsp.c hdsp->precise_ptr = 1; hdsp 2518 sound/pci/rme9652/hdsp.c hdsp->precise_ptr = 0; hdsp 2526 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2528 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2529 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[0] = hdsp->precise_ptr; hdsp 2530 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2536 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2540 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2543 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2544 sound/pci/rme9652/hdsp.c change = (int)val != hdsp->precise_ptr; hdsp 2545 sound/pci/rme9652/hdsp.c hdsp_set_precise_pointer(hdsp, val); hdsp 2546 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2559 sound/pci/rme9652/hdsp.c static int hdsp_set_use_midi_tasklet(struct hdsp *hdsp, int use_tasklet) hdsp 2562 sound/pci/rme9652/hdsp.c hdsp->use_midi_tasklet = 1; hdsp 2564 sound/pci/rme9652/hdsp.c hdsp->use_midi_tasklet = 0; hdsp 2572 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2574 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2575 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[0] = hdsp->use_midi_tasklet; hdsp 2576 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2582 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2586 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2589 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2590 sound/pci/rme9652/hdsp.c change = (int)val != hdsp->use_midi_tasklet; hdsp 2591 sound/pci/rme9652/hdsp.c hdsp_set_use_midi_tasklet(hdsp, val); hdsp 2592 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2620 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2628 sound/pci/rme9652/hdsp.c if (source >= hdsp->max_channels) hdsp 2629 sound/pci/rme9652/hdsp.c addr = hdsp_playback_to_output_key(hdsp,source-hdsp->max_channels,destination); hdsp 2631 sound/pci/rme9652/hdsp.c addr = hdsp_input_to_output_key(hdsp,source, destination); hdsp 2633 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2634 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[2] = hdsp_read_gain (hdsp, addr); hdsp 2635 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2641 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2648 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2654 sound/pci/rme9652/hdsp.c if (source >= hdsp->max_channels) hdsp 2655 sound/pci/rme9652/hdsp.c addr = hdsp_playback_to_output_key(hdsp,source-hdsp->max_channels, destination); hdsp 2657 sound/pci/rme9652/hdsp.c addr = hdsp_input_to_output_key(hdsp,source, destination); hdsp 2661 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2662 sound/pci/rme9652/hdsp.c change = gain != hdsp_read_gain(hdsp, addr); hdsp 2664 sound/pci/rme9652/hdsp.c hdsp_write_gain(hdsp, addr, gain); hdsp 2665 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2685 sound/pci/rme9652/hdsp.c static int hdsp_wc_sync_check(struct hdsp *hdsp) hdsp 2687 sound/pci/rme9652/hdsp.c int status2 = hdsp_read(hdsp, HDSP_status2Register); hdsp 2700 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2702 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_wc_sync_check(hdsp); hdsp 2715 sound/pci/rme9652/hdsp.c static int hdsp_spdif_sync_check(struct hdsp *hdsp) hdsp 2717 sound/pci/rme9652/hdsp.c int status = hdsp_read(hdsp, HDSP_statusRegister); hdsp 2731 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2733 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_spdif_sync_check(hdsp); hdsp 2746 sound/pci/rme9652/hdsp.c static int hdsp_adatsync_sync_check(struct hdsp *hdsp) hdsp 2748 sound/pci/rme9652/hdsp.c int status = hdsp_read(hdsp, HDSP_statusRegister); hdsp 2760 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2762 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_adatsync_sync_check(hdsp); hdsp 2773 sound/pci/rme9652/hdsp.c static int hdsp_adat_sync_check(struct hdsp *hdsp, int idx) hdsp 2775 sound/pci/rme9652/hdsp.c int status = hdsp_read(hdsp, HDSP_statusRegister); hdsp 2789 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2795 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 2810 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_adat_sync_check(hdsp, offset); hdsp 2823 sound/pci/rme9652/hdsp.c static int hdsp_dds_offset(struct hdsp *hdsp) hdsp 2826 sound/pci/rme9652/hdsp.c unsigned int dds_value = hdsp->dds_value; hdsp 2827 sound/pci/rme9652/hdsp.c int system_sample_rate = hdsp->system_sample_rate; hdsp 2845 sound/pci/rme9652/hdsp.c static int hdsp_set_dds_offset(struct hdsp *hdsp, int offset_hz) hdsp 2847 sound/pci/rme9652/hdsp.c int rate = hdsp->system_sample_rate + offset_hz; hdsp 2848 sound/pci/rme9652/hdsp.c hdsp_set_dds_value(hdsp, rate); hdsp 2863 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2865 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[0] = hdsp_dds_offset(hdsp); hdsp 2871 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2875 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 2878 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 2879 sound/pci/rme9652/hdsp.c if (val != hdsp_dds_offset(hdsp)) hdsp 2880 sound/pci/rme9652/hdsp.c change = (hdsp_set_dds_offset(hdsp, val) == 0) ? 1 : 0; hdsp 2883 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 2962 sound/pci/rme9652/hdsp.c static int hdsp_rpm_input12(struct hdsp *hdsp) hdsp 2964 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_RPM_Inp12) { hdsp 2980 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 2982 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_rpm_input12(hdsp); hdsp 2987 sound/pci/rme9652/hdsp.c static int hdsp_set_rpm_input12(struct hdsp *hdsp, int mode) hdsp 2989 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_RPM_Inp12; hdsp 2992 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp12_Phon_6dB; hdsp 2997 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp12_Phon_n6dB; hdsp 3000 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp12_Line_0dB; hdsp 3003 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp12_Line_n6dB; hdsp 3009 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3016 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 3020 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 3027 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 3028 sound/pci/rme9652/hdsp.c if (val != hdsp_rpm_input12(hdsp)) hdsp 3029 sound/pci/rme9652/hdsp.c change = (hdsp_set_rpm_input12(hdsp, val) == 0) ? 1 : 0; hdsp 3032 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 3047 sound/pci/rme9652/hdsp.c static int hdsp_rpm_input34(struct hdsp *hdsp) hdsp 3049 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_RPM_Inp34) { hdsp 3065 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 3067 sound/pci/rme9652/hdsp.c ucontrol->value.enumerated.item[0] = hdsp_rpm_input34(hdsp); hdsp 3072 sound/pci/rme9652/hdsp.c static int hdsp_set_rpm_input34(struct hdsp *hdsp, int mode) hdsp 3074 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_RPM_Inp34; hdsp 3077 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp34_Phon_6dB; hdsp 3082 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp34_Phon_n6dB; hdsp 3085 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp34_Line_0dB; hdsp 3088 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Inp34_Line_n6dB; hdsp 3094 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3101 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 3105 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 3112 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 3113 sound/pci/rme9652/hdsp.c if (val != hdsp_rpm_input34(hdsp)) hdsp 3114 sound/pci/rme9652/hdsp.c change = (hdsp_set_rpm_input34(hdsp, val) == 0) ? 1 : 0; hdsp 3117 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 3123 sound/pci/rme9652/hdsp.c static int hdsp_rpm_bypass(struct hdsp *hdsp) hdsp 3125 sound/pci/rme9652/hdsp.c return (hdsp->control_register & HDSP_RPM_Bypass) ? 1 : 0; hdsp 3131 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 3133 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[0] = hdsp_rpm_bypass(hdsp); hdsp 3138 sound/pci/rme9652/hdsp.c static int hdsp_set_rpm_bypass(struct hdsp *hdsp, int on) hdsp 3141 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Bypass; hdsp 3143 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_RPM_Bypass; hdsp 3144 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3151 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 3155 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 3158 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 3159 sound/pci/rme9652/hdsp.c change = (int)val != hdsp_rpm_bypass(hdsp); hdsp 3160 sound/pci/rme9652/hdsp.c hdsp_set_rpm_bypass(hdsp, val); hdsp 3161 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 3175 sound/pci/rme9652/hdsp.c static int hdsp_rpm_disconnect(struct hdsp *hdsp) hdsp 3177 sound/pci/rme9652/hdsp.c return (hdsp->control_register & HDSP_RPM_Disconnect) ? 1 : 0; hdsp 3183 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 3185 sound/pci/rme9652/hdsp.c ucontrol->value.integer.value[0] = hdsp_rpm_disconnect(hdsp); hdsp 3190 sound/pci/rme9652/hdsp.c static int hdsp_set_rpm_disconnect(struct hdsp *hdsp, int on) hdsp 3193 sound/pci/rme9652/hdsp.c hdsp->control_register |= HDSP_RPM_Disconnect; hdsp 3195 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_RPM_Disconnect; hdsp 3196 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3203 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_kcontrol_chip(kcontrol); hdsp 3207 sound/pci/rme9652/hdsp.c if (!snd_hdsp_use_is_exclusive(hdsp)) hdsp 3210 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 3211 sound/pci/rme9652/hdsp.c change = (int)val != hdsp_rpm_disconnect(hdsp); hdsp 3212 sound/pci/rme9652/hdsp.c hdsp_set_rpm_disconnect(hdsp, val); hdsp 3213 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 3262 sound/pci/rme9652/hdsp.c static int snd_hdsp_create_controls(struct snd_card *card, struct hdsp *hdsp) hdsp 3268 sound/pci/rme9652/hdsp.c if (hdsp->io_type == RPM) { hdsp 3271 sound/pci/rme9652/hdsp.c err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_rpm_controls[idx], hdsp)); hdsp 3279 sound/pci/rme9652/hdsp.c if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_controls[idx], hdsp))) < 0) hdsp 3282 sound/pci/rme9652/hdsp.c hdsp->spdif_ctl = kctl; hdsp 3288 sound/pci/rme9652/hdsp.c if ((err = snd_ctl_add (card, kctl = snd_ctl_new1(&snd_hdsp_adat_sync_check, hdsp)))) hdsp 3290 sound/pci/rme9652/hdsp.c if (hdsp->io_type == Digiface || hdsp->io_type == H9652) { hdsp 3293 sound/pci/rme9652/hdsp.c if ((err = snd_ctl_add (card, kctl = snd_ctl_new1(&snd_hdsp_adat_sync_check, hdsp)))) hdsp 3299 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 3301 sound/pci/rme9652/hdsp.c if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_9632_controls[idx], hdsp))) < 0) hdsp 3307 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632 || hdsp->io_type == H9652) { hdsp 3308 sound/pci/rme9652/hdsp.c if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_96xx_aeb, hdsp))) < 0) hdsp 3322 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = entry->private_data; hdsp 3331 sound/pci/rme9652/hdsp.c status = hdsp_read(hdsp, HDSP_statusRegister); hdsp 3332 sound/pci/rme9652/hdsp.c status2 = hdsp_read(hdsp, HDSP_status2Register); hdsp 3334 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "%s (Card #%d)\n", hdsp->card_name, hdsp 3335 sound/pci/rme9652/hdsp.c hdsp->card->number + 1); hdsp 3337 sound/pci/rme9652/hdsp.c hdsp->capture_buffer, hdsp->playback_buffer); hdsp 3339 sound/pci/rme9652/hdsp.c hdsp->irq, hdsp->port, (unsigned long)hdsp->iobase); hdsp 3340 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "Control register: 0x%x\n", hdsp->control_register); hdsp 3342 sound/pci/rme9652/hdsp.c hdsp->control2_register); hdsp 3346 sound/pci/rme9652/hdsp.c if (hdsp_check_for_iobox(hdsp)) { hdsp 3352 sound/pci/rme9652/hdsp.c if (hdsp_check_for_firmware(hdsp, 0)) { hdsp 3353 sound/pci/rme9652/hdsp.c if (hdsp->state & HDSP_FirmwareCached) { hdsp 3354 sound/pci/rme9652/hdsp.c if (snd_hdsp_load_firmware_from_cache(hdsp) != 0) { hdsp 3362 sound/pci/rme9652/hdsp.c err = hdsp_request_fw_loader(hdsp); hdsp 3372 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "FIFO status: %d\n", hdsp_read(hdsp, HDSP_fifoStatus) & 0xff); hdsp 3373 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "MIDI1 Output status: 0x%x\n", hdsp_read(hdsp, HDSP_midiStatusOut0)); hdsp 3374 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "MIDI1 Input status: 0x%x\n", hdsp_read(hdsp, HDSP_midiStatusIn0)); hdsp 3375 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "MIDI2 Output status: 0x%x\n", hdsp_read(hdsp, HDSP_midiStatusOut1)); hdsp 3376 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "MIDI2 Input status: 0x%x\n", hdsp_read(hdsp, HDSP_midiStatusIn1)); hdsp 3377 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "Use Midi Tasklet: %s\n", hdsp->use_midi_tasklet ? "on" : "off"); hdsp 3381 sound/pci/rme9652/hdsp.c x = 1 << (6 + hdsp_decode_latency(hdsp->control_register & HDSP_LatencyMask)); hdsp 3383 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "Buffer Size (Latency): %d samples (2 periods of %lu bytes)\n", x, (unsigned long) hdsp->period_bytes); hdsp 3384 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "Hardware pointer (frames): %ld\n", hdsp_hw_pointer(hdsp)); hdsp 3385 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "Precise pointer: %s\n", hdsp->precise_ptr ? "on" : "off"); hdsp 3386 sound/pci/rme9652/hdsp.c snd_iprintf(buffer, "Line out: %s\n", (hdsp->control_register & HDSP_LineOut) ? "on" : "off"); hdsp 3392 sound/pci/rme9652/hdsp.c switch (hdsp_clock_source(hdsp)) { hdsp 3428 sound/pci/rme9652/hdsp.c if (hdsp_system_clock_mode(hdsp)) hdsp 3433 sound/pci/rme9652/hdsp.c switch (hdsp_pref_sync_ref (hdsp)) { hdsp 3458 sound/pci/rme9652/hdsp.c switch (hdsp_autosync_ref (hdsp)) { hdsp 3486 sound/pci/rme9652/hdsp.c snd_iprintf (buffer, "AutoSync Frequency: %d\n", hdsp_external_sample_rate(hdsp)); hdsp 3490 sound/pci/rme9652/hdsp.c snd_iprintf (buffer, "System Clock Frequency: %d\n", hdsp->system_sample_rate); hdsp 3491 sound/pci/rme9652/hdsp.c snd_iprintf (buffer, "System Clock Locked: %s\n", hdsp->clock_source_locked ? "Yes" : "No"); hdsp 3495 sound/pci/rme9652/hdsp.c if (hdsp->io_type != RPM) { hdsp 3496 sound/pci/rme9652/hdsp.c switch (hdsp_spdif_in(hdsp)) { hdsp 3515 sound/pci/rme9652/hdsp.c if (RPM == hdsp->io_type) { hdsp 3516 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_RPM_Bypass) hdsp 3520 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_RPM_Disconnect) hdsp 3525 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_RPM_Inp12) { hdsp 3545 sound/pci/rme9652/hdsp.c switch (hdsp->control_register & HDSP_RPM_Inp34) { hdsp 3566 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_SPDIFOpticalOut) hdsp 3571 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_SPDIFProfessional) hdsp 3576 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_SPDIFEmphasis) hdsp 3581 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_SPDIFNonAudio) hdsp 3585 sound/pci/rme9652/hdsp.c x = hdsp_spdif_sample_rate(hdsp); hdsp 3600 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 3640 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 3643 sound/pci/rme9652/hdsp.c switch (hdsp_ad_gain(hdsp)) { hdsp 3656 sound/pci/rme9652/hdsp.c switch (hdsp_da_gain(hdsp)) { hdsp 3669 sound/pci/rme9652/hdsp.c switch (hdsp_phone_gain(hdsp)) { hdsp 3683 sound/pci/rme9652/hdsp.c hdsp_toggle_setting(hdsp, HDSP_XLRBreakoutCable) ? hdsp 3686 sound/pci/rme9652/hdsp.c if (hdsp->control_register & HDSP_AnalogExtensionBoard) hdsp 3695 sound/pci/rme9652/hdsp.c static void snd_hdsp_proc_init(struct hdsp *hdsp) hdsp 3697 sound/pci/rme9652/hdsp.c snd_card_ro_proc_new(hdsp->card, "hdsp", hdsp, snd_hdsp_proc_read); hdsp 3700 sound/pci/rme9652/hdsp.c static void snd_hdsp_free_buffers(struct hdsp *hdsp) hdsp 3702 sound/pci/rme9652/hdsp.c snd_hammerfall_free_buffer(&hdsp->capture_dma_buf, hdsp->pci); hdsp 3703 sound/pci/rme9652/hdsp.c snd_hammerfall_free_buffer(&hdsp->playback_dma_buf, hdsp->pci); hdsp 3706 sound/pci/rme9652/hdsp.c static int snd_hdsp_initialize_memory(struct hdsp *hdsp) hdsp 3710 sound/pci/rme9652/hdsp.c if (snd_hammerfall_get_buffer(hdsp->pci, &hdsp->capture_dma_buf, HDSP_DMA_AREA_BYTES) < 0 || hdsp 3711 sound/pci/rme9652/hdsp.c snd_hammerfall_get_buffer(hdsp->pci, &hdsp->playback_dma_buf, HDSP_DMA_AREA_BYTES) < 0) { hdsp 3712 sound/pci/rme9652/hdsp.c if (hdsp->capture_dma_buf.area) hdsp 3713 sound/pci/rme9652/hdsp.c snd_dma_free_pages(&hdsp->capture_dma_buf); hdsp 3714 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 3715 sound/pci/rme9652/hdsp.c "%s: no buffers available\n", hdsp->card_name); hdsp 3721 sound/pci/rme9652/hdsp.c cb_bus = ALIGN(hdsp->capture_dma_buf.addr, 0x10000ul); hdsp 3722 sound/pci/rme9652/hdsp.c pb_bus = ALIGN(hdsp->playback_dma_buf.addr, 0x10000ul); hdsp 3726 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_inputBufferAddress, cb_bus); hdsp 3727 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_outputBufferAddress, pb_bus); hdsp 3729 sound/pci/rme9652/hdsp.c hdsp->capture_buffer = hdsp->capture_dma_buf.area + (cb_bus - hdsp->capture_dma_buf.addr); hdsp 3730 sound/pci/rme9652/hdsp.c hdsp->playback_buffer = hdsp->playback_dma_buf.area + (pb_bus - hdsp->playback_dma_buf.addr); hdsp 3735 sound/pci/rme9652/hdsp.c static int snd_hdsp_set_defaults(struct hdsp *hdsp) hdsp 3753 sound/pci/rme9652/hdsp.c hdsp->control_register = HDSP_ClockModeMaster | hdsp 3759 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3762 sound/pci/rme9652/hdsp.c hdsp->control2_register = HDSP_BIGENDIAN_MODE; hdsp 3764 sound/pci/rme9652/hdsp.c hdsp->control2_register = 0; hdsp 3766 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652) hdsp 3767 sound/pci/rme9652/hdsp.c snd_hdsp_9652_enable_mixer (hdsp); hdsp 3769 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register); hdsp 3771 sound/pci/rme9652/hdsp.c hdsp_reset_hw_pointer(hdsp); hdsp 3772 sound/pci/rme9652/hdsp.c hdsp_compute_period_size(hdsp); hdsp 3777 sound/pci/rme9652/hdsp.c hdsp->mixer_matrix[i] = MINUS_INFINITY_GAIN; hdsp 3779 sound/pci/rme9652/hdsp.c for (i = 0; i < ((hdsp->io_type == H9652 || hdsp->io_type == H9632) ? 1352 : HDSP_MATRIX_MIXER_SIZE); ++i) { hdsp 3780 sound/pci/rme9652/hdsp.c if (hdsp_write_gain (hdsp, i, MINUS_INFINITY_GAIN)) hdsp 3785 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 3786 sound/pci/rme9652/hdsp.c hdsp->control_register |= (HDSP_DAGainPlus4dBu | HDSP_ADGainPlus4dBu | HDSP_PhoneGain0dB); hdsp 3787 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3793 sound/pci/rme9652/hdsp.c hdsp_set_rate(hdsp, 48000, 1); hdsp 3800 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = (struct hdsp *)arg; hdsp 3802 sound/pci/rme9652/hdsp.c if (hdsp->midi[0].pending) hdsp 3803 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[0]); hdsp 3804 sound/pci/rme9652/hdsp.c if (hdsp->midi[1].pending) hdsp 3805 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[1]); hdsp 3810 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = (struct hdsp *) dev_id; hdsp 3819 sound/pci/rme9652/hdsp.c status = hdsp_read(hdsp, HDSP_statusRegister); hdsp 3828 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_interruptConfirmation, 0); hdsp 3830 sound/pci/rme9652/hdsp.c midi0status = hdsp_read (hdsp, HDSP_midiStatusIn0) & 0xff; hdsp 3831 sound/pci/rme9652/hdsp.c midi1status = hdsp_read (hdsp, HDSP_midiStatusIn1) & 0xff; hdsp 3833 sound/pci/rme9652/hdsp.c if (!(hdsp->state & HDSP_InitializationComplete)) hdsp 3837 sound/pci/rme9652/hdsp.c if (hdsp->capture_substream) hdsp 3838 sound/pci/rme9652/hdsp.c snd_pcm_period_elapsed(hdsp->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream); hdsp 3840 sound/pci/rme9652/hdsp.c if (hdsp->playback_substream) hdsp 3841 sound/pci/rme9652/hdsp.c snd_pcm_period_elapsed(hdsp->pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream); hdsp 3845 sound/pci/rme9652/hdsp.c if (hdsp->use_midi_tasklet) { hdsp 3847 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_Midi0InterruptEnable; hdsp 3848 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3849 sound/pci/rme9652/hdsp.c hdsp->midi[0].pending = 1; hdsp 3852 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[0]); hdsp 3855 sound/pci/rme9652/hdsp.c if (hdsp->io_type != Multiface && hdsp->io_type != RPM && hdsp->io_type != H9632 && midi1 && midi1status) { hdsp 3856 sound/pci/rme9652/hdsp.c if (hdsp->use_midi_tasklet) { hdsp 3858 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~HDSP_Midi1InterruptEnable; hdsp 3859 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 3860 sound/pci/rme9652/hdsp.c hdsp->midi[1].pending = 1; hdsp 3863 sound/pci/rme9652/hdsp.c snd_hdsp_midi_input_read (&hdsp->midi[1]); hdsp 3866 sound/pci/rme9652/hdsp.c if (hdsp->use_midi_tasklet && schedule) hdsp 3867 sound/pci/rme9652/hdsp.c tasklet_schedule(&hdsp->midi_tasklet); hdsp 3873 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 3874 sound/pci/rme9652/hdsp.c return hdsp_hw_pointer(hdsp); hdsp 3877 sound/pci/rme9652/hdsp.c static char *hdsp_channel_buffer_location(struct hdsp *hdsp, hdsp 3884 sound/pci/rme9652/hdsp.c if (snd_BUG_ON(channel < 0 || channel >= hdsp->max_channels)) hdsp 3887 sound/pci/rme9652/hdsp.c if ((mapped_channel = hdsp->channel_map[channel]) < 0) hdsp 3891 sound/pci/rme9652/hdsp.c return hdsp->capture_buffer + (mapped_channel * HDSP_CHANNEL_BUFFER_BYTES); hdsp 3893 sound/pci/rme9652/hdsp.c return hdsp->playback_buffer + (mapped_channel * HDSP_CHANNEL_BUFFER_BYTES); hdsp 3900 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 3906 sound/pci/rme9652/hdsp.c channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, channel); hdsp 3918 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 3921 sound/pci/rme9652/hdsp.c channel_buf = hdsp_channel_buffer_location(hdsp, substream->pstr->stream, channel); hdsp 3932 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 3938 sound/pci/rme9652/hdsp.c channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, channel); hdsp 3950 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 3953 sound/pci/rme9652/hdsp.c channel_buf = hdsp_channel_buffer_location(hdsp, substream->pstr->stream, channel); hdsp 3964 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 3967 sound/pci/rme9652/hdsp.c channel_buf = hdsp_channel_buffer_location (hdsp, substream->pstr->stream, channel); hdsp 3977 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 3980 sound/pci/rme9652/hdsp.c other = hdsp->capture_substream; hdsp 3982 sound/pci/rme9652/hdsp.c other = hdsp->playback_substream; hdsp 3983 sound/pci/rme9652/hdsp.c if (hdsp->running) hdsp 3984 sound/pci/rme9652/hdsp.c runtime->status->hw_ptr = hdsp_hw_pointer(hdsp); hdsp 4003 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4008 sound/pci/rme9652/hdsp.c if (hdsp_check_for_iobox (hdsp)) hdsp 4011 sound/pci/rme9652/hdsp.c if (hdsp_check_for_firmware(hdsp, 1)) hdsp 4014 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 4017 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~(HDSP_SPDIFProfessional | HDSP_SPDIFNonAudio | HDSP_SPDIFEmphasis); hdsp 4018 sound/pci/rme9652/hdsp.c hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register |= hdsp->creg_spdif_stream); hdsp 4019 sound/pci/rme9652/hdsp.c this_pid = hdsp->playback_pid; hdsp 4020 sound/pci/rme9652/hdsp.c other_pid = hdsp->capture_pid; hdsp 4022 sound/pci/rme9652/hdsp.c this_pid = hdsp->capture_pid; hdsp 4023 sound/pci/rme9652/hdsp.c other_pid = hdsp->playback_pid; hdsp 4033 sound/pci/rme9652/hdsp.c if (params_rate(params) != hdsp->system_sample_rate) { hdsp 4034 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4039 sound/pci/rme9652/hdsp.c if (params_period_size(params) != hdsp->period_bytes / 4) { hdsp 4040 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4047 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4051 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4057 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 4058 sound/pci/rme9652/hdsp.c if (! hdsp->clock_source_locked) { hdsp 4059 sound/pci/rme9652/hdsp.c if ((err = hdsp_set_rate(hdsp, params_rate(params), 0)) < 0) { hdsp 4060 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4065 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4067 sound/pci/rme9652/hdsp.c if ((err = hdsp_set_interrupt_interval(hdsp, params_period_size(params))) < 0) { hdsp 4078 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4081 sound/pci/rme9652/hdsp.c if (snd_BUG_ON(channel >= hdsp->max_channels)) hdsp 4083 sound/pci/rme9652/hdsp.c channel = array_index_nospec(channel, hdsp->max_channels); hdsp 4085 sound/pci/rme9652/hdsp.c if (hdsp->channel_map[channel] < 0) hdsp 4088 sound/pci/rme9652/hdsp.c info->offset = hdsp->channel_map[channel] * HDSP_CHANNEL_BUFFER_BYTES; hdsp 4111 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4115 sound/pci/rme9652/hdsp.c if (hdsp_check_for_iobox (hdsp)) hdsp 4118 sound/pci/rme9652/hdsp.c if (hdsp_check_for_firmware(hdsp, 0)) /* no auto-loading in trigger */ hdsp 4121 sound/pci/rme9652/hdsp.c spin_lock(&hdsp->lock); hdsp 4122 sound/pci/rme9652/hdsp.c running = hdsp->running; hdsp 4132 sound/pci/rme9652/hdsp.c spin_unlock(&hdsp->lock); hdsp 4136 sound/pci/rme9652/hdsp.c other = hdsp->capture_substream; hdsp 4138 sound/pci/rme9652/hdsp.c other = hdsp->playback_substream; hdsp 4155 sound/pci/rme9652/hdsp.c hdsp_silence_playback(hdsp); hdsp 4159 sound/pci/rme9652/hdsp.c hdsp_silence_playback(hdsp); hdsp 4163 sound/pci/rme9652/hdsp.c hdsp_silence_playback(hdsp); hdsp 4167 sound/pci/rme9652/hdsp.c if (!hdsp->running && running) hdsp 4168 sound/pci/rme9652/hdsp.c hdsp_start_audio(hdsp); hdsp 4169 sound/pci/rme9652/hdsp.c else if (hdsp->running && !running) hdsp 4170 sound/pci/rme9652/hdsp.c hdsp_stop_audio(hdsp); hdsp 4171 sound/pci/rme9652/hdsp.c hdsp->running = running; hdsp 4172 sound/pci/rme9652/hdsp.c spin_unlock(&hdsp->lock); hdsp 4179 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4182 sound/pci/rme9652/hdsp.c if (hdsp_check_for_iobox (hdsp)) hdsp 4185 sound/pci/rme9652/hdsp.c if (hdsp_check_for_firmware(hdsp, 1)) hdsp 4188 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 4189 sound/pci/rme9652/hdsp.c if (!hdsp->running) hdsp 4190 sound/pci/rme9652/hdsp.c hdsp_reset_hw_pointer(hdsp); hdsp 4191 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4273 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = rule->private; hdsp 4275 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 4277 sound/pci/rme9652/hdsp.c list[0] = hdsp->qs_in_channels; hdsp 4278 sound/pci/rme9652/hdsp.c list[1] = hdsp->ds_in_channels; hdsp 4279 sound/pci/rme9652/hdsp.c list[2] = hdsp->ss_in_channels; hdsp 4283 sound/pci/rme9652/hdsp.c list[0] = hdsp->ds_in_channels; hdsp 4284 sound/pci/rme9652/hdsp.c list[1] = hdsp->ss_in_channels; hdsp 4293 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = rule->private; hdsp 4295 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 4296 sound/pci/rme9652/hdsp.c list[0] = hdsp->qs_out_channels; hdsp 4297 sound/pci/rme9652/hdsp.c list[1] = hdsp->ds_out_channels; hdsp 4298 sound/pci/rme9652/hdsp.c list[2] = hdsp->ss_out_channels; hdsp 4301 sound/pci/rme9652/hdsp.c list[0] = hdsp->ds_out_channels; hdsp 4302 sound/pci/rme9652/hdsp.c list[1] = hdsp->ss_out_channels; hdsp 4310 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = rule->private; hdsp 4313 sound/pci/rme9652/hdsp.c if (r->min > 96000 && hdsp->io_type == H9632) { hdsp 4315 sound/pci/rme9652/hdsp.c .min = hdsp->qs_in_channels, hdsp 4316 sound/pci/rme9652/hdsp.c .max = hdsp->qs_in_channels, hdsp 4322 sound/pci/rme9652/hdsp.c .min = hdsp->ds_in_channels, hdsp 4323 sound/pci/rme9652/hdsp.c .max = hdsp->ds_in_channels, hdsp 4329 sound/pci/rme9652/hdsp.c .min = hdsp->ss_in_channels, hdsp 4330 sound/pci/rme9652/hdsp.c .max = hdsp->ss_in_channels, hdsp 4341 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = rule->private; hdsp 4344 sound/pci/rme9652/hdsp.c if (r->min > 96000 && hdsp->io_type == H9632) { hdsp 4346 sound/pci/rme9652/hdsp.c .min = hdsp->qs_out_channels, hdsp 4347 sound/pci/rme9652/hdsp.c .max = hdsp->qs_out_channels, hdsp 4353 sound/pci/rme9652/hdsp.c .min = hdsp->ds_out_channels, hdsp 4354 sound/pci/rme9652/hdsp.c .max = hdsp->ds_out_channels, hdsp 4360 sound/pci/rme9652/hdsp.c .min = hdsp->ss_out_channels, hdsp 4361 sound/pci/rme9652/hdsp.c .max = hdsp->ss_out_channels, hdsp 4372 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = rule->private; hdsp 4375 sound/pci/rme9652/hdsp.c if (c->min >= hdsp->ss_out_channels) { hdsp 4382 sound/pci/rme9652/hdsp.c } else if (c->max <= hdsp->qs_out_channels && hdsp->io_type == H9632) { hdsp 4389 sound/pci/rme9652/hdsp.c } else if (c->max <= hdsp->ds_out_channels) { hdsp 4403 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = rule->private; hdsp 4406 sound/pci/rme9652/hdsp.c if (c->min >= hdsp->ss_in_channels) { hdsp 4413 sound/pci/rme9652/hdsp.c } else if (c->max <= hdsp->qs_in_channels && hdsp->io_type == H9632) { hdsp 4420 sound/pci/rme9652/hdsp.c } else if (c->max <= hdsp->ds_in_channels) { hdsp 4433 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4436 sound/pci/rme9652/hdsp.c if (hdsp_check_for_iobox (hdsp)) hdsp 4439 sound/pci/rme9652/hdsp.c if (hdsp_check_for_firmware(hdsp, 1)) hdsp 4442 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 4447 sound/pci/rme9652/hdsp.c runtime->dma_area = hdsp->playback_buffer; hdsp 4450 sound/pci/rme9652/hdsp.c hdsp->playback_pid = current->pid; hdsp 4451 sound/pci/rme9652/hdsp.c hdsp->playback_substream = substream; hdsp 4453 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4457 sound/pci/rme9652/hdsp.c if (hdsp->clock_source_locked) { hdsp 4458 sound/pci/rme9652/hdsp.c runtime->hw.rate_min = runtime->hw.rate_max = hdsp->system_sample_rate; hdsp 4459 sound/pci/rme9652/hdsp.c } else if (hdsp->io_type == H9632) { hdsp 4464 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 4465 sound/pci/rme9652/hdsp.c runtime->hw.channels_min = hdsp->qs_out_channels; hdsp 4466 sound/pci/rme9652/hdsp.c runtime->hw.channels_max = hdsp->ss_out_channels; hdsp 4470 sound/pci/rme9652/hdsp.c snd_hdsp_hw_rule_out_channels, hdsp, hdsp 4473 sound/pci/rme9652/hdsp.c snd_hdsp_hw_rule_out_channels_rate, hdsp, hdsp 4476 sound/pci/rme9652/hdsp.c snd_hdsp_hw_rule_rate_out_channels, hdsp, hdsp 4479 sound/pci/rme9652/hdsp.c if (RPM != hdsp->io_type) { hdsp 4480 sound/pci/rme9652/hdsp.c hdsp->creg_spdif_stream = hdsp->creg_spdif; hdsp 4481 sound/pci/rme9652/hdsp.c hdsp->spdif_ctl->vd[0].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; hdsp 4482 sound/pci/rme9652/hdsp.c snd_ctl_notify(hdsp->card, SNDRV_CTL_EVENT_MASK_VALUE | hdsp 4483 sound/pci/rme9652/hdsp.c SNDRV_CTL_EVENT_MASK_INFO, &hdsp->spdif_ctl->id); hdsp 4490 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4492 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 4494 sound/pci/rme9652/hdsp.c hdsp->playback_pid = -1; hdsp 4495 sound/pci/rme9652/hdsp.c hdsp->playback_substream = NULL; hdsp 4497 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4499 sound/pci/rme9652/hdsp.c if (RPM != hdsp->io_type) { hdsp 4500 sound/pci/rme9652/hdsp.c hdsp->spdif_ctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; hdsp 4501 sound/pci/rme9652/hdsp.c snd_ctl_notify(hdsp->card, SNDRV_CTL_EVENT_MASK_VALUE | hdsp 4502 sound/pci/rme9652/hdsp.c SNDRV_CTL_EVENT_MASK_INFO, &hdsp->spdif_ctl->id); hdsp 4510 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4513 sound/pci/rme9652/hdsp.c if (hdsp_check_for_iobox (hdsp)) hdsp 4516 sound/pci/rme9652/hdsp.c if (hdsp_check_for_firmware(hdsp, 1)) hdsp 4519 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 4524 sound/pci/rme9652/hdsp.c runtime->dma_area = hdsp->capture_buffer; hdsp 4527 sound/pci/rme9652/hdsp.c hdsp->capture_pid = current->pid; hdsp 4528 sound/pci/rme9652/hdsp.c hdsp->capture_substream = substream; hdsp 4530 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4534 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 4535 sound/pci/rme9652/hdsp.c runtime->hw.channels_min = hdsp->qs_in_channels; hdsp 4536 sound/pci/rme9652/hdsp.c runtime->hw.channels_max = hdsp->ss_in_channels; hdsp 4542 sound/pci/rme9652/hdsp.c snd_hdsp_hw_rule_in_channels, hdsp, hdsp 4545 sound/pci/rme9652/hdsp.c snd_hdsp_hw_rule_in_channels_rate, hdsp, hdsp 4548 sound/pci/rme9652/hdsp.c snd_hdsp_hw_rule_rate_in_channels, hdsp, hdsp 4555 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = snd_pcm_substream_chip(substream); hdsp 4557 sound/pci/rme9652/hdsp.c spin_lock_irq(&hdsp->lock); hdsp 4559 sound/pci/rme9652/hdsp.c hdsp->capture_pid = -1; hdsp 4560 sound/pci/rme9652/hdsp.c hdsp->capture_substream = NULL; hdsp 4562 sound/pci/rme9652/hdsp.c spin_unlock_irq(&hdsp->lock); hdsp 4593 sound/pci/rme9652/hdsp.c static int hdsp_9652_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms) hdsp 4598 sound/pci/rme9652/hdsp.c if (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DoubleSpeedStatus) hdsp 4605 sound/pci/rme9652/hdsp.c if (copy_u32_le(&peak_rms->input_peaks[i], hdsp->iobase + ofs)) hdsp 4608 sound/pci/rme9652/hdsp.c if (copy_u32_le(&peak_rms->playback_peaks[i], hdsp->iobase + ofs)) hdsp 4611 sound/pci/rme9652/hdsp.c if (copy_u32_le(&peak_rms->output_peaks[i], hdsp->iobase + ofs)) hdsp 4614 sound/pci/rme9652/hdsp.c if (copy_u48_le(&peak_rms->input_rms[i], hdsp->iobase + ofs, hdsp 4615 sound/pci/rme9652/hdsp.c hdsp->iobase + ofs + 4)) hdsp 4618 sound/pci/rme9652/hdsp.c if (copy_u48_le(&peak_rms->playback_rms[i], hdsp->iobase + ofs, hdsp 4619 sound/pci/rme9652/hdsp.c hdsp->iobase + ofs + 4)) hdsp 4622 sound/pci/rme9652/hdsp.c if (copy_u48_le(&peak_rms->output_rms[i], hdsp->iobase + ofs, hdsp 4623 sound/pci/rme9652/hdsp.c hdsp->iobase + ofs + 4)) hdsp 4630 sound/pci/rme9652/hdsp.c static int hdsp_9632_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms) hdsp 4636 sound/pci/rme9652/hdsp.c if (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DoubleSpeedStatus) hdsp 4638 sound/pci/rme9652/hdsp.c m = (struct hdsp_9632_meters __iomem *)(hdsp->iobase+HDSP_9632_metersBase); hdsp 4660 sound/pci/rme9652/hdsp.c static int hdsp_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms) hdsp 4666 sound/pci/rme9652/hdsp.c hdsp->iobase + HDSP_playbackPeakLevel + i * 4)) hdsp 4669 sound/pci/rme9652/hdsp.c hdsp->iobase + HDSP_inputPeakLevel + i * 4)) hdsp 4674 sound/pci/rme9652/hdsp.c hdsp->iobase + HDSP_outputPeakLevel + i * 4)) hdsp 4679 sound/pci/rme9652/hdsp.c hdsp->iobase + HDSP_playbackRmsLevel + i * 8 + 4, hdsp 4680 sound/pci/rme9652/hdsp.c hdsp->iobase + HDSP_playbackRmsLevel + i * 8)) hdsp 4683 sound/pci/rme9652/hdsp.c hdsp->iobase + HDSP_inputRmsLevel + i * 8 + 4, hdsp 4684 sound/pci/rme9652/hdsp.c hdsp->iobase + HDSP_inputRmsLevel + i * 8)) hdsp 4692 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = hw->private_data; hdsp 4700 sound/pci/rme9652/hdsp.c err = hdsp_check_for_iobox(hdsp); hdsp 4704 sound/pci/rme9652/hdsp.c err = hdsp_check_for_firmware(hdsp, 1); hdsp 4708 sound/pci/rme9652/hdsp.c if (!(hdsp->state & HDSP_FirmwareLoaded)) { hdsp 4709 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 4714 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 4716 sound/pci/rme9652/hdsp.c return hdsp_9652_get_peak(hdsp, peak_rms); hdsp 4718 sound/pci/rme9652/hdsp.c return hdsp_9632_get_peak(hdsp, peak_rms); hdsp 4720 sound/pci/rme9652/hdsp.c return hdsp_get_peak(hdsp, peak_rms); hdsp 4728 sound/pci/rme9652/hdsp.c err = hdsp_check_for_iobox(hdsp); hdsp 4732 sound/pci/rme9652/hdsp.c err = hdsp_check_for_firmware(hdsp, 1); hdsp 4737 sound/pci/rme9652/hdsp.c spin_lock_irqsave(&hdsp->lock, flags); hdsp 4738 sound/pci/rme9652/hdsp.c info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp); hdsp 4739 sound/pci/rme9652/hdsp.c info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp); hdsp 4740 sound/pci/rme9652/hdsp.c if (hdsp->io_type != H9632) hdsp 4741 sound/pci/rme9652/hdsp.c info.adatsync_sync_check = (unsigned char)hdsp_adatsync_sync_check(hdsp); hdsp 4742 sound/pci/rme9652/hdsp.c info.spdif_sync_check = (unsigned char)hdsp_spdif_sync_check(hdsp); hdsp 4743 sound/pci/rme9652/hdsp.c for (i = 0; i < ((hdsp->io_type != Multiface && hdsp->io_type != RPM && hdsp->io_type != H9632) ? 3 : 1); ++i) hdsp 4744 sound/pci/rme9652/hdsp.c info.adat_sync_check[i] = (unsigned char)hdsp_adat_sync_check(hdsp, i); hdsp 4745 sound/pci/rme9652/hdsp.c info.spdif_in = (unsigned char)hdsp_spdif_in(hdsp); hdsp 4746 sound/pci/rme9652/hdsp.c info.spdif_out = (unsigned char)hdsp_toggle_setting(hdsp, hdsp 4749 sound/pci/rme9652/hdsp.c hdsp_toggle_setting(hdsp, HDSP_SPDIFProfessional); hdsp 4751 sound/pci/rme9652/hdsp.c hdsp_toggle_setting(hdsp, HDSP_SPDIFEmphasis); hdsp 4753 sound/pci/rme9652/hdsp.c hdsp_toggle_setting(hdsp, HDSP_SPDIFNonAudio); hdsp 4754 sound/pci/rme9652/hdsp.c info.spdif_sample_rate = hdsp_spdif_sample_rate(hdsp); hdsp 4755 sound/pci/rme9652/hdsp.c info.system_sample_rate = hdsp->system_sample_rate; hdsp 4756 sound/pci/rme9652/hdsp.c info.autosync_sample_rate = hdsp_external_sample_rate(hdsp); hdsp 4757 sound/pci/rme9652/hdsp.c info.system_clock_mode = (unsigned char)hdsp_system_clock_mode(hdsp); hdsp 4758 sound/pci/rme9652/hdsp.c info.clock_source = (unsigned char)hdsp_clock_source(hdsp); hdsp 4759 sound/pci/rme9652/hdsp.c info.autosync_ref = (unsigned char)hdsp_autosync_ref(hdsp); hdsp 4761 sound/pci/rme9652/hdsp.c hdsp_toggle_setting(hdsp, HDSP_LineOut); hdsp 4762 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632) { hdsp 4763 sound/pci/rme9652/hdsp.c info.da_gain = (unsigned char)hdsp_da_gain(hdsp); hdsp 4764 sound/pci/rme9652/hdsp.c info.ad_gain = (unsigned char)hdsp_ad_gain(hdsp); hdsp 4765 sound/pci/rme9652/hdsp.c info.phone_gain = (unsigned char)hdsp_phone_gain(hdsp); hdsp 4767 sound/pci/rme9652/hdsp.c (unsigned char)hdsp_toggle_setting(hdsp, hdsp 4770 sound/pci/rme9652/hdsp.c } else if (hdsp->io_type == RPM) { hdsp 4771 sound/pci/rme9652/hdsp.c info.da_gain = (unsigned char) hdsp_rpm_input12(hdsp); hdsp 4772 sound/pci/rme9652/hdsp.c info.ad_gain = (unsigned char) hdsp_rpm_input34(hdsp); hdsp 4774 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9632 || hdsp->io_type == H9652) hdsp 4776 sound/pci/rme9652/hdsp.c (unsigned char)hdsp_toggle_setting(hdsp, hdsp 4778 sound/pci/rme9652/hdsp.c spin_unlock_irqrestore(&hdsp->lock, flags); hdsp 4786 sound/pci/rme9652/hdsp.c if (hdsp->io_type != H9632) return -EINVAL; hdsp 4787 sound/pci/rme9652/hdsp.c h9632_aeb.aebi = hdsp->ss_in_channels - H9632_SS_CHANNELS; hdsp 4788 sound/pci/rme9652/hdsp.c h9632_aeb.aebo = hdsp->ss_out_channels - H9632_SS_CHANNELS; hdsp 4797 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return -EINVAL; hdsp 4798 sound/pci/rme9652/hdsp.c if (hdsp->io_type == Undefined) { hdsp 4799 sound/pci/rme9652/hdsp.c if ((err = hdsp_get_iobox_version(hdsp)) < 0) hdsp 4803 sound/pci/rme9652/hdsp.c hdsp_version.io_type = hdsp->io_type; hdsp 4804 sound/pci/rme9652/hdsp.c hdsp_version.firmware_rev = hdsp->firmware_rev; hdsp 4814 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return -EINVAL; hdsp 4816 sound/pci/rme9652/hdsp.c if (hdsp->io_type == Undefined) return -EINVAL; hdsp 4818 sound/pci/rme9652/hdsp.c if (hdsp->state & (HDSP_FirmwareCached | HDSP_FirmwareLoaded)) hdsp 4821 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 4828 sound/pci/rme9652/hdsp.c if (hdsp_check_for_iobox (hdsp)) hdsp 4831 sound/pci/rme9652/hdsp.c if (!hdsp->fw_uploaded) { hdsp 4832 sound/pci/rme9652/hdsp.c hdsp->fw_uploaded = vmalloc(HDSP_FIRMWARE_SIZE); hdsp 4833 sound/pci/rme9652/hdsp.c if (!hdsp->fw_uploaded) hdsp 4837 sound/pci/rme9652/hdsp.c if (copy_from_user(hdsp->fw_uploaded, firmware_data, hdsp 4839 sound/pci/rme9652/hdsp.c vfree(hdsp->fw_uploaded); hdsp 4840 sound/pci/rme9652/hdsp.c hdsp->fw_uploaded = NULL; hdsp 4844 sound/pci/rme9652/hdsp.c hdsp->state |= HDSP_FirmwareCached; hdsp 4846 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_load_firmware_from_cache(hdsp)) < 0) hdsp 4849 sound/pci/rme9652/hdsp.c if (!(hdsp->state & HDSP_InitializationComplete)) { hdsp 4850 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_enable_io(hdsp)) < 0) hdsp 4853 sound/pci/rme9652/hdsp.c snd_hdsp_initialize_channels(hdsp); hdsp 4854 sound/pci/rme9652/hdsp.c snd_hdsp_initialize_midi_flush(hdsp); hdsp 4856 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_alsa_devices(hdsp->card, hdsp)) < 0) { hdsp 4857 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 4866 sound/pci/rme9652/hdsp.c if (copy_to_user(mixer->matrix, hdsp->mixer_matrix, sizeof(unsigned short)*HDSP_MATRIX_MIXER_SIZE)) hdsp 4901 sound/pci/rme9652/hdsp.c static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp) hdsp 4909 sound/pci/rme9652/hdsp.c hdsp->hwdep = hw; hdsp 4910 sound/pci/rme9652/hdsp.c hw->private_data = hdsp; hdsp 4919 sound/pci/rme9652/hdsp.c static int snd_hdsp_create_pcm(struct snd_card *card, struct hdsp *hdsp) hdsp 4924 sound/pci/rme9652/hdsp.c if ((err = snd_pcm_new(card, hdsp->card_name, 0, 1, 1, &pcm)) < 0) hdsp 4927 sound/pci/rme9652/hdsp.c hdsp->pcm = pcm; hdsp 4928 sound/pci/rme9652/hdsp.c pcm->private_data = hdsp; hdsp 4929 sound/pci/rme9652/hdsp.c strcpy(pcm->name, hdsp->card_name); hdsp 4939 sound/pci/rme9652/hdsp.c static void snd_hdsp_9652_enable_mixer (struct hdsp *hdsp) hdsp 4941 sound/pci/rme9652/hdsp.c hdsp->control2_register |= HDSP_9652_ENABLE_MIXER; hdsp 4942 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register); hdsp 4945 sound/pci/rme9652/hdsp.c static int snd_hdsp_enable_io (struct hdsp *hdsp) hdsp 4949 sound/pci/rme9652/hdsp.c if (hdsp_fifo_wait (hdsp, 0, 100)) { hdsp 4950 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 4955 sound/pci/rme9652/hdsp.c for (i = 0; i < hdsp->max_channels; ++i) { hdsp 4956 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_inputEnable + (4 * i), 1); hdsp 4957 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_outputEnable + (4 * i), 1); hdsp 4963 sound/pci/rme9652/hdsp.c static void snd_hdsp_initialize_channels(struct hdsp *hdsp) hdsp 4967 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 4969 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME Hammerfall DSP + Digiface"; hdsp 4970 sound/pci/rme9652/hdsp.c hdsp->ss_in_channels = hdsp->ss_out_channels = DIGIFACE_SS_CHANNELS; hdsp 4971 sound/pci/rme9652/hdsp.c hdsp->ds_in_channels = hdsp->ds_out_channels = DIGIFACE_DS_CHANNELS; hdsp 4975 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME Hammerfall HDSP 9652"; hdsp 4976 sound/pci/rme9652/hdsp.c hdsp->ss_in_channels = hdsp->ss_out_channels = H9652_SS_CHANNELS; hdsp 4977 sound/pci/rme9652/hdsp.c hdsp->ds_in_channels = hdsp->ds_out_channels = H9652_DS_CHANNELS; hdsp 4981 sound/pci/rme9652/hdsp.c status = hdsp_read(hdsp, HDSP_statusRegister); hdsp 4985 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME Hammerfall HDSP 9632"; hdsp 4986 sound/pci/rme9652/hdsp.c hdsp->ss_in_channels = H9632_SS_CHANNELS+aebi_channels; hdsp 4987 sound/pci/rme9652/hdsp.c hdsp->ds_in_channels = H9632_DS_CHANNELS+aebi_channels; hdsp 4988 sound/pci/rme9652/hdsp.c hdsp->qs_in_channels = H9632_QS_CHANNELS+aebi_channels; hdsp 4989 sound/pci/rme9652/hdsp.c hdsp->ss_out_channels = H9632_SS_CHANNELS+aebo_channels; hdsp 4990 sound/pci/rme9652/hdsp.c hdsp->ds_out_channels = H9632_DS_CHANNELS+aebo_channels; hdsp 4991 sound/pci/rme9652/hdsp.c hdsp->qs_out_channels = H9632_QS_CHANNELS+aebo_channels; hdsp 4995 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME Hammerfall DSP + Multiface"; hdsp 4996 sound/pci/rme9652/hdsp.c hdsp->ss_in_channels = hdsp->ss_out_channels = MULTIFACE_SS_CHANNELS; hdsp 4997 sound/pci/rme9652/hdsp.c hdsp->ds_in_channels = hdsp->ds_out_channels = MULTIFACE_DS_CHANNELS; hdsp 5001 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME Hammerfall DSP + RPM"; hdsp 5002 sound/pci/rme9652/hdsp.c hdsp->ss_in_channels = RPM_CHANNELS-1; hdsp 5003 sound/pci/rme9652/hdsp.c hdsp->ss_out_channels = RPM_CHANNELS; hdsp 5004 sound/pci/rme9652/hdsp.c hdsp->ds_in_channels = RPM_CHANNELS-1; hdsp 5005 sound/pci/rme9652/hdsp.c hdsp->ds_out_channels = RPM_CHANNELS; hdsp 5014 sound/pci/rme9652/hdsp.c static void snd_hdsp_initialize_midi_flush (struct hdsp *hdsp) hdsp 5016 sound/pci/rme9652/hdsp.c snd_hdsp_flush_midi_input (hdsp, 0); hdsp 5017 sound/pci/rme9652/hdsp.c snd_hdsp_flush_midi_input (hdsp, 1); hdsp 5020 sound/pci/rme9652/hdsp.c static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp) hdsp 5024 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_pcm(card, hdsp)) < 0) { hdsp 5031 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_midi(card, hdsp, 0)) < 0) { hdsp 5037 sound/pci/rme9652/hdsp.c if (hdsp->io_type == Digiface || hdsp->io_type == H9652) { hdsp 5038 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_midi(card, hdsp, 1)) < 0) { hdsp 5045 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_controls(card, hdsp)) < 0) { hdsp 5051 sound/pci/rme9652/hdsp.c snd_hdsp_proc_init(hdsp); hdsp 5053 sound/pci/rme9652/hdsp.c hdsp->system_sample_rate = -1; hdsp 5054 sound/pci/rme9652/hdsp.c hdsp->playback_pid = -1; hdsp 5055 sound/pci/rme9652/hdsp.c hdsp->capture_pid = -1; hdsp 5056 sound/pci/rme9652/hdsp.c hdsp->capture_substream = NULL; hdsp 5057 sound/pci/rme9652/hdsp.c hdsp->playback_substream = NULL; hdsp 5059 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_set_defaults(hdsp)) < 0) { hdsp 5065 sound/pci/rme9652/hdsp.c if (!(hdsp->state & HDSP_InitializationComplete)) { hdsp 5067 sound/pci/rme9652/hdsp.c sprintf(card->longname, "%s at 0x%lx, irq %d", hdsp->card_name, hdsp 5068 sound/pci/rme9652/hdsp.c hdsp->port, hdsp->irq); hdsp 5075 sound/pci/rme9652/hdsp.c hdsp->state |= HDSP_InitializationComplete; hdsp 5082 sound/pci/rme9652/hdsp.c static int hdsp_request_fw_loader(struct hdsp *hdsp) hdsp 5088 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) hdsp 5090 sound/pci/rme9652/hdsp.c if (hdsp->io_type == Undefined) { hdsp 5091 sound/pci/rme9652/hdsp.c if ((err = hdsp_get_iobox_version(hdsp)) < 0) hdsp 5093 sound/pci/rme9652/hdsp.c if (hdsp->io_type == H9652 || hdsp->io_type == H9632) hdsp 5098 sound/pci/rme9652/hdsp.c switch (hdsp->io_type) { hdsp 5103 sound/pci/rme9652/hdsp.c if (hdsp->firmware_rev == 0xa) hdsp 5109 sound/pci/rme9652/hdsp.c if (hdsp->firmware_rev == 0xa) hdsp 5115 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 5116 sound/pci/rme9652/hdsp.c "invalid io_type %d\n", hdsp->io_type); hdsp 5120 sound/pci/rme9652/hdsp.c if (request_firmware(&fw, fwfile, &hdsp->pci->dev)) { hdsp 5121 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 5126 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 5133 sound/pci/rme9652/hdsp.c hdsp->firmware = fw; hdsp 5135 sound/pci/rme9652/hdsp.c hdsp->state |= HDSP_FirmwareCached; hdsp 5137 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_load_firmware_from_cache(hdsp)) < 0) hdsp 5140 sound/pci/rme9652/hdsp.c if (!(hdsp->state & HDSP_InitializationComplete)) { hdsp 5141 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_enable_io(hdsp)) < 0) hdsp 5144 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_hwdep(hdsp->card, hdsp)) < 0) { hdsp 5145 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 5149 sound/pci/rme9652/hdsp.c snd_hdsp_initialize_channels(hdsp); hdsp 5150 sound/pci/rme9652/hdsp.c snd_hdsp_initialize_midi_flush(hdsp); hdsp 5151 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_alsa_devices(hdsp->card, hdsp)) < 0) { hdsp 5152 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 5161 sound/pci/rme9652/hdsp.c struct hdsp *hdsp) hdsp 5163 sound/pci/rme9652/hdsp.c struct pci_dev *pci = hdsp->pci; hdsp 5168 sound/pci/rme9652/hdsp.c hdsp->irq = -1; hdsp 5169 sound/pci/rme9652/hdsp.c hdsp->state = 0; hdsp 5170 sound/pci/rme9652/hdsp.c hdsp->midi[0].rmidi = NULL; hdsp 5171 sound/pci/rme9652/hdsp.c hdsp->midi[1].rmidi = NULL; hdsp 5172 sound/pci/rme9652/hdsp.c hdsp->midi[0].input = NULL; hdsp 5173 sound/pci/rme9652/hdsp.c hdsp->midi[1].input = NULL; hdsp 5174 sound/pci/rme9652/hdsp.c hdsp->midi[0].output = NULL; hdsp 5175 sound/pci/rme9652/hdsp.c hdsp->midi[1].output = NULL; hdsp 5176 sound/pci/rme9652/hdsp.c hdsp->midi[0].pending = 0; hdsp 5177 sound/pci/rme9652/hdsp.c hdsp->midi[1].pending = 0; hdsp 5178 sound/pci/rme9652/hdsp.c spin_lock_init(&hdsp->midi[0].lock); hdsp 5179 sound/pci/rme9652/hdsp.c spin_lock_init(&hdsp->midi[1].lock); hdsp 5180 sound/pci/rme9652/hdsp.c hdsp->iobase = NULL; hdsp 5181 sound/pci/rme9652/hdsp.c hdsp->control_register = 0; hdsp 5182 sound/pci/rme9652/hdsp.c hdsp->control2_register = 0; hdsp 5183 sound/pci/rme9652/hdsp.c hdsp->io_type = Undefined; hdsp 5184 sound/pci/rme9652/hdsp.c hdsp->max_channels = 26; hdsp 5186 sound/pci/rme9652/hdsp.c hdsp->card = card; hdsp 5188 sound/pci/rme9652/hdsp.c spin_lock_init(&hdsp->lock); hdsp 5190 sound/pci/rme9652/hdsp.c tasklet_init(&hdsp->midi_tasklet, hdsp_midi_tasklet, (unsigned long)hdsp); hdsp 5192 sound/pci/rme9652/hdsp.c pci_read_config_word(hdsp->pci, PCI_CLASS_REVISION, &hdsp->firmware_rev); hdsp 5193 sound/pci/rme9652/hdsp.c hdsp->firmware_rev &= 0xff; hdsp 5202 sound/pci/rme9652/hdsp.c pci_write_config_byte(hdsp->pci, PCI_LATENCY_TIMER, 0xFF); hdsp 5207 sound/pci/rme9652/hdsp.c if (hdsp->firmware_rev < 0xa) hdsp 5209 sound/pci/rme9652/hdsp.c else if (hdsp->firmware_rev < 0x64) hdsp 5210 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME Hammerfall DSP"; hdsp 5211 sound/pci/rme9652/hdsp.c else if (hdsp->firmware_rev < 0x96) { hdsp 5212 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME HDSP 9652"; hdsp 5215 sound/pci/rme9652/hdsp.c hdsp->card_name = "RME HDSP 9632"; hdsp 5216 sound/pci/rme9652/hdsp.c hdsp->max_channels = 16; hdsp 5223 sound/pci/rme9652/hdsp.c pci_set_master(hdsp->pci); hdsp 5227 sound/pci/rme9652/hdsp.c hdsp->port = pci_resource_start(pci, 0); hdsp 5228 sound/pci/rme9652/hdsp.c if ((hdsp->iobase = ioremap_nocache(hdsp->port, HDSP_IO_EXTENT)) == NULL) { hdsp 5229 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, "unable to remap region 0x%lx-0x%lx\n", hdsp 5230 sound/pci/rme9652/hdsp.c hdsp->port, hdsp->port + HDSP_IO_EXTENT - 1); hdsp 5235 sound/pci/rme9652/hdsp.c KBUILD_MODNAME, hdsp)) { hdsp 5236 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, "unable to use IRQ %d\n", pci->irq); hdsp 5240 sound/pci/rme9652/hdsp.c hdsp->irq = pci->irq; hdsp 5241 sound/pci/rme9652/hdsp.c hdsp->precise_ptr = 0; hdsp 5242 sound/pci/rme9652/hdsp.c hdsp->use_midi_tasklet = 1; hdsp 5243 sound/pci/rme9652/hdsp.c hdsp->dds_value = 0; hdsp 5245 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_initialize_memory(hdsp)) < 0) hdsp 5251 sound/pci/rme9652/hdsp.c err = hdsp_wait_for_iobox(hdsp, 1000, 10); hdsp 5256 sound/pci/rme9652/hdsp.c if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) { hdsp 5257 sound/pci/rme9652/hdsp.c if ((err = hdsp_request_fw_loader(hdsp)) < 0) hdsp 5262 sound/pci/rme9652/hdsp.c dev_err(hdsp->card->dev, hdsp 5268 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 5270 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) hdsp 5274 sound/pci/rme9652/hdsp.c dev_info(hdsp->card->dev, hdsp 5276 sound/pci/rme9652/hdsp.c if (hdsp_read(hdsp, HDSP_status2Register) & HDSP_version2) hdsp 5277 sound/pci/rme9652/hdsp.c hdsp->io_type = RPM; hdsp 5278 sound/pci/rme9652/hdsp.c else if (hdsp_read(hdsp, HDSP_status2Register) & HDSP_version1) hdsp 5279 sound/pci/rme9652/hdsp.c hdsp->io_type = Multiface; hdsp 5281 sound/pci/rme9652/hdsp.c hdsp->io_type = Digiface; hdsp 5285 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_enable_io(hdsp)) != 0) hdsp 5289 sound/pci/rme9652/hdsp.c hdsp->io_type = H9652; hdsp 5292 sound/pci/rme9652/hdsp.c hdsp->io_type = H9632; hdsp 5294 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) hdsp 5297 sound/pci/rme9652/hdsp.c snd_hdsp_initialize_channels(hdsp); hdsp 5298 sound/pci/rme9652/hdsp.c snd_hdsp_initialize_midi_flush(hdsp); hdsp 5300 sound/pci/rme9652/hdsp.c hdsp->state |= HDSP_FirmwareLoaded; hdsp 5302 sound/pci/rme9652/hdsp.c if ((err = snd_hdsp_create_alsa_devices(card, hdsp)) < 0) hdsp 5308 sound/pci/rme9652/hdsp.c static int snd_hdsp_free(struct hdsp *hdsp) hdsp 5310 sound/pci/rme9652/hdsp.c if (hdsp->port) { hdsp 5312 sound/pci/rme9652/hdsp.c tasklet_kill(&hdsp->midi_tasklet); hdsp 5313 sound/pci/rme9652/hdsp.c hdsp->control_register &= ~(HDSP_Start|HDSP_AudioInterruptEnable|HDSP_Midi0InterruptEnable|HDSP_Midi1InterruptEnable); hdsp 5314 sound/pci/rme9652/hdsp.c hdsp_write (hdsp, HDSP_controlRegister, hdsp->control_register); hdsp 5317 sound/pci/rme9652/hdsp.c if (hdsp->irq >= 0) hdsp 5318 sound/pci/rme9652/hdsp.c free_irq(hdsp->irq, (void *)hdsp); hdsp 5320 sound/pci/rme9652/hdsp.c snd_hdsp_free_buffers(hdsp); hdsp 5322 sound/pci/rme9652/hdsp.c release_firmware(hdsp->firmware); hdsp 5323 sound/pci/rme9652/hdsp.c vfree(hdsp->fw_uploaded); hdsp 5324 sound/pci/rme9652/hdsp.c iounmap(hdsp->iobase); hdsp 5326 sound/pci/rme9652/hdsp.c if (hdsp->port) hdsp 5327 sound/pci/rme9652/hdsp.c pci_release_regions(hdsp->pci); hdsp 5329 sound/pci/rme9652/hdsp.c pci_disable_device(hdsp->pci); hdsp 5335 sound/pci/rme9652/hdsp.c struct hdsp *hdsp = card->private_data; hdsp 5337 sound/pci/rme9652/hdsp.c if (hdsp) hdsp 5338 sound/pci/rme9652/hdsp.c snd_hdsp_free(hdsp); hdsp 5345 sound/pci/rme9652/hdsp.c struct hdsp *hdsp; hdsp 5357 sound/pci/rme9652/hdsp.c sizeof(struct hdsp), &card); hdsp 5361 sound/pci/rme9652/hdsp.c hdsp = card->private_data; hdsp 5363 sound/pci/rme9652/hdsp.c hdsp->dev = dev; hdsp 5364 sound/pci/rme9652/hdsp.c hdsp->pci = pci; hdsp 5365 sound/pci/rme9652/hdsp.c err = snd_hdsp_create(card, hdsp); hdsp 5370 sound/pci/rme9652/hdsp.c sprintf(card->longname, "%s at 0x%lx, irq %d", hdsp->card_name, hdsp 5371 sound/pci/rme9652/hdsp.c hdsp->port, hdsp->irq);