#include <dt-bindings/sound/samsung-i2s.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <sound/soc.h>
#include <sound/pcm_params.h>
#include <linux/platform_data/asoc-s3c.h>
#include "dma.h"
#include "idma.h"
#include "i2s.h"
#include "i2s-regs.h"
#define msecs_to_loops(t) …
#define SAMSUNG_I2S_ID_PRIMARY …
#define SAMSUNG_I2S_ID_SECONDARY …
struct samsung_i2s_variant_regs { … };
struct samsung_i2s_dai_data { … };
struct i2s_dai { … };
struct samsung_i2s_priv { … };
static inline bool is_secondary(struct i2s_dai *i2s)
{ … }
static inline bool tx_active(struct i2s_dai *i2s)
{ … }
static inline struct i2s_dai *get_other_dai(struct i2s_dai *i2s)
{ … }
static inline bool other_tx_active(struct i2s_dai *i2s)
{ … }
static inline bool any_tx_active(struct i2s_dai *i2s)
{ … }
static inline bool rx_active(struct i2s_dai *i2s)
{ … }
static inline bool other_rx_active(struct i2s_dai *i2s)
{ … }
static inline bool any_rx_active(struct i2s_dai *i2s)
{ … }
static inline bool other_active(struct i2s_dai *i2s)
{ … }
static inline bool this_active(struct i2s_dai *i2s)
{ … }
static inline bool any_active(struct i2s_dai *i2s)
{ … }
static inline struct i2s_dai *to_info(struct snd_soc_dai *dai)
{ … }
static inline bool is_opened(struct i2s_dai *i2s)
{ … }
static inline bool is_manager(struct i2s_dai *i2s)
{ … }
static inline unsigned get_rfs(struct i2s_dai *i2s)
{ … }
static inline void set_rfs(struct i2s_dai *i2s, unsigned rfs)
{ … }
static inline unsigned get_bfs(struct i2s_dai *i2s)
{ … }
static inline void set_bfs(struct i2s_dai *i2s, unsigned bfs)
{ … }
static inline int get_blc(struct i2s_dai *i2s)
{ … }
static void i2s_txctrl(struct i2s_dai *i2s, int on)
{ … }
static void i2s_rxctrl(struct i2s_dai *i2s, int on)
{ … }
static inline void i2s_fifo(struct i2s_dai *i2s, u32 flush)
{ … }
static int i2s_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int rfs,
int dir)
{ … }
static int i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int i2s_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static void i2s_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int config_setup(struct i2s_dai *i2s)
{ … }
static int i2s_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{ … }
static int i2s_set_clkdiv(struct snd_soc_dai *dai,
int div_id, int div)
{ … }
static snd_pcm_sframes_t
i2s_delay(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{ … }
#ifdef CONFIG_PM
static int i2s_suspend(struct snd_soc_component *component)
{ … }
static int i2s_resume(struct snd_soc_component *component)
{ … }
#else
#define i2s_suspend …
#define i2s_resume …
#endif
static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
{ … }
static int samsung_i2s_dai_remove(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops samsung_i2s_dai_ops = …;
static const struct snd_soc_dapm_widget samsung_i2s_widgets[] = …;
static const struct snd_soc_dapm_route samsung_i2s_dapm_routes[] = …;
static const struct snd_soc_component_driver samsung_i2s_component = …;
#define SAMSUNG_I2S_FMTS …
static int i2s_alloc_dais(struct samsung_i2s_priv *priv,
const struct samsung_i2s_dai_data *i2s_dai_data,
int num_dais)
{ … }
#ifdef CONFIG_PM
static int i2s_runtime_suspend(struct device *dev)
{ … }
static int i2s_runtime_resume(struct device *dev)
{ … }
#endif
static void i2s_unregister_clocks(struct samsung_i2s_priv *priv)
{ … }
static void i2s_unregister_clock_provider(struct samsung_i2s_priv *priv)
{ … }
static int i2s_register_clock_provider(struct samsung_i2s_priv *priv)
{ … }
static int i2s_create_secondary_device(struct samsung_i2s_priv *priv)
{ … }
static void i2s_delete_secondary_device(struct samsung_i2s_priv *priv)
{ … }
static int samsung_i2s_probe(struct platform_device *pdev)
{ … }
static void samsung_i2s_remove(struct platform_device *pdev)
{ … }
static void fsd_i2s_fixup_early(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static void fsd_i2s_fixup_late(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static const struct samsung_i2s_variant_regs i2sv3_regs = …;
static const struct samsung_i2s_variant_regs i2sv6_regs = …;
static const struct samsung_i2s_variant_regs i2sv7_regs = …;
static const struct samsung_i2s_variant_regs i2sv5_i2s1_regs = …;
static const struct samsung_i2s_dai_data i2sv3_dai_type = …;
static const struct samsung_i2s_dai_data i2sv5_dai_type __maybe_unused = …;
static const struct samsung_i2s_dai_data i2sv6_dai_type __maybe_unused = …;
static const struct samsung_i2s_dai_data i2sv7_dai_type __maybe_unused = …;
static const struct samsung_i2s_dai_data i2sv5_dai_type_i2s1 __maybe_unused = …;
static const struct samsung_i2s_dai_data fsd_dai_type __maybe_unused = …;
static const struct platform_device_id samsung_i2s_driver_ids[] = …;
MODULE_DEVICE_TABLE(platform, samsung_i2s_driver_ids);
#ifdef CONFIG_OF
static const struct of_device_id exynos_i2s_match[] = …;
MODULE_DEVICE_TABLE(of, exynos_i2s_match);
#endif
static const struct dev_pm_ops samsung_i2s_pm = …;
static struct platform_driver samsung_i2s_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;