linux/sound/soc/intel/boards/cht_bsw_nau8824.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  cht-bsw-nau8824.c - ASoc Machine driver for Intel Cherryview-based
 *          platforms Cherrytrail and Braswell, with nau8824 codec.
 *
 *  Copyright (C) 2018 Intel Corp
 *  Copyright (C) 2018 Nuvoton Technology Corp
 *
 *  Author: Wang, Joseph C <[email protected]>
 *  Co-author: John Hsu <[email protected]>
 *  This file is based on cht_bsw_rt5672.c and cht-bsw-max98090.c
 */

#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include <sound/jack.h>
#include <linux/input.h>
#include "../atom/sst-atom-controls.h"
#include "../../codecs/nau8824.h"

struct cht_mc_private {};

static struct snd_soc_jack_pin cht_bsw_jack_pins[] =;

static const struct snd_soc_dapm_widget cht_dapm_widgets[] =;

static const struct snd_soc_dapm_route cht_audio_map[] =;

static const struct snd_kcontrol_new cht_mc_controls[] =;

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

static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
{}

static int cht_codec_fixup(struct snd_soc_pcm_runtime *rtd,
	struct snd_pcm_hw_params *params)
{}

static int cht_aif1_startup(struct snd_pcm_substream *substream)
{}

static const struct snd_soc_ops cht_aif1_ops =;

static const struct snd_soc_ops cht_be_ssp2_ops =;

SND_SOC_DAILINK_DEF(dummy,
	DAILINK_COMP_ARRAY(COMP_DUMMY()));

SND_SOC_DAILINK_DEF(media,
	DAILINK_COMP_ARRAY(COMP_CPU("media-cpu-dai")));

SND_SOC_DAILINK_DEF(deepbuffer,
	DAILINK_COMP_ARRAY(COMP_CPU("deepbuffer-cpu-dai")));

SND_SOC_DAILINK_DEF(ssp2_port,
	DAILINK_COMP_ARRAY(COMP_CPU("ssp2-port")));
SND_SOC_DAILINK_DEF(ssp2_codec,
	DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508824:00",
				      NAU8824_CODEC_DAI)));

SND_SOC_DAILINK_DEF(platform,
	DAILINK_COMP_ARRAY(COMP_PLATFORM("sst-mfld-platform")));

static struct snd_soc_dai_link cht_dailink[] =;

/* use space before codec name to simplify card ID, and simplify driver name */
#define SOF_CARD_NAME
#define SOF_DRIVER_NAME

#define CARD_NAME
#define DRIVER_NAME

/* SoC card */
static struct snd_soc_card snd_soc_card_cht =;

static int snd_cht_mc_probe(struct platform_device *pdev)
{}

static struct platform_driver snd_cht_mc_driver =;

module_platform_driver();

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