#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/dmaengine_pcm.h>
#define JZ_REG_AIC_CONF …
#define JZ_REG_AIC_CTRL …
#define JZ_REG_AIC_I2S_FMT …
#define JZ_REG_AIC_FIFO_STATUS …
#define JZ_REG_AIC_I2S_STATUS …
#define JZ_REG_AIC_CLK_DIV …
#define JZ_REG_AIC_FIFO …
#define JZ_AIC_CONF_OVERFLOW_PLAY_LAST …
#define JZ_AIC_CONF_INTERNAL_CODEC …
#define JZ_AIC_CONF_I2S …
#define JZ_AIC_CONF_RESET …
#define JZ_AIC_CONF_BIT_CLK_MASTER …
#define JZ_AIC_CONF_SYNC_CLK_MASTER …
#define JZ_AIC_CONF_ENABLE …
#define JZ_AIC_CTRL_OUTPUT_SAMPLE_SIZE …
#define JZ_AIC_CTRL_INPUT_SAMPLE_SIZE …
#define JZ_AIC_CTRL_ENABLE_RX_DMA …
#define JZ_AIC_CTRL_ENABLE_TX_DMA …
#define JZ_AIC_CTRL_MONO_TO_STEREO …
#define JZ_AIC_CTRL_SWITCH_ENDIANNESS …
#define JZ_AIC_CTRL_SIGNED_TO_UNSIGNED …
#define JZ_AIC_CTRL_TFLUSH …
#define JZ_AIC_CTRL_RFLUSH …
#define JZ_AIC_CTRL_ENABLE_ROR_INT …
#define JZ_AIC_CTRL_ENABLE_TUR_INT …
#define JZ_AIC_CTRL_ENABLE_RFS_INT …
#define JZ_AIC_CTRL_ENABLE_TFS_INT …
#define JZ_AIC_CTRL_ENABLE_LOOPBACK …
#define JZ_AIC_CTRL_ENABLE_PLAYBACK …
#define JZ_AIC_CTRL_ENABLE_CAPTURE …
#define JZ_AIC_I2S_FMT_DISABLE_BIT_CLK …
#define JZ_AIC_I2S_FMT_DISABLE_BIT_ICLK …
#define JZ_AIC_I2S_FMT_ENABLE_SYS_CLK …
#define JZ_AIC_I2S_FMT_MSB …
#define JZ_AIC_I2S_STATUS_BUSY …
struct i2s_soc_info { … };
struct jz4740_i2s { … };
static int jz4740_i2s_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static void jz4740_i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int jz4740_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int jz4740_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int jz4740_i2s_get_i2sdiv(unsigned long mclk, unsigned long rate,
unsigned long i2sdiv_max)
{ … }
static int jz4740_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops jz4740_i2s_dai_ops = …;
#define JZ4740_I2S_FMTS …
static struct snd_soc_dai_driver jz4740_i2s_dai = …;
static const struct i2s_soc_info jz4740_i2s_soc_info = …;
static const struct i2s_soc_info jz4760_i2s_soc_info = …;
static const struct i2s_soc_info x1000_i2s_soc_info = …;
static struct snd_soc_dai_driver jz4770_i2s_dai = …;
static const struct i2s_soc_info jz4770_i2s_soc_info = …;
static const struct i2s_soc_info jz4780_i2s_soc_info = …;
static int jz4740_i2s_suspend(struct snd_soc_component *component)
{ … }
static int jz4740_i2s_resume(struct snd_soc_component *component)
{ … }
static int jz4740_i2s_probe(struct snd_soc_component *component)
{ … }
static void jz4740_i2s_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver jz4740_i2s_component = …;
static const struct of_device_id jz4740_of_matches[] = …;
MODULE_DEVICE_TABLE(of, jz4740_of_matches);
static int jz4740_i2s_init_regmap_fields(struct device *dev,
struct jz4740_i2s *i2s)
{ … }
static const struct regmap_config jz4740_i2s_regmap_config = …;
static int jz4740_i2s_dev_probe(struct platform_device *pdev)
{ … }
static struct platform_driver jz4740_i2s_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;