#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/dmaengine_pcm.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#define BCM2835_I2S_CS_A_REG …
#define BCM2835_I2S_FIFO_A_REG …
#define BCM2835_I2S_MODE_A_REG …
#define BCM2835_I2S_RXC_A_REG …
#define BCM2835_I2S_TXC_A_REG …
#define BCM2835_I2S_DREQ_A_REG …
#define BCM2835_I2S_INTEN_A_REG …
#define BCM2835_I2S_INTSTC_A_REG …
#define BCM2835_I2S_GRAY_REG …
#define BCM2835_I2S_STBY …
#define BCM2835_I2S_SYNC …
#define BCM2835_I2S_RXSEX …
#define BCM2835_I2S_RXF …
#define BCM2835_I2S_TXE …
#define BCM2835_I2S_RXD …
#define BCM2835_I2S_TXD …
#define BCM2835_I2S_RXR …
#define BCM2835_I2S_TXW …
#define BCM2835_I2S_CS_RXERR …
#define BCM2835_I2S_CS_TXERR …
#define BCM2835_I2S_RXSYNC …
#define BCM2835_I2S_TXSYNC …
#define BCM2835_I2S_DMAEN …
#define BCM2835_I2S_RXTHR(v) …
#define BCM2835_I2S_TXTHR(v) …
#define BCM2835_I2S_RXCLR …
#define BCM2835_I2S_TXCLR …
#define BCM2835_I2S_TXON …
#define BCM2835_I2S_RXON …
#define BCM2835_I2S_EN …
#define BCM2835_I2S_CLKDIS …
#define BCM2835_I2S_PDMN …
#define BCM2835_I2S_PDME …
#define BCM2835_I2S_FRXP …
#define BCM2835_I2S_FTXP …
#define BCM2835_I2S_CLKM …
#define BCM2835_I2S_CLKI …
#define BCM2835_I2S_FSM …
#define BCM2835_I2S_FSI …
#define BCM2835_I2S_FLEN(v) …
#define BCM2835_I2S_FSLEN(v) …
#define BCM2835_I2S_CHWEX …
#define BCM2835_I2S_CHEN …
#define BCM2835_I2S_CHPOS(v) …
#define BCM2835_I2S_CHWID(v) …
#define BCM2835_I2S_CH1(v) …
#define BCM2835_I2S_CH2(v) …
#define BCM2835_I2S_CH1_POS(v) …
#define BCM2835_I2S_CH2_POS(v) …
#define BCM2835_I2S_TX_PANIC(v) …
#define BCM2835_I2S_RX_PANIC(v) …
#define BCM2835_I2S_TX(v) …
#define BCM2835_I2S_RX(v) …
#define BCM2835_I2S_INT_RXERR …
#define BCM2835_I2S_INT_TXERR …
#define BCM2835_I2S_INT_RXR …
#define BCM2835_I2S_INT_TXW …
#define BCM2835_I2S_MAX_FRAME_LENGTH …
struct bcm2835_i2s_dev { … };
static void bcm2835_i2s_start_clock(struct bcm2835_i2s_dev *dev)
{ … }
static void bcm2835_i2s_stop_clock(struct bcm2835_i2s_dev *dev)
{ … }
static void bcm2835_i2s_clear_fifos(struct bcm2835_i2s_dev *dev,
bool tx, bool rx)
{ … }
static int bcm2835_i2s_set_dai_fmt(struct snd_soc_dai *dai,
unsigned int fmt)
{ … }
static int bcm2835_i2s_set_dai_bclk_ratio(struct snd_soc_dai *dai,
unsigned int ratio)
{ … }
static int bcm2835_i2s_set_dai_tdm_slot(struct snd_soc_dai *dai,
unsigned int tx_mask, unsigned int rx_mask,
int slots, int width)
{ … }
static int bcm2835_i2s_convert_slot(unsigned int slot, unsigned int odd_offset)
{ … }
static void bcm2835_i2s_calc_channel_pos(
unsigned int *ch1_pos, unsigned int *ch2_pos,
unsigned int mask, unsigned int width,
unsigned int bit_offset, unsigned int odd_offset)
{ … }
static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int bcm2835_i2s_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static void bcm2835_i2s_stop(struct bcm2835_i2s_dev *dev,
struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int bcm2835_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int bcm2835_i2s_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static void bcm2835_i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int bcm2835_i2s_dai_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops bcm2835_i2s_dai_ops = …;
static struct snd_soc_dai_driver bcm2835_i2s_dai = …;
static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg)
{ … }
static bool bcm2835_i2s_precious_reg(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config bcm2835_regmap_config = …;
static const struct snd_soc_component_driver bcm2835_i2s_component = …;
static int bcm2835_i2s_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id bcm2835_i2s_of_match[] = …;
MODULE_DEVICE_TABLE(of, bcm2835_i2s_of_match);
static struct platform_driver bcm2835_i2s_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;