Merge tag 'powerpc-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux/fpc-iii.git] / sound / soc / meson / axg-tdm-formatter.h
bloba1f0dcc0ff134c7e5fd021958c2fa342e05a9dac
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_hw {
18 unsigned int skew_offset;
21 struct axg_tdm_formatter_ops {
22 struct axg_tdm_stream *(*get_stream)(struct snd_soc_dapm_widget *w);
23 void (*enable)(struct regmap *map);
24 void (*disable)(struct regmap *map);
25 int (*prepare)(struct regmap *map,
26 const struct axg_tdm_formatter_hw *quirks,
27 struct axg_tdm_stream *ts);
30 struct axg_tdm_formatter_driver {
31 const struct snd_soc_component_driver *component_drv;
32 const struct regmap_config *regmap_cfg;
33 const struct axg_tdm_formatter_ops *ops;
34 const struct axg_tdm_formatter_hw *quirks;
37 int axg_tdm_formatter_set_channel_masks(struct regmap *map,
38 struct axg_tdm_stream *ts,
39 unsigned int offset);
40 int axg_tdm_formatter_event(struct snd_soc_dapm_widget *w,
41 struct snd_kcontrol *control,
42 int event);
43 int axg_tdm_formatter_probe(struct platform_device *pdev);
45 #endif /* _MESON_AXG_TDM_FORMATTER_H */