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

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  cht-bsw-max98090.c - ASoc Machine driver for Intel Cherryview-based
 *  platforms Cherrytrail and Braswell, with max98090 & TI codec.
 *
 *  Copyright (C) 2015 Intel Corp
 *  Author: Fang, Yang A <[email protected]>
 *  This file is modified from cht_bsw_rt5645.c
 *  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */

#include <linux/dmi.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/clk.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include <sound/jack.h>
#include "../../codecs/max98090.h"
#include "../atom/sst-atom-controls.h"
#include "../../codecs/ts3a227e.h"

#define CHT_PLAT_CLK_3_HZ
#define CHT_CODEC_DAI

#define QUIRK_PMC_PLT_CLK_0

struct cht_mc_private {};

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

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_ti_jack_event(struct notifier_block *nb,
		unsigned long event, void *data)
{}

static struct notifier_block cht_jack_nb =;

static struct snd_soc_jack_pin hs_jack_pins[] =;

static struct snd_soc_jack_gpio hs_jack_gpios[] =;

static const struct acpi_gpio_params hp_gpios =;
static const struct acpi_gpio_params mic_gpios =;

static const struct acpi_gpio_mapping acpi_max98090_gpios[] =;

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 int cht_max98090_headset_init(struct snd_soc_component *component)
{}

static const struct snd_soc_ops cht_aif1_ops =;

static const struct snd_soc_ops cht_be_ssp2_ops =;

static struct snd_soc_aux_dev cht_max98090_headset_dev =;

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-193C9890:00", "HiFi")));

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 const struct dmi_system_id cht_max98090_quirk_table[] =;

static int snd_cht_mc_probe(struct platform_device *pdev)
{}

static void snd_cht_mc_remove(struct platform_device *pdev)
{}

static struct platform_driver snd_cht_mc_driver =;

module_platform_driver()

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