linux/sound/soc/fsl/fsl_xcvr.c

// SPDX-License-Identifier: GPL-2.0
// Copyright 2019 NXP

#include <linux/bitrev.h>
#include <linux/clk.h>
#include <linux/firmware.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_iec958.h>
#include <sound/pcm_params.h>

#include "fsl_xcvr.h"
#include "fsl_utils.h"
#include "imx-pcm.h"

#define FSL_XCVR_CAPDS_SIZE

enum fsl_xcvr_pll_verison {};

struct fsl_xcvr_soc_data {};

struct fsl_xcvr {};

static const struct fsl_xcvr_pll_conf {} fsl_xcvr_pll_cfg[] =;

/*
 * HDMI2.1 spec defines 6- and 12-channels layout for one bit audio
 * stream. Todo: to check how this case can be considered below
 */
static const u32 fsl_xcvr_earc_channels[] =;
static const struct snd_pcm_hw_constraint_list fsl_xcvr_earc_channels_constr =;

static const u32 fsl_xcvr_earc_rates[] =;
static const struct snd_pcm_hw_constraint_list fsl_xcvr_earc_rates_constr =;

static const u32 fsl_xcvr_spdif_channels[] =;
static const struct snd_pcm_hw_constraint_list fsl_xcvr_spdif_channels_constr =;

static const u32 fsl_xcvr_spdif_rates[] =;
static const struct snd_pcm_hw_constraint_list fsl_xcvr_spdif_rates_constr =;

static int fsl_xcvr_arc_mode_put(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_value *ucontrol)
{}

static int fsl_xcvr_arc_mode_get(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_value *ucontrol)
{}

static const u32 fsl_xcvr_phy_arc_cfg[] =;

static const char * const fsl_xcvr_arc_mode[] =;
static const struct soc_enum fsl_xcvr_arc_mode_enum =;
static struct snd_kcontrol_new fsl_xcvr_arc_mode_kctl =;

/* Capabilities data structure, bytes */
static int fsl_xcvr_type_capds_bytes_info(struct snd_kcontrol *kcontrol,
					  struct snd_ctl_elem_info *uinfo)
{}

static int fsl_xcvr_capds_get(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{}

static int fsl_xcvr_capds_put(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{}

static struct snd_kcontrol_new fsl_xcvr_earc_capds_kctl =;

static int fsl_xcvr_activate_ctl(struct snd_soc_dai *dai, const char *name,
				 bool active)
{}

static int fsl_xcvr_mode_put(struct snd_kcontrol *kcontrol,
			     struct snd_ctl_elem_value *ucontrol)
{}

static int fsl_xcvr_mode_get(struct snd_kcontrol *kcontrol,
			     struct snd_ctl_elem_value *ucontrol)
{}

static const char * const fsl_xcvr_mode[] =;
static const struct soc_enum fsl_xcvr_mode_enum =;
static struct snd_kcontrol_new fsl_xcvr_mode_kctl =;

/** phy: true => phy, false => pll */
static int fsl_xcvr_ai_write(struct fsl_xcvr *xcvr, u8 reg, u32 data, bool phy)
{}

static int fsl_xcvr_en_phy_pll(struct fsl_xcvr *xcvr, u32 freq, bool tx)
{}

static int fsl_xcvr_en_aud_pll(struct fsl_xcvr *xcvr, u32 freq)
{}

#define FSL_XCVR_SPDIF_RX_FREQ
static int fsl_xcvr_prepare(struct snd_pcm_substream *substream,
			    struct snd_soc_dai *dai)
{}

static int fsl_xcvr_constr(const struct snd_pcm_substream *substream,
			   const struct snd_pcm_hw_constraint_list *channels,
			   const struct snd_pcm_hw_constraint_list *rates)
{}

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

static void fsl_xcvr_shutdown(struct snd_pcm_substream *substream,
			      struct snd_soc_dai *dai)
{}

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

static int fsl_xcvr_load_firmware(struct fsl_xcvr *xcvr)
{}

static int fsl_xcvr_type_iec958_info(struct snd_kcontrol *kcontrol,
				     struct snd_ctl_elem_info *uinfo)
{}

static int fsl_xcvr_type_iec958_bytes_info(struct snd_kcontrol *kcontrol,
					   struct snd_ctl_elem_info *uinfo)
{}

static int fsl_xcvr_rx_cs_get(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{}

static int fsl_xcvr_tx_cs_get(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{}

static int fsl_xcvr_tx_cs_put(struct snd_kcontrol *kcontrol,
			      struct snd_ctl_elem_value *ucontrol)
{}

static struct snd_kcontrol_new fsl_xcvr_rx_ctls[] =;

static struct snd_kcontrol_new fsl_xcvr_tx_ctls[] =;

static int fsl_xcvr_dai_probe(struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops fsl_xcvr_dai_ops =;

static struct snd_soc_dai_driver fsl_xcvr_dai =;

static const struct snd_soc_component_driver fsl_xcvr_comp =;

static const struct reg_default fsl_xcvr_reg_defaults[] =;

static bool fsl_xcvr_readable_reg(struct device *dev, unsigned int reg)
{}

static bool fsl_xcvr_writeable_reg(struct device *dev, unsigned int reg)
{}

static bool fsl_xcvr_volatile_reg(struct device *dev, unsigned int reg)
{}

static const struct regmap_config fsl_xcvr_regmap_cfg =;

static irqreturn_t irq0_isr(int irq, void *devid)
{}

static const struct fsl_xcvr_soc_data fsl_xcvr_imx8mp_data =;

static const struct fsl_xcvr_soc_data fsl_xcvr_imx93_data =;

static const struct fsl_xcvr_soc_data fsl_xcvr_imx95_data =;

static const struct of_device_id fsl_xcvr_dt_ids[] =;
MODULE_DEVICE_TABLE(of, fsl_xcvr_dt_ids);

static int fsl_xcvr_probe(struct platform_device *pdev)
{}

static void fsl_xcvr_remove(struct platform_device *pdev)
{}

static int fsl_xcvr_runtime_suspend(struct device *dev)
{}

static int fsl_xcvr_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops fsl_xcvr_pm_ops =;

static struct platform_driver fsl_xcvr_driver =;
module_platform_driver();

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