Lines Matching full:mod
50 * | +- playback -> [mod] -> [mod] -> [mod] -> ...
53 * | +- capture -> [mod] -> [mod] -> [mod] -> ...
57 * | +- playback -> [mod] -> [mod] -> [mod] -> ...
60 * | +- capture -> [mod] -> [mod] -> [mod] -> ...
86 * [mod] => [mod] => [mod] => ...
89 * [mod]->fn() -> [mod]->fn() -> [mod]->fn()...
122 void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type) in rsnd_mod_make_sure() argument
124 if (mod->type != type) { in rsnd_mod_make_sure()
125 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); in rsnd_mod_make_sure()
129 rsnd_mod_name(mod)); in rsnd_mod_make_sure()
134 struct rsnd_mod *mod) in rsnd_mod_dma_req() argument
136 if (!mod || !mod->ops || !mod->ops->dma_req) in rsnd_mod_dma_req()
139 return mod->ops->dma_req(io, mod); in rsnd_mod_dma_req()
144 char *rsnd_mod_name(struct rsnd_mod *mod) in rsnd_mod_name() argument
159 if ((mod)->ops->id_sub) { in rsnd_mod_name()
161 mod->ops->name, in rsnd_mod_name()
162 rsnd_mod_id(mod), in rsnd_mod_name()
163 rsnd_mod_id_sub(mod)); in rsnd_mod_name()
166 mod->ops->name, in rsnd_mod_name()
167 rsnd_mod_id(mod)); in rsnd_mod_name()
173 u32 *rsnd_mod_get_status(struct rsnd_mod *mod, in rsnd_mod_get_status() argument
177 return &mod->status; in rsnd_mod_get_status()
180 int rsnd_mod_id_raw(struct rsnd_mod *mod) in rsnd_mod_id_raw() argument
182 return mod->id; in rsnd_mod_id_raw()
185 int rsnd_mod_id(struct rsnd_mod *mod) in rsnd_mod_id() argument
187 if ((mod)->ops->id) in rsnd_mod_id()
188 return (mod)->ops->id(mod); in rsnd_mod_id()
190 return rsnd_mod_id_raw(mod); in rsnd_mod_id()
193 int rsnd_mod_id_sub(struct rsnd_mod *mod) in rsnd_mod_id_sub() argument
195 if ((mod)->ops->id_sub) in rsnd_mod_id_sub()
196 return (mod)->ops->id_sub(mod); in rsnd_mod_id_sub()
202 struct rsnd_mod *mod, in rsnd_mod_init() argument
213 mod->id = id; in rsnd_mod_init()
214 mod->ops = ops; in rsnd_mod_init()
215 mod->type = type; in rsnd_mod_init()
216 mod->clk = clk; in rsnd_mod_init()
217 mod->priv = priv; in rsnd_mod_init()
222 void rsnd_mod_quit(struct rsnd_mod *mod) in rsnd_mod_quit() argument
224 clk_unprepare(mod->clk); in rsnd_mod_quit()
225 mod->clk = NULL; in rsnd_mod_quit()
228 void rsnd_mod_interrupt(struct rsnd_mod *mod, in rsnd_mod_interrupt() argument
229 void (*callback)(struct rsnd_mod *mod, in rsnd_mod_interrupt() argument
232 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); in rsnd_mod_interrupt()
239 if (mod == io->mod[mod->type]) in rsnd_mod_interrupt()
240 callback(mod, io); in rsnd_mod_interrupt()
243 if (mod == io->mod[mod->type]) in rsnd_mod_interrupt()
244 callback(mod, io); in rsnd_mod_interrupt()
354 u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io) in rsnd_get_adinr_bit() argument
356 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); in rsnd_get_adinr_bit()
377 u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io) in rsnd_get_dalign() argument
420 if (mod == ssiu) in rsnd_get_dalign()
421 id = rsnd_mod_id_sub(mod); in rsnd_get_dalign()
425 if (mod == target && snd_pcm_format_width(runtime->format) == 16) { in rsnd_get_dalign()
426 /* Target mod needs inverted DALIGN when 16bit */ in rsnd_get_dalign()
434 u32 rsnd_get_busif_shift(struct rsnd_dai_stream *io, struct rsnd_mod *mod) in rsnd_get_busif_shift() argument
470 if (tmod != mod) in rsnd_get_busif_shift()
489 struct rsnd_mod *mod; in rsnd_mod_next() local
495 mod = rsnd_io_to_mod(io, type); in rsnd_mod_next()
496 if (mod) in rsnd_mod_next()
497 return mod; in rsnd_mod_next()
556 struct rsnd_mod *mod; \
560 for_each_rsnd_mod_arrays(i, mod, io, types, RSND_MOD_MAX) { \
562 u32 *status = mod->ops->get_status(mod, io, types[i]); \
568 rsnd_mod_name(mod), *status, \
569 (func_call && (mod)->ops->fn) ? #fn : ""); \
570 if (func_call && (mod)->ops->fn) \
571 tmp = (mod)->ops->fn(mod, io, param); \
574 rsnd_mod_name(mod), #fn, tmp); \
580 int rsnd_dai_connect(struct rsnd_mod *mod, in rsnd_dai_connect() argument
587 if (!mod) in rsnd_dai_connect()
590 if (io->mod[type] == mod) in rsnd_dai_connect()
593 if (io->mod[type]) in rsnd_dai_connect()
596 priv = rsnd_mod_to_priv(mod); in rsnd_dai_connect()
599 io->mod[type] = mod; in rsnd_dai_connect()
602 rsnd_mod_name(mod), in rsnd_dai_connect()
608 static void rsnd_dai_disconnect(struct rsnd_mod *mod, in rsnd_dai_disconnect() argument
612 io->mod[type] = NULL; in rsnd_dai_disconnect()
1143 struct rsnd_mod *mod; in rsnd_parse_connect_common() local
1151 mod = mod_get(priv, i); in rsnd_parse_connect_common()
1153 rsnd_dai_connect(mod, &rdai->playback, mod->type); in rsnd_parse_connect_common()
1155 rsnd_dai_connect(mod, &rdai->capture, mod->type); in rsnd_parse_connect_common()
1525 cfg->update(cfg->io, cfg->mod); in rsnd_kctrl_put()
1590 int rsnd_kctrl_new(struct rsnd_mod *mod, in rsnd_kctrl_new() argument
1596 struct rsnd_mod *mod), in rsnd_kctrl_new() argument
1645 cfg->mod = mod; in rsnd_kctrl_new()
1668 struct rsnd_mod *mod; in rsnd_rdai_continuance_probe() local
1685 * remove all mod from io in rsnd_rdai_continuance_probe()
1688 for_each_rsnd_mod(i, mod, io) in rsnd_rdai_continuance_probe()
1689 rsnd_dai_disconnect(mod, io, i); in rsnd_rdai_continuance_probe()
1784 * adg is very special mod which can't use rsnd_dai_call(remove), in rsnd_probe()