linux/sound/soc/tegra/tegra210_i2s.c

// SPDX-License-Identifier: GPL-2.0-only
//
// tegra210_i2s.c - Tegra210 I2S driver
//
// Copyright (c) 2020 NVIDIA CORPORATION.  All rights reserved.

#include <linux/clk.h>
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm_params.h>
#include <sound/simple_card_utils.h>
#include <sound/soc.h>
#include "tegra210_i2s.h"
#include "tegra_cif.h"

static const struct reg_default tegra210_i2s_reg_defaults[] =;

static void tegra210_i2s_set_slot_ctrl(struct regmap *regmap,
				       unsigned int total_slots,
				       unsigned int tx_slot_mask,
				       unsigned int rx_slot_mask)
{}

static int tegra210_i2s_set_clock_rate(struct device *dev,
				       unsigned int clock_rate)
{}

static int tegra210_i2s_sw_reset(struct snd_soc_component *compnt,
				 bool is_playback)
{}

static int tegra210_i2s_init(struct snd_soc_dapm_widget *w,
			     struct snd_kcontrol *kcontrol, int event)
{}

static int __maybe_unused tegra210_i2s_runtime_suspend(struct device *dev)
{}

static int __maybe_unused tegra210_i2s_runtime_resume(struct device *dev)
{}

static void tegra210_i2s_set_data_offset(struct tegra210_i2s *i2s,
					 unsigned int data_offset)
{}

static int tegra210_i2s_set_fmt(struct snd_soc_dai *dai,
				unsigned int fmt)
{}

static int tegra210_i2s_set_tdm_slot(struct snd_soc_dai *dai,
				     unsigned int tx_mask, unsigned int rx_mask,
				     int slots, int slot_width)
{}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

static int tegra210_i2s_set_dai_bclk_ratio(struct snd_soc_dai *dai,
					   unsigned int ratio)
{}

static int tegra210_i2s_set_timing_params(struct device *dev,
					  unsigned int sample_size,
					  unsigned int srate,
					  unsigned int channels)
{}

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

static const struct snd_soc_dai_ops tegra210_i2s_dai_ops =;

static struct snd_soc_dai_driver tegra210_i2s_dais[] =;

static const char * const tegra210_i2s_stereo_conv_text[] =;

static const char * const tegra210_i2s_mono_conv_text[] =;

static const struct soc_enum tegra210_i2s_mono_conv_enum =;

static const struct soc_enum tegra210_i2s_stereo_conv_enum =;

static const struct snd_kcontrol_new tegra210_i2s_controls[] =;

static const struct snd_soc_dapm_widget tegra210_i2s_widgets[] =;

static const struct snd_soc_dapm_route tegra210_i2s_routes[] =;

static const struct snd_soc_component_driver tegra210_i2s_cmpnt =;

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

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

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

static const struct regmap_config tegra210_i2s_regmap_config =;

/*
 * The AHUB HW modules are interconnected with CIF which are capable of
 * supporting Channel and Sample bit format conversion. This needs different
 * CIF Audio and client configuration. As one of the config comes from
 * params_channels() or params_format(), the extra configuration is passed from
 * CIF Port of DT I2S node which can help to perform this conversion.
 *
 *    4ch          audio = 4ch      client = 2ch       2ch
 *   -----> ADMAIF -----------> CIF -------------> I2S ---->
 */
static void tegra210_parse_client_convert(struct device *dev)
{}

static int tegra210_i2s_probe(struct platform_device *pdev)
{}

static void tegra210_i2s_remove(struct platform_device *pdev)
{}

static const struct dev_pm_ops tegra210_i2s_pm_ops =;

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

static struct platform_driver tegra210_i2s_driver =;
module_platform_driver()

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