ASoC: fsl: Add generic CPU DAI driver
Subsystems (3)
PATCH 1/1 ASoC: fsl: Add generic CPU DAI driver
From: Daniel Baluta <[email protected]>
On i.MX8 platforms that have a DSP the DAI handling is taken care of by two entities:
* Application Processor (AP), which runs Linux
* DSP, which runs a firmware (typically Sound Open Firmware)
The DSP has access to DAI IP registers, but it cannot easily handle resources like:
* clocks
* power domain management
* pinctrl
For this reason we introduce a generic FSL DAI driver which will take care of the resources above.
--- sound/soc/fsl/Kconfig | 8 ++ sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_dai.c | 276 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 286 insertions(+) create mode 100644 sound/soc/fsl/fsl_dai.c
sound/soc/fsl/Kconfig +8 -0
@@ -75,6 +75,14 @@ config SND_SOC_FSL_ESAI This option is only useful for out-of-tree drivers since in-tree drivers select it automatically. +config SND_SOC_FSL_DAI + tristate "Generic FSL DAI support for Sound Open Firmware" + help + Say Y if you want to enable generic FSL DAI support to be used + with Sound Open Firmware. This module takes care of enabling + clocks, power domain, pinctrl for FSL DAIs. The rest of DAI + control is taken care of by SOF firmware. + config SND_SOC_FSL_MICFIL tristate "Pulse Density Modulation Microphone Interface (MICFIL) module support" select REGMAP_MMIO
sound/soc/fsl/Makefile +2 -0
@@ -20,6 +20,7 @@ snd-soc-fsl-ssi-y := fsl_ssi.o snd-soc-fsl-ssi-$(CONFIG_DEBUG_FS) += fsl_ssi_dbg.o snd-soc-fsl-spdif-objs := fsl_spdif.o snd-soc-fsl-esai-objs := fsl_esai.o +snd-soc-fsl-dai-objs := fsl_dai.o snd-soc-fsl-micfil-objs := fsl_micfil.o snd-soc-fsl-utils-objs := fsl_utils.o snd-soc-fsl-dma-objs := fsl_dma.o
@@ -32,6 +33,7 @@ obj-$(CONFIG_SND_SOC_FSL_SAI) += snd-soc-fsl-sai.o obj-$(CONFIG_SND_SOC_FSL_SSI) += snd-soc-fsl-ssi.o obj-$(CONFIG_SND_SOC_FSL_SPDIF) += snd-soc-fsl-spdif.o obj-$(CONFIG_SND_SOC_FSL_ESAI) += snd-soc-fsl-esai.o +obj-$(CONFIG_SND_SOC_FSL_DAI) += snd-soc-fsl-dai.o obj-$(CONFIG_SND_SOC_FSL_MICFIL) += snd-soc-fsl-micfil.o obj-$(CONFIG_SND_SOC_FSL_UTILS) += snd-soc-fsl-utils.o obj-$(CONFIG_SND_SOC_FSL_MQS) += snd-soc-fsl-mqs.o
sound/soc/fsl/fsl_dai.c new file +276 -0
276 lines not on this page · raw message
Signature · 1 line
2.17.1
Mark Brown
maintainerQuoted 9 lines · Daniel Baluta (OSS)
* clocks
* power domain management
* pinctrlFor this reason we introduce a generic FSL DAI driver which will take care of the resources above.
--- sound/soc/fsl/Kconfig | 8 ++ sound/soc/fsl/Makefile | 2 +
This lacks a signoff, see submitting-patches.rst for details on what this is and why it's important.
Fabio Estevam
reviewersound/soc/fsl/fsl_dai.c line 61
Quoted 6 lines · Daniel Baluta (OSS)
sound/soc/fsl/fsl_dai.c new file +6
-0+static struct snd_soc_dai_driver fsl_esai_dai = { + .name ="esai0" , +}; + +static struct snd_soc_dai_driver fsl_sai_dai = { + .name ="sai1" ,
So the name will be hardcoded to sai1 even if SAI2, SAI3, etc is used?
Quoted 10 lines · Fabio Estevam
sound/soc/fsl/fsl_dai.c line 61
Quoted 6 lines · Daniel Baluta (OSS)
sound/soc/fsl/fsl_dai.c new file +6
-0+static struct snd_soc_dai_driver fsl_esai_dai = { + .name ="esai0" , +}; + +static struct snd_soc_dai_driver fsl_sai_dai = { + .name ="sai1" ,So the name will be hardcoded to sai1 even if SAI2, SAI3, etc is used?
Indeed this is a good point. In our use case with DSP we are only using SAI1/ESAI0 for now.
Let me try to get a more generic approach and resend.
thanks,
Daniel.