#include <linux/init.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/math64.h>
#include <linux/vmalloc.h>
#include <linux/io.h>
#include <linux/nospec.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/info.h>
#include <sound/asoundef.h>
#include <sound/rawmidi.h>
#include <sound/hwdep.h>
#include <sound/initval.h>
#include <sound/hdsp.h>
#include <asm/byteorder.h>
#include <asm/current.h>
static int index[SNDRV_CARDS] = …;
static char *id[SNDRV_CARDS] = …;
static bool enable[SNDRV_CARDS] = …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
#define HDSP_MAX_CHANNELS …
#define HDSP_MAX_DS_CHANNELS …
#define HDSP_MAX_QS_CHANNELS …
#define DIGIFACE_SS_CHANNELS …
#define DIGIFACE_DS_CHANNELS …
#define MULTIFACE_SS_CHANNELS …
#define MULTIFACE_DS_CHANNELS …
#define H9652_SS_CHANNELS …
#define H9652_DS_CHANNELS …
#define H9632_SS_CHANNELS …
#define H9632_DS_CHANNELS …
#define H9632_QS_CHANNELS …
#define RPM_CHANNELS …
#define HDSP_resetPointer …
#define HDSP_freqReg …
#define HDSP_outputBufferAddress …
#define HDSP_inputBufferAddress …
#define HDSP_controlRegister …
#define HDSP_interruptConfirmation …
#define HDSP_outputEnable …
#define HDSP_control2Reg …
#define HDSP_midiDataOut0 …
#define HDSP_midiDataOut1 …
#define HDSP_fifoData …
#define HDSP_inputEnable …
#define HDSP_statusRegister …
#define HDSP_timecode …
#define HDSP_status2Register …
#define HDSP_midiDataIn0 …
#define HDSP_midiDataIn1 …
#define HDSP_midiStatusOut0 …
#define HDSP_midiStatusOut1 …
#define HDSP_midiStatusIn0 …
#define HDSP_midiStatusIn1 …
#define HDSP_fifoStatus …
#define HDSP_playbackPeakLevel …
#define HDSP_inputPeakLevel …
#define HDSP_outputPeakLevel …
#define HDSP_playbackRmsLevel …
#define HDSP_inputRmsLevel …
#define HDSP_9652_peakBase …
#define HDSP_9652_rmsBase …
#define HDSP_9632_metersBase …
#define HDSP_IO_EXTENT …
#define HDSP_TMS …
#define HDSP_TCK …
#define HDSP_TDI …
#define HDSP_JTAG …
#define HDSP_PWDN …
#define HDSP_PROGRAM …
#define HDSP_CONFIG_MODE_0 …
#define HDSP_CONFIG_MODE_1 …
#define HDSP_VERSION_BIT …
#define HDSP_BIGENDIAN_MODE …
#define HDSP_RD_MULTIPLE …
#define HDSP_9652_ENABLE_MIXER …
#define HDSP_S200 …
#define HDSP_S300 …
#define HDSP_CYCLIC_MODE …
#define HDSP_TDO …
#define HDSP_S_PROGRAM …
#define HDSP_S_LOAD …
#define HDSP_Start …
#define HDSP_Latency0 …
#define HDSP_Latency1 …
#define HDSP_Latency2 …
#define HDSP_ClockModeMaster …
#define HDSP_AudioInterruptEnable …
#define HDSP_Frequency0 …
#define HDSP_Frequency1 …
#define HDSP_DoubleSpeed …
#define HDSP_SPDIFProfessional …
#define HDSP_SPDIFEmphasis …
#define HDSP_SPDIFNonAudio …
#define HDSP_SPDIFOpticalOut …
#define HDSP_SyncRef2 …
#define HDSP_SPDIFInputSelect0 …
#define HDSP_SPDIFInputSelect1 …
#define HDSP_SyncRef0 …
#define HDSP_SyncRef1 …
#define HDSP_AnalogExtensionBoard …
#define HDSP_XLRBreakoutCable …
#define HDSP_Midi0InterruptEnable …
#define HDSP_Midi1InterruptEnable …
#define HDSP_LineOut …
#define HDSP_ADGain0 …
#define HDSP_ADGain1 …
#define HDSP_DAGain0 …
#define HDSP_DAGain1 …
#define HDSP_PhoneGain0 …
#define HDSP_PhoneGain1 …
#define HDSP_QuadSpeed …
#define HDSP_RPM_Inp12 …
#define HDSP_RPM_Inp12_Phon_6dB …
#define HDSP_RPM_Inp12_Phon_0dB …
#define HDSP_RPM_Inp12_Phon_n6dB …
#define HDSP_RPM_Inp12_Line_0dB …
#define HDSP_RPM_Inp12_Line_n6dB …
#define HDSP_RPM_Inp34 …
#define HDSP_RPM_Inp34_Phon_6dB …
#define HDSP_RPM_Inp34_Phon_0dB …
#define HDSP_RPM_Inp34_Phon_n6dB …
#define HDSP_RPM_Inp34_Line_0dB …
#define HDSP_RPM_Inp34_Line_n6dB …
#define HDSP_RPM_Bypass …
#define HDSP_RPM_Disconnect …
#define HDSP_ADGainMask …
#define HDSP_ADGainMinus10dBV …
#define HDSP_ADGainPlus4dBu …
#define HDSP_ADGainLowGain …
#define HDSP_DAGainMask …
#define HDSP_DAGainHighGain …
#define HDSP_DAGainPlus4dBu …
#define HDSP_DAGainMinus10dBV …
#define HDSP_PhoneGainMask …
#define HDSP_PhoneGain0dB …
#define HDSP_PhoneGainMinus6dB …
#define HDSP_PhoneGainMinus12dB …
#define HDSP_LatencyMask …
#define HDSP_FrequencyMask …
#define HDSP_SPDIFInputMask …
#define HDSP_SPDIFInputADAT1 …
#define HDSP_SPDIFInputCoaxial …
#define HDSP_SPDIFInputCdrom …
#define HDSP_SPDIFInputAES …
#define HDSP_SyncRefMask …
#define HDSP_SyncRef_ADAT1 …
#define HDSP_SyncRef_ADAT2 …
#define HDSP_SyncRef_ADAT3 …
#define HDSP_SyncRef_SPDIF …
#define HDSP_SyncRef_WORD …
#define HDSP_SyncRef_ADAT_SYNC …
#define HDSP_CLOCK_SOURCE_AUTOSYNC …
#define HDSP_CLOCK_SOURCE_INTERNAL_32KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_44_1KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_48KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_64KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_88_2KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_96KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_128KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_176_4KHZ …
#define HDSP_CLOCK_SOURCE_INTERNAL_192KHZ …
#define HDSP_SYNC_FROM_WORD …
#define HDSP_SYNC_FROM_SPDIF …
#define HDSP_SYNC_FROM_ADAT1 …
#define HDSP_SYNC_FROM_ADAT_SYNC …
#define HDSP_SYNC_FROM_ADAT2 …
#define HDSP_SYNC_FROM_ADAT3 …
#define HDSP_SYNC_CHECK_NO_LOCK …
#define HDSP_SYNC_CHECK_LOCK …
#define HDSP_SYNC_CHECK_SYNC …
#define HDSP_AUTOSYNC_FROM_WORD …
#define HDSP_AUTOSYNC_FROM_ADAT_SYNC …
#define HDSP_AUTOSYNC_FROM_SPDIF …
#define HDSP_AUTOSYNC_FROM_NONE …
#define HDSP_AUTOSYNC_FROM_ADAT1 …
#define HDSP_AUTOSYNC_FROM_ADAT2 …
#define HDSP_AUTOSYNC_FROM_ADAT3 …
#define HDSP_SPDIFIN_OPTICAL …
#define HDSP_SPDIFIN_COAXIAL …
#define HDSP_SPDIFIN_INTERNAL …
#define HDSP_SPDIFIN_AES …
#define HDSP_Frequency32KHz …
#define HDSP_Frequency44_1KHz …
#define HDSP_Frequency48KHz …
#define HDSP_Frequency64KHz …
#define HDSP_Frequency88_2KHz …
#define HDSP_Frequency96KHz …
#define HDSP_Frequency128KHz …
#define HDSP_Frequency176_4KHz …
#define HDSP_Frequency192KHz …
#define DDS_NUMERATOR …
#define hdsp_encode_latency(x) …
#define hdsp_decode_latency(x) …
#define hdsp_encode_spdif_in(x) …
#define hdsp_decode_spdif_in(x) …
#define HDSP_audioIRQPending …
#define HDSP_Lock2 …
#define HDSP_spdifFrequency3 …
#define HDSP_Lock1 …
#define HDSP_Lock0 …
#define HDSP_SPDIFSync …
#define HDSP_TimecodeLock …
#define HDSP_BufferPositionMask …
#define HDSP_Sync2 …
#define HDSP_Sync1 …
#define HDSP_Sync0 …
#define HDSP_DoubleSpeedStatus …
#define HDSP_ConfigError …
#define HDSP_DllError …
#define HDSP_spdifFrequency0 …
#define HDSP_spdifFrequency1 …
#define HDSP_spdifFrequency2 …
#define HDSP_SPDIFErrorFlag …
#define HDSP_BufferID …
#define HDSP_TimecodeSync …
#define HDSP_AEBO …
#define HDSP_AEBI …
#define HDSP_midi0IRQPending …
#define HDSP_midi1IRQPending …
#define HDSP_spdifFrequencyMask …
#define HDSP_spdifFrequencyMask_9632 …
#define HDSP_spdifFrequency32KHz …
#define HDSP_spdifFrequency44_1KHz …
#define HDSP_spdifFrequency48KHz …
#define HDSP_spdifFrequency64KHz …
#define HDSP_spdifFrequency88_2KHz …
#define HDSP_spdifFrequency96KHz …
#define HDSP_spdifFrequency128KHz …
#define HDSP_spdifFrequency176_4KHz …
#define HDSP_spdifFrequency192KHz …
#define HDSP_version0 …
#define HDSP_version1 …
#define HDSP_version2 …
#define HDSP_wc_lock …
#define HDSP_wc_sync …
#define HDSP_inp_freq0 …
#define HDSP_inp_freq1 …
#define HDSP_inp_freq2 …
#define HDSP_SelSyncRef0 …
#define HDSP_SelSyncRef1 …
#define HDSP_SelSyncRef2 …
#define HDSP_wc_valid …
#define HDSP_systemFrequencyMask …
#define HDSP_systemFrequency32 …
#define HDSP_systemFrequency44_1 …
#define HDSP_systemFrequency48 …
#define HDSP_systemFrequency64 …
#define HDSP_systemFrequency88_2 …
#define HDSP_systemFrequency96 …
#define HDSP_SelSyncRefMask …
#define HDSP_SelSyncRef_ADAT1 …
#define HDSP_SelSyncRef_ADAT2 …
#define HDSP_SelSyncRef_ADAT3 …
#define HDSP_SelSyncRef_SPDIF …
#define HDSP_SelSyncRef_WORD …
#define HDSP_SelSyncRef_ADAT_SYNC …
#define HDSP_InitializationComplete …
#define HDSP_FirmwareLoaded …
#define HDSP_FirmwareCached …
#define HDSP_LONG_WAIT …
#define HDSP_SHORT_WAIT …
#define UNITY_GAIN …
#define MINUS_INFINITY_GAIN …
#define HDSP_CHANNEL_BUFFER_SAMPLES …
#define HDSP_CHANNEL_BUFFER_BYTES …
#define HDSP_DMA_AREA_BYTES …
#define HDSP_DMA_AREA_KILOBYTES …
#define HDSP_FIRMWARE_SIZE …
struct hdsp_9632_meters { … };
struct hdsp_midi { … };
struct hdsp { … };
static const signed char channel_map_df_ss[HDSP_MAX_CHANNELS] = …;
static const char channel_map_mf_ss[HDSP_MAX_CHANNELS] = …;
static const signed char channel_map_ds[HDSP_MAX_CHANNELS] = …;
static const signed char channel_map_H9632_ss[HDSP_MAX_CHANNELS] = …;
static const signed char channel_map_H9632_ds[HDSP_MAX_CHANNELS] = …;
static const signed char channel_map_H9632_qs[HDSP_MAX_CHANNELS] = …;
static struct snd_dma_buffer *
snd_hammerfall_get_buffer(struct pci_dev *pci, size_t size)
{ … }
static const struct pci_device_id snd_hdsp_ids[] = …;
MODULE_DEVICE_TABLE(pci, snd_hdsp_ids);
static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp);
static int snd_hdsp_create_pcm(struct snd_card *card, struct hdsp *hdsp);
static int snd_hdsp_enable_io (struct hdsp *hdsp);
static void snd_hdsp_initialize_midi_flush (struct hdsp *hdsp);
static void snd_hdsp_initialize_channels (struct hdsp *hdsp);
static int hdsp_fifo_wait(struct hdsp *hdsp, int count, int timeout);
static int hdsp_autosync_ref(struct hdsp *hdsp);
static int snd_hdsp_set_defaults(struct hdsp *hdsp);
static void snd_hdsp_9652_enable_mixer (struct hdsp *hdsp);
static int hdsp_playback_to_output_key (struct hdsp *hdsp, int in, int out)
{ … }
static int hdsp_input_to_output_key (struct hdsp *hdsp, int in, int out)
{ … }
static void hdsp_write(struct hdsp *hdsp, int reg, int val)
{ … }
static unsigned int hdsp_read(struct hdsp *hdsp, int reg)
{ … }
static int hdsp_check_for_iobox (struct hdsp *hdsp)
{ … }
static int hdsp_wait_for_iobox(struct hdsp *hdsp, unsigned int loops,
unsigned int delay)
{ … }
static int snd_hdsp_load_firmware_from_cache(struct hdsp *hdsp) { … }
static int hdsp_get_iobox_version (struct hdsp *hdsp)
{ … }
static int hdsp_request_fw_loader(struct hdsp *hdsp);
static int hdsp_check_for_firmware (struct hdsp *hdsp, int load_on_demand)
{ … }
static int hdsp_fifo_wait(struct hdsp *hdsp, int count, int timeout)
{ … }
static int hdsp_read_gain (struct hdsp *hdsp, unsigned int addr)
{ … }
static int hdsp_write_gain(struct hdsp *hdsp, unsigned int addr, unsigned short data)
{ … }
static int snd_hdsp_use_is_exclusive(struct hdsp *hdsp)
{ … }
static int hdsp_spdif_sample_rate(struct hdsp *hdsp)
{ … }
static int hdsp_external_sample_rate(struct hdsp *hdsp)
{ … }
static void hdsp_compute_period_size(struct hdsp *hdsp)
{ … }
static snd_pcm_uframes_t hdsp_hw_pointer(struct hdsp *hdsp)
{ … }
static void hdsp_reset_hw_pointer(struct hdsp *hdsp)
{ … }
static void hdsp_start_audio(struct hdsp *s)
{ … }
static void hdsp_stop_audio(struct hdsp *s)
{ … }
static void hdsp_silence_playback(struct hdsp *hdsp)
{ … }
static int hdsp_set_interrupt_interval(struct hdsp *s, unsigned int frames)
{ … }
static void hdsp_set_dds_value(struct hdsp *hdsp, int rate)
{ … }
static int hdsp_set_rate(struct hdsp *hdsp, int rate, int called_internally)
{ … }
static unsigned char snd_hdsp_midi_read_byte (struct hdsp *hdsp, int id)
{ … }
static void snd_hdsp_midi_write_byte (struct hdsp *hdsp, int id, int val)
{ … }
static int snd_hdsp_midi_input_available (struct hdsp *hdsp, int id)
{ … }
static int snd_hdsp_midi_output_possible (struct hdsp *hdsp, int id)
{ … }
static void snd_hdsp_flush_midi_input (struct hdsp *hdsp, int id)
{ … }
static int snd_hdsp_midi_output_write (struct hdsp_midi *hmidi)
{ … }
static int snd_hdsp_midi_input_read (struct hdsp_midi *hmidi)
{ … }
static void snd_hdsp_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
{ … }
static void snd_hdsp_midi_output_timer(struct timer_list *t)
{ … }
static void snd_hdsp_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{ … }
static int snd_hdsp_midi_input_open(struct snd_rawmidi_substream *substream)
{ … }
static int snd_hdsp_midi_output_open(struct snd_rawmidi_substream *substream)
{ … }
static int snd_hdsp_midi_input_close(struct snd_rawmidi_substream *substream)
{ … }
static int snd_hdsp_midi_output_close(struct snd_rawmidi_substream *substream)
{ … }
static const struct snd_rawmidi_ops snd_hdsp_midi_output = …;
static const struct snd_rawmidi_ops snd_hdsp_midi_input = …;
static int snd_hdsp_create_midi (struct snd_card *card, struct hdsp *hdsp, int id)
{ … }
static u32 snd_hdsp_convert_from_aes(struct snd_aes_iec958 *aes)
{ … }
static void snd_hdsp_convert_to_aes(struct snd_aes_iec958 *aes, u32 val)
{ … }
static int snd_hdsp_control_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_control_spdif_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_control_spdif_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_control_spdif_stream_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_control_spdif_stream_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_control_spdif_stream_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_control_spdif_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_control_spdif_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_SPDIF_IN(xname, xindex) …
static unsigned int hdsp_spdif_in(struct hdsp *hdsp)
{ … }
static int hdsp_set_spdif_input(struct hdsp *hdsp, int in)
{ … }
static int snd_hdsp_info_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_spdif_in(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_TOGGLE_SETTING(xname, xindex) …
static int hdsp_toggle_setting(struct hdsp *hdsp, u32 regmask)
{ … }
static int hdsp_set_toggle_setting(struct hdsp *hdsp, u32 regmask, int out)
{ … }
#define snd_hdsp_info_toggle_setting …
static int snd_hdsp_get_toggle_setting(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_toggle_setting(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_SPDIF_SAMPLE_RATE(xname, xindex) …
static int snd_hdsp_info_spdif_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_spdif_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_SYSTEM_SAMPLE_RATE(xname, xindex) …
static int snd_hdsp_info_system_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_system_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_AUTOSYNC_SAMPLE_RATE(xname, xindex) …
static int snd_hdsp_info_autosync_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_autosync_sample_rate(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_SYSTEM_CLOCK_MODE(xname, xindex) …
static int hdsp_system_clock_mode(struct hdsp *hdsp)
{ … }
static int snd_hdsp_info_system_clock_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_system_clock_mode(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_CLOCK_SOURCE(xname, xindex) …
static int hdsp_clock_source(struct hdsp *hdsp)
{ … }
static int hdsp_set_clock_source(struct hdsp *hdsp, int mode)
{ … }
static int snd_hdsp_info_clock_source(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_clock_source(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_clock_source(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define snd_hdsp_info_clock_source_lock …
static int snd_hdsp_get_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_clock_source_lock(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_DA_GAIN(xname, xindex) …
static int hdsp_da_gain(struct hdsp *hdsp)
{ … }
static int hdsp_set_da_gain(struct hdsp *hdsp, int mode)
{ … }
static int snd_hdsp_info_da_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_da_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_da_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_AD_GAIN(xname, xindex) …
static int hdsp_ad_gain(struct hdsp *hdsp)
{ … }
static int hdsp_set_ad_gain(struct hdsp *hdsp, int mode)
{ … }
static int snd_hdsp_info_ad_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_ad_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_ad_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_PHONE_GAIN(xname, xindex) …
static int hdsp_phone_gain(struct hdsp *hdsp)
{ … }
static int hdsp_set_phone_gain(struct hdsp *hdsp, int mode)
{ … }
static int snd_hdsp_info_phone_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_phone_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_phone_gain(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_PREF_SYNC_REF(xname, xindex) …
static int hdsp_pref_sync_ref(struct hdsp *hdsp)
{ … }
static int hdsp_set_pref_sync_ref(struct hdsp *hdsp, int pref)
{ … }
static int snd_hdsp_info_pref_sync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_pref_sync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_pref_sync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_AUTOSYNC_REF(xname, xindex) …
static int hdsp_autosync_ref(struct hdsp *hdsp)
{ … }
static int snd_hdsp_info_autosync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_autosync_ref(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_PRECISE_POINTER(xname, xindex) …
static int hdsp_set_precise_pointer(struct hdsp *hdsp, int precise)
{ … }
#define snd_hdsp_info_precise_pointer …
static int snd_hdsp_get_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_precise_pointer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_USE_MIDI_WORK(xname, xindex) …
static int hdsp_set_use_midi_work(struct hdsp *hdsp, int use_work)
{ … }
#define snd_hdsp_info_use_midi_work …
static int snd_hdsp_get_use_midi_work(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_use_midi_work(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_MIXER(xname, xindex) …
static int snd_hdsp_info_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_WC_SYNC_CHECK(xname, xindex) …
static int snd_hdsp_info_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int hdsp_wc_sync_check(struct hdsp *hdsp)
{ … }
static int snd_hdsp_get_wc_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_SPDIF_SYNC_CHECK(xname, xindex) …
static int hdsp_spdif_sync_check(struct hdsp *hdsp)
{ … }
static int snd_hdsp_get_spdif_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_ADATSYNC_SYNC_CHECK(xname, xindex) …
static int hdsp_adatsync_sync_check(struct hdsp *hdsp)
{ … }
static int snd_hdsp_get_adatsync_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_ADAT_SYNC_CHECK …
static int hdsp_adat_sync_check(struct hdsp *hdsp, int idx)
{ … }
static int snd_hdsp_get_adat_sync_check(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define HDSP_DDS_OFFSET(xname, xindex) …
static int hdsp_dds_offset(struct hdsp *hdsp)
{ … }
static int hdsp_set_dds_offset(struct hdsp *hdsp, int offset_hz)
{ … }
static int snd_hdsp_info_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_hdsp_get_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_put_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new snd_hdsp_9632_controls[] = …;
static const struct snd_kcontrol_new snd_hdsp_controls[] = …;
static int hdsp_rpm_input12(struct hdsp *hdsp)
{ … }
static int snd_hdsp_get_rpm_input12(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdsp_set_rpm_input12(struct hdsp *hdsp, int mode)
{ … }
static int snd_hdsp_put_rpm_input12(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_info_rpm_input(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int hdsp_rpm_input34(struct hdsp *hdsp)
{ … }
static int snd_hdsp_get_rpm_input34(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdsp_set_rpm_input34(struct hdsp *hdsp, int mode)
{ … }
static int snd_hdsp_put_rpm_input34(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdsp_rpm_bypass(struct hdsp *hdsp)
{ … }
static int snd_hdsp_get_rpm_bypass(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdsp_set_rpm_bypass(struct hdsp *hdsp, int on)
{ … }
static int snd_hdsp_put_rpm_bypass(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_info_rpm_bypass(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int hdsp_rpm_disconnect(struct hdsp *hdsp)
{ … }
static int snd_hdsp_get_rpm_disconnect(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int hdsp_set_rpm_disconnect(struct hdsp *hdsp, int on)
{ … }
static int snd_hdsp_put_rpm_disconnect(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_hdsp_info_rpm_disconnect(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static const struct snd_kcontrol_new snd_hdsp_rpm_controls[] = …;
static const struct snd_kcontrol_new snd_hdsp_96xx_aeb = …;
static struct snd_kcontrol_new snd_hdsp_adat_sync_check = …;
static bool hdsp_loopback_get(struct hdsp *const hdsp, const u8 channel)
{ … }
static int hdsp_loopback_set(struct hdsp *const hdsp, const u8 channel, const bool enable)
{ … }
static int snd_hdsp_loopback_get(struct snd_kcontrol *const kcontrol,
struct snd_ctl_elem_value *const ucontrol)
{ … }
static int snd_hdsp_loopback_put(struct snd_kcontrol *const kcontrol,
struct snd_ctl_elem_value *const ucontrol)
{ … }
static struct snd_kcontrol_new snd_hdsp_loopback_control = …;
static int snd_hdsp_create_controls(struct snd_card *card, struct hdsp *hdsp)
{ … }
static void
snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{ … }
static void snd_hdsp_proc_init(struct hdsp *hdsp)
{ … }
static int snd_hdsp_initialize_memory(struct hdsp *hdsp)
{ … }
static int snd_hdsp_set_defaults(struct hdsp *hdsp)
{ … }
static void hdsp_midi_work(struct work_struct *work)
{ … }
static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id)
{ … }
static snd_pcm_uframes_t snd_hdsp_hw_pointer(struct snd_pcm_substream *substream)
{ … }
static signed char *hdsp_channel_buffer_location(struct hdsp *hdsp,
int stream,
int channel)
{ … }
static int snd_hdsp_playback_copy(struct snd_pcm_substream *substream,
int channel, unsigned long pos,
struct iov_iter *src, unsigned long count)
{ … }
static int snd_hdsp_capture_copy(struct snd_pcm_substream *substream,
int channel, unsigned long pos,
struct iov_iter *dst, unsigned long count)
{ … }
static int snd_hdsp_hw_silence(struct snd_pcm_substream *substream,
int channel, unsigned long pos,
unsigned long count)
{ … }
static int snd_hdsp_reset(struct snd_pcm_substream *substream)
{ … }
static int snd_hdsp_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int snd_hdsp_channel_info(struct snd_pcm_substream *substream,
struct snd_pcm_channel_info *info)
{ … }
static int snd_hdsp_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg)
{ … }
static int snd_hdsp_trigger(struct snd_pcm_substream *substream, int cmd)
{ … }
static int snd_hdsp_prepare(struct snd_pcm_substream *substream)
{ … }
static const struct snd_pcm_hardware snd_hdsp_playback_subinfo = …;
static const struct snd_pcm_hardware snd_hdsp_capture_subinfo = …;
static const unsigned int hdsp_period_sizes[] = …;
static const struct snd_pcm_hw_constraint_list hdsp_hw_constraints_period_sizes = …;
static const unsigned int hdsp_9632_sample_rates[] = …;
static const struct snd_pcm_hw_constraint_list hdsp_hw_constraints_9632_sample_rates = …;
static int snd_hdsp_hw_rule_in_channels(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{ … }
static int snd_hdsp_hw_rule_out_channels(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{ … }
static int snd_hdsp_hw_rule_in_channels_rate(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{ … }
static int snd_hdsp_hw_rule_out_channels_rate(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{ … }
static int snd_hdsp_hw_rule_rate_out_channels(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{ … }
static int snd_hdsp_hw_rule_rate_in_channels(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule *rule)
{ … }
static int snd_hdsp_playback_open(struct snd_pcm_substream *substream)
{ … }
static int snd_hdsp_playback_release(struct snd_pcm_substream *substream)
{ … }
static int snd_hdsp_capture_open(struct snd_pcm_substream *substream)
{ … }
static int snd_hdsp_capture_release(struct snd_pcm_substream *substream)
{ … }
static inline int copy_u32_le(void __user *dest, void __iomem *src)
{ … }
static inline int copy_u64_le(void __user *dest, void __iomem *src_low, void __iomem *src_high)
{ … }
static inline int copy_u48_le(void __user *dest, void __iomem *src_low, void __iomem *src_high)
{ … }
static int hdsp_9652_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms)
{ … }
static int hdsp_9632_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms)
{ … }
static int hdsp_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rms)
{ … }
static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigned int cmd, unsigned long arg)
{ … }
static const struct snd_pcm_ops snd_hdsp_playback_ops = …;
static const struct snd_pcm_ops snd_hdsp_capture_ops = …;
static int snd_hdsp_create_hwdep(struct snd_card *card, struct hdsp *hdsp)
{ … }
static int snd_hdsp_create_pcm(struct snd_card *card, struct hdsp *hdsp)
{ … }
static void snd_hdsp_9652_enable_mixer (struct hdsp *hdsp)
{ … }
static int snd_hdsp_enable_io (struct hdsp *hdsp)
{ … }
static void snd_hdsp_initialize_channels(struct hdsp *hdsp)
{ … }
static void snd_hdsp_initialize_midi_flush (struct hdsp *hdsp)
{ … }
static int snd_hdsp_create_alsa_devices(struct snd_card *card, struct hdsp *hdsp)
{ … }
static int hdsp_request_fw_loader(struct hdsp *hdsp)
{ … }
static int snd_hdsp_create(struct snd_card *card,
struct hdsp *hdsp)
{ … }
static void snd_hdsp_card_free(struct snd_card *card)
{ … }
static int snd_hdsp_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{ … }
static struct pci_driver hdsp_driver = …;
module_pci_driver(…) …;