Lines Matching +full:0 +full:x0f000000
10 #define LATTER_STF 0xffff00000004ULL
11 #define LATTER_ISOC_CHANNELS 0xffff00000008ULL
12 #define LATTER_ISOC_START 0xffff0000000cULL
13 #define LATTER_FETCH_MODE 0xffff00000010ULL
14 #define LATTER_SYNC_STATUS 0x0000801c0000ULL
19 // 0xf0000000: (unidentified)
20 // 0x0f000000: effective rate of sampling clock
21 // 0x00f00000: detected rate of word clock on BNC interface
22 // 0x000f0000: detected rate of ADAT or S/PDIF on optical interface
23 // 0x0000f000: detected rate of S/PDIF on coaxial interface
24 // 0x00000e00: effective source of sampling clock
25 // 0x00000e00: Internal
26 // 0x00000800: (unidentified)
27 // 0x00000600: Word clock on BNC interface
28 // 0x00000400: ADAT on optical interface
29 // 0x00000200: S/PDIF on coaxial or optical interface
30 // 0x00000100: Optical interface is used for ADAT signal
31 // 0x00000080: (unidentified)
32 // 0x00000040: Synchronized to word clock on BNC interface
33 // 0x00000020: Synchronized to ADAT or S/PDIF on optical interface
34 // 0x00000010: Synchronized to S/PDIF on coaxial interface
35 // 0x00000008: (unidentified)
36 // 0x00000004: Lock word clock on BNC interface
37 // 0x00000002: Lock ADAT or S/PDIF on optical interface
38 // 0x00000001: Lock S/PDIF on coaxial interface
41 // 0xf0000000: effective rate of sampling clock
42 // 0x0f000000: detected rate of ADAT-B on 2nd optical interface
43 // 0x00f00000: detected rate of ADAT-A on 1st optical interface
44 // 0x000f0000: detected rate of AES/EBU on XLR or coaxial interface
45 // 0x0000f000: detected rate of word clock on BNC interface
46 // 0x00000e00: effective source of sampling clock
47 // 0x00000e00: internal
48 // 0x00000800: ADAT-B
49 // 0x00000600: ADAT-A
50 // 0x00000400: AES/EBU
51 // 0x00000200: Word clock
52 // 0x00000080: Synchronized to ADAT-B on 2nd optical interface
53 // 0x00000040: Synchronized to ADAT-A on 1st optical interface
54 // 0x00000020: Synchronized to AES/EBU on XLR or 2nd optical interface
55 // 0x00000010: Synchronized to word clock on BNC interface
56 // 0x00000008: Lock ADAT-B on 2nd optical interface
57 // 0x00000004: Lock ADAT-A on 1st optical interface
58 // 0x00000002: Lock AES/EBU on XLR or 2nd optical interface
59 // 0x00000001: Lock word clock on BNC interface
62 // 0x00: 32.0 kHz
63 // 0x01: 44.1 kHz
64 // 0x02: 48.0 kHz
65 // 0x04: 64.0 kHz
66 // 0x05: 88.2 kHz
67 // 0x06: 96.0 kHz
68 // 0x08: 128.0 kHz
69 // 0x09: 176.4 kHz
70 // 0x0a: 192.0 kHz
79 { 32000, 0x00, }, in parse_clock_bits()
80 { 44100, 0x01, }, in parse_clock_bits()
81 { 48000, 0x02, }, in parse_clock_bits()
82 { 64000, 0x04, }, in parse_clock_bits()
83 { 88200, 0x05, }, in parse_clock_bits()
84 { 96000, 0x06, }, in parse_clock_bits()
85 { 128000, 0x08, }, in parse_clock_bits()
86 { 176400, 0x09, }, in parse_clock_bits()
87 { 192000, 0x0a, }, in parse_clock_bits()
93 { SND_FF_CLOCK_SRC_SPDIF, 0x00000200, }, in parse_clock_bits()
94 { SND_FF_CLOCK_SRC_ADAT1, 0x00000400, }, in parse_clock_bits()
95 { SND_FF_CLOCK_SRC_WORD, 0x00000600, }, in parse_clock_bits()
96 { SND_FF_CLOCK_SRC_INTERNAL, 0x00000e00, }, in parse_clock_bits()
98 { SND_FF_CLOCK_SRC_WORD, 0x00000200, }, in parse_clock_bits()
99 { SND_FF_CLOCK_SRC_SPDIF, 0x00000400, }, in parse_clock_bits()
100 { SND_FF_CLOCK_SRC_ADAT1, 0x00000600, }, in parse_clock_bits()
101 { SND_FF_CLOCK_SRC_ADAT2, 0x00000800, }, in parse_clock_bits()
102 { SND_FF_CLOCK_SRC_INTERNAL, 0x00000e00, }, in parse_clock_bits()
109 rate_bits = (data & 0x0f000000) >> 24; in parse_clock_bits()
113 rate_bits = (data & 0xf0000000) >> 28; in parse_clock_bits()
118 for (i = 0; i < ARRAY_SIZE(rate_entries); ++i) { in parse_clock_bits()
128 for (i = 0; i < clk_entry_count; ++i) { in parse_clock_bits()
130 if ((data & 0x000e00) == clk_entry->flag) { in parse_clock_bits()
138 return 0; in parse_clock_bits()
149 LATTER_SYNC_STATUS, ®, sizeof(reg), 0); in latter_get_clock()
150 if (err < 0) in latter_get_clock()
163 data = 0x00000000; in latter_switch_fetching_mode()
165 data = 0xffffffff; in latter_switch_fetching_mode()
169 LATTER_FETCH_MODE, ®, sizeof(reg), 0); in latter_switch_fetching_mode()
182 if (rate % 48000 == 0) in latter_allocate_resources()
183 code = 0x04; in latter_allocate_resources()
184 else if (rate % 44100 == 0) in latter_allocate_resources()
185 code = 0x02; in latter_allocate_resources()
186 else if (rate % 32000 == 0) in latter_allocate_resources()
187 code = 0x00; in latter_allocate_resources()
192 code |= 0x08; in latter_allocate_resources()
194 code |= 0x10; in latter_allocate_resources()
198 LATTER_STF, ®, sizeof(reg), 0); in latter_allocate_resources()
199 if (err < 0) in latter_allocate_resources()
203 count = 0; in latter_allocate_resources()
209 if (err < 0) in latter_allocate_resources()
218 for (i = 0; i < ARRAY_SIZE(amdtp_rate_table); ++i) { in latter_allocate_resources()
226 if (err < 0) in latter_allocate_resources()
230 ff->tx_resources.channels_mask = 0x00000000000000ffuLL; in latter_allocate_resources()
234 if (err < 0) in latter_allocate_resources()
238 ff->rx_resources.channels_mask = 0x00000000000000ffuLL; in latter_allocate_resources()
242 if (err < 0) in latter_allocate_resources()
260 flag = 0x92; in latter_begin_session()
262 flag = 0x8e; in latter_begin_session()
264 flag = 0x8c; in latter_begin_session()
272 flag = 0x9e; in latter_begin_session()
274 flag = 0x96; in latter_begin_session()
276 flag = 0x8e; in latter_begin_session()
283 if (err < 0) in latter_begin_session()
287 if (err < 0) in latter_begin_session()
294 LATTER_ISOC_CHANNELS, ®, sizeof(reg), 0); in latter_begin_session()
295 if (err < 0) in latter_begin_session()
300 LATTER_ISOC_START, ®, sizeof(reg), 0); in latter_begin_session()
307 reg = cpu_to_le32(0x00000000); in latter_finish_session()
309 LATTER_ISOC_START, ®, sizeof(reg), 0); in latter_finish_session()
319 { "S/PDIF", 0x00000001, 0x00000010, }, in latter_dump_status()
320 { "ADAT", 0x00000002, 0x00000020, }, in latter_dump_status()
321 { "WDClk", 0x00000004, 0x00000040, }, in latter_dump_status()
323 { "WDClk", 0x00000001, 0x00000010, }, in latter_dump_status()
324 { "AES/EBU", 0x00000002, 0x00000020, }, in latter_dump_status()
325 { "ADAT-A", 0x00000004, 0x00000040, }, in latter_dump_status()
326 { "ADAT-B", 0x00000008, 0x00000080, }, in latter_dump_status()
338 LATTER_SYNC_STATUS, ®, sizeof(reg), 0); in latter_dump_status()
339 if (err < 0) in latter_dump_status()
353 for (i = 0; i < clk_entry_count; ++i) { in latter_dump_status()
367 if (err < 0) in latter_dump_status()
376 // NOTE: transactions are transferred within 0x00-0x7f in allocated range of
381 // 0x'ffff'0000'0014:
384 // - 0x00002000: 0x'....'....'0000'0000
385 // - 0x00004000: 0x'....'....'0000'0080
386 // - 0x00008000: 0x'....'....'0000'0100
387 // - 0x00010000: 0x'....'....'0000'0180
394 // (0x'....'....'0000'0000) and expects userspace application to configure the
400 unsigned int index = (data & 0x000000f0) >> 4; in latter_handle_midi_msg()
408 switch (data & 0x0000000f) { in latter_handle_midi_msg()
409 case 0x00000008: in latter_handle_midi_msg()
410 case 0x00000009: in latter_handle_midi_msg()
411 case 0x0000000a: in latter_handle_midi_msg()
412 case 0x0000000b: in latter_handle_midi_msg()
413 case 0x0000000e: in latter_handle_midi_msg()
416 case 0x0000000c: in latter_handle_midi_msg()
417 case 0x0000000d: in latter_handle_midi_msg()
421 len = data & 0x00000003; in latter_handle_midi_msg()
422 if (len == 0) in latter_handle_midi_msg()
427 byte[0] = (data & 0x0000ff00) >> 8; in latter_handle_midi_msg()
428 byte[1] = (data & 0x00ff0000) >> 16; in latter_handle_midi_msg()
429 byte[2] = (data & 0xff000000) >> 24; in latter_handle_midi_msg()
438 * When return 0, given argument is a beginning of system exclusive.
444 case 0xf6: /* Tune request. */ in calculate_message_bytes()
445 case 0xf8: /* Timing clock. */ in calculate_message_bytes()
446 case 0xfa: /* Start. */ in calculate_message_bytes()
447 case 0xfb: /* Continue. */ in calculate_message_bytes()
448 case 0xfc: /* Stop. */ in calculate_message_bytes()
449 case 0xfe: /* Active sensing. */ in calculate_message_bytes()
450 case 0xff: /* System reset. */ in calculate_message_bytes()
452 case 0xf1: /* MIDI time code quarter frame. */ in calculate_message_bytes()
453 case 0xf3: /* Song select. */ in calculate_message_bytes()
455 case 0xf2: /* Song position pointer. */ in calculate_message_bytes()
457 case 0xf0: /* Exclusive. */ in calculate_message_bytes()
458 return 0; in calculate_message_bytes()
459 case 0xf7: /* End of exclusive. */ in calculate_message_bytes()
461 case 0xf4: /* Undefined. */ in calculate_message_bytes()
462 case 0xf5: /* Undefined. */ in calculate_message_bytes()
463 case 0xf9: /* Undefined. */ in calculate_message_bytes()
464 case 0xfd: /* Undefined. */ in calculate_message_bytes()
467 switch (status & 0xf0) { in calculate_message_bytes()
468 case 0x80: /* Note on. */ in calculate_message_bytes()
469 case 0x90: /* Note off. */ in calculate_message_bytes()
470 case 0xa0: /* Polyphonic key pressure. */ in calculate_message_bytes()
471 case 0xb0: /* Control change and Mode change. */ in calculate_message_bytes()
472 case 0xe0: /* Pitch bend change. */ in calculate_message_bytes()
474 case 0xc0: /* Program change. */ in calculate_message_bytes()
475 case 0xd0: /* Channel pressure. */ in calculate_message_bytes()
490 u32 data = {0}; in latter_fill_midi_msg()
494 buf[0] = port << 4; in latter_fill_midi_msg()
496 if (consumed <= 0) in latter_fill_midi_msg()
500 if (buf[1] != 0xf0) { in latter_fill_midi_msg()
502 return 0; in latter_fill_midi_msg()
508 buf[0] |= consumed; in latter_fill_midi_msg()
510 if (buf[1] != 0xf7) { in latter_fill_midi_msg()
511 if (buf[2] == 0xf7 || buf[3] == 0xf7) { in latter_fill_midi_msg()
516 buf[0] |= consumed; in latter_fill_midi_msg()
521 buf[0] |= 0x0f; in latter_fill_midi_msg()
525 ff->msg_buf[port][0] = cpu_to_le32(data); in latter_fill_midi_msg()