Lines Matching +full:io +full:- +full:reset

1 // SPDX-License-Identifier: GPL-2.0
50 * -----------------------------------------------------------------------
55 * H'00_0001 2.38 x 10^-7 -132
56 * H'00_0000 0 Mute H'FF_FFFF 2.38 x 10^-7 -132
59 * Ex) Input ch -> Output ch
60 * 1ch -> 0ch
61 * 0ch -> 1ch
63 * amixer set "CTU Reset" on
68 * amixer set "CTU Reset" on
76 struct rsnd_kctrl_cfg_s reset; member
83 #define rsnd_ctu_nr(priv) ((priv)->ctu_nr)
87 ((pos) = (struct rsnd_ctu *)(priv)->ctu + i); \
93 #define rsnd_ctu_get(priv, id) ((struct rsnd_ctu *)(priv->ctu) + id)
108 struct rsnd_dai_stream *io, in rsnd_ctu_probe_() argument
111 return rsnd_cmd_attach(io, rsnd_mod_id(mod)); in rsnd_ctu_probe_()
114 static void rsnd_ctu_value_init(struct rsnd_dai_stream *io, in rsnd_ctu_value_init() argument
123 u32 val = rsnd_kctrl_valm(ctu->pass, i); in rsnd_ctu_value_init()
125 cpmdr |= val << (28 - (i * 4)); in rsnd_ctu_value_init()
127 if ((val > 0x8) && (scmdr < (val - 0x8))) in rsnd_ctu_value_init()
128 scmdr = val - 0x8; in rsnd_ctu_value_init()
133 rsnd_mod_write(mod, CTU_ADINR, rsnd_runtime_channel_original(io)); in rsnd_ctu_value_init()
145 rsnd_mod_write(mod, CTU_SVxxR(i, j), rsnd_kctrl_valm(ctu->sv[i], j)); in rsnd_ctu_value_init()
151 static void rsnd_ctu_value_reset(struct rsnd_dai_stream *io, in rsnd_ctu_value_reset() argument
157 if (!rsnd_kctrl_vals(ctu->reset)) in rsnd_ctu_value_reset()
161 rsnd_kctrl_valm(ctu->pass, i) = 0; in rsnd_ctu_value_reset()
162 rsnd_kctrl_valm(ctu->sv[0], i) = 0; in rsnd_ctu_value_reset()
163 rsnd_kctrl_valm(ctu->sv[1], i) = 0; in rsnd_ctu_value_reset()
164 rsnd_kctrl_valm(ctu->sv[2], i) = 0; in rsnd_ctu_value_reset()
165 rsnd_kctrl_valm(ctu->sv[3], i) = 0; in rsnd_ctu_value_reset()
167 rsnd_kctrl_vals(ctu->reset) = 0; in rsnd_ctu_value_reset()
171 struct rsnd_dai_stream *io, in rsnd_ctu_init() argument
182 rsnd_ctu_value_init(io, mod); in rsnd_ctu_init()
188 struct rsnd_dai_stream *io, in rsnd_ctu_quit() argument
199 struct rsnd_dai_stream *io, in rsnd_ctu_pcm_new() argument
209 ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU Pass", in rsnd_ctu_pcm_new()
212 &ctu->pass, RSND_MAX_CHANNELS, in rsnd_ctu_pcm_new()
218 ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU SV0", in rsnd_ctu_pcm_new()
221 &ctu->sv[0], RSND_MAX_CHANNELS, in rsnd_ctu_pcm_new()
227 ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU SV1", in rsnd_ctu_pcm_new()
230 &ctu->sv[1], RSND_MAX_CHANNELS, in rsnd_ctu_pcm_new()
236 ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU SV2", in rsnd_ctu_pcm_new()
239 &ctu->sv[2], RSND_MAX_CHANNELS, in rsnd_ctu_pcm_new()
245 ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU SV3", in rsnd_ctu_pcm_new()
248 &ctu->sv[3], RSND_MAX_CHANNELS, in rsnd_ctu_pcm_new()
253 /* Reset */ in rsnd_ctu_pcm_new()
254 ret = rsnd_kctrl_new_s(mod, io, rtd, "CTU Reset", in rsnd_ctu_pcm_new()
257 &ctu->reset, 1); in rsnd_ctu_pcm_new()
267 * ctu00: -> 0, ctu01: -> 0, ctu02: -> 0, ctu03: -> 0 in rsnd_ctu_id()
268 * ctu10: -> 1, ctu11: -> 1, ctu12: -> 1, ctu13: -> 1 in rsnd_ctu_id()
270 return mod->id / 4; in rsnd_ctu_id()
276 * ctu00: -> 0, ctu01: -> 1, ctu02: -> 2, ctu03: -> 3 in rsnd_ctu_id_sub()
277 * ctu10: -> 0, ctu11: -> 1, ctu12: -> 2, ctu13: -> 3 in rsnd_ctu_id_sub()
279 return mod->id % 4; in rsnd_ctu_id_sub()
284 struct rsnd_dai_stream *io, in rsnd_ctu_debug_info() argument
332 ret = -EINVAL; in rsnd_ctu_probe()
338 ret = -ENOMEM; in rsnd_ctu_probe()
342 priv->ctu_nr = nr; in rsnd_ctu_probe()
343 priv->ctu = ctu; in rsnd_ctu_probe()