linux/sound/soc/starfive/jh7110_tdm.c

// SPDX-License-Identifier: GPL-2.0
/*
 * jh7110_tdm.c -- StarFive JH7110 TDM driver
 *
 * Copyright (C) 2023 StarFive Technology Co., Ltd.
 *
 * Author: Walker Chen <[email protected]>
 */

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/dmaengine.h>
#include <linux/module.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/types.h>
#include <sound/dmaengine_pcm.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dai.h>

#define TDM_PCMGBCR
	#define PCMGBCR_ENABLE
	#define CLKPOL_BIT
	#define ELM_BIT
	#define SYNCM_BIT
	#define MS_BIT
#define TDM_PCMTXCR
	#define PCMTXCR_TXEN
	#define IFL_BIT
	#define WL_BIT
	#define SSCALE_BIT
	#define SL_BIT
	#define LRJ_BIT
#define TDM_PCMRXCR
	#define PCMRXCR_RXEN
#define TDM_PCMDIV

#define JH7110_TDM_FIFO
#define JH7110_TDM_FIFO_DEPTH

enum TDM_MASTER_SLAVE_MODE {};

enum TDM_CLKPOL {};

enum TDM_ELM {};

enum TDM_SYNCM {};

enum TDM_IFL {};

enum TDM_WL {};

enum TDM_SL {};

enum TDM_LRJ {};

struct tdm_chan_cfg {};

struct jh7110_tdm_dev {};

static inline u32 jh7110_tdm_readl(struct jh7110_tdm_dev *tdm, u16 reg)
{}

static inline void jh7110_tdm_writel(struct jh7110_tdm_dev *tdm, u16 reg, u32 val)
{}

static void jh7110_tdm_save_context(struct jh7110_tdm_dev *tdm,
				    struct snd_pcm_substream *substream)
{}

static void jh7110_tdm_start(struct jh7110_tdm_dev *tdm,
			     struct snd_pcm_substream *substream)
{}

static void jh7110_tdm_stop(struct jh7110_tdm_dev *tdm,
			    struct snd_pcm_substream *substream)
{}

static int jh7110_tdm_syncdiv(struct jh7110_tdm_dev *tdm)
{}

static int jh7110_tdm_config(struct jh7110_tdm_dev *tdm,
			     struct snd_pcm_substream *substream)
{}

static void jh7110_tdm_clk_disable(struct jh7110_tdm_dev *tdm)
{}

static int jh7110_tdm_clk_enable(struct jh7110_tdm_dev *tdm)
{}

static int jh7110_tdm_runtime_suspend(struct device *dev)
{}

static int jh7110_tdm_runtime_resume(struct device *dev)
{}

static int jh7110_tdm_system_suspend(struct device *dev)
{}

static int jh7110_tdm_system_resume(struct device *dev)
{}

static const struct snd_soc_component_driver jh7110_tdm_component =;

static int jh7110_tdm_startup(struct snd_pcm_substream *substream,
			      struct snd_soc_dai *cpu_dai)
{}

static int jh7110_tdm_hw_params(struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *params,
				struct snd_soc_dai *dai)
{}

static int jh7110_tdm_trigger(struct snd_pcm_substream *substream,
			      int cmd, struct snd_soc_dai *dai)
{}

static int jh7110_tdm_set_dai_fmt(struct snd_soc_dai *cpu_dai,
				  unsigned int fmt)
{}

static int jh7110_tdm_dai_probe(struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops jh7110_tdm_dai_ops =;

#define JH7110_TDM_RATES

#define JH7110_TDM_FORMATS

static struct snd_soc_dai_driver jh7110_tdm_dai =;

static const struct snd_pcm_hardware jh7110_pcm_hardware =;

static const struct snd_dmaengine_pcm_config jh7110_dmaengine_pcm_config =;

static void jh7110_tdm_init_params(struct jh7110_tdm_dev *tdm)
{}

static int jh7110_tdm_clk_reset_get(struct platform_device *pdev,
				    struct jh7110_tdm_dev *tdm)
{}

static int jh7110_tdm_probe(struct platform_device *pdev)
{}

static void jh7110_tdm_dev_remove(struct platform_device *pdev)
{}

static const struct of_device_id jh7110_tdm_of_match[] =;

MODULE_DEVICE_TABLE(of, jh7110_tdm_of_match);

static const struct dev_pm_ops jh7110_tdm_pm_ops =;

static struct platform_driver jh7110_tdm_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();