Lines Matching full:dai

25 static int q6dma_set_channel_map(struct snd_soc_dai *dai,  in q6dma_set_channel_map()  argument
30 struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); in q6dma_set_channel_map()
31 struct audioreach_module_config *cfg = &dai_data->module_config[dai->id]; in q6dma_set_channel_map()
34 switch (dai->id) { in q6dma_set_channel_map()
48 dev_err(dai->dev, "tx slot not found\n"); in q6dma_set_channel_map()
53 dev_err(dai->dev, "invalid tx num %d\n", in q6dma_set_channel_map()
72 dev_err(dai->dev, "rx slot not found\n"); in q6dma_set_channel_map()
76 dev_err(dai->dev, "invalid rx num %d\n", in q6dma_set_channel_map()
84 dev_err(dai->dev, "%s: invalid dai id 0x%x\n", in q6dma_set_channel_map()
85 __func__, dai->id); in q6dma_set_channel_map()
95 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) in q6dma_hw_params() argument
97 struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); in q6dma_hw_params()
98 struct audioreach_module_config *cfg = &dai_data->module_config[dai->id]; in q6dma_hw_params()
107 static void q6apm_lpass_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) in q6apm_lpass_dai_shutdown() argument
109 struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); in q6apm_lpass_dai_shutdown()
112 if (!dai_data->is_port_started[dai->id]) in q6apm_lpass_dai_shutdown()
114 rc = q6apm_graph_stop(dai_data->graph[dai->id]); in q6apm_lpass_dai_shutdown()
116 dev_err(dai->dev, "fail to close APM port (%d)\n", rc); in q6apm_lpass_dai_shutdown()
118 q6apm_graph_close(dai_data->graph[dai->id]); in q6apm_lpass_dai_shutdown()
119 dai_data->is_port_started[dai->id] = false; in q6apm_lpass_dai_shutdown()
122 static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) in q6apm_lpass_dai_prepare() argument
124 struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); in q6apm_lpass_dai_prepare()
125 struct audioreach_module_config *cfg = &dai_data->module_config[dai->id]; in q6apm_lpass_dai_prepare()
127 int graph_id = dai->id; in q6apm_lpass_dai_prepare()
135 graph = q6apm_graph_open(dai->dev, NULL, dai->dev, graph_id); in q6apm_lpass_dai_prepare()
137 dev_err(dai->dev, "Failed to open graph (%d)\n", graph_id); in q6apm_lpass_dai_prepare()
145 rc = q6apm_graph_media_format_pcm(dai_data->graph[dai->id], cfg); in q6apm_lpass_dai_prepare()
148 dev_err(dai->dev, "Failed to set media format %d\n", rc); in q6apm_lpass_dai_prepare()
152 rc = q6apm_graph_prepare(dai_data->graph[dai->id]); in q6apm_lpass_dai_prepare()
154 dev_err(dai->dev, "Failed to prepare Graph %d\n", rc); in q6apm_lpass_dai_prepare()
158 rc = q6apm_graph_start(dai_data->graph[dai->id]); in q6apm_lpass_dai_prepare()
160 dev_err(dai->dev, "fail to start APM port %x\n", dai->id); in q6apm_lpass_dai_prepare()
163 dai_data->is_port_started[dai->id] = true; in q6apm_lpass_dai_prepare()
168 static int q6apm_lpass_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) in q6apm_lpass_dai_startup() argument
170 struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); in q6apm_lpass_dai_startup()
172 int graph_id = dai->id; in q6apm_lpass_dai_startup()
175 graph = q6apm_graph_open(dai->dev, NULL, dai->dev, graph_id); in q6apm_lpass_dai_startup()
177 dev_err(dai->dev, "Failed to open graph (%d)\n", graph_id); in q6apm_lpass_dai_startup()
186 static int q6i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) in q6i2s_set_fmt() argument
188 struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev); in q6i2s_set_fmt()
189 struct audioreach_module_config *cfg = &dai_data->module_config[dai->id]; in q6i2s_set_fmt()
214 .name = "q6apm-be-dai-component",
259 MODULE_DESCRIPTION("AUDIOREACH APM LPASS dai driver");