linux/sound/soc/meson/axg-tdm-formatter.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: (GPL-2.0 OR MIT)
   2 *
   3 * Copyright (c) 2018 Baylibre SAS.
   4 * Author: Jerome Brunet <jbrunet@baylibre.com>
   5 */
   6
   7#ifndef _MESON_AXG_TDM_FORMATTER_H
   8#define _MESON_AXG_TDM_FORMATTER_H
   9
  10#include "axg-tdm.h"
  11
  12struct platform_device;
  13struct regmap;
  14struct snd_soc_dapm_widget;
  15struct snd_kcontrol;
  16
  17struct 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);
  22};
  23
  24struct 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;
  29};
  30
  31int axg_tdm_formatter_set_channel_masks(struct regmap *map,
  32                                        struct axg_tdm_stream *ts,
  33                                        unsigned int offset);
  34int axg_tdm_formatter_event(struct snd_soc_dapm_widget *w,
  35                            struct snd_kcontrol *control,
  36                            int event);
  37int axg_tdm_formatter_probe(struct platform_device *pdev);
  38
  39#endif /* _MESON_AXG_TDM_FORMATTER_H */
  40