Linux 5.1.5
[linux/fpc-iii.git] / sound / soc / meson / axg-tdm-formatter.h
blobcf947caf3cb15d023e912877f6b99d360f60692c
1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * Copyright (c) 2018 Baylibre SAS.
4 * Author: Jerome Brunet <jbrunet@baylibre.com>
5 */
7 #ifndef _MESON_AXG_TDM_FORMATTER_H
8 #define _MESON_AXG_TDM_FORMATTER_H
10 #include "axg-tdm.h"
12 struct platform_device;
13 struct regmap;
14 struct snd_soc_dapm_widget;
15 struct snd_kcontrol;
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;
28 bool invert_sclk;
31 int axg_tdm_formatter_set_channel_masks(struct regmap *map,
32 struct axg_tdm_stream *ts,
33 unsigned int offset);
34 int axg_tdm_formatter_event(struct snd_soc_dapm_widget *w,
35 struct snd_kcontrol *control,
36 int event);
37 int axg_tdm_formatter_probe(struct platform_device *pdev);
39 #endif /* _MESON_AXG_TDM_FORMATTER_H */