linux/sound/soc/uniphier/aio-cpu.c

// SPDX-License-Identifier: GPL-2.0
//
// Socionext UniPhier AIO ALSA CPU DAI driver.
//
// Copyright (c) 2016-2018 Socionext Inc.

#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>

#include "aio.h"

static bool is_valid_pll(struct uniphier_aio_chip *chip, int pll_id)
{}

/**
 * find_volume - find volume supported HW port by HW port number
 * @chip: the AIO chip pointer
 * @oport_hw: HW port number, one of AUD_HW_XXXX
 *
 * Find AIO device from device list by HW port number. Volume feature is
 * available only in Output and PCM ports, this limitation comes from HW
 * specifications.
 *
 * Return: The pointer of AIO substream if successful, otherwise NULL on error.
 */
static struct uniphier_aio_sub *find_volume(struct uniphier_aio_chip *chip,
					    int oport_hw)
{}

static bool match_spec(const struct uniphier_aio_spec *spec,
		       const char *name, int dir)
{}

/**
 * find_spec - find HW specification info by name
 * @aio: the AIO device pointer
 * @name: name of device
 * @direction: the direction of substream, SNDRV_PCM_STREAM_*
 *
 * Find hardware specification information from list by device name. This
 * information is used for telling the difference of SoCs to driver.
 *
 * Specification list is array of 'struct uniphier_aio_spec' which is defined
 * in each drivers (see: aio-i2s.c).
 *
 * Return: The pointer of hardware specification of AIO if successful,
 * otherwise NULL on error.
 */
static const struct uniphier_aio_spec *find_spec(struct uniphier_aio *aio,
						 const char *name,
						 int direction)
{}

/**
 * find_divider - find clock divider by frequency
 * @aio: the AIO device pointer
 * @pll_id: PLL ID, should be AUD_PLL_XX
 * @freq: required frequency
 *
 * Find suitable clock divider by frequency.
 *
 * Return: The ID of PLL if successful, otherwise negative error value.
 */
static int find_divider(struct uniphier_aio *aio, int pll_id, unsigned int freq)
{}

static int uniphier_aio_set_sysclk(struct snd_soc_dai *dai, int clk_id,
				   unsigned int freq, int dir)
{}

static int uniphier_aio_set_pll(struct snd_soc_dai *dai, int pll_id,
				int source, unsigned int freq_in,
				unsigned int freq_out)
{}

static int uniphier_aio_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{}

static int uniphier_aio_startup(struct snd_pcm_substream *substream,
				struct snd_soc_dai *dai)
{}

static void uniphier_aio_shutdown(struct snd_pcm_substream *substream,
				  struct snd_soc_dai *dai)
{}

static int uniphier_aio_hw_params(struct snd_pcm_substream *substream,
				  struct snd_pcm_hw_params *params,
				  struct snd_soc_dai *dai)
{}

static int uniphier_aio_hw_free(struct snd_pcm_substream *substream,
				struct snd_soc_dai *dai)
{}

static int uniphier_aio_prepare(struct snd_pcm_substream *substream,
				struct snd_soc_dai *dai)
{}

static int uniphier_aio_dai_probe(struct snd_soc_dai *dai)
{}

static int uniphier_aio_dai_remove(struct snd_soc_dai *dai)
{}

static int uniphier_aio_ld11_probe(struct snd_soc_dai *dai)
{}

static int uniphier_aio_pxs2_probe(struct snd_soc_dai *dai)
{}

const struct snd_soc_dai_ops uniphier_aio_i2s_ld11_ops =;
EXPORT_SYMBOL_GPL();

const struct snd_soc_dai_ops uniphier_aio_spdif_ld11_ops =;
EXPORT_SYMBOL_GPL();

const struct snd_soc_dai_ops uniphier_aio_spdif_ld11_ops2 =;
EXPORT_SYMBOL_GPL();

const struct snd_soc_dai_ops uniphier_aio_i2s_pxs2_ops =;
EXPORT_SYMBOL_GPL();

const struct snd_soc_dai_ops uniphier_aio_spdif_pxs2_ops =;
EXPORT_SYMBOL_GPL();

const struct snd_soc_dai_ops uniphier_aio_spdif_pxs2_ops2 =;
EXPORT_SYMBOL_GPL();

static void uniphier_aio_dai_suspend(struct snd_soc_dai *dai)
{}

static int uniphier_aio_suspend(struct snd_soc_component *component)
{}

static int uniphier_aio_dai_resume(struct snd_soc_dai *dai)
{}

static int uniphier_aio_resume(struct snd_soc_component *component)
{}

static int uniphier_aio_vol_info(struct snd_kcontrol *kcontrol,
				 struct snd_ctl_elem_info *uinfo)
{}

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

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

static const struct snd_kcontrol_new uniphier_aio_controls[] =;

static const struct snd_soc_component_driver uniphier_aio_component =;

int uniphier_aio_probe(struct platform_device *pdev)
{}
EXPORT_SYMBOL_GPL();

void uniphier_aio_remove(struct platform_device *pdev)
{}
EXPORT_SYMBOL_GPL();

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