Lines Matching +full:num +full:- +full:channels
1 // SPDX-License-Identifier: GPL-2.0
4 #include <dt-bindings/sound/qcom,q6afe.h>
11 #include <sound/soc-dapm.h>
15 #include "qdsp6/q6dsp-common.h"
29 struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in x1e80100_snd_init()
34 switch (cpu_dai->id) { in x1e80100_snd_init()
37 dp_jack = &data->dp_jack[dp_pcm_id]; in x1e80100_snd_init()
40 dp_pcm_id = cpu_dai->id - DISPLAY_PORT_RX_1 + 1; in x1e80100_snd_init()
41 dp_jack = &data->dp_jack[dp_pcm_id]; in x1e80100_snd_init()
50 return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup); in x1e80100_snd_init()
57 struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in x1e80100_snd_shutdown()
58 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; in x1e80100_snd_shutdown()
60 data->sruntime[cpu_dai->id] = NULL; in x1e80100_snd_shutdown()
70 struct snd_interval *channels = hw_param_interval(params, in x1e80100_be_hw_params_fixup() local
73 rate->min = rate->max = 48000; in x1e80100_be_hw_params_fixup()
74 switch (cpu_dai->id) { in x1e80100_be_hw_params_fixup()
79 channels->min = 1; in x1e80100_be_hw_params_fixup()
93 struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in x1e80100_snd_hw_params()
95 return qcom_snd_sdw_hw_params(substream, params, &data->sruntime[cpu_dai->id]); in x1e80100_snd_hw_params()
98 static int x1e80100_snd_hw_map_channels(unsigned int *ch_map, int num) in x1e80100_snd_hw_map_channels() argument
100 switch (num) { in x1e80100_snd_hw_map_channels()
120 return -EINVAL; in x1e80100_snd_hw_map_channels()
130 struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in x1e80100_snd_prepare()
131 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; in x1e80100_snd_prepare()
132 unsigned int channels = substream->runtime->channels; in x1e80100_snd_prepare() local
136 switch (cpu_dai->id) { in x1e80100_snd_prepare()
139 ret = x1e80100_snd_hw_map_channels(rx_slot, channels); in x1e80100_snd_prepare()
144 channels, rx_slot); in x1e80100_snd_prepare()
153 &data->stream_prepared[cpu_dai->id]); in x1e80100_snd_prepare()
159 struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card); in x1e80100_snd_hw_free()
161 struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; in x1e80100_snd_hw_free()
164 &data->stream_prepared[cpu_dai->id]); in x1e80100_snd_hw_free()
181 if (link->no_pcm == 1) { in x1e80100_add_be_ops()
182 link->init = x1e80100_snd_init; in x1e80100_add_be_ops()
183 link->be_hw_params_fixup = x1e80100_be_hw_params_fixup; in x1e80100_add_be_ops()
184 link->ops = &x1e80100_be_ops; in x1e80100_add_be_ops()
193 struct device *dev = &pdev->dev; in x1e80100_platform_probe()
198 return -ENOMEM; in x1e80100_platform_probe()
202 return -ENOMEM; in x1e80100_platform_probe()
204 card->owner = THIS_MODULE; in x1e80100_platform_probe()
205 card->dev = dev; in x1e80100_platform_probe()
213 card->driver_name = "x1e80100"; in x1e80100_platform_probe()
220 { .compatible = "qcom,x1e80100-sndcard", },
228 .name = "snd-x1e80100",