1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Copyright (c) 2018 Baylibre SAS.
4 * Author: Jerome Brunet <jbrunet@baylibre.com>
7 #ifndef _MESON_AXG_TDM_FORMATTER_H
8 #define _MESON_AXG_TDM_FORMATTER_H
12 struct platform_device
;
14 struct snd_soc_dapm_widget
;
17 struct axg_tdm_formatter_ops
{
18 struct axg_tdm_stream
*(*get_stream
)(struct snd_soc_dapm_widget
*w
);
19 void (*enable
)(struct regmap
*map
);
20 void (*disable
)(struct regmap
*map
);
21 int (*prepare
)(struct regmap
*map
, struct axg_tdm_stream
*ts
);
24 struct axg_tdm_formatter_driver
{
25 const struct snd_soc_component_driver
*component_drv
;
26 const struct regmap_config
*regmap_cfg
;
27 const struct axg_tdm_formatter_ops
*ops
;
31 int axg_tdm_formatter_set_channel_masks(struct regmap
*map
,
32 struct axg_tdm_stream
*ts
,
34 int axg_tdm_formatter_event(struct snd_soc_dapm_widget
*w
,
35 struct snd_kcontrol
*control
,
37 int axg_tdm_formatter_probe(struct platform_device
*pdev
);
39 #endif /* _MESON_AXG_TDM_FORMATTER_H */