linux/sound/soc/meson/axg-tdm.h

/* SPDX-License-Identifier: (GPL-2.0 OR MIT)
 *
 * Copyright (c) 2018 Baylibre SAS.
 * Author: Jerome Brunet <[email protected]>
 */

#ifndef _MESON_AXG_TDM_H
#define _MESON_AXG_TDM_H

#include <linux/clk.h>
#include <linux/regmap.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#include <sound/soc-dai.h>

#define AXG_TDM_NUM_LANES
#define AXG_TDM_CHANNEL_MAX
#define AXG_TDM_RATES
#define AXG_TDM_FORMATS

struct axg_tdm_iface {};

static inline bool axg_tdm_lrclk_invert(unsigned int fmt)
{}

static inline bool axg_tdm_sclk_invert(unsigned int fmt)
{}

struct axg_tdm_stream {};

struct axg_tdm_stream *axg_tdm_stream_alloc(struct axg_tdm_iface *iface);
void axg_tdm_stream_free(struct axg_tdm_stream *ts);
int axg_tdm_stream_start(struct axg_tdm_stream *ts);
void axg_tdm_stream_stop(struct axg_tdm_stream *ts);
int axg_tdm_stream_set_cont_clocks(struct axg_tdm_stream *ts,
				   unsigned int fmt);

static inline int axg_tdm_stream_reset(struct axg_tdm_stream *ts)
{}

int axg_tdm_set_tdm_slots(struct snd_soc_dai *dai, u32 *tx_mask,
			  u32 *rx_mask, unsigned int slots,
			  unsigned int slot_width);

#endif /* _MESON_AXG_TDM_H */