linux/sound/soc/dwc/dwc-i2s.c

/*
 * ALSA SoC Synopsys I2S Audio Layer
 *
 * sound/soc/dwc/designware_i2s.c
 *
 * Copyright (C) 2010 ST Microelectronics
 * Rajeev Kumar <[email protected]>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2. This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <sound/designware_i2s.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
#include "local.h"

static inline void i2s_write_reg(void __iomem *io_base, int reg, u32 val)
{}

static inline u32 i2s_read_reg(void __iomem *io_base, int reg)
{}

static inline void i2s_disable_channels(struct dw_i2s_dev *dev, u32 stream)
{}

static inline void i2s_clear_irqs(struct dw_i2s_dev *dev, u32 stream)
{}

static inline void i2s_disable_irqs(struct dw_i2s_dev *dev, u32 stream,
				    int chan_nr)
{}

static inline void i2s_enable_irqs(struct dw_i2s_dev *dev, u32 stream,
				   int chan_nr)
{}

static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
{}

static void i2s_enable_dma(struct dw_i2s_dev *dev, u32 stream)
{}

static void i2s_disable_dma(struct dw_i2s_dev *dev, u32 stream)
{}

static void i2s_start(struct dw_i2s_dev *dev,
		      struct snd_pcm_substream *substream)
{}

static void i2s_stop(struct dw_i2s_dev *dev,
		struct snd_pcm_substream *substream)
{}

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

static void dw_i2s_config(struct dw_i2s_dev *dev, int stream)
{}

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

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

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

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

static int dw_i2s_set_tdm_slot(struct snd_soc_dai *cpu_dai,	unsigned int tx_mask,
			   unsigned int rx_mask, int slots, int slot_width)
{}

static int dw_i2s_dai_probe(struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops dw_i2s_dai_ops =;

#ifdef CONFIG_PM
static int dw_i2s_runtime_suspend(struct device *dev)
{}

static int dw_i2s_runtime_resume(struct device *dev)
{}

static int dw_i2s_suspend(struct snd_soc_component *component)
{}

static int dw_i2s_resume(struct snd_soc_component *component)
{}

#else
#define dw_i2s_suspend
#define dw_i2s_resume
#endif

static const struct snd_soc_component_driver dw_i2s_component =;

/*
 * The following tables allow a direct lookup of various parameters
 * defined in the I2S block's configuration in terms of sound system
 * parameters.  Each table is sized to the number of entries possible
 * according to the number of configuration bits describing an I2S
 * block parameter.
 */

/* Maximum bit resolution of a channel - not uniformly spaced */
static const u32 fifo_width[COMP_MAX_WORDSIZE] =;

/* Width of (DMA) bus */
static const u32 bus_widths[COMP_MAX_DATA_WIDTH] =;

/* PCM format to support channel resolution */
static const u32 formats[COMP_MAX_WORDSIZE] =;

static int dw_configure_dai(struct dw_i2s_dev *dev,
				   struct snd_soc_dai_driver *dw_i2s_dai,
				   unsigned int rates)
{}

static int dw_configure_dai_by_pd(struct dw_i2s_dev *dev,
				   struct snd_soc_dai_driver *dw_i2s_dai,
				   struct resource *res,
				   const struct i2s_platform_data *pdata)
{}

static int dw_configure_dai_by_dt(struct dw_i2s_dev *dev,
				   struct snd_soc_dai_driver *dw_i2s_dai,
				   struct resource *res)
{}

#ifdef CONFIG_OF
/* clocks initialization with master mode on JH7110 SoC */
static int jh7110_i2s_crg_master_init(struct dw_i2s_dev *dev)
{}

/* clocks initialization with slave mode on JH7110 SoC */
static int jh7110_i2s_crg_slave_init(struct dw_i2s_dev *dev)
{}

/* Special syscon initialization about RX channel with slave mode on JH7110 SoC */
static int jh7110_i2srx_crg_init(struct dw_i2s_dev *dev)
{}

static int jh7110_i2stx0_clk_cfg(struct i2s_clk_config_data *config)
{}
#endif /* CONFIG_OF */

static int dw_i2s_probe(struct platform_device *pdev)
{}

static void dw_i2s_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_OF
static const struct i2s_platform_data jh7110_i2stx0_data =;

static const struct i2s_platform_data jh7110_i2stx1_data =;

static const struct i2s_platform_data jh7110_i2srx_data =;

static const struct of_device_id dw_i2s_of_match[] =;

MODULE_DEVICE_TABLE(of, dw_i2s_of_match);
#endif

static const struct dev_pm_ops dwc_pm_ops =;

static struct platform_driver dw_i2s_driver =;

module_platform_driver();

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