linux/sound/soc/amd/vangogh/acp5x-mach.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Machine driver for AMD Vangogh platform using either
 * NAU8821 & CS35L41 or NAU8821 & MAX98388 codecs.
 *
 * Copyright 2021 Advanced Micro Devices, Inc.
 */

#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/input-event-codes.h>
#include <linux/module.h>
#include <sound/jack.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>

#include "../../codecs/nau8821.h"
#include "acp5x.h"

#define DRV_NAME
#define DUAL_CHANNEL
#define ACP5X_NAU8821_BCLK
#define ACP5X_NAU8821_FREQ_OUT
#define ACP5X_NAU8821_COMP_NAME
#define ACP5X_NAU8821_DAI_NAME
#define ACP5X_CS35L41_COMP_LNAME
#define ACP5X_CS35L41_COMP_RNAME
#define ACP5X_CS35L41_DAI_NAME
#define ACP5X_MAX98388_COMP_LNAME
#define ACP5X_MAX98388_COMP_RNAME
#define ACP5X_MAX98388_DAI_NAME

static struct snd_soc_jack vg_headset;

SND_SOC_DAILINK_DEF(platform,  DAILINK_COMP_ARRAY(COMP_PLATFORM("acp5x_i2s_dma.0")));
SND_SOC_DAILINK_DEF(acp5x_i2s, DAILINK_COMP_ARRAY(COMP_CPU("acp5x_i2s_playcap.0")));
SND_SOC_DAILINK_DEF(acp5x_bt,  DAILINK_COMP_ARRAY(COMP_CPU("acp5x_i2s_playcap.1")));
SND_SOC_DAILINK_DEF(nau8821,   DAILINK_COMP_ARRAY(COMP_CODEC(ACP5X_NAU8821_COMP_NAME,
							     ACP5X_NAU8821_DAI_NAME)));

static struct snd_soc_jack_pin acp5x_nau8821_jack_pins[] =;

static const struct snd_kcontrol_new acp5x_8821_controls[] =;

static int platform_clock_control(struct snd_soc_dapm_widget *w,
				  struct snd_kcontrol *k, int event)
{}

static int acp5x_8821_init(struct snd_soc_pcm_runtime *rtd)
{}

static const unsigned int rates[] =;

static const struct snd_pcm_hw_constraint_list constraints_rates =;

static const unsigned int channels[] =;

static const struct snd_pcm_hw_constraint_list constraints_channels =;

static const unsigned int acp5x_nau8821_format[] =;

static struct snd_pcm_hw_constraint_list constraints_sample_bits =;

static int acp5x_8821_startup(struct snd_pcm_substream *substream)
{}

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

static const struct snd_soc_ops acp5x_8821_ops =;

static int acp5x_cs35l41_startup(struct snd_pcm_substream *substream)
{}

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

static const struct snd_soc_ops acp5x_cs35l41_play_ops =;

static struct snd_soc_codec_conf acp5x_cs35l41_conf[] =;

SND_SOC_DAILINK_DEF();

static struct snd_soc_dai_link acp5x_8821_35l41_dai[] =;

static const struct snd_soc_dapm_widget acp5x_8821_35l41_widgets[] =;

static const struct snd_soc_dapm_route acp5x_8821_35l41_audio_route[] =;

static struct snd_soc_card acp5x_8821_35l41_card =;

static int acp5x_max98388_startup(struct snd_pcm_substream *substream)
{}

static const struct snd_soc_ops acp5x_max98388_play_ops =;

static struct snd_soc_codec_conf acp5x_max98388_conf[] =;

SND_SOC_DAILINK_DEF();

static struct snd_soc_dai_link acp5x_8821_98388_dai[] =;

static const struct snd_soc_dapm_widget acp5x_8821_98388_widgets[] =;

static const struct snd_soc_dapm_route acp5x_8821_98388_route[] =;

static struct snd_soc_card acp5x_8821_98388_card =;

static const struct dmi_system_id acp5x_vg_quirk_table[] =;

static int acp5x_probe(struct platform_device *pdev)
{}

static struct platform_driver acp5x_mach_driver =;

module_platform_driver();

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