linux/sound/soc/samsung/midas_wm1811.c

// SPDX-License-Identifier: GPL-2.0+
//
// Midas audio support
//
// Copyright (C) 2018 Simon Shields <[email protected]>
// Copyright (C) 2020 Samsung Electronics Co., Ltd.

#include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/iio/consumer.h>
#include <linux/mfd/wm8994/registers.h>
#include <linux/input-event-codes.h>
#include <linux/module.h>
#include <linux/of.h>
#include <sound/jack.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>

#include "i2s.h"
#include "../codecs/wm8994.h"

/*
 * The MCLK1 clock source is XCLKOUT with its mux set to the external fixed rate
 * oscillator (XXTI).
 */
#define MCLK1_RATE
#define MCLK2_RATE
#define DEFAULT_FLL1_RATE

struct midas_priv {};

static struct snd_soc_jack_pin headset_jack_pins[] =;

/*
 * min_mv/max_mv values in this struct are set up based on DT values.
 */
static struct snd_soc_jack_zone headset_jack_zones[] =;

/*
 * This is used for manual detection in headset_key_check, we reuse the
 * structure since it's convenient.
 *
 * min_mv/max_mv values in this struct are set up based on DT values.
 */
static struct snd_soc_jack_zone headset_key_zones[] =;

static int headset_jack_check(void *data)
{}

static int headset_key_check(void *data)
{}

static struct snd_soc_jack_gpio headset_gpio[] =;

static int midas_start_fll1(struct snd_soc_pcm_runtime *rtd, unsigned int rate)
{}

static int midas_stop_fll1(struct snd_soc_pcm_runtime *rtd)
{}

static int midas_aif1_hw_params(struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *params)
{}

static const struct snd_soc_ops midas_aif1_ops =;

/*
 * We only have a single external speaker, so mix stereo data
 * to a single mono stream.
 */
static int midas_ext_spkmode(struct snd_soc_dapm_widget *w,
			     struct snd_kcontrol *kcontrol, int event)
{}

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

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

static const struct snd_kcontrol_new midas_controls[] =;

static const struct snd_soc_dapm_widget midas_dapm_widgets[] =;

/* Default routing; supplemented by audio-routing DT property */
static const struct snd_soc_dapm_route midas_dapm_routes[] =;

static int midas_set_bias_level(struct snd_soc_card *card,
				struct snd_soc_dapm_context *dapm,
				enum snd_soc_bias_level level)
{}

static int midas_late_probe(struct snd_soc_card *card)
{}

static struct snd_soc_dai_driver midas_ext_dai[] =;

static const struct snd_soc_component_driver midas_component =;

SND_SOC_DAILINK_DEFS();

SND_SOC_DAILINK_DEFS();

SND_SOC_DAILINK_DEFS();

static struct snd_soc_dai_link midas_dai[] =;

static struct snd_soc_card midas_card =;

static int midas_probe(struct platform_device *pdev)
{}

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

static struct platform_driver midas_driver =;
module_platform_driver();

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