Lines Matching +full:mod +full:- +full:12 +full:b
1 // SPDX-License-Identifier: GPL-2.0
3 // Renesas R-Car
13 #include <linux/dma-mapping.h>
251 * R-Car basic functions
253 u32 rsnd_mod_read(struct rsnd_mod *mod, enum rsnd_reg reg);
254 void rsnd_mod_write(struct rsnd_mod *mod, enum rsnd_reg reg, u32 data);
255 void rsnd_mod_bset(struct rsnd_mod *mod, enum rsnd_reg reg, u32 mask, u32 data);
256 u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io);
257 u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io);
258 u32 rsnd_get_busif_shift(struct rsnd_dai_stream *io, struct rsnd_mod *mod);
261 * R-Car DMA
264 struct rsnd_mod *mod, struct rsnd_mod **dma_mod);
267 struct rsnd_mod *mod, char *x);
270 * R-Car sound mod
292 struct rsnd_mod *mod);
293 int (*probe)(struct rsnd_mod *mod,
296 int (*remove)(struct rsnd_mod *mod,
299 int (*init)(struct rsnd_mod *mod,
302 int (*quit)(struct rsnd_mod *mod,
305 int (*start)(struct rsnd_mod *mod,
308 int (*stop)(struct rsnd_mod *mod,
311 int (*irq)(struct rsnd_mod *mod,
314 int (*pcm_new)(struct rsnd_mod *mod,
317 int (*hw_params)(struct rsnd_mod *mod,
321 int (*pointer)(struct rsnd_mod *mod,
324 int (*fallback)(struct rsnd_mod *mod,
327 int (*prepare)(struct rsnd_mod *mod,
330 int (*cleanup)(struct rsnd_mod *mod,
333 int (*hw_free)(struct rsnd_mod *mod,
336 u32 *(*get_status)(struct rsnd_mod *mod,
339 int (*id)(struct rsnd_mod *mod);
340 int (*id_sub)(struct rsnd_mod *mod);
341 int (*id_cmd)(struct rsnd_mod *mod);
345 struct rsnd_dai_stream *io, struct rsnd_mod *mod);
363 * B 0: init 1: quit
373 #define __rsnd_mod_shift_hw_params 12
374 #define __rsnd_mod_shift_hw_free 12
389 #define __rsnd_mod_add_quit -1 /* needs protect */
391 #define __rsnd_mod_add_stop -1 /* needs protect */
393 #define __rsnd_mod_add_hw_free -1 /* needs protect */
414 #define rsnd_mod_to_priv(mod) ((mod)->priv) argument
415 #define rsnd_mod_power_on(mod) clk_enable((mod)->clk) argument
416 #define rsnd_mod_power_off(mod) clk_disable((mod)->clk) argument
417 #define rsnd_mod_get(ip) (&(ip)->mod)
420 struct rsnd_mod *mod,
425 void rsnd_mod_quit(struct rsnd_mod *mod);
427 struct rsnd_mod *mod);
428 void rsnd_mod_interrupt(struct rsnd_mod *mod,
429 void (*callback)(struct rsnd_mod *mod,
431 u32 *rsnd_mod_get_status(struct rsnd_mod *mod,
434 int rsnd_mod_id(struct rsnd_mod *mod);
435 int rsnd_mod_id_raw(struct rsnd_mod *mod);
436 int rsnd_mod_id_sub(struct rsnd_mod *mod);
437 char *rsnd_mod_name(struct rsnd_mod *mod);
480 of_get_child_by_name(rsnd_priv_to_dev(priv)->of_node, node)
490 * R-Car sound DAI
496 struct rsnd_mod *mod[RSND_MOD_MAX]; member
512 #define rsnd_io_to_mod(io, i) ((i) < RSND_MOD_MAX ? (io)->mod[(i)] : NULL)
521 #define rsnd_io_to_rdai(io) ((io)->rdai)
523 #define rsnd_io_is_play(io) (&rsnd_io_to_rdai(io)->playback == io)
524 #define rsnd_io_to_runtime(io) ((io)->substream ? \
525 (io)->substream->runtime : NULL)
526 #define rsnd_io_converted_rate(io) ((io)->converted_rate)
527 #define rsnd_io_converted_chan(io) ((io)->converted_chan)
538 int max_channels; /* 2ch - 16ch */
539 int ssi_lane; /* 1lane - 4lane */
549 #define rsnd_rdai_nr(priv) ((priv)->rdai_nr)
550 #define rsnd_rdai_is_clk_master(rdai) ((rdai)->clk_master)
551 #define rsnd_rdai_to_priv(rdai) ((rdai)->priv)
579 int rsnd_dai_connect(struct rsnd_mod *mod,
584 * R-Car Gen1/Gen2
588 struct rsnd_mod *mod,
596 * R-Car ADG
615 * R-Car sound priv
698 #define rsnd_priv_to_pdev(priv) ((priv)->pdev)
699 #define rsnd_priv_to_dev(priv) (&(rsnd_priv_to_pdev(priv)->dev))
701 #define rsnd_is_gen1(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN1)
702 #define rsnd_is_gen2(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN2)
703 #define rsnd_is_gen3(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN3)
704 #define rsnd_is_gen4(priv) (((priv)->flags & RSND_GEN_MASK) == RSND_GEN4)
705 #define rsnd_is_gen3_e3(priv) (((priv)->flags & \
709 #define rsnd_flags_has(p, f) ((p)->flags & (f))
710 #define rsnd_flags_set(p, f) ((p)->flags |= (f))
711 #define rsnd_flags_del(p, f) ((p)->flags &= ~(f))
722 void (*update)(struct rsnd_dai_stream *io, struct rsnd_mod *mod);
726 struct rsnd_mod *mod; member
748 int rsnd_kctrl_new(struct rsnd_mod *mod,
754 struct rsnd_mod *mod),
760 #define rsnd_kctrl_new_m(mod, io, rtd, name, accept, update, cfg, size, max) \ argument
761 rsnd_kctrl_new(mod, io, rtd, name, accept, update, rsnd_kctrl_init_m(cfg), \
764 #define rsnd_kctrl_new_s(mod, io, rtd, name, accept, update, cfg, max) \ argument
765 rsnd_kctrl_new(mod, io, rtd, name, accept, update, rsnd_kctrl_init_s(cfg), \
768 #define rsnd_kctrl_new_e(mod, io, rtd, name, accept, update, cfg, texts, size) \ argument
769 rsnd_kctrl_new(mod, io, rtd, name, accept, update, rsnd_kctrl_init_s(cfg), \
777 * R-Car SSI
784 int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod);
788 int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
798 * R-Car SSIU
801 struct rsnd_mod *mod);
808 bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod);
811 * R-Car SRC
830 * R-Car CTU
842 * R-Car MIX
854 * R-Car DVC
866 * R-Car CMD
872 void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type);
889 void rsnd_debugfs_mod_reg_show(struct seq_file *m, struct rsnd_mod *mod,