130ad723bSSrinivas Kandagatla // SPDX-License-Identifier: GPL-2.0
230ad723bSSrinivas Kandagatla // Copyright (c) 2021, Linaro Limited
330ad723bSSrinivas Kandagatla
430ad723bSSrinivas Kandagatla #include <linux/err.h>
530ad723bSSrinivas Kandagatla #include <linux/init.h>
630ad723bSSrinivas Kandagatla #include <linux/module.h>
730ad723bSSrinivas Kandagatla #include <linux/device.h>
830ad723bSSrinivas Kandagatla #include <linux/platform_device.h>
930ad723bSSrinivas Kandagatla #include <linux/slab.h>
1030ad723bSSrinivas Kandagatla #include <sound/pcm.h>
1130ad723bSSrinivas Kandagatla #include <sound/soc.h>
1230ad723bSSrinivas Kandagatla #include <sound/pcm_params.h>
1330ad723bSSrinivas Kandagatla #include "q6dsp-lpass-ports.h"
142f6860e6SSrinivas Kandagatla #include "q6dsp-common.h"
1530ad723bSSrinivas Kandagatla #include "audioreach.h"
1630ad723bSSrinivas Kandagatla #include "q6apm.h"
1730ad723bSSrinivas Kandagatla
1830ad723bSSrinivas Kandagatla #define AUDIOREACH_BE_PCM_BASE 16
1930ad723bSSrinivas Kandagatla
2030ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data {
2130ad723bSSrinivas Kandagatla struct q6apm_graph *graph[APM_PORT_MAX];
2230ad723bSSrinivas Kandagatla bool is_port_started[APM_PORT_MAX];
2330ad723bSSrinivas Kandagatla struct audioreach_module_config module_config[APM_PORT_MAX];
2430ad723bSSrinivas Kandagatla };
2530ad723bSSrinivas Kandagatla
q6dma_set_channel_map(struct snd_soc_dai * dai,unsigned int tx_num,unsigned int * tx_ch_mask,unsigned int rx_num,unsigned int * rx_ch_mask)2630ad723bSSrinivas Kandagatla static int q6dma_set_channel_map(struct snd_soc_dai *dai,
2730ad723bSSrinivas Kandagatla unsigned int tx_num, unsigned int *tx_ch_mask,
2830ad723bSSrinivas Kandagatla unsigned int rx_num, unsigned int *rx_ch_mask)
2930ad723bSSrinivas Kandagatla {
3030ad723bSSrinivas Kandagatla
3130ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
3230ad723bSSrinivas Kandagatla struct audioreach_module_config *cfg = &dai_data->module_config[dai->id];
3330ad723bSSrinivas Kandagatla int ch_mask;
3430ad723bSSrinivas Kandagatla
3530ad723bSSrinivas Kandagatla switch (dai->id) {
3630ad723bSSrinivas Kandagatla case WSA_CODEC_DMA_TX_0:
3730ad723bSSrinivas Kandagatla case WSA_CODEC_DMA_TX_1:
3830ad723bSSrinivas Kandagatla case WSA_CODEC_DMA_TX_2:
3930ad723bSSrinivas Kandagatla case VA_CODEC_DMA_TX_0:
4030ad723bSSrinivas Kandagatla case VA_CODEC_DMA_TX_1:
4130ad723bSSrinivas Kandagatla case VA_CODEC_DMA_TX_2:
4230ad723bSSrinivas Kandagatla case TX_CODEC_DMA_TX_0:
4330ad723bSSrinivas Kandagatla case TX_CODEC_DMA_TX_1:
4430ad723bSSrinivas Kandagatla case TX_CODEC_DMA_TX_2:
4530ad723bSSrinivas Kandagatla case TX_CODEC_DMA_TX_3:
4630ad723bSSrinivas Kandagatla case TX_CODEC_DMA_TX_4:
4730ad723bSSrinivas Kandagatla case TX_CODEC_DMA_TX_5:
4830ad723bSSrinivas Kandagatla if (!tx_ch_mask) {
4930ad723bSSrinivas Kandagatla dev_err(dai->dev, "tx slot not found\n");
5030ad723bSSrinivas Kandagatla return -EINVAL;
5130ad723bSSrinivas Kandagatla }
5230ad723bSSrinivas Kandagatla
5330ad723bSSrinivas Kandagatla if (tx_num > AR_PCM_MAX_NUM_CHANNEL) {
5430ad723bSSrinivas Kandagatla dev_err(dai->dev, "invalid tx num %d\n",
5530ad723bSSrinivas Kandagatla tx_num);
5630ad723bSSrinivas Kandagatla return -EINVAL;
5730ad723bSSrinivas Kandagatla }
5830ad723bSSrinivas Kandagatla ch_mask = *tx_ch_mask;
5930ad723bSSrinivas Kandagatla
6030ad723bSSrinivas Kandagatla break;
6130ad723bSSrinivas Kandagatla case WSA_CODEC_DMA_RX_0:
6230ad723bSSrinivas Kandagatla case WSA_CODEC_DMA_RX_1:
6330ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_0:
6430ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_1:
6530ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_2:
6630ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_3:
6730ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_4:
6830ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_5:
6930ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_6:
7030ad723bSSrinivas Kandagatla case RX_CODEC_DMA_RX_7:
7130ad723bSSrinivas Kandagatla /* rx */
7230ad723bSSrinivas Kandagatla if (!rx_ch_mask) {
7330ad723bSSrinivas Kandagatla dev_err(dai->dev, "rx slot not found\n");
7430ad723bSSrinivas Kandagatla return -EINVAL;
7530ad723bSSrinivas Kandagatla }
7630ad723bSSrinivas Kandagatla if (rx_num > APM_PORT_MAX_AUDIO_CHAN_CNT) {
7730ad723bSSrinivas Kandagatla dev_err(dai->dev, "invalid rx num %d\n",
7830ad723bSSrinivas Kandagatla rx_num);
7930ad723bSSrinivas Kandagatla return -EINVAL;
8030ad723bSSrinivas Kandagatla }
8130ad723bSSrinivas Kandagatla ch_mask = *rx_ch_mask;
8230ad723bSSrinivas Kandagatla
8330ad723bSSrinivas Kandagatla break;
8430ad723bSSrinivas Kandagatla default:
8530ad723bSSrinivas Kandagatla dev_err(dai->dev, "%s: invalid dai id 0x%x\n",
8630ad723bSSrinivas Kandagatla __func__, dai->id);
8730ad723bSSrinivas Kandagatla return -EINVAL;
8830ad723bSSrinivas Kandagatla }
8930ad723bSSrinivas Kandagatla
9030ad723bSSrinivas Kandagatla cfg->active_channels_mask = ch_mask;
9130ad723bSSrinivas Kandagatla
9230ad723bSSrinivas Kandagatla return 0;
9330ad723bSSrinivas Kandagatla }
9430ad723bSSrinivas Kandagatla
q6hdmi_hw_params(struct snd_pcm_substream * substream,struct snd_pcm_hw_params * params,struct snd_soc_dai * dai)952f6860e6SSrinivas Kandagatla static int q6hdmi_hw_params(struct snd_pcm_substream *substream,
962f6860e6SSrinivas Kandagatla struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
972f6860e6SSrinivas Kandagatla {
982f6860e6SSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
992f6860e6SSrinivas Kandagatla struct audioreach_module_config *cfg = &dai_data->module_config[dai->id];
1002f6860e6SSrinivas Kandagatla int channels = params_channels(params);
1012f6860e6SSrinivas Kandagatla int ret;
1022f6860e6SSrinivas Kandagatla
1032f6860e6SSrinivas Kandagatla cfg->bit_width = params_width(params);
1042f6860e6SSrinivas Kandagatla cfg->sample_rate = params_rate(params);
1052f6860e6SSrinivas Kandagatla cfg->num_channels = channels;
1062f6860e6SSrinivas Kandagatla
1072f6860e6SSrinivas Kandagatla switch (dai->id) {
1082f6860e6SSrinivas Kandagatla case DISPLAY_PORT_RX_0:
1092f6860e6SSrinivas Kandagatla cfg->dp_idx = 0;
1102f6860e6SSrinivas Kandagatla break;
1112f6860e6SSrinivas Kandagatla case DISPLAY_PORT_RX_1 ... DISPLAY_PORT_RX_7:
1122f6860e6SSrinivas Kandagatla cfg->dp_idx = dai->id - DISPLAY_PORT_RX_1 + 1;
1132f6860e6SSrinivas Kandagatla break;
1142f6860e6SSrinivas Kandagatla }
1152f6860e6SSrinivas Kandagatla
1162f6860e6SSrinivas Kandagatla ret = q6dsp_get_channel_allocation(channels);
1172f6860e6SSrinivas Kandagatla if (ret < 0)
1182f6860e6SSrinivas Kandagatla return ret;
1192f6860e6SSrinivas Kandagatla
1202f6860e6SSrinivas Kandagatla cfg->channel_allocation = ret;
1212f6860e6SSrinivas Kandagatla
1222f6860e6SSrinivas Kandagatla return 0;
1232f6860e6SSrinivas Kandagatla }
1242f6860e6SSrinivas Kandagatla
q6dma_hw_params(struct snd_pcm_substream * substream,struct snd_pcm_hw_params * params,struct snd_soc_dai * dai)12530ad723bSSrinivas Kandagatla static int q6dma_hw_params(struct snd_pcm_substream *substream,
12630ad723bSSrinivas Kandagatla struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
12730ad723bSSrinivas Kandagatla {
12830ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
12930ad723bSSrinivas Kandagatla struct audioreach_module_config *cfg = &dai_data->module_config[dai->id];
13030ad723bSSrinivas Kandagatla
13130ad723bSSrinivas Kandagatla cfg->bit_width = params_width(params);
13230ad723bSSrinivas Kandagatla cfg->sample_rate = params_rate(params);
13330ad723bSSrinivas Kandagatla cfg->num_channels = params_channels(params);
13430ad723bSSrinivas Kandagatla
13530ad723bSSrinivas Kandagatla return 0;
13630ad723bSSrinivas Kandagatla }
13730ad723bSSrinivas Kandagatla
q6apm_lpass_dai_shutdown(struct snd_pcm_substream * substream,struct snd_soc_dai * dai)13830ad723bSSrinivas Kandagatla static void q6apm_lpass_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
13930ad723bSSrinivas Kandagatla {
14030ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
14130ad723bSSrinivas Kandagatla int rc;
14230ad723bSSrinivas Kandagatla
143*b377d4dfSSrinivas Kandagatla if (dai_data->is_port_started[dai->id]) {
14430ad723bSSrinivas Kandagatla rc = q6apm_graph_stop(dai_data->graph[dai->id]);
145*b377d4dfSSrinivas Kandagatla dai_data->is_port_started[dai->id] = false;
14630ad723bSSrinivas Kandagatla if (rc < 0)
14730ad723bSSrinivas Kandagatla dev_err(dai->dev, "fail to close APM port (%d)\n", rc);
148*b377d4dfSSrinivas Kandagatla }
14930ad723bSSrinivas Kandagatla
150*b377d4dfSSrinivas Kandagatla if (dai_data->graph[dai->id]) {
15130ad723bSSrinivas Kandagatla q6apm_graph_close(dai_data->graph[dai->id]);
152*b377d4dfSSrinivas Kandagatla dai_data->graph[dai->id] = NULL;
153*b377d4dfSSrinivas Kandagatla }
15430ad723bSSrinivas Kandagatla }
15530ad723bSSrinivas Kandagatla
q6apm_lpass_dai_prepare(struct snd_pcm_substream * substream,struct snd_soc_dai * dai)15630ad723bSSrinivas Kandagatla static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
15730ad723bSSrinivas Kandagatla {
15830ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
15930ad723bSSrinivas Kandagatla struct audioreach_module_config *cfg = &dai_data->module_config[dai->id];
16030ad723bSSrinivas Kandagatla struct q6apm_graph *graph;
16130ad723bSSrinivas Kandagatla int graph_id = dai->id;
16230ad723bSSrinivas Kandagatla int rc;
16330ad723bSSrinivas Kandagatla
164c2ac3aecSSrinivas Kandagatla if (dai_data->is_port_started[dai->id]) {
165c2ac3aecSSrinivas Kandagatla q6apm_graph_stop(dai_data->graph[dai->id]);
166c2ac3aecSSrinivas Kandagatla dai_data->is_port_started[dai->id] = false;
167c52615e4SSrinivas Kandagatla
168*b377d4dfSSrinivas Kandagatla if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
169c52615e4SSrinivas Kandagatla q6apm_graph_close(dai_data->graph[dai->id]);
170*b377d4dfSSrinivas Kandagatla dai_data->graph[dai->id] = NULL;
171*b377d4dfSSrinivas Kandagatla }
172c2ac3aecSSrinivas Kandagatla }
173c2ac3aecSSrinivas Kandagatla
17430ad723bSSrinivas Kandagatla /**
17530ad723bSSrinivas Kandagatla * It is recommend to load DSP with source graph first and then sink
17630ad723bSSrinivas Kandagatla * graph, so sequence for playback and capture will be different
17730ad723bSSrinivas Kandagatla */
17830ad723bSSrinivas Kandagatla if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
17930ad723bSSrinivas Kandagatla graph = q6apm_graph_open(dai->dev, NULL, dai->dev, graph_id);
18030ad723bSSrinivas Kandagatla if (IS_ERR(graph)) {
18130ad723bSSrinivas Kandagatla dev_err(dai->dev, "Failed to open graph (%d)\n", graph_id);
18230ad723bSSrinivas Kandagatla rc = PTR_ERR(graph);
18330ad723bSSrinivas Kandagatla return rc;
18430ad723bSSrinivas Kandagatla }
18530ad723bSSrinivas Kandagatla dai_data->graph[graph_id] = graph;
18630ad723bSSrinivas Kandagatla }
18730ad723bSSrinivas Kandagatla
18830ad723bSSrinivas Kandagatla cfg->direction = substream->stream;
18930ad723bSSrinivas Kandagatla rc = q6apm_graph_media_format_pcm(dai_data->graph[dai->id], cfg);
19030ad723bSSrinivas Kandagatla if (rc) {
19130ad723bSSrinivas Kandagatla dev_err(dai->dev, "Failed to set media format %d\n", rc);
192*b377d4dfSSrinivas Kandagatla goto err;
19330ad723bSSrinivas Kandagatla }
19430ad723bSSrinivas Kandagatla
19530ad723bSSrinivas Kandagatla rc = q6apm_graph_prepare(dai_data->graph[dai->id]);
19630ad723bSSrinivas Kandagatla if (rc) {
19730ad723bSSrinivas Kandagatla dev_err(dai->dev, "Failed to prepare Graph %d\n", rc);
198*b377d4dfSSrinivas Kandagatla goto err;
19930ad723bSSrinivas Kandagatla }
20030ad723bSSrinivas Kandagatla
20130ad723bSSrinivas Kandagatla rc = q6apm_graph_start(dai_data->graph[dai->id]);
20230ad723bSSrinivas Kandagatla if (rc < 0) {
20330ad723bSSrinivas Kandagatla dev_err(dai->dev, "fail to start APM port %x\n", dai->id);
204*b377d4dfSSrinivas Kandagatla goto err;
20530ad723bSSrinivas Kandagatla }
20630ad723bSSrinivas Kandagatla dai_data->is_port_started[dai->id] = true;
20730ad723bSSrinivas Kandagatla
20830ad723bSSrinivas Kandagatla return 0;
209*b377d4dfSSrinivas Kandagatla err:
210*b377d4dfSSrinivas Kandagatla q6apm_graph_close(dai_data->graph[dai->id]);
211*b377d4dfSSrinivas Kandagatla dai_data->graph[dai->id] = NULL;
212*b377d4dfSSrinivas Kandagatla return rc;
21330ad723bSSrinivas Kandagatla }
21430ad723bSSrinivas Kandagatla
q6apm_lpass_dai_startup(struct snd_pcm_substream * substream,struct snd_soc_dai * dai)21530ad723bSSrinivas Kandagatla static int q6apm_lpass_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
21630ad723bSSrinivas Kandagatla {
21730ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
21830ad723bSSrinivas Kandagatla struct q6apm_graph *graph;
21930ad723bSSrinivas Kandagatla int graph_id = dai->id;
22030ad723bSSrinivas Kandagatla
22130ad723bSSrinivas Kandagatla if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
22230ad723bSSrinivas Kandagatla graph = q6apm_graph_open(dai->dev, NULL, dai->dev, graph_id);
22330ad723bSSrinivas Kandagatla if (IS_ERR(graph)) {
22430ad723bSSrinivas Kandagatla dev_err(dai->dev, "Failed to open graph (%d)\n", graph_id);
22530ad723bSSrinivas Kandagatla return PTR_ERR(graph);
22630ad723bSSrinivas Kandagatla }
22730ad723bSSrinivas Kandagatla dai_data->graph[graph_id] = graph;
22830ad723bSSrinivas Kandagatla }
22930ad723bSSrinivas Kandagatla
23030ad723bSSrinivas Kandagatla return 0;
23130ad723bSSrinivas Kandagatla }
23230ad723bSSrinivas Kandagatla
q6i2s_set_fmt(struct snd_soc_dai * dai,unsigned int fmt)23330ad723bSSrinivas Kandagatla static int q6i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
23430ad723bSSrinivas Kandagatla {
23530ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data = dev_get_drvdata(dai->dev);
23630ad723bSSrinivas Kandagatla struct audioreach_module_config *cfg = &dai_data->module_config[dai->id];
23730ad723bSSrinivas Kandagatla
23830ad723bSSrinivas Kandagatla cfg->fmt = fmt;
23930ad723bSSrinivas Kandagatla
24030ad723bSSrinivas Kandagatla return 0;
24130ad723bSSrinivas Kandagatla }
24230ad723bSSrinivas Kandagatla
24330ad723bSSrinivas Kandagatla static const struct snd_soc_dai_ops q6dma_ops = {
24430ad723bSSrinivas Kandagatla .prepare = q6apm_lpass_dai_prepare,
24530ad723bSSrinivas Kandagatla .startup = q6apm_lpass_dai_startup,
24630ad723bSSrinivas Kandagatla .shutdown = q6apm_lpass_dai_shutdown,
24730ad723bSSrinivas Kandagatla .set_channel_map = q6dma_set_channel_map,
24830ad723bSSrinivas Kandagatla .hw_params = q6dma_hw_params,
24930ad723bSSrinivas Kandagatla };
25030ad723bSSrinivas Kandagatla
25130ad723bSSrinivas Kandagatla static const struct snd_soc_dai_ops q6i2s_ops = {
25230ad723bSSrinivas Kandagatla .prepare = q6apm_lpass_dai_prepare,
25330ad723bSSrinivas Kandagatla .startup = q6apm_lpass_dai_startup,
25430ad723bSSrinivas Kandagatla .shutdown = q6apm_lpass_dai_shutdown,
25530ad723bSSrinivas Kandagatla .set_channel_map = q6dma_set_channel_map,
25630ad723bSSrinivas Kandagatla .hw_params = q6dma_hw_params,
2572f6860e6SSrinivas Kandagatla };
2582f6860e6SSrinivas Kandagatla
2592f6860e6SSrinivas Kandagatla static const struct snd_soc_dai_ops q6hdmi_ops = {
2602f6860e6SSrinivas Kandagatla .prepare = q6apm_lpass_dai_prepare,
2612f6860e6SSrinivas Kandagatla .startup = q6apm_lpass_dai_startup,
2622f6860e6SSrinivas Kandagatla .shutdown = q6apm_lpass_dai_shutdown,
2632f6860e6SSrinivas Kandagatla .hw_params = q6hdmi_hw_params,
26430ad723bSSrinivas Kandagatla .set_fmt = q6i2s_set_fmt,
26530ad723bSSrinivas Kandagatla };
26630ad723bSSrinivas Kandagatla
26730ad723bSSrinivas Kandagatla static const struct snd_soc_component_driver q6apm_lpass_dai_component = {
26830ad723bSSrinivas Kandagatla .name = "q6apm-be-dai-component",
26930ad723bSSrinivas Kandagatla .of_xlate_dai_name = q6dsp_audio_ports_of_xlate_dai_name,
27030ad723bSSrinivas Kandagatla .be_pcm_base = AUDIOREACH_BE_PCM_BASE,
27130ad723bSSrinivas Kandagatla .use_dai_pcm_id = true,
27230ad723bSSrinivas Kandagatla };
27330ad723bSSrinivas Kandagatla
q6apm_lpass_dai_dev_probe(struct platform_device * pdev)27430ad723bSSrinivas Kandagatla static int q6apm_lpass_dai_dev_probe(struct platform_device *pdev)
27530ad723bSSrinivas Kandagatla {
27630ad723bSSrinivas Kandagatla struct q6dsp_audio_port_dai_driver_config cfg;
27730ad723bSSrinivas Kandagatla struct q6apm_lpass_dai_data *dai_data;
27830ad723bSSrinivas Kandagatla struct snd_soc_dai_driver *dais;
27930ad723bSSrinivas Kandagatla struct device *dev = &pdev->dev;
28030ad723bSSrinivas Kandagatla int num_dais;
28130ad723bSSrinivas Kandagatla
28230ad723bSSrinivas Kandagatla dai_data = devm_kzalloc(dev, sizeof(*dai_data), GFP_KERNEL);
28330ad723bSSrinivas Kandagatla if (!dai_data)
28430ad723bSSrinivas Kandagatla return -ENOMEM;
28530ad723bSSrinivas Kandagatla
28630ad723bSSrinivas Kandagatla dev_set_drvdata(dev, dai_data);
28730ad723bSSrinivas Kandagatla
28830ad723bSSrinivas Kandagatla memset(&cfg, 0, sizeof(cfg));
28930ad723bSSrinivas Kandagatla cfg.q6i2s_ops = &q6i2s_ops;
29030ad723bSSrinivas Kandagatla cfg.q6dma_ops = &q6dma_ops;
2912f6860e6SSrinivas Kandagatla cfg.q6hdmi_ops = &q6hdmi_ops;
29230ad723bSSrinivas Kandagatla dais = q6dsp_audio_ports_set_config(dev, &cfg, &num_dais);
29330ad723bSSrinivas Kandagatla
29430ad723bSSrinivas Kandagatla return devm_snd_soc_register_component(dev, &q6apm_lpass_dai_component, dais, num_dais);
29530ad723bSSrinivas Kandagatla }
29630ad723bSSrinivas Kandagatla
29730ad723bSSrinivas Kandagatla #ifdef CONFIG_OF
29830ad723bSSrinivas Kandagatla static const struct of_device_id q6apm_lpass_dai_device_id[] = {
29930ad723bSSrinivas Kandagatla { .compatible = "qcom,q6apm-lpass-dais" },
30030ad723bSSrinivas Kandagatla {},
30130ad723bSSrinivas Kandagatla };
30230ad723bSSrinivas Kandagatla MODULE_DEVICE_TABLE(of, q6apm_lpass_dai_device_id);
30330ad723bSSrinivas Kandagatla #endif
30430ad723bSSrinivas Kandagatla
30530ad723bSSrinivas Kandagatla static struct platform_driver q6apm_lpass_dai_platform_driver = {
30630ad723bSSrinivas Kandagatla .driver = {
30730ad723bSSrinivas Kandagatla .name = "q6apm-lpass-dais",
30830ad723bSSrinivas Kandagatla .of_match_table = of_match_ptr(q6apm_lpass_dai_device_id),
30930ad723bSSrinivas Kandagatla },
31030ad723bSSrinivas Kandagatla .probe = q6apm_lpass_dai_dev_probe,
31130ad723bSSrinivas Kandagatla };
31230ad723bSSrinivas Kandagatla module_platform_driver(q6apm_lpass_dai_platform_driver);
31330ad723bSSrinivas Kandagatla
31430ad723bSSrinivas Kandagatla MODULE_DESCRIPTION("AUDIOREACH APM LPASS dai driver");
31530ad723bSSrinivas Kandagatla MODULE_LICENSE("GPL");
316