alistair23-linux/sound/soc/meson/meson-codec-glue.h
Jerome Brunet 9c29fd9bdf
ASoC: meson: g12a: extract codec-to-codec utils
The hdmi routing mechanism used on g12a hdmi is also used:
* other Amlogic SoC types
* for the internal DAC path

Each of these codec glues are slightly different but the idea
behind it remains the same. This change extract some helper functions
from the g12a-tohdmitx driver to make them available for other Amlogic
codecs.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200213155159.3235792-3-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-13 20:57:20 +00:00

33 lines
937 B
C

/* SPDX-License-Identifier: GPL-2.0
*
* Copyright (c) 2018 Baylibre SAS.
* Author: Jerome Brunet <jbrunet@baylibre.com>
*/
#ifndef _MESON_CODEC_GLUE_H
#define _MESON_CODEC_GLUE_H
#include <sound/soc.h>
struct meson_codec_glue_input {
struct snd_soc_pcm_stream params;
unsigned int fmt;
};
/* Input helpers */
struct meson_codec_glue_input *
meson_codec_glue_input_get_data(struct snd_soc_dai *dai);
int meson_codec_glue_input_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai);
int meson_codec_glue_input_set_fmt(struct snd_soc_dai *dai,
unsigned int fmt);
int meson_codec_glue_input_dai_probe(struct snd_soc_dai *dai);
int meson_codec_glue_input_dai_remove(struct snd_soc_dai *dai);
/* Output helpers */
int meson_codec_glue_output_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai);
#endif /* _MESON_CODEC_GLUE_H */