Symbol: hdspm
sound/pci/rme9652/hdspm.c
1089
struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1091
struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1093
static inline void snd_hdspm_initialize_midi_flush(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1094
static inline int hdspm_get_pll_freq(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1095
static int hdspm_update_simple_mixer_controls(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1096
static int hdspm_autosync_ref(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1097
static int hdspm_set_toggle_setting(struct hdspm *hdspm, u32 regmask, int out);
sound/pci/rme9652/hdspm.c
1098
static int snd_hdspm_set_defaults(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1099
static int hdspm_system_clock_mode(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1100
static void hdspm_set_channel_dma_addr(struct hdspm *hdspm,
sound/pci/rme9652/hdspm.c
1104
static int hdspm_aes_sync_check(struct hdspm *hdspm, int idx);
sound/pci/rme9652/hdspm.c
1105
static int hdspm_wc_sync_check(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1106
static int hdspm_tco_sync_check(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1107
static int hdspm_sync_in_sync_check(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1109
static int hdspm_get_aes_sample_rate(struct hdspm *hdspm, int index);
sound/pci/rme9652/hdspm.c
1110
static int hdspm_get_tco_sample_rate(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1111
static int hdspm_get_wc_sample_rate(struct hdspm *hdspm);
sound/pci/rme9652/hdspm.c
1125
static bool hdspm_is_raydat_or_aio(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
1127
return ((AIO == hdspm->io_type) || (RayDAT == hdspm->io_type));
sound/pci/rme9652/hdspm.c
1134
static inline void hdspm_write(struct hdspm * hdspm, unsigned int reg,
sound/pci/rme9652/hdspm.c
1137
writel(val, hdspm->iobase + reg);
sound/pci/rme9652/hdspm.c
1140
static inline unsigned int hdspm_read(struct hdspm * hdspm, unsigned int reg)
sound/pci/rme9652/hdspm.c
1142
return readl(hdspm->iobase + reg);
sound/pci/rme9652/hdspm.c
1149
static inline int hdspm_read_in_gain(struct hdspm * hdspm, unsigned int chan,
sound/pci/rme9652/hdspm.c
1155
return hdspm->mixer->ch[chan].in[in];
sound/pci/rme9652/hdspm.c
1158
static inline int hdspm_read_pb_gain(struct hdspm * hdspm, unsigned int chan,
sound/pci/rme9652/hdspm.c
1163
return hdspm->mixer->ch[chan].pb[pb];
sound/pci/rme9652/hdspm.c
1166
static int hdspm_write_in_gain(struct hdspm *hdspm, unsigned int chan,
sound/pci/rme9652/hdspm.c
1172
hdspm_write(hdspm,
sound/pci/rme9652/hdspm.c
1175
(hdspm->mixer->ch[chan].in[in] = data & 0xFFFF));
sound/pci/rme9652/hdspm.c
1179
static int hdspm_write_pb_gain(struct hdspm *hdspm, unsigned int chan,
sound/pci/rme9652/hdspm.c
1185
hdspm_write(hdspm,
sound/pci/rme9652/hdspm.c
1188
(hdspm->mixer->ch[chan].pb[pb] = data & 0xFFFF));
sound/pci/rme9652/hdspm.c
1194
static inline void snd_hdspm_enable_in(struct hdspm * hdspm, int i, int v)
sound/pci/rme9652/hdspm.c
1196
hdspm_write(hdspm, HDSPM_inputEnableBase + (4 * i), v);
sound/pci/rme9652/hdspm.c
1199
static inline void snd_hdspm_enable_out(struct hdspm * hdspm, int i, int v)
sound/pci/rme9652/hdspm.c
1201
hdspm_write(hdspm, HDSPM_outputEnableBase + (4 * i), v);
sound/pci/rme9652/hdspm.c
1205
static int snd_hdspm_use_is_exclusive(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
1207
guard(spinlock_irqsave)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
1208
if ((hdspm->playback_pid != hdspm->capture_pid) &&
sound/pci/rme9652/hdspm.c
1209
(hdspm->playback_pid >= 0) && (hdspm->capture_pid >= 0))
sound/pci/rme9652/hdspm.c
1233
static int hdspm_rate_multiplier(struct hdspm *hdspm, int rate)
sound/pci/rme9652/hdspm.c
1236
if (hdspm->control_register & HDSPM_QuadSpeed)
sound/pci/rme9652/hdspm.c
1238
else if (hdspm->control_register &
sound/pci/rme9652/hdspm.c
1246
static int hdspm_external_sample_rate(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
1251
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
1253
status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
1254
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
1256
syncref = hdspm_autosync_ref(hdspm);
sound/pci/rme9652/hdspm.c
1260
if (hdspm_wc_sync_check(hdspm))
sound/pci/rme9652/hdspm.c
1261
return HDSPM_bit2freq(hdspm_get_wc_sample_rate(hdspm));
sound/pci/rme9652/hdspm.c
1273
if (hdspm_aes_sync_check(hdspm, syncref - HDSPM_AES32_AUTOSYNC_FROM_AES1))
sound/pci/rme9652/hdspm.c
1274
return HDSPM_bit2freq(hdspm_get_aes_sample_rate(hdspm,
sound/pci/rme9652/hdspm.c
1281
if (hdspm_tco_sync_check(hdspm))
sound/pci/rme9652/hdspm.c
1282
return HDSPM_bit2freq(hdspm_get_tco_sample_rate(hdspm));
sound/pci/rme9652/hdspm.c
1290
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
1324
status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
1325
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
1374
return hdspm_rate_multiplier(hdspm, rate);
sound/pci/rme9652/hdspm.c
1420
syncref = hdspm_autosync_ref(hdspm);
sound/pci/rme9652/hdspm.c
1424
hdspm_tco_sync_check(hdspm));
sound/pci/rme9652/hdspm.c
1428
hdspm_sync_in_sync_check(hdspm));
sound/pci/rme9652/hdspm.c
1433
hdspm_get_pll_freq(hdspm));
sound/pci/rme9652/hdspm.c
1437
rate = hdspm_rate_multiplier(hdspm, rate);
sound/pci/rme9652/hdspm.c
1446
static int hdspm_get_latency(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
1450
n = hdspm_decode_latency(hdspm->control_register);
sound/pci/rme9652/hdspm.c
1459
if ((7 == n) && (RayDAT == hdspm->io_type || AIO == hdspm->io_type))
sound/pci/rme9652/hdspm.c
1466
static inline void hdspm_compute_period_size(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
1468
hdspm->period_bytes = 4 * hdspm_get_latency(hdspm);
sound/pci/rme9652/hdspm.c
1472
static snd_pcm_uframes_t hdspm_hw_pointer(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
1476
position = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
1478
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
1486
(hdspm->period_bytes / 4) : 0;
sound/pci/rme9652/hdspm.c
1493
static inline void hdspm_start_audio(struct hdspm * s)
sound/pci/rme9652/hdspm.c
1499
static inline void hdspm_stop_audio(struct hdspm * s)
sound/pci/rme9652/hdspm.c
1506
static void hdspm_silence_playback(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
1509
int n = hdspm->period_bytes;
sound/pci/rme9652/hdspm.c
1510
void *buf = hdspm->playback_buffer;
sound/pci/rme9652/hdspm.c
1521
static int hdspm_set_interrupt_interval(struct hdspm *s, unsigned int frames)
sound/pci/rme9652/hdspm.c
1558
static u64 hdspm_calc_dds_value(struct hdspm *hdspm, u64 period)
sound/pci/rme9652/hdspm.c
1565
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
1586
static void hdspm_set_dds_value(struct hdspm *hdspm, int rate)
sound/pci/rme9652/hdspm.c
1598
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
1618
hdspm_write(hdspm, HDSPM_freqReg, (u32)n);
sound/pci/rme9652/hdspm.c
1622
static int hdspm_set_rate(struct hdspm * hdspm, int rate, int called_internally)
sound/pci/rme9652/hdspm.c
1633
if (!(hdspm->control_register & HDSPM_ClockModeMaster)) {
sound/pci/rme9652/hdspm.c
1642
dev_warn(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
1649
hdspm_external_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
1651
if (hdspm_autosync_ref(hdspm) ==
sound/pci/rme9652/hdspm.c
1654
dev_warn(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
1660
dev_warn(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
1667
current_rate = hdspm->system_sample_rate;
sound/pci/rme9652/hdspm.c
1726
&& (hdspm->capture_pid >= 0 || hdspm->playback_pid >= 0)) {
sound/pci/rme9652/hdspm.c
1727
dev_err(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
1731
hdspm->capture_pid, hdspm->playback_pid);
sound/pci/rme9652/hdspm.c
1735
hdspm->control_register &= ~HDSPM_FrequencyMask;
sound/pci/rme9652/hdspm.c
1736
hdspm->control_register |= rate_bits;
sound/pci/rme9652/hdspm.c
1737
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
1741
hdspm_set_dds_value(hdspm, rate);
sound/pci/rme9652/hdspm.c
1743
if (AES32 == hdspm->io_type && rate != current_rate)
sound/pci/rme9652/hdspm.c
1744
hdspm_write(hdspm, HDSPM_eeprom_wr, 0);
sound/pci/rme9652/hdspm.c
1746
hdspm->system_sample_rate = rate;
sound/pci/rme9652/hdspm.c
1749
hdspm->channel_map_in = hdspm->channel_map_in_ss;
sound/pci/rme9652/hdspm.c
1750
hdspm->channel_map_out = hdspm->channel_map_out_ss;
sound/pci/rme9652/hdspm.c
1751
hdspm->max_channels_in = hdspm->ss_in_channels;
sound/pci/rme9652/hdspm.c
1752
hdspm->max_channels_out = hdspm->ss_out_channels;
sound/pci/rme9652/hdspm.c
1753
hdspm->port_names_in = hdspm->port_names_in_ss;
sound/pci/rme9652/hdspm.c
1754
hdspm->port_names_out = hdspm->port_names_out_ss;
sound/pci/rme9652/hdspm.c
1756
hdspm->channel_map_in = hdspm->channel_map_in_ds;
sound/pci/rme9652/hdspm.c
1757
hdspm->channel_map_out = hdspm->channel_map_out_ds;
sound/pci/rme9652/hdspm.c
1758
hdspm->max_channels_in = hdspm->ds_in_channels;
sound/pci/rme9652/hdspm.c
1759
hdspm->max_channels_out = hdspm->ds_out_channels;
sound/pci/rme9652/hdspm.c
1760
hdspm->port_names_in = hdspm->port_names_in_ds;
sound/pci/rme9652/hdspm.c
1761
hdspm->port_names_out = hdspm->port_names_out_ds;
sound/pci/rme9652/hdspm.c
1763
hdspm->channel_map_in = hdspm->channel_map_in_qs;
sound/pci/rme9652/hdspm.c
1764
hdspm->channel_map_out = hdspm->channel_map_out_qs;
sound/pci/rme9652/hdspm.c
1765
hdspm->max_channels_in = hdspm->qs_in_channels;
sound/pci/rme9652/hdspm.c
1766
hdspm->max_channels_out = hdspm->qs_out_channels;
sound/pci/rme9652/hdspm.c
1767
hdspm->port_names_in = hdspm->port_names_in_qs;
sound/pci/rme9652/hdspm.c
1768
hdspm->port_names_out = hdspm->port_names_out_qs;
sound/pci/rme9652/hdspm.c
1778
static void all_in_all_mixer(struct hdspm * hdspm, int sgain)
sound/pci/rme9652/hdspm.c
1792
hdspm_write_in_gain(hdspm, i, j, gain);
sound/pci/rme9652/hdspm.c
1793
hdspm_write_pb_gain(hdspm, i, j, gain);
sound/pci/rme9652/hdspm.c
1801
static inline unsigned char snd_hdspm_midi_read_byte (struct hdspm *hdspm,
sound/pci/rme9652/hdspm.c
1805
return hdspm_read(hdspm, hdspm->midi[id].dataIn);
sound/pci/rme9652/hdspm.c
1808
static inline void snd_hdspm_midi_write_byte (struct hdspm *hdspm, int id,
sound/pci/rme9652/hdspm.c
1812
return hdspm_write(hdspm, hdspm->midi[id].dataOut, val);
sound/pci/rme9652/hdspm.c
1815
static inline int snd_hdspm_midi_input_available (struct hdspm *hdspm, int id)
sound/pci/rme9652/hdspm.c
1817
return hdspm_read(hdspm, hdspm->midi[id].statusIn) & 0xFF;
sound/pci/rme9652/hdspm.c
1820
static inline int snd_hdspm_midi_output_possible (struct hdspm *hdspm, int id)
sound/pci/rme9652/hdspm.c
1824
fifo_bytes_used = hdspm_read(hdspm, hdspm->midi[id].statusOut) & 0xFF;
sound/pci/rme9652/hdspm.c
1832
static void snd_hdspm_flush_midi_input(struct hdspm *hdspm, int id)
sound/pci/rme9652/hdspm.c
1836
while (snd_hdspm_midi_input_available(hdspm, id) && --count)
sound/pci/rme9652/hdspm.c
1837
snd_hdspm_midi_read_byte(hdspm, id);
sound/pci/rme9652/hdspm.c
1852
n_pending = snd_hdspm_midi_output_possible (hmidi->hdspm,
sound/pci/rme9652/hdspm.c
1862
snd_hdspm_midi_write_byte (hmidi->hdspm,
sound/pci/rme9652/hdspm.c
1880
n_pending = snd_hdspm_midi_input_available(hmidi->hdspm, hmidi->id);
sound/pci/rme9652/hdspm.c
1886
buf[i] = snd_hdspm_midi_read_byte(hmidi->hdspm,
sound/pci/rme9652/hdspm.c
1894
snd_hdspm_midi_read_byte(hmidi->hdspm,
sound/pci/rme9652/hdspm.c
1901
scoped_guard(spinlock_irqsave, &hmidi->hdspm->lock) {
sound/pci/rme9652/hdspm.c
1902
hmidi->hdspm->control_register |= hmidi->ie;
sound/pci/rme9652/hdspm.c
1903
hdspm_write(hmidi->hdspm, HDSPM_controlRegister,
sound/pci/rme9652/hdspm.c
1904
hmidi->hdspm->control_register);
sound/pci/rme9652/hdspm.c
1913
struct hdspm *hdspm;
sound/pci/rme9652/hdspm.c
1917
hdspm = hmidi->hdspm;
sound/pci/rme9652/hdspm.c
1919
guard(spinlock_irqsave)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
1921
if (!(hdspm->control_register & hmidi->ie)) {
sound/pci/rme9652/hdspm.c
1922
snd_hdspm_flush_midi_input (hdspm, hmidi->id);
sound/pci/rme9652/hdspm.c
1923
hdspm->control_register |= hmidi->ie;
sound/pci/rme9652/hdspm.c
1926
hdspm->control_register &= ~hmidi->ie;
sound/pci/rme9652/hdspm.c
1929
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
1978
snd_hdspm_flush_midi_input (hmidi->hdspm, hmidi->id);
sound/pci/rme9652/hdspm.c
2036
struct hdspm *hdspm, int id)
sound/pci/rme9652/hdspm.c
2041
hdspm->midi[id].id = id;
sound/pci/rme9652/hdspm.c
2042
hdspm->midi[id].hdspm = hdspm;
sound/pci/rme9652/hdspm.c
2043
spin_lock_init (&hdspm->midi[id].lock);
sound/pci/rme9652/hdspm.c
2046
if (MADIface == hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2048
hdspm->midi[0].dataIn = HDSPM_midiDataIn2;
sound/pci/rme9652/hdspm.c
2049
hdspm->midi[0].statusIn = HDSPM_midiStatusIn2;
sound/pci/rme9652/hdspm.c
2050
hdspm->midi[0].dataOut = HDSPM_midiDataOut2;
sound/pci/rme9652/hdspm.c
2051
hdspm->midi[0].statusOut = HDSPM_midiStatusOut2;
sound/pci/rme9652/hdspm.c
2052
hdspm->midi[0].ie = HDSPM_Midi2InterruptEnable;
sound/pci/rme9652/hdspm.c
2053
hdspm->midi[0].irq = HDSPM_midi2IRQPending;
sound/pci/rme9652/hdspm.c
2055
hdspm->midi[0].dataIn = HDSPM_midiDataIn0;
sound/pci/rme9652/hdspm.c
2056
hdspm->midi[0].statusIn = HDSPM_midiStatusIn0;
sound/pci/rme9652/hdspm.c
2057
hdspm->midi[0].dataOut = HDSPM_midiDataOut0;
sound/pci/rme9652/hdspm.c
2058
hdspm->midi[0].statusOut = HDSPM_midiStatusOut0;
sound/pci/rme9652/hdspm.c
2059
hdspm->midi[0].ie = HDSPM_Midi0InterruptEnable;
sound/pci/rme9652/hdspm.c
2060
hdspm->midi[0].irq = HDSPM_midi0IRQPending;
sound/pci/rme9652/hdspm.c
2063
hdspm->midi[1].dataIn = HDSPM_midiDataIn1;
sound/pci/rme9652/hdspm.c
2064
hdspm->midi[1].statusIn = HDSPM_midiStatusIn1;
sound/pci/rme9652/hdspm.c
2065
hdspm->midi[1].dataOut = HDSPM_midiDataOut1;
sound/pci/rme9652/hdspm.c
2066
hdspm->midi[1].statusOut = HDSPM_midiStatusOut1;
sound/pci/rme9652/hdspm.c
2067
hdspm->midi[1].ie = HDSPM_Midi1InterruptEnable;
sound/pci/rme9652/hdspm.c
2068
hdspm->midi[1].irq = HDSPM_midi1IRQPending;
sound/pci/rme9652/hdspm.c
2069
} else if ((2 == id) && (MADI == hdspm->io_type)) {
sound/pci/rme9652/hdspm.c
2071
hdspm->midi[2].dataIn = HDSPM_midiDataIn2;
sound/pci/rme9652/hdspm.c
2072
hdspm->midi[2].statusIn = HDSPM_midiStatusIn2;
sound/pci/rme9652/hdspm.c
2073
hdspm->midi[2].dataOut = HDSPM_midiDataOut2;
sound/pci/rme9652/hdspm.c
2074
hdspm->midi[2].statusOut = HDSPM_midiStatusOut2;
sound/pci/rme9652/hdspm.c
2075
hdspm->midi[2].ie = HDSPM_Midi2InterruptEnable;
sound/pci/rme9652/hdspm.c
2076
hdspm->midi[2].irq = HDSPM_midi2IRQPending;
sound/pci/rme9652/hdspm.c
2079
hdspm->midi[2].dataIn = HDSPM_midiDataIn2;
sound/pci/rme9652/hdspm.c
2080
hdspm->midi[2].statusIn = HDSPM_midiStatusIn2;
sound/pci/rme9652/hdspm.c
2081
hdspm->midi[2].dataOut = -1;
sound/pci/rme9652/hdspm.c
2082
hdspm->midi[2].statusOut = -1;
sound/pci/rme9652/hdspm.c
2083
hdspm->midi[2].ie = HDSPM_Midi2InterruptEnable;
sound/pci/rme9652/hdspm.c
2084
hdspm->midi[2].irq = HDSPM_midi2IRQPendingAES;
sound/pci/rme9652/hdspm.c
2087
hdspm->midi[3].dataIn = HDSPM_midiDataIn3;
sound/pci/rme9652/hdspm.c
2088
hdspm->midi[3].statusIn = HDSPM_midiStatusIn3;
sound/pci/rme9652/hdspm.c
2089
hdspm->midi[3].dataOut = -1;
sound/pci/rme9652/hdspm.c
2090
hdspm->midi[3].statusOut = -1;
sound/pci/rme9652/hdspm.c
2091
hdspm->midi[3].ie = HDSPM_Midi3InterruptEnable;
sound/pci/rme9652/hdspm.c
2092
hdspm->midi[3].irq = HDSPM_midi3IRQPending;
sound/pci/rme9652/hdspm.c
2095
if ((id < 2) || ((2 == id) && ((MADI == hdspm->io_type) ||
sound/pci/rme9652/hdspm.c
2096
(MADIface == hdspm->io_type)))) {
sound/pci/rme9652/hdspm.c
2097
if ((id == 0) && (MADIface == hdspm->io_type)) {
sound/pci/rme9652/hdspm.c
2100
} else if ((id == 2) && (MADI == hdspm->io_type)) {
sound/pci/rme9652/hdspm.c
2108
&hdspm->midi[id].rmidi);
sound/pci/rme9652/hdspm.c
2112
snprintf(hdspm->midi[id].rmidi->name,
sound/pci/rme9652/hdspm.c
2113
sizeof(hdspm->midi[id].rmidi->name),
sound/pci/rme9652/hdspm.c
2115
hdspm->midi[id].rmidi->private_data = &hdspm->midi[id];
sound/pci/rme9652/hdspm.c
2117
snd_rawmidi_set_ops(hdspm->midi[id].rmidi,
sound/pci/rme9652/hdspm.c
2120
snd_rawmidi_set_ops(hdspm->midi[id].rmidi,
sound/pci/rme9652/hdspm.c
2124
hdspm->midi[id].rmidi->info_flags |=
sound/pci/rme9652/hdspm.c
2133
&hdspm->midi[id].rmidi);
sound/pci/rme9652/hdspm.c
2137
snprintf(hdspm->midi[id].rmidi->name,
sound/pci/rme9652/hdspm.c
2138
sizeof(hdspm->midi[id].rmidi->name),
sound/pci/rme9652/hdspm.c
2140
hdspm->midi[id].rmidi->private_data = &hdspm->midi[id];
sound/pci/rme9652/hdspm.c
2142
snd_rawmidi_set_ops(hdspm->midi[id].rmidi,
sound/pci/rme9652/hdspm.c
2146
hdspm->midi[id].rmidi->info_flags |= SNDRV_RAWMIDI_INFO_INPUT;
sound/pci/rme9652/hdspm.c
2155
struct hdspm *hdspm = container_of(work, struct hdspm, midi_work);
sound/pci/rme9652/hdspm.c
2158
while (i < hdspm->midiPorts) {
sound/pci/rme9652/hdspm.c
2159
if (hdspm->midi[i].pending)
sound/pci/rme9652/hdspm.c
2160
snd_hdspm_midi_input_read(&hdspm->midi[i]);
sound/pci/rme9652/hdspm.c
2174
static inline int hdspm_get_pll_freq(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
2178
period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ);
sound/pci/rme9652/hdspm.c
2179
rate = hdspm_calc_dds_value(hdspm, period);
sound/pci/rme9652/hdspm.c
2188
static int hdspm_get_system_sample_rate(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
2192
rate = hdspm_get_pll_freq(hdspm);
sound/pci/rme9652/hdspm.c
2196
if (0 == hdspm_system_clock_mode(hdspm)) {
sound/pci/rme9652/hdspm.c
2198
rate = hdspm->system_sample_rate;
sound/pci/rme9652/hdspm.c
2201
rate = hdspm_external_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2203
rate = hdspm->system_sample_rate;
sound/pci/rme9652/hdspm.c
2238
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2240
ucontrol->value.integer.value[0] = hdspm_get_system_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2248
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2253
hdspm_set_dds_value(hdspm, ucontrol->value.integer.value[0]);
sound/pci/rme9652/hdspm.c
2261
static int hdspm_get_wc_sample_rate(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
2265
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2268
status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
sound/pci/rme9652/hdspm.c
2271
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
2285
static int hdspm_get_tco_sample_rate(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
2289
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2290
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2293
status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
sound/pci/rme9652/hdspm.c
2296
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
2310
static int hdspm_get_sync_in_sample_rate(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
2314
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2315
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2318
status = hdspm_read(hdspm, HDSPM_RD_STATUS_2);
sound/pci/rme9652/hdspm.c
2331
static int hdspm_get_aes_sample_rate(struct hdspm *hdspm, int index)
sound/pci/rme9652/hdspm.c
2335
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2337
timecode = hdspm_read(hdspm, HDSPM_timecodeRegister);
sound/pci/rme9652/hdspm.c
2349
static int hdspm_get_s1_sample_rate(struct hdspm *hdspm, unsigned int idx)
sound/pci/rme9652/hdspm.c
2351
int status = hdspm_read(hdspm, HDSPM_RD_STATUS_2);
sound/pci/rme9652/hdspm.c
2363
static int hdspm_external_rate_to_enum(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
2365
int rate = hdspm_external_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2398
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2400
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2405
hdspm_get_wc_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2409
hdspm_get_tco_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2413
hdspm_get_sync_in_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2417
hdspm_get_s1_sample_rate(hdspm,
sound/pci/rme9652/hdspm.c
2426
hdspm_get_wc_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2430
hdspm_get_tco_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2434
hdspm_get_sync_in_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2438
hdspm_get_s1_sample_rate(hdspm,
sound/pci/rme9652/hdspm.c
2448
hdspm_get_wc_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2452
hdspm_get_tco_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2456
hdspm_get_sync_in_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
2460
hdspm_external_rate_to_enum(hdspm);
sound/pci/rme9652/hdspm.c
2464
hdspm_get_aes_sample_rate(hdspm,
sound/pci/rme9652/hdspm.c
2474
hdspm_external_rate_to_enum(hdspm);
sound/pci/rme9652/hdspm.c
2500
static int hdspm_system_clock_mode(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
2502
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2505
if (hdspm->settings_register & HDSPM_c0Master)
sound/pci/rme9652/hdspm.c
2510
if (hdspm->control_register & HDSPM_ClockModeMaster)
sound/pci/rme9652/hdspm.c
2522
static void hdspm_set_system_clock_mode(struct hdspm *hdspm, int mode)
sound/pci/rme9652/hdspm.c
2524
hdspm_set_toggle_setting(hdspm,
sound/pci/rme9652/hdspm.c
2525
(hdspm_is_raydat_or_aio(hdspm)) ?
sound/pci/rme9652/hdspm.c
2542
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2544
ucontrol->value.enumerated.item[0] = hdspm_system_clock_mode(hdspm);
sound/pci/rme9652/hdspm.c
2551
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2554
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
2563
hdspm_set_system_clock_mode(hdspm, val);
sound/pci/rme9652/hdspm.c
2579
static int hdspm_clock_source(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
2581
switch (hdspm->system_sample_rate) {
sound/pci/rme9652/hdspm.c
2596
static int hdspm_set_clock_source(struct hdspm * hdspm, int mode)
sound/pci/rme9652/hdspm.c
2621
hdspm_set_rate(hdspm, rate, 1);
sound/pci/rme9652/hdspm.c
2634
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2636
ucontrol->value.enumerated.item[0] = hdspm_clock_source(hdspm);
sound/pci/rme9652/hdspm.c
2643
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2647
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
2654
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
2655
if (val != hdspm_clock_source(hdspm))
sound/pci/rme9652/hdspm.c
2656
change = (hdspm_set_clock_source(hdspm, val) == 0) ? 1 : 0;
sound/pci/rme9652/hdspm.c
2680
static int hdspm_pref_sync_ref(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
2682
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2684
switch (hdspm->control_register & HDSPM_SyncRefMask) {
sound/pci/rme9652/hdspm.c
2701
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2702
switch (hdspm->control_register & HDSPM_SyncRefMask) {
sound/pci/rme9652/hdspm.c
2710
switch (hdspm->control_register & HDSPM_SyncRefMask) {
sound/pci/rme9652/hdspm.c
2720
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2721
switch ((hdspm->settings_register &
sound/pci/rme9652/hdspm.c
2734
switch ((hdspm->settings_register &
sound/pci/rme9652/hdspm.c
2750
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2751
switch ((hdspm->settings_register &
sound/pci/rme9652/hdspm.c
2761
switch ((hdspm->settings_register &
sound/pci/rme9652/hdspm.c
2783
static int hdspm_set_pref_sync_ref(struct hdspm * hdspm, int pref)
sound/pci/rme9652/hdspm.c
2787
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2789
hdspm->control_register &= ~HDSPM_SyncRefMask;
sound/pci/rme9652/hdspm.c
2794
hdspm->control_register |= HDSPM_SyncRef0;
sound/pci/rme9652/hdspm.c
2797
hdspm->control_register |= HDSPM_SyncRef1;
sound/pci/rme9652/hdspm.c
2800
hdspm->control_register |=
sound/pci/rme9652/hdspm.c
2804
hdspm->control_register |= HDSPM_SyncRef2;
sound/pci/rme9652/hdspm.c
2807
hdspm->control_register |=
sound/pci/rme9652/hdspm.c
2811
hdspm->control_register |=
sound/pci/rme9652/hdspm.c
2815
hdspm->control_register |=
sound/pci/rme9652/hdspm.c
2819
hdspm->control_register |= HDSPM_SyncRef3;
sound/pci/rme9652/hdspm.c
2822
hdspm->control_register |=
sound/pci/rme9652/hdspm.c
2833
hdspm->control_register &= ~HDSPM_SyncRefMask;
sound/pci/rme9652/hdspm.c
2834
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2839
hdspm->control_register |= HDSPM_SyncRef0;
sound/pci/rme9652/hdspm.c
2842
hdspm->control_register |= HDSPM_SyncRef1;
sound/pci/rme9652/hdspm.c
2845
hdspm->control_register |=
sound/pci/rme9652/hdspm.c
2856
hdspm->control_register |= HDSPM_SyncRef0;
sound/pci/rme9652/hdspm.c
2859
hdspm->control_register |=
sound/pci/rme9652/hdspm.c
2870
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2899
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
2922
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
2925
hdspm->settings_register &= ~HDSPM_c0_SyncRefMask;
sound/pci/rme9652/hdspm.c
2926
hdspm->settings_register |= HDSPM_c0_SyncRef0 * p;
sound/pci/rme9652/hdspm.c
2927
hdspm_write(hdspm, HDSPM_WR_SETTINGS, hdspm->settings_register);
sound/pci/rme9652/hdspm.c
2933
hdspm_write(hdspm, HDSPM_controlRegister,
sound/pci/rme9652/hdspm.c
2934
hdspm->control_register);
sound/pci/rme9652/hdspm.c
2944
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2946
snd_ctl_enum_info(uinfo, 1, hdspm->texts_autosync_items, hdspm->texts_autosync);
sound/pci/rme9652/hdspm.c
2954
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2955
int psf = hdspm_pref_sync_ref(hdspm);
sound/pci/rme9652/hdspm.c
2968
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
2971
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
2978
else if (val >= hdspm->texts_autosync_items)
sound/pci/rme9652/hdspm.c
2979
val = hdspm->texts_autosync_items-1;
sound/pci/rme9652/hdspm.c
2981
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
2982
if (val != hdspm_pref_sync_ref(hdspm))
sound/pci/rme9652/hdspm.c
2983
change = (0 == hdspm_set_pref_sync_ref(hdspm, val)) ? 1 : 0;
sound/pci/rme9652/hdspm.c
2998
static int hdspm_autosync_ref(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
3001
if (AES32 == hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3003
unsigned int status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
3011
} else if (MADI == hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3013
unsigned int status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
3037
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3039
if (AES32 == hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3044
} else if (MADI == hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3056
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3058
ucontrol->value.enumerated.item[0] = hdspm_autosync_ref(hdspm);
sound/pci/rme9652/hdspm.c
3087
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3088
status = hdspm_read(hdspm, HDSPM_RD_TCO + 4);
sound/pci/rme9652/hdspm.c
3128
static int hdspm_tco_ltc_frames(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
3133
status = hdspm_read(hdspm, HDSPM_RD_TCO + 4);
sound/pci/rme9652/hdspm.c
3162
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3164
ucontrol->value.enumerated.item[0] = hdspm_tco_ltc_frames(hdspm);
sound/pci/rme9652/hdspm.c
3177
static int hdspm_toggle_setting(struct hdspm *hdspm, u32 regmask)
sound/pci/rme9652/hdspm.c
3181
if (hdspm_is_raydat_or_aio(hdspm))
sound/pci/rme9652/hdspm.c
3182
reg = hdspm->settings_register;
sound/pci/rme9652/hdspm.c
3184
reg = hdspm->control_register;
sound/pci/rme9652/hdspm.c
3189
static int hdspm_set_toggle_setting(struct hdspm *hdspm, u32 regmask, int out)
sound/pci/rme9652/hdspm.c
3194
if (hdspm_is_raydat_or_aio(hdspm)) {
sound/pci/rme9652/hdspm.c
3195
reg = &(hdspm->settings_register);
sound/pci/rme9652/hdspm.c
3198
reg = &(hdspm->control_register);
sound/pci/rme9652/hdspm.c
3207
hdspm_write(hdspm, target_reg, *reg);
sound/pci/rme9652/hdspm.c
3217
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3220
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3221
ucontrol->value.integer.value[0] = hdspm_toggle_setting(hdspm, regmask);
sound/pci/rme9652/hdspm.c
3228
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3233
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3236
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3237
change = (int) val != hdspm_toggle_setting(hdspm, regmask);
sound/pci/rme9652/hdspm.c
3238
hdspm_set_toggle_setting(hdspm, regmask, val);
sound/pci/rme9652/hdspm.c
3251
static int hdspm_input_select(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
3253
return (hdspm->control_register & HDSPM_InputSelect0) ? 1 : 0;
sound/pci/rme9652/hdspm.c
3256
static int hdspm_set_input_select(struct hdspm * hdspm, int out)
sound/pci/rme9652/hdspm.c
3259
hdspm->control_register |= HDSPM_InputSelect0;
sound/pci/rme9652/hdspm.c
3261
hdspm->control_register &= ~HDSPM_InputSelect0;
sound/pci/rme9652/hdspm.c
3262
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
3278
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3280
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3281
ucontrol->value.enumerated.item[0] = hdspm_input_select(hdspm);
sound/pci/rme9652/hdspm.c
3288
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3292
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3295
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3296
change = (int) val != hdspm_input_select(hdspm);
sound/pci/rme9652/hdspm.c
3297
hdspm_set_input_select(hdspm, val);
sound/pci/rme9652/hdspm.c
3311
static int hdspm_ds_wire(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
3313
return (hdspm->control_register & HDSPM_DS_DoubleWire) ? 1 : 0;
sound/pci/rme9652/hdspm.c
3316
static int hdspm_set_ds_wire(struct hdspm * hdspm, int ds)
sound/pci/rme9652/hdspm.c
3319
hdspm->control_register |= HDSPM_DS_DoubleWire;
sound/pci/rme9652/hdspm.c
3321
hdspm->control_register &= ~HDSPM_DS_DoubleWire;
sound/pci/rme9652/hdspm.c
3322
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
3338
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3340
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3341
ucontrol->value.enumerated.item[0] = hdspm_ds_wire(hdspm);
sound/pci/rme9652/hdspm.c
3348
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3352
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3355
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3356
change = (int) val != hdspm_ds_wire(hdspm);
sound/pci/rme9652/hdspm.c
3357
hdspm_set_ds_wire(hdspm, val);
sound/pci/rme9652/hdspm.c
3371
static int hdspm_qs_wire(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
3373
if (hdspm->control_register & HDSPM_QS_DoubleWire)
sound/pci/rme9652/hdspm.c
3375
if (hdspm->control_register & HDSPM_QS_QuadWire)
sound/pci/rme9652/hdspm.c
3380
static int hdspm_set_qs_wire(struct hdspm * hdspm, int mode)
sound/pci/rme9652/hdspm.c
3382
hdspm->control_register &= ~(HDSPM_QS_DoubleWire | HDSPM_QS_QuadWire);
sound/pci/rme9652/hdspm.c
3387
hdspm->control_register |= HDSPM_QS_DoubleWire;
sound/pci/rme9652/hdspm.c
3390
hdspm->control_register |= HDSPM_QS_QuadWire;
sound/pci/rme9652/hdspm.c
3393
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
3409
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3411
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3412
ucontrol->value.enumerated.item[0] = hdspm_qs_wire(hdspm);
sound/pci/rme9652/hdspm.c
3419
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3423
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3430
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3431
change = val != hdspm_qs_wire(hdspm);
sound/pci/rme9652/hdspm.c
3432
hdspm_set_qs_wire(hdspm, val);
sound/pci/rme9652/hdspm.c
3445
static int hdspm_tristate(struct hdspm *hdspm, u32 regmask)
sound/pci/rme9652/hdspm.c
3447
u32 reg = hdspm->settings_register & (regmask * 3);
sound/pci/rme9652/hdspm.c
3451
static int hdspm_set_tristate(struct hdspm *hdspm, int mode, u32 regmask)
sound/pci/rme9652/hdspm.c
3453
hdspm->settings_register &= ~(regmask * 3);
sound/pci/rme9652/hdspm.c
3454
hdspm->settings_register |= (regmask * mode);
sound/pci/rme9652/hdspm.c
3455
hdspm_write(hdspm, HDSPM_WR_SETTINGS, hdspm->settings_register);
sound/pci/rme9652/hdspm.c
3482
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3485
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3486
ucontrol->value.enumerated.item[0] = hdspm_tristate(hdspm, regmask);
sound/pci/rme9652/hdspm.c
3493
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3498
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3506
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3507
change = val != hdspm_tristate(hdspm, regmask);
sound/pci/rme9652/hdspm.c
3508
hdspm_set_tristate(hdspm, val, regmask);
sound/pci/rme9652/hdspm.c
3521
static int hdspm_madi_speedmode(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
3523
if (hdspm->control_register & HDSPM_QuadSpeed)
sound/pci/rme9652/hdspm.c
3525
if (hdspm->control_register & HDSPM_DoubleSpeed)
sound/pci/rme9652/hdspm.c
3530
static int hdspm_set_madi_speedmode(struct hdspm *hdspm, int mode)
sound/pci/rme9652/hdspm.c
3532
hdspm->control_register &= ~(HDSPM_DoubleSpeed | HDSPM_QuadSpeed);
sound/pci/rme9652/hdspm.c
3537
hdspm->control_register |= HDSPM_DoubleSpeed;
sound/pci/rme9652/hdspm.c
3540
hdspm->control_register |= HDSPM_QuadSpeed;
sound/pci/rme9652/hdspm.c
3543
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
3559
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3561
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3562
ucontrol->value.enumerated.item[0] = hdspm_madi_speedmode(hdspm);
sound/pci/rme9652/hdspm.c
3569
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3573
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3580
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3581
change = val != hdspm_madi_speedmode(hdspm);
sound/pci/rme9652/hdspm.c
3582
hdspm_set_madi_speedmode(hdspm, val);
sound/pci/rme9652/hdspm.c
3612
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3628
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3631
hdspm_read_pb_gain(hdspm, destination,
sound/pci/rme9652/hdspm.c
3635
hdspm_read_in_gain(hdspm, destination, source);
sound/pci/rme9652/hdspm.c
3643
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3649
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3662
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3665
change = gain != hdspm_read_pb_gain(hdspm, destination,
sound/pci/rme9652/hdspm.c
3669
change = gain != hdspm_read_in_gain(hdspm, destination,
sound/pci/rme9652/hdspm.c
3674
hdspm_write_pb_gain(hdspm, destination,
sound/pci/rme9652/hdspm.c
3678
hdspm_write_in_gain(hdspm, destination, source,
sound/pci/rme9652/hdspm.c
3713
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3721
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3723
(hdspm_read_pb_gain(hdspm, channel, channel)*64)/UNITY_GAIN;
sound/pci/rme9652/hdspm.c
3731
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3736
if (!snd_hdspm_use_is_exclusive(hdspm))
sound/pci/rme9652/hdspm.c
3746
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
3748
gain != hdspm_read_pb_gain(hdspm, channel,
sound/pci/rme9652/hdspm.c
3751
hdspm_write_pb_gain(hdspm, channel, channel,
sound/pci/rme9652/hdspm.c
3792
static int hdspm_wc_sync_check(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
3796
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3798
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
3808
status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
3819
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
3836
static int hdspm_madi_sync_check(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
3838
int status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
3849
static int hdspm_s1_sync_check(struct hdspm *hdspm, int idx)
sound/pci/rme9652/hdspm.c
3853
status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
sound/pci/rme9652/hdspm.c
3866
static int hdspm_sync_in_sync_check(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
3870
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3873
status = hdspm_read(hdspm, HDSPM_RD_STATUS_3);
sound/pci/rme9652/hdspm.c
3879
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
3885
status = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
3902
static int hdspm_aes_sync_check(struct hdspm *hdspm, int idx)
sound/pci/rme9652/hdspm.c
3905
status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
3917
static int hdspm_tco_input_check(struct hdspm *hdspm, u32 mask)
sound/pci/rme9652/hdspm.c
3920
status = hdspm_read(hdspm, HDSPM_RD_TCO + 4);
sound/pci/rme9652/hdspm.c
3926
static int hdspm_tco_sync_check(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
3930
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
3931
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3933
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
3942
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
3952
status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
sound/pci/rme9652/hdspm.c
3972
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
3975
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
3979
val = hdspm_wc_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
3981
val = hdspm_tco_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
3983
val = hdspm_sync_in_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
3985
val = hdspm_s1_sync_check(hdspm,
sound/pci/rme9652/hdspm.c
3993
val = hdspm_wc_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
3995
val = hdspm_tco_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
3997
val = hdspm_sync_in_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
3999
val = hdspm_s1_sync_check(hdspm,
sound/pci/rme9652/hdspm.c
4007
val = hdspm_wc_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
4009
val = hdspm_madi_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
4011
val = hdspm_tco_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
4013
val = hdspm_sync_in_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
4018
val = hdspm_madi_sync_check(hdspm); /* MADI */
sound/pci/rme9652/hdspm.c
4024
val = hdspm_wc_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
4026
val = hdspm_tco_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
4028
val = hdspm_sync_in_sync_check(hdspm); break;
sound/pci/rme9652/hdspm.c
4030
val = hdspm_aes_sync_check(hdspm,
sound/pci/rme9652/hdspm.c
4037
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
4041
val = hdspm_tco_input_check(hdspm, HDSPM_TCO1_TCO_lock);
sound/pci/rme9652/hdspm.c
4045
val = hdspm_tco_input_check(hdspm,
sound/pci/rme9652/hdspm.c
4065
static void hdspm_tco_write(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
4069
switch (hdspm->tco->input) {
sound/pci/rme9652/hdspm.c
4080
switch (hdspm->tco->framerate) {
sound/pci/rme9652/hdspm.c
4104
switch (hdspm->tco->wordclock) {
sound/pci/rme9652/hdspm.c
4115
switch (hdspm->tco->samplerate) {
sound/pci/rme9652/hdspm.c
4126
switch (hdspm->tco->pull) {
sound/pci/rme9652/hdspm.c
4143
if (1 == hdspm->tco->term) {
sound/pci/rme9652/hdspm.c
4147
hdspm_write(hdspm, HDSPM_WR_TCO, tc[0]);
sound/pci/rme9652/hdspm.c
4148
hdspm_write(hdspm, HDSPM_WR_TCO+4, tc[1]);
sound/pci/rme9652/hdspm.c
4149
hdspm_write(hdspm, HDSPM_WR_TCO+8, tc[2]);
sound/pci/rme9652/hdspm.c
4150
hdspm_write(hdspm, HDSPM_WR_TCO+12, tc[3]);
sound/pci/rme9652/hdspm.c
4177
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4179
ucontrol->value.enumerated.item[0] = hdspm->tco->samplerate;
sound/pci/rme9652/hdspm.c
4187
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4189
if (hdspm->tco->samplerate != ucontrol->value.enumerated.item[0]) {
sound/pci/rme9652/hdspm.c
4190
hdspm->tco->samplerate = ucontrol->value.enumerated.item[0];
sound/pci/rme9652/hdspm.c
4192
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
4224
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4226
ucontrol->value.enumerated.item[0] = hdspm->tco->pull;
sound/pci/rme9652/hdspm.c
4234
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4236
if (hdspm->tco->pull != ucontrol->value.enumerated.item[0]) {
sound/pci/rme9652/hdspm.c
4237
hdspm->tco->pull = ucontrol->value.enumerated.item[0];
sound/pci/rme9652/hdspm.c
4239
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
4269
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4271
ucontrol->value.enumerated.item[0] = hdspm->tco->wordclock;
sound/pci/rme9652/hdspm.c
4279
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4281
if (hdspm->tco->wordclock != ucontrol->value.enumerated.item[0]) {
sound/pci/rme9652/hdspm.c
4282
hdspm->tco->wordclock = ucontrol->value.enumerated.item[0];
sound/pci/rme9652/hdspm.c
4284
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
4316
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4318
ucontrol->value.enumerated.item[0] = hdspm->tco->framerate;
sound/pci/rme9652/hdspm.c
4326
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4328
if (hdspm->tco->framerate != ucontrol->value.enumerated.item[0]) {
sound/pci/rme9652/hdspm.c
4329
hdspm->tco->framerate = ucontrol->value.enumerated.item[0];
sound/pci/rme9652/hdspm.c
4331
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
4362
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4364
ucontrol->value.enumerated.item[0] = hdspm->tco->input;
sound/pci/rme9652/hdspm.c
4372
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4374
if (hdspm->tco->input != ucontrol->value.enumerated.item[0]) {
sound/pci/rme9652/hdspm.c
4375
hdspm->tco->input = ucontrol->value.enumerated.item[0];
sound/pci/rme9652/hdspm.c
4377
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
4412
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4414
ucontrol->value.integer.value[0] = hdspm->tco->term;
sound/pci/rme9652/hdspm.c
4423
struct hdspm *hdspm = snd_kcontrol_chip(kcontrol);
sound/pci/rme9652/hdspm.c
4425
if (hdspm->tco->term != ucontrol->value.integer.value[0]) {
sound/pci/rme9652/hdspm.c
4426
hdspm->tco->term = ucontrol->value.integer.value[0];
sound/pci/rme9652/hdspm.c
4428
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
4602
static int hdspm_update_simple_mixer_controls(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
4606
for (i = hdspm->ds_out_channels; i < hdspm->ss_out_channels; ++i) {
sound/pci/rme9652/hdspm.c
4607
if (hdspm->system_sample_rate > 48000) {
sound/pci/rme9652/hdspm.c
4608
hdspm->playback_mixer_ctls[i]->vd[0].access =
sound/pci/rme9652/hdspm.c
4613
hdspm->playback_mixer_ctls[i]->vd[0].access =
sound/pci/rme9652/hdspm.c
4617
snd_ctl_notify(hdspm->card, SNDRV_CTL_EVENT_MASK_VALUE |
sound/pci/rme9652/hdspm.c
4619
&hdspm->playback_mixer_ctls[i]->id);
sound/pci/rme9652/hdspm.c
4627
struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
4634
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
4660
snd_ctl_new1(&list[idx], hdspm));
sound/pci/rme9652/hdspm.c
4669
if (hdspm->system_sample_rate >= 128000) {
sound/pci/rme9652/hdspm.c
4670
limit = hdspm->qs_out_channels;
sound/pci/rme9652/hdspm.c
4671
} else if (hdspm->system_sample_rate >= 64000) {
sound/pci/rme9652/hdspm.c
4672
limit = hdspm->ds_out_channels;
sound/pci/rme9652/hdspm.c
4674
limit = hdspm->ss_out_channels;
sound/pci/rme9652/hdspm.c
4678
kctl = snd_ctl_new1(&snd_hdspm_playback_mixer, hdspm);
sound/pci/rme9652/hdspm.c
4682
hdspm->playback_mixer_ctls[idx] = kctl;
sound/pci/rme9652/hdspm.c
4686
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
4692
snd_ctl_new1(&list[idx], hdspm));
sound/pci/rme9652/hdspm.c
4709
struct hdspm *hdspm = entry->private_data;
sound/pci/rme9652/hdspm.c
4718
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
4719
control = hdspm->control_register;
sound/pci/rme9652/hdspm.c
4724
a = hdspm_read(hdspm, HDSPM_RD_TCO+4);
sound/pci/rme9652/hdspm.c
4763
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
4776
period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ);
sound/pci/rme9652/hdspm.c
4792
ltc = hdspm_read(hdspm, HDSPM_RD_TCO);
sound/pci/rme9652/hdspm.c
4821
struct hdspm *hdspm = entry->private_data;
sound/pci/rme9652/hdspm.c
4829
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
4830
status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
4833
hdspm->card_name, hdspm->card->number + 1,
sound/pci/rme9652/hdspm.c
4834
hdspm->firmware_rev,
sound/pci/rme9652/hdspm.c
4840
(hdspm_read(hdspm, HDSPM_midiStatusIn1)>>8) & 0xFFFFFF,
sound/pci/rme9652/hdspm.c
4841
hdspm->serial);
sound/pci/rme9652/hdspm.c
4844
hdspm->irq, hdspm->port, (unsigned long)hdspm->iobase);
sound/pci/rme9652/hdspm.c
4853
hdspm->irq_count);
sound/pci/rme9652/hdspm.c
4860
(2 * (int)hdspm->period_bytes),
sound/pci/rme9652/hdspm.c
4862
(2 * (int)hdspm->period_bytes),
sound/pci/rme9652/hdspm.c
4863
(long) hdspm_hw_pointer(hdspm) * 4);
sound/pci/rme9652/hdspm.c
4867
hdspm_read(hdspm, HDSPM_midiStatusOut0) & 0xFF,
sound/pci/rme9652/hdspm.c
4868
hdspm_read(hdspm, HDSPM_midiStatusOut1) & 0xFF,
sound/pci/rme9652/hdspm.c
4869
hdspm_read(hdspm, HDSPM_midiStatusIn0) & 0xFF,
sound/pci/rme9652/hdspm.c
4870
hdspm_read(hdspm, HDSPM_midiStatusIn1) & 0xFF);
sound/pci/rme9652/hdspm.c
4873
hdspm_read(hdspm, HDSPM_midiStatusIn2) & 0xFF,
sound/pci/rme9652/hdspm.c
4874
hdspm_read(hdspm, HDSPM_midiStatusOut2) & 0xFF);
sound/pci/rme9652/hdspm.c
4878
hdspm->control_register, hdspm->control2_register,
sound/pci/rme9652/hdspm.c
4884
x = hdspm_get_latency(hdspm);
sound/pci/rme9652/hdspm.c
4888
x, (unsigned long) hdspm->period_bytes);
sound/pci/rme9652/hdspm.c
4891
str_on_off(hdspm->control_register & HDSPM_LineOut));
sound/pci/rme9652/hdspm.c
4896
str_on_off(hdspm->control_register & HDSPM_clr_tms),
sound/pci/rme9652/hdspm.c
4897
(hdspm->control_register & HDSPM_TX_64ch) ? "64" : "56",
sound/pci/rme9652/hdspm.c
4898
str_on_off(hdspm->control_register & HDSPM_AutoInp));
sound/pci/rme9652/hdspm.c
4901
if (!(hdspm->control_register & HDSPM_ClockModeMaster))
sound/pci/rme9652/hdspm.c
4907
switch (hdspm_pref_sync_ref(hdspm)) {
sound/pci/rme9652/hdspm.c
4928
hdspm->system_sample_rate);
sound/pci/rme9652/hdspm.c
4942
switch (hdspm_autosync_ref(hdspm)) {
sound/pci/rme9652/hdspm.c
4964
autosync_ref, hdspm_external_sample_rate(hdspm),
sound/pci/rme9652/hdspm.c
4983
struct hdspm *hdspm = entry->private_data;
sound/pci/rme9652/hdspm.c
4992
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
4993
status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
4994
timecode = hdspm_read(hdspm, HDSPM_timecodeRegister);
sound/pci/rme9652/hdspm.c
4997
hdspm->card_name, hdspm->card->number + 1,
sound/pci/rme9652/hdspm.c
4998
hdspm->firmware_rev);
sound/pci/rme9652/hdspm.c
5001
hdspm->irq, hdspm->port, (unsigned long)hdspm->iobase);
sound/pci/rme9652/hdspm.c
5010
hdspm->irq_count);
sound/pci/rme9652/hdspm.c
5017
(2 * (int)hdspm->period_bytes),
sound/pci/rme9652/hdspm.c
5019
(2 * (int)hdspm->period_bytes),
sound/pci/rme9652/hdspm.c
5020
(long) hdspm_hw_pointer(hdspm) * 4);
sound/pci/rme9652/hdspm.c
5024
hdspm_read(hdspm, HDSPM_midiStatusOut0) & 0xFF,
sound/pci/rme9652/hdspm.c
5025
hdspm_read(hdspm, HDSPM_midiStatusOut1) & 0xFF,
sound/pci/rme9652/hdspm.c
5026
hdspm_read(hdspm, HDSPM_midiStatusIn0) & 0xFF,
sound/pci/rme9652/hdspm.c
5027
hdspm_read(hdspm, HDSPM_midiStatusIn1) & 0xFF);
sound/pci/rme9652/hdspm.c
5030
hdspm_read(hdspm, HDSPM_midiStatusIn2) & 0xFF,
sound/pci/rme9652/hdspm.c
5031
hdspm_read(hdspm, HDSPM_midiStatusOut2) & 0xFF);
sound/pci/rme9652/hdspm.c
5035
hdspm->control_register, hdspm->control2_register,
sound/pci/rme9652/hdspm.c
5040
x = hdspm_get_latency(hdspm);
sound/pci/rme9652/hdspm.c
5044
x, (unsigned long) hdspm->period_bytes);
sound/pci/rme9652/hdspm.c
5047
(hdspm->
sound/pci/rme9652/hdspm.c
5052
str_on_off(hdspm->control_register & HDSPM_clr_tms),
sound/pci/rme9652/hdspm.c
5053
str_on_off(hdspm->control_register & HDSPM_Emphasis),
sound/pci/rme9652/hdspm.c
5054
str_on_off(hdspm->control_register & HDSPM_Dolby));
sound/pci/rme9652/hdspm.c
5057
pref_syncref = hdspm_pref_sync_ref(hdspm);
sound/pci/rme9652/hdspm.c
5065
hdspm->system_sample_rate);
sound/pci/rme9652/hdspm.c
5068
hdspm->control_register & HDSPM_DS_DoubleWire?
sound/pci/rme9652/hdspm.c
5071
hdspm->control_register & HDSPM_QS_DoubleWire?
sound/pci/rme9652/hdspm.c
5073
hdspm->control_register & HDSPM_QS_QuadWire?
sound/pci/rme9652/hdspm.c
5093
switch (hdspm_autosync_ref(hdspm)) {
sound/pci/rme9652/hdspm.c
5133
struct hdspm *hdspm = entry->private_data;
sound/pci/rme9652/hdspm.c
5137
status1 = hdspm_read(hdspm, HDSPM_RD_STATUS_1); /* s1 */
sound/pci/rme9652/hdspm.c
5138
status2 = hdspm_read(hdspm, HDSPM_RD_STATUS_2); /* freq */
sound/pci/rme9652/hdspm.c
5139
status3 = hdspm_read(hdspm, HDSPM_RD_STATUS_3); /* s2 */
sound/pci/rme9652/hdspm.c
5149
(hdspm_system_clock_mode(hdspm) == 0) ? "master" : "slave");
sound/pci/rme9652/hdspm.c
5151
hdspm_get_system_sample_rate(hdspm));
sound/pci/rme9652/hdspm.c
5191
struct hdspm *hdspm = entry->private_data;
sound/pci/rme9652/hdspm.c
5198
snd_iprintf(buffer, "%08X ", hdspm_read(hdspm, i + j));
sound/pci/rme9652/hdspm.c
5208
struct hdspm *hdspm = entry->private_data;
sound/pci/rme9652/hdspm.c
5213
for (i = 0; i < hdspm->max_channels_in; i++) {
sound/pci/rme9652/hdspm.c
5214
snd_iprintf(buffer, "%d=%s\n", i+1, hdspm->port_names_in[i]);
sound/pci/rme9652/hdspm.c
5221
struct hdspm *hdspm = entry->private_data;
sound/pci/rme9652/hdspm.c
5226
for (i = 0; i < hdspm->max_channels_out; i++) {
sound/pci/rme9652/hdspm.c
5227
snd_iprintf(buffer, "%d=%s\n", i+1, hdspm->port_names_out[i]);
sound/pci/rme9652/hdspm.c
5232
static void snd_hdspm_proc_init(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
5236
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
5253
snd_card_ro_proc_new(hdspm->card, "hdspm", hdspm, read);
sound/pci/rme9652/hdspm.c
5254
snd_card_ro_proc_new(hdspm->card, "ports.in", hdspm,
sound/pci/rme9652/hdspm.c
5256
snd_card_ro_proc_new(hdspm->card, "ports.out", hdspm,
sound/pci/rme9652/hdspm.c
5261
snd_card_ro_proc_new(hdspm->card, "debug", hdspm,
sound/pci/rme9652/hdspm.c
5270
static int snd_hdspm_set_defaults(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
5278
hdspm->settings_register = 0;
sound/pci/rme9652/hdspm.c
5280
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
5283
hdspm->control_register =
sound/pci/rme9652/hdspm.c
5289
hdspm->settings_register = 0x1 + 0x1000;
sound/pci/rme9652/hdspm.c
5292
hdspm->control_register =
sound/pci/rme9652/hdspm.c
5297
hdspm->control_register =
sound/pci/rme9652/hdspm.c
5306
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
5308
if (AES32 == hdspm->io_type) {
sound/pci/rme9652/hdspm.c
5311
hdspm->control2_register = HDSPM_BIGENDIAN_MODE;
sound/pci/rme9652/hdspm.c
5313
hdspm->control2_register = 0;
sound/pci/rme9652/hdspm.c
5316
hdspm_write(hdspm, HDSPM_control2Reg, hdspm->control2_register);
sound/pci/rme9652/hdspm.c
5318
hdspm_compute_period_size(hdspm);
sound/pci/rme9652/hdspm.c
5322
all_in_all_mixer(hdspm, 0 * UNITY_GAIN);
sound/pci/rme9652/hdspm.c
5324
if (hdspm_is_raydat_or_aio(hdspm))
sound/pci/rme9652/hdspm.c
5325
hdspm_write(hdspm, HDSPM_WR_SETTINGS, hdspm->settings_register);
sound/pci/rme9652/hdspm.c
5328
hdspm_set_rate(hdspm, 48000, 1);
sound/pci/rme9652/hdspm.c
5340
struct hdspm *hdspm = (struct hdspm *) dev_id;
sound/pci/rme9652/hdspm.c
5345
status = hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
5371
hdspm_write(hdspm, HDSPM_interruptConfirmation, 0);
sound/pci/rme9652/hdspm.c
5372
hdspm->irq_count++;
sound/pci/rme9652/hdspm.c
5376
if (hdspm->capture_substream)
sound/pci/rme9652/hdspm.c
5377
snd_pcm_period_elapsed(hdspm->capture_substream);
sound/pci/rme9652/hdspm.c
5379
if (hdspm->playback_substream)
sound/pci/rme9652/hdspm.c
5380
snd_pcm_period_elapsed(hdspm->playback_substream);
sound/pci/rme9652/hdspm.c
5385
while (i < hdspm->midiPorts) {
sound/pci/rme9652/hdspm.c
5386
if ((hdspm_read(hdspm,
sound/pci/rme9652/hdspm.c
5387
hdspm->midi[i].statusIn) & 0xff) &&
sound/pci/rme9652/hdspm.c
5388
(status & hdspm->midi[i].irq)) {
sound/pci/rme9652/hdspm.c
5392
hdspm->control_register &= ~hdspm->midi[i].ie;
sound/pci/rme9652/hdspm.c
5393
hdspm_write(hdspm, HDSPM_controlRegister,
sound/pci/rme9652/hdspm.c
5394
hdspm->control_register);
sound/pci/rme9652/hdspm.c
5395
hdspm->midi[i].pending = 1;
sound/pci/rme9652/hdspm.c
5403
queue_work(system_highpri_wq, &hdspm->midi_work);
sound/pci/rme9652/hdspm.c
5417
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
5418
return hdspm_hw_pointer(hdspm);
sound/pci/rme9652/hdspm.c
5425
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
5429
other = hdspm->capture_substream;
sound/pci/rme9652/hdspm.c
5431
other = hdspm->playback_substream;
sound/pci/rme9652/hdspm.c
5433
if (hdspm->running)
sound/pci/rme9652/hdspm.c
5434
runtime->status->hw_ptr = hdspm_hw_pointer(hdspm);
sound/pci/rme9652/hdspm.c
5454
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
5460
scoped_guard(spinlock_irq, &hdspm->lock) {
sound/pci/rme9652/hdspm.c
5463
this_pid = hdspm->playback_pid;
sound/pci/rme9652/hdspm.c
5464
other_pid = hdspm->capture_pid;
sound/pci/rme9652/hdspm.c
5466
this_pid = hdspm->capture_pid;
sound/pci/rme9652/hdspm.c
5467
other_pid = hdspm->playback_pid;
sound/pci/rme9652/hdspm.c
5477
if (params_rate(params) != hdspm->system_sample_rate) {
sound/pci/rme9652/hdspm.c
5483
if (params_period_size(params) != hdspm->period_bytes / 4) {
sound/pci/rme9652/hdspm.c
5495
scoped_guard(spinlock_irq, &hdspm->lock) {
sound/pci/rme9652/hdspm.c
5496
err = hdspm_set_rate(hdspm, params_rate(params), 0);
sound/pci/rme9652/hdspm.c
5498
dev_info(hdspm->card->dev, "err on hdspm_set_rate: %d\n", err);
sound/pci/rme9652/hdspm.c
5505
err = hdspm_set_interrupt_interval(hdspm,
sound/pci/rme9652/hdspm.c
5508
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5525
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5533
int c = hdspm->channel_map_out[i];
sound/pci/rme9652/hdspm.c
5537
hdspm_set_channel_dma_addr(hdspm, substream,
sound/pci/rme9652/hdspm.c
5540
snd_hdspm_enable_out(hdspm, c, 1);
sound/pci/rme9652/hdspm.c
5543
hdspm->playback_buffer =
sound/pci/rme9652/hdspm.c
5545
dev_dbg(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5547
hdspm->playback_buffer);
sound/pci/rme9652/hdspm.c
5550
int c = hdspm->channel_map_in[i];
sound/pci/rme9652/hdspm.c
5554
hdspm_set_channel_dma_addr(hdspm, substream,
sound/pci/rme9652/hdspm.c
5557
snd_hdspm_enable_in(hdspm, c, 1);
sound/pci/rme9652/hdspm.c
5560
hdspm->capture_buffer =
sound/pci/rme9652/hdspm.c
5562
dev_dbg(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5564
hdspm->capture_buffer);
sound/pci/rme9652/hdspm.c
5587
if (hdspm->io_type == AES32) {
sound/pci/rme9652/hdspm.c
5594
if (!(hdspm->control_register & HDSPe_FLOAT_FORMAT))
sound/pci/rme9652/hdspm.c
5595
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5598
hdspm->control_register |= HDSPe_FLOAT_FORMAT;
sound/pci/rme9652/hdspm.c
5600
if (hdspm->control_register & HDSPe_FLOAT_FORMAT)
sound/pci/rme9652/hdspm.c
5601
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5604
hdspm->control_register &= ~HDSPe_FLOAT_FORMAT;
sound/pci/rme9652/hdspm.c
5606
hdspm_write(hdspm, HDSPM_controlRegister, hdspm->control_register);
sound/pci/rme9652/hdspm.c
5614
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
5620
snd_hdspm_enable_out(hdspm, i, 0);
sound/pci/rme9652/hdspm.c
5622
hdspm->playback_buffer = NULL;
sound/pci/rme9652/hdspm.c
5625
snd_hdspm_enable_in(hdspm, i, 0);
sound/pci/rme9652/hdspm.c
5627
hdspm->capture_buffer = NULL;
sound/pci/rme9652/hdspm.c
5639
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
5643
if (snd_BUG_ON(channel >= hdspm->max_channels_out)) {
sound/pci/rme9652/hdspm.c
5644
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5650
channel = array_index_nospec(channel, hdspm->max_channels_out);
sound/pci/rme9652/hdspm.c
5651
if (hdspm->channel_map_out[channel] < 0) {
sound/pci/rme9652/hdspm.c
5652
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5658
info->offset = hdspm->channel_map_out[channel] *
sound/pci/rme9652/hdspm.c
5661
if (snd_BUG_ON(channel >= hdspm->max_channels_in)) {
sound/pci/rme9652/hdspm.c
5662
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5668
channel = array_index_nospec(channel, hdspm->max_channels_in);
sound/pci/rme9652/hdspm.c
5669
if (hdspm->channel_map_in[channel] < 0) {
sound/pci/rme9652/hdspm.c
5670
dev_info(hdspm->card->dev,
sound/pci/rme9652/hdspm.c
5676
info->offset = hdspm->channel_map_in[channel] *
sound/pci/rme9652/hdspm.c
5707
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
5711
guard(spinlock)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
5712
running = hdspm->running;
sound/pci/rme9652/hdspm.c
5725
other = hdspm->capture_substream;
sound/pci/rme9652/hdspm.c
5727
other = hdspm->playback_substream;
sound/pci/rme9652/hdspm.c
5745
hdspm_silence_playback(hdspm);
sound/pci/rme9652/hdspm.c
5749
hdspm_silence_playback(hdspm);
sound/pci/rme9652/hdspm.c
5753
hdspm_silence_playback(hdspm);
sound/pci/rme9652/hdspm.c
5757
if (!hdspm->running && running)
sound/pci/rme9652/hdspm.c
5758
hdspm_start_audio(hdspm);
sound/pci/rme9652/hdspm.c
5759
else if (hdspm->running && !running)
sound/pci/rme9652/hdspm.c
5760
hdspm_stop_audio(hdspm);
sound/pci/rme9652/hdspm.c
5761
hdspm->running = running;
sound/pci/rme9652/hdspm.c
5824
struct hdspm *hdspm = rule->private;
sound/pci/rme9652/hdspm.c
5832
.min = hdspm->qs_in_channels,
sound/pci/rme9652/hdspm.c
5833
.max = hdspm->qs_in_channels,
sound/pci/rme9652/hdspm.c
5839
.min = hdspm->ds_in_channels,
sound/pci/rme9652/hdspm.c
5840
.max = hdspm->ds_in_channels,
sound/pci/rme9652/hdspm.c
5846
.min = hdspm->ss_in_channels,
sound/pci/rme9652/hdspm.c
5847
.max = hdspm->ss_in_channels,
sound/pci/rme9652/hdspm.c
5859
struct hdspm *hdspm = rule->private;
sound/pci/rme9652/hdspm.c
5867
.min = hdspm->qs_out_channels,
sound/pci/rme9652/hdspm.c
5868
.max = hdspm->qs_out_channels,
sound/pci/rme9652/hdspm.c
5874
.min = hdspm->ds_out_channels,
sound/pci/rme9652/hdspm.c
5875
.max = hdspm->ds_out_channels,
sound/pci/rme9652/hdspm.c
5881
.min = hdspm->ss_out_channels,
sound/pci/rme9652/hdspm.c
5882
.max = hdspm->ss_out_channels,
sound/pci/rme9652/hdspm.c
5894
struct hdspm *hdspm = rule->private;
sound/pci/rme9652/hdspm.c
5900
if (c->min >= hdspm->ss_in_channels) {
sound/pci/rme9652/hdspm.c
5907
} else if (c->max <= hdspm->qs_in_channels) {
sound/pci/rme9652/hdspm.c
5914
} else if (c->max <= hdspm->ds_in_channels) {
sound/pci/rme9652/hdspm.c
5928
struct hdspm *hdspm = rule->private;
sound/pci/rme9652/hdspm.c
5934
if (c->min >= hdspm->ss_out_channels) {
sound/pci/rme9652/hdspm.c
5941
} else if (c->max <= hdspm->qs_out_channels) {
sound/pci/rme9652/hdspm.c
5948
} else if (c->max <= hdspm->ds_out_channels) {
sound/pci/rme9652/hdspm.c
5964
struct hdspm *hdspm = rule->private;
sound/pci/rme9652/hdspm.c
5968
list[0] = hdspm->qs_in_channels;
sound/pci/rme9652/hdspm.c
5969
list[1] = hdspm->ds_in_channels;
sound/pci/rme9652/hdspm.c
5970
list[2] = hdspm->ss_in_channels;
sound/pci/rme9652/hdspm.c
5978
struct hdspm *hdspm = rule->private;
sound/pci/rme9652/hdspm.c
5982
list[0] = hdspm->qs_out_channels;
sound/pci/rme9652/hdspm.c
5983
list[1] = hdspm->ds_out_channels;
sound/pci/rme9652/hdspm.c
5984
list[2] = hdspm->ss_out_channels;
sound/pci/rme9652/hdspm.c
5990
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
5994
scoped_guard(spinlock_irq, &hdspm->lock) {
sound/pci/rme9652/hdspm.c
6000
if (!hdspm->capture_substream)
sound/pci/rme9652/hdspm.c
6001
hdspm_stop_audio(hdspm);
sound/pci/rme9652/hdspm.c
6003
hdspm->playback_pid = current->pid;
sound/pci/rme9652/hdspm.c
6004
hdspm->playback_substream = substream;
sound/pci/rme9652/hdspm.c
6006
if (!hdspm->playback_substream)
sound/pci/rme9652/hdspm.c
6007
hdspm_stop_audio(hdspm);
sound/pci/rme9652/hdspm.c
6009
hdspm->capture_pid = current->pid;
sound/pci/rme9652/hdspm.c
6010
hdspm->capture_substream = substream;
sound/pci/rme9652/hdspm.c
6017
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
6038
if (AES32 == hdspm->io_type) {
sound/pci/rme9652/hdspm.c
6044
snd_hdspm_hw_rule_rate_in_channels), hdspm,
sound/pci/rme9652/hdspm.c
6050
snd_hdspm_hw_rule_in_channels), hdspm,
sound/pci/rme9652/hdspm.c
6055
snd_hdspm_hw_rule_in_channels_rate), hdspm,
sound/pci/rme9652/hdspm.c
6063
struct hdspm *hdspm = snd_pcm_substream_chip(substream);
sound/pci/rme9652/hdspm.c
6066
guard(spinlock_irq)(&hdspm->lock);
sound/pci/rme9652/hdspm.c
6069
hdspm->playback_pid = -1;
sound/pci/rme9652/hdspm.c
6070
hdspm->playback_substream = NULL;
sound/pci/rme9652/hdspm.c
6072
hdspm->capture_pid = -1;
sound/pci/rme9652/hdspm.c
6073
hdspm->capture_substream = NULL;
sound/pci/rme9652/hdspm.c
6089
struct hdspm *hdspm = hw->private_data;
sound/pci/rme9652/hdspm.c
6103
levels = &hdspm->peak_rms;
sound/pci/rme9652/hdspm.c
6106
readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6109
readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6112
readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6116
((uint64_t) readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6118
(uint64_t) readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6121
((uint64_t)readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6123
(uint64_t)readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6126
((uint64_t)readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6128
(uint64_t)readl(hdspm->iobase +
sound/pci/rme9652/hdspm.c
6132
if (hdspm->system_sample_rate > 96000) {
sound/pci/rme9652/hdspm.c
6134
} else if (hdspm->system_sample_rate > 48000) {
sound/pci/rme9652/hdspm.c
6139
levels->status2 = hdspm_read(hdspm, HDSPM_statusRegister2);
sound/pci/rme9652/hdspm.c
6151
ltc.ltc = hdspm_read(hdspm, HDSPM_RD_TCO);
sound/pci/rme9652/hdspm.c
6152
i = hdspm_read(hdspm, HDSPM_RD_TCO + 4);
sound/pci/rme9652/hdspm.c
6198
scoped_guard(spinlock_irq, &hdspm->lock) {
sound/pci/rme9652/hdspm.c
6199
info.pref_sync_ref = hdspm_pref_sync_ref(hdspm);
sound/pci/rme9652/hdspm.c
6200
info.wordclock_sync_check = hdspm_wc_sync_check(hdspm);
sound/pci/rme9652/hdspm.c
6202
info.system_sample_rate = hdspm->system_sample_rate;
sound/pci/rme9652/hdspm.c
6204
hdspm_external_sample_rate(hdspm);
sound/pci/rme9652/hdspm.c
6205
info.system_clock_mode = hdspm_system_clock_mode(hdspm);
sound/pci/rme9652/hdspm.c
6206
info.clock_source = hdspm_clock_source(hdspm);
sound/pci/rme9652/hdspm.c
6207
info.autosync_ref = hdspm_autosync_ref(hdspm);
sound/pci/rme9652/hdspm.c
6208
info.line_out = hdspm_toggle_setting(hdspm, HDSPM_LineOut);
sound/pci/rme9652/hdspm.c
6218
status.card_type = hdspm->io_type;
sound/pci/rme9652/hdspm.c
6220
status.autosync_source = hdspm_autosync_ref(hdspm);
sound/pci/rme9652/hdspm.c
6223
status.master_period = hdspm_read(hdspm, HDSPM_RD_PLL_FREQ);
sound/pci/rme9652/hdspm.c
6225
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
6229
hdspm_wc_sync_check(hdspm);
sound/pci/rme9652/hdspm.c
6231
hdspm_madi_sync_check(hdspm);
sound/pci/rme9652/hdspm.c
6233
hdspm_tco_sync_check(hdspm);
sound/pci/rme9652/hdspm.c
6235
hdspm_sync_in_sync_check(hdspm);
sound/pci/rme9652/hdspm.c
6238
hdspm_read(hdspm, HDSPM_statusRegister);
sound/pci/rme9652/hdspm.c
6260
hdspm_version.card_type = hdspm->io_type;
sound/pci/rme9652/hdspm.c
6261
strscpy(hdspm_version.cardname, hdspm->card_name,
sound/pci/rme9652/hdspm.c
6263
hdspm_version.serial = hdspm->serial;
sound/pci/rme9652/hdspm.c
6264
hdspm_version.firmware_rev = hdspm->firmware_rev;
sound/pci/rme9652/hdspm.c
6266
if (hdspm->tco)
sound/pci/rme9652/hdspm.c
6277
if (copy_to_user((void __user *)mixer.mixer, hdspm->mixer,
sound/pci/rme9652/hdspm.c
6300
struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
6309
hdspm->hwdep = hw;
sound/pci/rme9652/hdspm.c
6310
hw->private_data = hdspm;
sound/pci/rme9652/hdspm.c
6325
static int snd_hdspm_preallocate_memory(struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
6330
pcm = hdspm->pcm;
sound/pci/rme9652/hdspm.c
6335
&hdspm->pci->dev,
sound/pci/rme9652/hdspm.c
6337
dev_dbg(hdspm->card->dev, " Preallocated %zd Bytes\n", wanted);
sound/pci/rme9652/hdspm.c
6343
static void hdspm_set_channel_dma_addr(struct hdspm *hdspm,
sound/pci/rme9652/hdspm.c
6350
hdspm_write(hdspm, reg + 4 * i,
sound/pci/rme9652/hdspm.c
6357
struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
6362
err = snd_pcm_new(card, hdspm->card_name, 0, 1, 1, &pcm);
sound/pci/rme9652/hdspm.c
6366
hdspm->pcm = pcm;
sound/pci/rme9652/hdspm.c
6367
pcm->private_data = hdspm;
sound/pci/rme9652/hdspm.c
6368
strscpy(pcm->name, hdspm->card_name);
sound/pci/rme9652/hdspm.c
6377
err = snd_hdspm_preallocate_memory(hdspm);
sound/pci/rme9652/hdspm.c
6384
static inline void snd_hdspm_initialize_midi_flush(struct hdspm * hdspm)
sound/pci/rme9652/hdspm.c
6388
for (i = 0; i < hdspm->midiPorts; i++)
sound/pci/rme9652/hdspm.c
6389
snd_hdspm_flush_midi_input(hdspm, i);
sound/pci/rme9652/hdspm.c
6393
struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
6398
err = snd_hdspm_create_pcm(card, hdspm);
sound/pci/rme9652/hdspm.c
6403
while (i < hdspm->midiPorts) {
sound/pci/rme9652/hdspm.c
6404
err = snd_hdspm_create_midi(card, hdspm, i);
sound/pci/rme9652/hdspm.c
6411
err = snd_hdspm_create_controls(card, hdspm);
sound/pci/rme9652/hdspm.c
6415
err = snd_hdspm_create_hwdep(card, hdspm);
sound/pci/rme9652/hdspm.c
6420
snd_hdspm_proc_init(hdspm);
sound/pci/rme9652/hdspm.c
6422
hdspm->system_sample_rate = -1;
sound/pci/rme9652/hdspm.c
6423
hdspm->last_external_sample_rate = -1;
sound/pci/rme9652/hdspm.c
6424
hdspm->last_internal_sample_rate = -1;
sound/pci/rme9652/hdspm.c
6425
hdspm->playback_pid = -1;
sound/pci/rme9652/hdspm.c
6426
hdspm->capture_pid = -1;
sound/pci/rme9652/hdspm.c
6427
hdspm->capture_substream = NULL;
sound/pci/rme9652/hdspm.c
6428
hdspm->playback_substream = NULL;
sound/pci/rme9652/hdspm.c
6431
err = snd_hdspm_set_defaults(hdspm);
sound/pci/rme9652/hdspm.c
6436
hdspm_update_simple_mixer_controls(hdspm);
sound/pci/rme9652/hdspm.c
6452
struct hdspm *hdspm)
sound/pci/rme9652/hdspm.c
6455
struct pci_dev *pci = hdspm->pci;
sound/pci/rme9652/hdspm.c
6459
hdspm->irq = -1;
sound/pci/rme9652/hdspm.c
6460
hdspm->card = card;
sound/pci/rme9652/hdspm.c
6462
spin_lock_init(&hdspm->lock);
sound/pci/rme9652/hdspm.c
6463
INIT_WORK(&hdspm->midi_work, hdspm_midi_work);
sound/pci/rme9652/hdspm.c
6465
pci_read_config_word(hdspm->pci,
sound/pci/rme9652/hdspm.c
6466
PCI_CLASS_REVISION, &hdspm->firmware_rev);
sound/pci/rme9652/hdspm.c
6471
switch (hdspm->firmware_rev) {
sound/pci/rme9652/hdspm.c
6473
hdspm->io_type = RayDAT;
sound/pci/rme9652/hdspm.c
6474
hdspm->card_name = "RME RayDAT";
sound/pci/rme9652/hdspm.c
6475
hdspm->midiPorts = 2;
sound/pci/rme9652/hdspm.c
6478
hdspm->io_type = AIO;
sound/pci/rme9652/hdspm.c
6479
hdspm->card_name = "RME AIO";
sound/pci/rme9652/hdspm.c
6480
hdspm->midiPorts = 1;
sound/pci/rme9652/hdspm.c
6483
hdspm->io_type = MADIface;
sound/pci/rme9652/hdspm.c
6484
hdspm->card_name = "RME MADIface";
sound/pci/rme9652/hdspm.c
6485
hdspm->midiPorts = 1;
sound/pci/rme9652/hdspm.c
6488
if ((hdspm->firmware_rev == 0xf0) ||
sound/pci/rme9652/hdspm.c
6489
((hdspm->firmware_rev >= 0xe6) &&
sound/pci/rme9652/hdspm.c
6490
(hdspm->firmware_rev <= 0xea))) {
sound/pci/rme9652/hdspm.c
6491
hdspm->io_type = AES32;
sound/pci/rme9652/hdspm.c
6492
hdspm->card_name = "RME AES32";
sound/pci/rme9652/hdspm.c
6493
hdspm->midiPorts = 2;
sound/pci/rme9652/hdspm.c
6494
} else if ((hdspm->firmware_rev == 0xd2) ||
sound/pci/rme9652/hdspm.c
6495
((hdspm->firmware_rev >= 0xc8) &&
sound/pci/rme9652/hdspm.c
6496
(hdspm->firmware_rev <= 0xcf))) {
sound/pci/rme9652/hdspm.c
6497
hdspm->io_type = MADI;
sound/pci/rme9652/hdspm.c
6498
hdspm->card_name = "RME MADI";
sound/pci/rme9652/hdspm.c
6499
hdspm->midiPorts = 3;
sound/pci/rme9652/hdspm.c
6503
hdspm->firmware_rev);
sound/pci/rme9652/hdspm.c
6512
pci_set_master(hdspm->pci);
sound/pci/rme9652/hdspm.c
6514
hdspm->iobase = pcim_iomap_region(pci, 0, "hdspm");
sound/pci/rme9652/hdspm.c
6515
if (IS_ERR(hdspm->iobase))
sound/pci/rme9652/hdspm.c
6516
return PTR_ERR(hdspm->iobase);
sound/pci/rme9652/hdspm.c
6518
hdspm->port = pci_resource_start(pci, 0);
sound/pci/rme9652/hdspm.c
6521
(unsigned long)hdspm->iobase, hdspm->port,
sound/pci/rme9652/hdspm.c
6522
hdspm->port + io_extent - 1);
sound/pci/rme9652/hdspm.c
6525
IRQF_SHARED, KBUILD_MODNAME, hdspm)) {
sound/pci/rme9652/hdspm.c
6532
hdspm->irq = pci->irq;
sound/pci/rme9652/hdspm.c
6533
card->sync_irq = hdspm->irq;
sound/pci/rme9652/hdspm.c
6536
sizeof(*hdspm->mixer));
sound/pci/rme9652/hdspm.c
6537
hdspm->mixer = devm_kzalloc(&pci->dev, sizeof(*hdspm->mixer), GFP_KERNEL);
sound/pci/rme9652/hdspm.c
6538
if (!hdspm->mixer)
sound/pci/rme9652/hdspm.c
6541
hdspm->port_names_in = NULL;
sound/pci/rme9652/hdspm.c
6542
hdspm->port_names_out = NULL;
sound/pci/rme9652/hdspm.c
6544
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
6546
hdspm->ss_in_channels = hdspm->ss_out_channels = AES32_CHANNELS;
sound/pci/rme9652/hdspm.c
6547
hdspm->ds_in_channels = hdspm->ds_out_channels = AES32_CHANNELS;
sound/pci/rme9652/hdspm.c
6548
hdspm->qs_in_channels = hdspm->qs_out_channels = AES32_CHANNELS;
sound/pci/rme9652/hdspm.c
6550
hdspm->channel_map_in_ss = hdspm->channel_map_out_ss =
sound/pci/rme9652/hdspm.c
6552
hdspm->channel_map_in_ds = hdspm->channel_map_out_ds =
sound/pci/rme9652/hdspm.c
6554
hdspm->channel_map_in_qs = hdspm->channel_map_out_qs =
sound/pci/rme9652/hdspm.c
6556
hdspm->port_names_in_ss = hdspm->port_names_out_ss =
sound/pci/rme9652/hdspm.c
6558
hdspm->port_names_in_ds = hdspm->port_names_out_ds =
sound/pci/rme9652/hdspm.c
6560
hdspm->port_names_in_qs = hdspm->port_names_out_qs =
sound/pci/rme9652/hdspm.c
6563
hdspm->max_channels_out = hdspm->max_channels_in =
sound/pci/rme9652/hdspm.c
6565
hdspm->port_names_in = hdspm->port_names_out =
sound/pci/rme9652/hdspm.c
6567
hdspm->channel_map_in = hdspm->channel_map_out =
sound/pci/rme9652/hdspm.c
6574
hdspm->ss_in_channels = hdspm->ss_out_channels =
sound/pci/rme9652/hdspm.c
6576
hdspm->ds_in_channels = hdspm->ds_out_channels =
sound/pci/rme9652/hdspm.c
6578
hdspm->qs_in_channels = hdspm->qs_out_channels =
sound/pci/rme9652/hdspm.c
6581
hdspm->channel_map_in_ss = hdspm->channel_map_out_ss =
sound/pci/rme9652/hdspm.c
6583
hdspm->channel_map_in_ds = hdspm->channel_map_out_ds =
sound/pci/rme9652/hdspm.c
6585
hdspm->channel_map_in_qs = hdspm->channel_map_out_qs =
sound/pci/rme9652/hdspm.c
6588
hdspm->port_names_in_ss = hdspm->port_names_out_ss =
sound/pci/rme9652/hdspm.c
6590
hdspm->port_names_in_ds = hdspm->port_names_out_ds =
sound/pci/rme9652/hdspm.c
6592
hdspm->port_names_in_qs = hdspm->port_names_out_qs =
sound/pci/rme9652/hdspm.c
6597
hdspm->ss_in_channels = AIO_IN_SS_CHANNELS;
sound/pci/rme9652/hdspm.c
6598
hdspm->ds_in_channels = AIO_IN_DS_CHANNELS;
sound/pci/rme9652/hdspm.c
6599
hdspm->qs_in_channels = AIO_IN_QS_CHANNELS;
sound/pci/rme9652/hdspm.c
6600
hdspm->ss_out_channels = AIO_OUT_SS_CHANNELS;
sound/pci/rme9652/hdspm.c
6601
hdspm->ds_out_channels = AIO_OUT_DS_CHANNELS;
sound/pci/rme9652/hdspm.c
6602
hdspm->qs_out_channels = AIO_OUT_QS_CHANNELS;
sound/pci/rme9652/hdspm.c
6604
if (0 == (hdspm_read(hdspm, HDSPM_statusRegister2) & HDSPM_s2_AEBI_D)) {
sound/pci/rme9652/hdspm.c
6606
hdspm->ss_in_channels += 4;
sound/pci/rme9652/hdspm.c
6607
hdspm->ds_in_channels += 4;
sound/pci/rme9652/hdspm.c
6608
hdspm->qs_in_channels += 4;
sound/pci/rme9652/hdspm.c
6611
if (0 == (hdspm_read(hdspm, HDSPM_statusRegister2) & HDSPM_s2_AEBO_D)) {
sound/pci/rme9652/hdspm.c
6613
hdspm->ss_out_channels += 4;
sound/pci/rme9652/hdspm.c
6614
hdspm->ds_out_channels += 4;
sound/pci/rme9652/hdspm.c
6615
hdspm->qs_out_channels += 4;
sound/pci/rme9652/hdspm.c
6618
hdspm->channel_map_out_ss = channel_map_aio_out_ss;
sound/pci/rme9652/hdspm.c
6619
hdspm->channel_map_out_ds = channel_map_aio_out_ds;
sound/pci/rme9652/hdspm.c
6620
hdspm->channel_map_out_qs = channel_map_aio_out_qs;
sound/pci/rme9652/hdspm.c
6622
hdspm->channel_map_in_ss = channel_map_aio_in_ss;
sound/pci/rme9652/hdspm.c
6623
hdspm->channel_map_in_ds = channel_map_aio_in_ds;
sound/pci/rme9652/hdspm.c
6624
hdspm->channel_map_in_qs = channel_map_aio_in_qs;
sound/pci/rme9652/hdspm.c
6626
hdspm->port_names_in_ss = texts_ports_aio_in_ss;
sound/pci/rme9652/hdspm.c
6627
hdspm->port_names_out_ss = texts_ports_aio_out_ss;
sound/pci/rme9652/hdspm.c
6628
hdspm->port_names_in_ds = texts_ports_aio_in_ds;
sound/pci/rme9652/hdspm.c
6629
hdspm->port_names_out_ds = texts_ports_aio_out_ds;
sound/pci/rme9652/hdspm.c
6630
hdspm->port_names_in_qs = texts_ports_aio_in_qs;
sound/pci/rme9652/hdspm.c
6631
hdspm->port_names_out_qs = texts_ports_aio_out_qs;
sound/pci/rme9652/hdspm.c
6636
hdspm->ss_in_channels = hdspm->ss_out_channels =
sound/pci/rme9652/hdspm.c
6638
hdspm->ds_in_channels = hdspm->ds_out_channels =
sound/pci/rme9652/hdspm.c
6640
hdspm->qs_in_channels = hdspm->qs_out_channels =
sound/pci/rme9652/hdspm.c
6643
hdspm->max_channels_in = RAYDAT_SS_CHANNELS;
sound/pci/rme9652/hdspm.c
6644
hdspm->max_channels_out = RAYDAT_SS_CHANNELS;
sound/pci/rme9652/hdspm.c
6646
hdspm->channel_map_in_ss = hdspm->channel_map_out_ss =
sound/pci/rme9652/hdspm.c
6648
hdspm->channel_map_in_ds = hdspm->channel_map_out_ds =
sound/pci/rme9652/hdspm.c
6650
hdspm->channel_map_in_qs = hdspm->channel_map_out_qs =
sound/pci/rme9652/hdspm.c
6652
hdspm->channel_map_in = hdspm->channel_map_out =
sound/pci/rme9652/hdspm.c
6655
hdspm->port_names_in_ss = hdspm->port_names_out_ss =
sound/pci/rme9652/hdspm.c
6657
hdspm->port_names_in_ds = hdspm->port_names_out_ds =
sound/pci/rme9652/hdspm.c
6659
hdspm->port_names_in_qs = hdspm->port_names_out_qs =
sound/pci/rme9652/hdspm.c
6668
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
6671
if (hdspm_read(hdspm, HDSPM_statusRegister2) &
sound/pci/rme9652/hdspm.c
6673
hdspm->midiPorts++;
sound/pci/rme9652/hdspm.c
6674
hdspm->tco = kzalloc_obj(*hdspm->tco);
sound/pci/rme9652/hdspm.c
6675
if (hdspm->tco)
sound/pci/rme9652/hdspm.c
6676
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
6680
hdspm->tco = NULL;
sound/pci/rme9652/hdspm.c
6686
if (hdspm_read(hdspm, HDSPM_statusRegister) & HDSPM_tco_detect) {
sound/pci/rme9652/hdspm.c
6687
hdspm->midiPorts++;
sound/pci/rme9652/hdspm.c
6688
hdspm->tco = kzalloc_obj(*hdspm->tco);
sound/pci/rme9652/hdspm.c
6689
if (hdspm->tco)
sound/pci/rme9652/hdspm.c
6690
hdspm_tco_write(hdspm);
sound/pci/rme9652/hdspm.c
6694
hdspm->tco = NULL;
sound/pci/rme9652/hdspm.c
6699
hdspm->tco = NULL;
sound/pci/rme9652/hdspm.c
6703
switch (hdspm->io_type) {
sound/pci/rme9652/hdspm.c
6705
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
6706
hdspm->texts_autosync = texts_autosync_aes_tco;
sound/pci/rme9652/hdspm.c
6707
hdspm->texts_autosync_items =
sound/pci/rme9652/hdspm.c
6710
hdspm->texts_autosync = texts_autosync_aes;
sound/pci/rme9652/hdspm.c
6711
hdspm->texts_autosync_items =
sound/pci/rme9652/hdspm.c
6717
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
6718
hdspm->texts_autosync = texts_autosync_madi_tco;
sound/pci/rme9652/hdspm.c
6719
hdspm->texts_autosync_items = 4;
sound/pci/rme9652/hdspm.c
6721
hdspm->texts_autosync = texts_autosync_madi;
sound/pci/rme9652/hdspm.c
6722
hdspm->texts_autosync_items = 3;
sound/pci/rme9652/hdspm.c
6731
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
6732
hdspm->texts_autosync = texts_autosync_raydat_tco;
sound/pci/rme9652/hdspm.c
6733
hdspm->texts_autosync_items = 9;
sound/pci/rme9652/hdspm.c
6735
hdspm->texts_autosync = texts_autosync_raydat;
sound/pci/rme9652/hdspm.c
6736
hdspm->texts_autosync_items = 8;
sound/pci/rme9652/hdspm.c
6741
if (hdspm->tco) {
sound/pci/rme9652/hdspm.c
6742
hdspm->texts_autosync = texts_autosync_aio_tco;
sound/pci/rme9652/hdspm.c
6743
hdspm->texts_autosync_items = 6;
sound/pci/rme9652/hdspm.c
6745
hdspm->texts_autosync = texts_autosync_aio;
sound/pci/rme9652/hdspm.c
6746
hdspm->texts_autosync_items = 5;
sound/pci/rme9652/hdspm.c
6752
if (hdspm->io_type != MADIface) {
sound/pci/rme9652/hdspm.c
6753
hdspm->serial = (hdspm_read(hdspm,
sound/pci/rme9652/hdspm.c
6764
if (!id[hdspm->dev] && hdspm->serial != 0xFFFFFF) {
sound/pci/rme9652/hdspm.c
6766
"HDSPMx%06x", hdspm->serial);
sound/pci/rme9652/hdspm.c
6772
err = snd_hdspm_create_alsa_devices(card, hdspm);
sound/pci/rme9652/hdspm.c
6776
snd_hdspm_initialize_midi_flush(hdspm);
sound/pci/rme9652/hdspm.c
6784
struct hdspm *hdspm = card->private_data;
sound/pci/rme9652/hdspm.c
6786
if (hdspm->port) {
sound/pci/rme9652/hdspm.c
6787
cancel_work_sync(&hdspm->midi_work);
sound/pci/rme9652/hdspm.c
6790
hdspm->control_register &=
sound/pci/rme9652/hdspm.c
6794
hdspm_write(hdspm, HDSPM_controlRegister,
sound/pci/rme9652/hdspm.c
6795
hdspm->control_register);
sound/pci/rme9652/hdspm.c
6804
struct hdspm *hdspm;
sound/pci/rme9652/hdspm.c
6816
THIS_MODULE, sizeof(*hdspm), &card);
sound/pci/rme9652/hdspm.c
6820
hdspm = card->private_data;
sound/pci/rme9652/hdspm.c
6822
hdspm->dev = dev;
sound/pci/rme9652/hdspm.c
6823
hdspm->pci = pci;
sound/pci/rme9652/hdspm.c
6825
err = snd_hdspm_create(card, hdspm);
sound/pci/rme9652/hdspm.c
6829
if (hdspm->io_type != MADIface) {
sound/pci/rme9652/hdspm.c
6831
hdspm->card_name, hdspm->serial);
sound/pci/rme9652/hdspm.c
6834
hdspm->card_name, hdspm->serial,
sound/pci/rme9652/hdspm.c
6835
hdspm->port, hdspm->irq);
sound/pci/rme9652/hdspm.c
6838
hdspm->card_name);
sound/pci/rme9652/hdspm.c
6841
hdspm->card_name, hdspm->port, hdspm->irq);
sound/pci/rme9652/hdspm.c
955
struct hdspm *hdspm;