at v6.19 61 lines 2.2 kB view raw
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * The MIPI SDCA specification is available for public downloads at 4 * https://www.mipi.org/mipi-sdca-v1-0-download 5 * 6 * Copyright (C) 2025 Cirrus Logic, Inc. and 7 * Cirrus Logic International Semiconductor Ltd. 8 */ 9 10#ifndef __SDCA_ASOC_H__ 11#define __SDCA_ASOC_H__ 12 13struct device; 14struct regmap; 15struct sdca_function_data; 16struct snd_kcontrol_new; 17struct snd_pcm_hw_params; 18struct snd_pcm_substream; 19struct snd_soc_component_driver; 20struct snd_soc_dai; 21struct snd_soc_dai_driver; 22struct snd_soc_dai_ops; 23struct snd_soc_dapm_route; 24struct snd_soc_dapm_widget; 25 26int sdca_asoc_count_component(struct device *dev, struct sdca_function_data *function, 27 int *num_widgets, int *num_routes, int *num_controls, 28 int *num_dais); 29 30int sdca_asoc_populate_dapm(struct device *dev, struct sdca_function_data *function, 31 struct snd_soc_dapm_widget *widgets, 32 struct snd_soc_dapm_route *routes); 33int sdca_asoc_populate_controls(struct device *dev, 34 struct sdca_function_data *function, 35 struct snd_kcontrol_new *kctl); 36int sdca_asoc_populate_dais(struct device *dev, struct sdca_function_data *function, 37 struct snd_soc_dai_driver *dais, 38 const struct snd_soc_dai_ops *ops); 39 40int sdca_asoc_populate_component(struct device *dev, 41 struct sdca_function_data *function, 42 struct snd_soc_component_driver *component_drv, 43 struct snd_soc_dai_driver **dai_drv, int *num_dai_drv, 44 const struct snd_soc_dai_ops *ops); 45 46int sdca_asoc_set_constraints(struct device *dev, struct regmap *regmap, 47 struct sdca_function_data *function, 48 struct snd_pcm_substream *substream, 49 struct snd_soc_dai *dai); 50void sdca_asoc_free_constraints(struct snd_pcm_substream *substream, 51 struct snd_soc_dai *dai); 52int sdca_asoc_get_port(struct device *dev, struct regmap *regmap, 53 struct sdca_function_data *function, 54 struct snd_soc_dai *dai); 55int sdca_asoc_hw_params(struct device *dev, struct regmap *regmap, 56 struct sdca_function_data *function, 57 struct snd_pcm_substream *substream, 58 struct snd_pcm_hw_params *params, 59 struct snd_soc_dai *dai); 60 61#endif // __SDCA_ASOC_H__