linux/sound/soc/codecs/rt1308-sdw.c

// SPDX-License-Identifier: GPL-2.0
//
// rt1308-sdw.c -- rt1308 ALSA SoC audio driver
//
// Copyright(c) 2019 Realtek Semiconductor Corp.
//
//
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/pm_runtime.h>
#include <linux/mod_devicetable.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_type.h>
#include <linux/soundwire/sdw_registers.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/sdw.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>

#include "rt1308.h"
#include "rt1308-sdw.h"

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

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

static const struct regmap_config rt1308_sdw_regmap =;

/* Bus clock frequency */
#define RT1308_CLK_FREQ_9600000HZ
#define RT1308_CLK_FREQ_12000000HZ
#define RT1308_CLK_FREQ_6000000HZ
#define RT1308_CLK_FREQ_4800000HZ
#define RT1308_CLK_FREQ_2400000HZ
#define RT1308_CLK_FREQ_12288000HZ

static int rt1308_clock_config(struct device *dev)
{}

static int rt1308_read_prop(struct sdw_slave *slave)
{}

static void rt1308_apply_calib_params(struct rt1308_sdw_priv *rt1308)
{}

static void rt1308_apply_bq_params(struct rt1308_sdw_priv *rt1308)
{}

static int rt1308_io_init(struct device *dev, struct sdw_slave *slave)
{}

static int rt1308_update_status(struct sdw_slave *slave,
					enum sdw_slave_status status)
{}

static int rt1308_bus_config(struct sdw_slave *slave,
				struct sdw_bus_params *params)
{}

static int rt1308_interrupt_callback(struct sdw_slave *slave,
					struct sdw_slave_intr_status *status)
{}

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

static const char * const rt1308_rx_data_ch_select[] =;

static SOC_ENUM_SINGLE_DECL(rt1308_rx_data_ch_enum,
	RT1308_SDW_OFFSET | (RT1308_DATA_PATH << 4), 0,
	rt1308_rx_data_ch_select);

static const struct snd_kcontrol_new rt1308_snd_controls[] =;

static const struct snd_kcontrol_new rt1308_sto_dac_l =;

static const struct snd_kcontrol_new rt1308_sto_dac_r =;

static const struct snd_soc_dapm_widget rt1308_dapm_widgets[] =;

static const struct snd_soc_dapm_route rt1308_dapm_routes[] =;

static int rt1308_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
				int direction)
{}

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

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

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

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

/*
 * slave_ops: callbacks for get_clock_stop_mode, clock_stop and
 * port_prep are not defined for now
 */
static const struct sdw_slave_ops rt1308_slave_ops =;

static int rt1308_sdw_parse_dt(struct rt1308_sdw_priv *rt1308, struct device *dev)
{}

static int rt1308_sdw_component_probe(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_component_sdw_rt1308 =;

static const struct snd_soc_dai_ops rt1308_aif_dai_ops =;

#define RT1308_STEREO_RATES
#define RT1308_FORMATS

static struct snd_soc_dai_driver rt1308_sdw_dai[] =;

static int rt1308_sdw_init(struct device *dev, struct regmap *regmap,
				struct sdw_slave *slave)
{}

static int rt1308_sdw_probe(struct sdw_slave *slave,
				const struct sdw_device_id *id)
{}

static int rt1308_sdw_remove(struct sdw_slave *slave)
{}

static const struct sdw_device_id rt1308_id[] =;
MODULE_DEVICE_TABLE(sdw, rt1308_id);

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

#define RT1308_PROBE_TIMEOUT

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

static const struct dev_pm_ops rt1308_pm =;

static struct sdw_driver rt1308_sdw_driver =;
module_sdw_driver();

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