linux/sound/soc/amd/acp3x-rt5682-max9836.c

// SPDX-License-Identifier: GPL-2.0+
//
// Machine driver for AMD ACP Audio engine using DA7219 & MAX98357 codec.
//
//Copyright 2016 Advanced Micro Devices, Inc.

#include <sound/core.h>
#include <sound/soc.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc-dapm.h>
#include <sound/jack.h>
#include <linux/clk.h>
#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <linux/io.h>
#include <linux/acpi.h>

#include "raven/acp3x.h"
#include "../codecs/rt5682.h"
#include "../codecs/rt1015.h"

#define PCO_PLAT_CLK
#define RT5682_PLL_FREQ
#define DUAL_CHANNEL

static struct snd_soc_jack pco_jack;
static struct snd_soc_jack_pin pco_jack_pins[] =;

static struct clk *rt5682_dai_wclk;
static struct clk *rt5682_dai_bclk;
static struct gpio_desc *dmic_sel;
void *soc_is_rltk_max(struct device *dev);

enum {};

static int acp3x_5682_init(struct snd_soc_pcm_runtime *rtd)
{}

static int rt5682_clk_enable(struct snd_pcm_substream *substream)
{}

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

static void rt5682_clk_disable(void)
{}

static const unsigned int channels[] =;

static const unsigned int rates[] =;

static const struct snd_pcm_hw_constraint_list constraints_rates =;

static const struct snd_pcm_hw_constraint_list constraints_channels =;

static int acp3x_5682_startup(struct snd_pcm_substream *substream)
{}

static int acp3x_max_startup(struct snd_pcm_substream *substream)
{}

static int acp3x_ec_dmic0_startup(struct snd_pcm_substream *substream)
{}

static int dmic_switch;

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

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

static void rt5682_shutdown(struct snd_pcm_substream *substream)
{}

static const struct snd_soc_ops acp3x_5682_ops =;

static const struct snd_soc_ops acp3x_max_play_ops =;

static const struct snd_soc_ops acp3x_ec_cap0_ops =;

SND_SOC_DAILINK_DEF(acp3x_i2s,
	DAILINK_COMP_ARRAY(COMP_CPU("acp3x_i2s_playcap.0")));
SND_SOC_DAILINK_DEF(acp3x_bt,
	DAILINK_COMP_ARRAY(COMP_CPU("acp3x_i2s_playcap.2")));

SND_SOC_DAILINK_DEF(rt5682,
	DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5682:00", "rt5682-aif1")));
SND_SOC_DAILINK_DEF(max,
	DAILINK_COMP_ARRAY(COMP_CODEC("MX98357A:00", "HiFi")));
SND_SOC_DAILINK_DEF(rt1015p,
	DAILINK_COMP_ARRAY(COMP_CODEC("RTL1015:00", "HiFi")));
SND_SOC_DAILINK_DEF();
SND_SOC_DAILINK_DEF(cros_ec,
	DAILINK_COMP_ARRAY(COMP_CODEC("GOOG0013:00", "EC Codec I2S RX")));

SND_SOC_DAILINK_DEF(platform,
	DAILINK_COMP_ARRAY(COMP_PLATFORM("acp3x_rv_i2s_dma.0")));

static struct snd_soc_codec_conf rt1015_conf[] =;

static struct snd_soc_dai_link acp3x_dai[] =;

static const char * const dmic_mux_text[] =;

static SOC_ENUM_SINGLE_DECL(
		acp3x_dmic_enum, SND_SOC_NOPM, 0, dmic_mux_text);

static const struct snd_kcontrol_new acp3x_dmic_mux_control =;

static const struct snd_soc_dapm_widget acp3x_5682_widgets[] =;

static const struct snd_soc_dapm_route acp3x_5682_audio_route[] =;

static const struct snd_kcontrol_new acp3x_5682_mc_controls[] =;

static struct snd_soc_card acp3x_5682 =;

static const struct snd_soc_dapm_widget acp3x_1015_widgets[] =;

static const struct snd_soc_dapm_route acp3x_1015_route[] =;

static const struct snd_kcontrol_new acp3x_mc_1015_controls[] =;

static struct snd_soc_card acp3x_1015 =;

static const struct snd_soc_dapm_widget acp3x_1015p_widgets[] =;

static const struct snd_soc_dapm_route acp3x_1015p_route[] =;

static const struct snd_kcontrol_new acp3x_mc_1015p_controls[] =;

static struct snd_soc_card acp3x_1015p =;

void *soc_is_rltk_max(struct device *dev)
{}

static void card_spk_dai_link_present(struct snd_soc_dai_link *links,
						const char *card_name)
{}

static int acp3x_probe(struct platform_device *pdev)
{}

static const struct acpi_device_id acp3x_audio_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, acp3x_audio_acpi_match);

static struct platform_driver acp3x_audio =;

module_platform_driver();

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