linux/sound/soc/img/img-spdif-in.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * IMG SPDIF input controller driver
 *
 * Copyright (C) 2015 Imagination Technologies Ltd.
 *
 * Author: Damien Horsley <[email protected]>
 */

#include <linux/clk.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.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 IMG_SPDIF_IN_RX_FIFO_OFFSET

#define IMG_SPDIF_IN_CTL
#define IMG_SPDIF_IN_CTL_LOCKLO_MASK
#define IMG_SPDIF_IN_CTL_LOCKLO_SHIFT
#define IMG_SPDIF_IN_CTL_LOCKHI_MASK
#define IMG_SPDIF_IN_CTL_LOCKHI_SHIFT
#define IMG_SPDIF_IN_CTL_TRK_MASK
#define IMG_SPDIF_IN_CTL_TRK_SHIFT
#define IMG_SPDIF_IN_CTL_SRD_MASK
#define IMG_SPDIF_IN_CTL_SRD_SHIFT
#define IMG_SPDIF_IN_CTL_SRT_MASK

#define IMG_SPDIF_IN_STATUS
#define IMG_SPDIF_IN_STATUS_SAM_MASK
#define IMG_SPDIF_IN_STATUS_SAM_SHIFT
#define IMG_SPDIF_IN_STATUS_LOCK_MASK
#define IMG_SPDIF_IN_STATUS_LOCK_SHIFT

#define IMG_SPDIF_IN_CLKGEN
#define IMG_SPDIF_IN_CLKGEN_NOM_MASK
#define IMG_SPDIF_IN_CLKGEN_NOM_SHIFT
#define IMG_SPDIF_IN_CLKGEN_HLD_MASK
#define IMG_SPDIF_IN_CLKGEN_HLD_SHIFT

#define IMG_SPDIF_IN_CSL

#define IMG_SPDIF_IN_CSH
#define IMG_SPDIF_IN_CSH_MASK
#define IMG_SPDIF_IN_CSH_SHIFT

#define IMG_SPDIF_IN_SOFT_RESET
#define IMG_SPDIF_IN_SOFT_RESET_MASK

#define IMG_SPDIF_IN_ACLKGEN_START
#define IMG_SPDIF_IN_ACLKGEN_NOM_MASK
#define IMG_SPDIF_IN_ACLKGEN_NOM_SHIFT
#define IMG_SPDIF_IN_ACLKGEN_HLD_MASK
#define IMG_SPDIF_IN_ACLKGEN_HLD_SHIFT
#define IMG_SPDIF_IN_ACLKGEN_TRK_MASK
#define IMG_SPDIF_IN_ACLKGEN_TRK_SHIFT

#define IMG_SPDIF_IN_NUM_ACLKGEN

struct img_spdif_in {};

static int img_spdif_in_runtime_suspend(struct device *dev)
{}

static int img_spdif_in_runtime_resume(struct device *dev)
{}

static inline void img_spdif_in_writel(struct img_spdif_in *spdif,
					u32 val, u32 reg)
{}

static inline u32 img_spdif_in_readl(struct img_spdif_in *spdif, u32 reg)
{}

static inline void img_spdif_in_aclkgen_writel(struct img_spdif_in *spdif,
						u32 index)
{}

static int img_spdif_in_check_max_rate(struct img_spdif_in *spdif,
		unsigned int sample_rate, unsigned long *actual_freq)
{}

static int img_spdif_in_do_clkgen_calc(unsigned int rate, unsigned int *pnom,
		unsigned int *phld, unsigned long clk_rate)
{}

static int img_spdif_in_do_clkgen_single(struct img_spdif_in *spdif,
		unsigned int rate)
{}

static int img_spdif_in_do_clkgen_multi(struct img_spdif_in *spdif,
		unsigned int multi_freqs[])
{}

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

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

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

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

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

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

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

static int img_spdif_in_get_lock_freq(struct snd_kcontrol *kcontrol,
				  struct snd_ctl_elem_value *uc)
{}

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

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

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

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

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

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

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

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

static struct snd_kcontrol_new img_spdif_in_controls[] =;

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

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

static int img_spdif_in_dai_probe(struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops img_spdif_in_dai_ops =;

static struct snd_soc_dai_driver img_spdif_in_dai =;

static const struct snd_soc_component_driver img_spdif_in_component =;

static int img_spdif_in_probe(struct platform_device *pdev)
{}

static void img_spdif_in_dev_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int img_spdif_in_suspend(struct device *dev)
{}

static int img_spdif_in_resume(struct device *dev)
{}
#endif

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

static const struct dev_pm_ops img_spdif_in_pm_ops =;

static struct platform_driver img_spdif_in_driver =;
module_platform_driver();

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