linux/sound/soc/codecs/rk3328_codec.c

// SPDX-License-Identifier: GPL-2.0
//
// rk3328 ALSA SoC Audio driver
//
// Copyright (c) 2017, Fuzhou Rockchip Electronics Co., Ltd All rights reserved.

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_params.h>
#include "rk3328_codec.h"

/*
 * volume setting
 * 0: -39dB
 * 26: 0dB
 * 31: 6dB
 * Step: 1.5dB
 */
#define OUT_VOLUME
#define RK3328_GRF_SOC_CON2
#define RK3328_GRF_SOC_CON10
#define INITIAL_FREQ

struct rk3328_codec_priv {};

static const struct reg_default rk3328_codec_reg_defaults[] =;

static int rk3328_codec_reset(struct rk3328_codec_priv *rk3328)
{}

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

static int rk3328_mute_stream(struct snd_soc_dai *dai, int mute, int direction)
{}

static int rk3328_codec_power_on(struct rk3328_codec_priv *rk3328, int wait_ms)
{}

static int rk3328_codec_power_off(struct rk3328_codec_priv *rk3328, int wait_ms)
{}

static const struct rk3328_reg_msk_val playback_open_list[] =;

static int rk3328_codec_open_playback(struct rk3328_codec_priv *rk3328)
{}

static const struct rk3328_reg_msk_val playback_close_list[] =;

static int rk3328_codec_close_playback(struct rk3328_codec_priv *rk3328)
{}

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

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

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

static const struct snd_soc_dai_ops rk3328_dai_ops =;

static struct snd_soc_dai_driver rk3328_dai[] =;

static int rk3328_codec_probe(struct snd_soc_component *component)
{}

static void rk3328_codec_remove(struct snd_soc_component *component)
{}

static const struct snd_soc_component_driver soc_codec_rk3328 =;

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

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

static const struct regmap_config rk3328_codec_regmap_config =;

static int rk3328_platform_probe(struct platform_device *pdev)
{}

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

static struct platform_driver rk3328_codec_driver =;
module_platform_driver();

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