Lines Matching +full:mode +full:- +full:reg

1 // SPDX-License-Identifier: GPL-2.0
3 * dice-extension.c - a part of driver for DICE based devices
53 return snd_fw_transaction(dice->unit, in read_transaction()
61 unsigned int mode, in read_stream_entries() argument
66 __be32 reg[2]; in read_stream_entries() local
74 reg, sizeof(reg)); in read_stream_entries()
77 pcm_channels[i][mode] = be32_to_cpu(reg[0]); in read_stream_entries()
78 midi_ports[i] = max(midi_ports[i], be32_to_cpu(reg[1])); in read_stream_entries()
87 __be32 reg[2]; in detect_stream_formats() local
89 int mode; in detect_stream_formats() local
92 for (mode = 0; mode < SND_DICE_RATE_MODE_COUNT; ++mode) { in detect_stream_formats()
96 * Some models report stream formats at highest mode, however in detect_stream_formats()
97 * they don't support the mode. Check clock capabilities. in detect_stream_formats()
99 if (mode == 2) { in detect_stream_formats()
101 } else if (mode == 1) { in detect_stream_formats()
107 if (!(cap & dice->clock_caps)) in detect_stream_formats()
110 base_offset = 0x2000 * mode + 0x1000; in detect_stream_formats()
114 &reg, sizeof(reg)); in detect_stream_formats()
119 stream_count = be32_to_cpu(reg[0]); in detect_stream_formats()
121 stream_count, mode, in detect_stream_formats()
122 dice->tx_pcm_chs, in detect_stream_formats()
123 dice->tx_midi_ports); in detect_stream_formats()
128 stream_count = be32_to_cpu(reg[1]); in detect_stream_formats()
131 mode, dice->rx_pcm_chs, in detect_stream_formats()
132 dice->rx_midi_ports); in detect_stream_formats()
149 return -ENOMEM; in snd_dice_detect_extension_formats()
151 err = snd_fw_transaction(dice->unit, TCODE_READ_BLOCK_REQUEST, in snd_dice_detect_extension_formats()
164 err = -ENXIO; in snd_dice_detect_extension_formats()