mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
Use the previously parsed DisCo information from ACPI to create the DAI drivers required to connect an SDCA Function into an ASoC soundcard. Create DAI driver structures and populate the supported sample rates and sample widths into them based on the Input/Output Terminal and any attach Clock Source entities. More complex relationships with channels etc. will be added later as constraints as part of the DAI startup. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20250516131011.221310-8-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
43 lines
1.4 KiB
C
43 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* The MIPI SDCA specification is available for public downloads at
|
|
* https://www.mipi.org/mipi-sdca-v1-0-download
|
|
*
|
|
* Copyright (C) 2025 Cirrus Logic, Inc. and
|
|
* Cirrus Logic International Semiconductor Ltd.
|
|
*/
|
|
|
|
#ifndef __SDCA_ASOC_H__
|
|
#define __SDCA_ASOC_H__
|
|
|
|
struct device;
|
|
struct sdca_function_data;
|
|
struct snd_kcontrol_new;
|
|
struct snd_soc_component_driver;
|
|
struct snd_soc_dai_driver;
|
|
struct snd_soc_dai_ops;
|
|
struct snd_soc_dapm_route;
|
|
struct snd_soc_dapm_widget;
|
|
|
|
int sdca_asoc_count_component(struct device *dev, struct sdca_function_data *function,
|
|
int *num_widgets, int *num_routes, int *num_controls,
|
|
int *num_dais);
|
|
|
|
int sdca_asoc_populate_dapm(struct device *dev, struct sdca_function_data *function,
|
|
struct snd_soc_dapm_widget *widgets,
|
|
struct snd_soc_dapm_route *routes);
|
|
int sdca_asoc_populate_controls(struct device *dev,
|
|
struct sdca_function_data *function,
|
|
struct snd_kcontrol_new *kctl);
|
|
int sdca_asoc_populate_dais(struct device *dev, struct sdca_function_data *function,
|
|
struct snd_soc_dai_driver *dais,
|
|
const struct snd_soc_dai_ops *ops);
|
|
|
|
int sdca_asoc_populate_component(struct device *dev,
|
|
struct sdca_function_data *function,
|
|
struct snd_soc_component_driver *component_drv,
|
|
struct snd_soc_dai_driver **dai_drv, int *num_dai_drv,
|
|
const struct snd_soc_dai_ops *ops);
|
|
|
|
#endif // __SDCA_ASOC_H__
|