summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: SOF: ipc4-control: Support for Switch and EnumMark Brown2023-09-193-6/+237
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Currently IPC4 has no notion of a switch or enum type of control which is a generic concept in ALSA. The generic support for these control types will be as follows: - large config is used to send the channel-value par array - param_id of a SWITCH type is 200 - param_id of an ENUM type is 201 Each module need to support a switch or/and enum must handle these universal param_ids. The message payload is described by struct sof_ipc4_control_msg_payload.
| * ASoC: SOF: ipc4-control: Add support for ALSA enum controlPeter Ujfalusi2023-09-192-0/+97
| | | | | | | | | | | | | | | | | | | | | | Enum controls use generic param_id and a generic struct where the data is passed to the firmware. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919103115.30783-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: ipc4-control: Add support for ALSA switch controlPeter Ujfalusi2023-09-192-5/+122
| | | | | | | | | | | | | | | | | | | | | | | | Volume controls with a max value of 1 are switches. Switch controls use generic param_id and a generic struct where the data is passed to the firmware. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919103115.30783-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: ipc4-topology: Add definition for generic switch/enum controlPeter Ujfalusi2023-09-191-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently IPC4 has no notion of a switch or enum type of control which is a generic concept in ALSA. The generic support for these control types will be as follows: - large config is used to send the channel-value par array - param_id of a SWITCH type is 200 - param_id of an ENUM type is 201 Each module need to support a switch or/and enum must handle these universal param_ids. The message payload is described by struct sof_ipc4_control_msg_payload. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919103115.30783-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: intel: Add CS42L43 sdw machine driver supportMark Brown2023-09-196-1/+269
|\ \ | | | | | | | | | | | | | | | Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: Add cs42l43 codec support to sof_sdw machine driver.
| * | ASoC: Intel: soc-acpi-intel-mtl-match: add acpi match table for cdb35l56-eight-cChao Song2023-09-191-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds acpi match table for cdb35l56-eight-c AIC board from Cirrus Logic. The codec layout is configured as: - Link0: CS42L43 Jack - Link1: 2x CS35L56 Speaker - Link2: 2x CS35L56 Speaker Signed-off-by: Chao Song <chao.song@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230919020011.1896041-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: intel: sof_sdw: Add CS42L43 CODEC supportBard Liao2023-09-195-1/+191
| |/ | | | | | | | | | | | | | | | | | | | | Add support for the Cirrus Logic CS42L43 using SoundWire. Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919020011.1896041-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: SOF: Use generic IPC type identifiersMark Brown2023-09-1938-288/+286
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Hi, rename the IPC type defines to be more generic and intuitive: SOF_IPC -> SOF_IPC_TYPE_3 SOF_INTEL_IPC4 -> SOF_IPC_TYPE_4 No functional change, just renaming all around. Regards, Peter --- Peter Ujfalusi (9): ASoC: SOF: Introduce generic names for IPC types ASoC: SOF: sof-pci-dev: Update the ipc_type module parameter description ASoC: SOF: Kconfig: Rename SND_SOC_SOF_INTEL_IPC4 to SND_SOC_SOF_IPC4 ASoC: SOF: Use generic names for IPC types ASoC: SOF: amd: Use generic names for IPC types ASoC: SOF: imx: Use generic names for IPC types ASoC: SOF: Intel: Use generic names for IPC types ASoC: SOF: mediatek: Use generic names for IPC types ASoC: SOF: Drop unused IPC type defines include/sound/sof.h | 4 +- sound/soc/sof/Kconfig | 2 +- sound/soc/sof/Makefile | 4 +- sound/soc/sof/amd/pci-rmb.c | 10 +- sound/soc/sof/amd/pci-rn.c | 10 +- sound/soc/sof/amd/pci-vangogh.c | 10 +- sound/soc/sof/imx/imx8.c | 20 +-- sound/soc/sof/imx/imx8m.c | 10 +- sound/soc/sof/imx/imx8ulp.c | 10 +- sound/soc/sof/intel/Kconfig | 14 +- sound/soc/sof/intel/apl.c | 4 +- sound/soc/sof/intel/bdw.c | 10 +- sound/soc/sof/intel/byt.c | 30 ++-- sound/soc/sof/intel/cnl.c | 4 +- sound/soc/sof/intel/hda-dai-ops.c | 4 +- sound/soc/sof/intel/hda-dai.c | 4 +- sound/soc/sof/intel/hda-loader.c | 2 +- sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/intel/icl.c | 4 +- sound/soc/sof/intel/pci-apl.c | 36 ++--- sound/soc/sof/intel/pci-cnl.c | 54 ++++---- sound/soc/sof/intel/pci-icl.c | 36 ++--- sound/soc/sof/intel/pci-lnl.c | 10 +- sound/soc/sof/intel/pci-mtl.c | 12 +- sound/soc/sof/intel/pci-skl.c | 20 +-- sound/soc/sof/intel/pci-tgl.c | 144 ++++++++++---------- sound/soc/sof/intel/pci-tng.c | 10 +- sound/soc/sof/intel/tgl.c | 4 +- sound/soc/sof/ipc.c | 6 +- sound/soc/sof/ipc3-dtrace.c | 2 +- sound/soc/sof/mediatek/mt8186/mt8186.c | 20 +-- sound/soc/sof/mediatek/mt8195/mt8195.c | 10 +- sound/soc/sof/sof-acpi-dev.c | 8 +- sound/soc/sof/sof-client-ipc-msg-injector.c | 4 +- sound/soc/sof/sof-client-probes.c | 6 +- sound/soc/sof/sof-client.c | 26 ++-- sound/soc/sof/sof-of-dev.c | 6 +- sound/soc/sof/sof-pci-dev.c | 2 +- 38 files changed, 286 insertions(+), 288 deletions(-) -- 2.42.0
| * | ASoC: SOF: Drop unused IPC type definesPeter Ujfalusi2023-09-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SOF stack now uses the generic names for the IPC type, the defines can be dropped. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: mediatek: Use generic names for IPC typesPeter Ujfalusi2023-09-192-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new SOF_IPC_TYPE_3 in core code. No functional changes, just renaming. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: Intel: Use generic names for IPC typesPeter Ujfalusi2023-09-1918-195/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new SOF_IPC_TYPE_3, SOF_IPC_TYPE_4 in core code. No functional changes, just renaming. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: imx: Use generic names for IPC typesPeter Ujfalusi2023-09-193-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new SOF_IPC_TYPE_3 in core code. No functional changes, just renaming. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: amd: Use generic names for IPC typesPeter Ujfalusi2023-09-193-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new SOF_IPC_TYPE_3 in core code. No functional changes, just renaming. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: Use generic names for IPC typesPeter Ujfalusi2023-09-197-27/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new SOF_IPC_TYPE_3, SOF_IPC_TYPE_4 in core code. No functional changes, just renaming. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: Kconfig: Rename SND_SOC_SOF_INTEL_IPC4 to SND_SOC_SOF_IPC4Peter Ujfalusi2023-09-196-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the Intel from the IPC type Kconfig option Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: sof-pci-dev: Update the ipc_type module parameter descriptionPeter Ujfalusi2023-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify the description of the ipc_type module parameter and drop the Intel CAVS in favor of IPC4. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: SOF: Introduce generic names for IPC typesPeter Ujfalusi2023-09-191-2/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the enum names for the IPC types to be more descriptive and drop tying the IPC4 to Intel SoCs. Add defines to avoid build breakage while the related code is modified to use the new enum names. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20230919104226.32239-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: hdac_hda: add HDA patch loader supportBard Liao2023-09-194-0/+34
|/ | | | | | | | | | | | HDA patch loader is supported by legacy HDA driver. Implement it on ASoC HDA driver, too. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20230919083209.1919921-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: da7213: add .auto_selectable_formats supportMark Brown2023-09-181-6/+24
|\ | | | | | | | | | | | | | | Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: da7213 is still using M/S instead of P/C for SND_SOC_DAIFMT_CBx_CFx. [PATCH 1/2] will update it. [PATCH 2/2] will enable DAI format automatic select.
| * ASoC: da7213: add .auto_selectable_formats supportKuninori Morimoto2023-09-181-0/+18
| | | | | | | | | | | | | | | | | | | | | | By this patch, DAI format might be automatically selected (Depends on paired DAI, and/or Sound Card). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Linh Phung <linh.phung.jy@renesas.com> Tested-by: Khanh Le <khanh.le.xr@renesas.com> Link: https://lore.kernel.org/r/87y1hdh4f1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: da7213: tidyup SND_SOC_DAIFMT_xxxKuninori Morimoto2023-09-181-6/+6
| | | | | | | | | | | | | | | | | | | | We should use P/C instead of M/S for SND_SOC_DAIFMT_CBx_CFx. We should use SND_SOC_DAIFMT_xxx instead of SND_SOC_DAI_FORMAT_xxx This patch tidyup these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zg1th4f8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: dt-bindings: wlf,wm8782: Add wlf,fsampen propertyJohn Watts2023-09-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The WM8782 can safely support rates higher than 48kHz by changing the value of the FSAMPEN pin. Allow specifying the FSAMPEN pin value in the device tree. Signed-off-by: John Watts <contact@jookia.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230918131532.2257615-4-contact@jookia.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: wm8782: Use wlf,fsampen device tree propertyJohn Watts2023-09-181-3/+22
| | | | | | | | | | | | | | | | | | | | The wm8782 supports rates 96kHz and 192kHz as long as the hardware is configured properly. Allow this to be specified in the device tree. Signed-off-by: John Watts <contact@jookia.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230918131532.2257615-3-contact@jookia.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: wm8782: Constrain maximum audio rate at runtimeJohn Watts2023-09-181-12/+30
|/ | | | | | | | | | | The wm8782 supports up to 192kHz audio when pins are set correctly. Instead of hardcoding which rates are supported constrain them at runtime based on a max_rate variable. Signed-off-by: John Watts <contact@jookia.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230918131532.2257615-2-contact@jookia.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: cs42l43: make const array controls staticColin Ian King2023-09-161-1/+1
| | | | | | | | | | Don't populate the const array controls on the stack, instead make it static. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230915092639.31074-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: common: add ACPI matching tables for Arrow LakeArun T2023-09-163-0/+54
| | | | | | | | | | | | Initial support for ARL w/ RT711 Signed-off-by: Arun T <arun.t@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915080635.1619942-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: SOF: ipc4: Fixup dailink format based on copierMark Brown2023-09-153-12/+54
|\ | | | | | | | | | | | | Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: If the copier supports a single format on the DAI side we should fixup the BE dailink to use this single format.
| * ASoC: SOF: ipc4-pcm: fixup dailink based on copier formatBard Liao2023-09-151-8/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a copier exposes a single format, we can fixup the BE dailink with that format. This is helpful when some codec have format restrictions and e.g. don't support a 32-bit format. In that case, the copier output formats mirror that restriction in the topology file. An alternate solution was suggested earlier using a dedicated topology token. When specified, the token would be used to fix-up the dailink. The main reason why this solution was chosen is that there is a risk of a disconnect between token definition and copier format. With a single piece of information as suggested in this patch, there are fewer risks of a bad configuration. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230915093507.7242-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: SOF: ipc4-topology: export sof_ipc4_copier_is_single_formatBard Liao2023-09-152-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | We will use the sof_ipc4_copier_is_single_format() function to check if a ipc4 copier has single format available in ipc4-pcm.c in the next patch. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230915093507.7242-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: intel: sof_sdw: Remove large global CPUs arrayMark Brown2023-09-152-148/+102
|\ \ | | | | | | | | | | | | | | | | | | | | | Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: Rather than keeping a single array of CPU dai link components allocate a smaller one for each DAI link, this reduces the amount of state that needs to be passed back and forth in the driver.
| * | ASoC: intel: sof_sdw: Increment be_id in init_dai_linkCharles Keepax2023-09-151-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than incrementing the ID for the dai_links in many places throughout the code, just increment it each time we initialise a new DAI link. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915075611.1619548-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: intel: sof_sdw: Make create_sdw_dailink allocate link componentsCharles Keepax2023-09-151-46/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now only the SoundWire part of the code uses the global cpus array, remove it and have create_sdw_dailink allocate its own link components. This removes a lot of state being passed around in the driver, which simplifies things a fair bit. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915075611.1619548-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: intel: sof_sdw: Add simple DAI link creation helperCharles Keepax2023-09-151-89/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code contains a fair amount of state tracking and one part of that is keeping track of which entry in the large global cpus snd_soc_dai_link_component array is currently in use. Add a helper function to allocate a simple DAI link, this simplifies the code slightly and moves us in the direction of eliminating the need for the large global cpus array. This does slightly increase the number of allocations done, but this is probe time and the code already does a large number of allocations so this increase is small over all. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915075611.1619548-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: intel: sof_sdw: Move sdw_pin_index into private structCharles Keepax2023-09-152-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whilst it should not cause any issues as only a single instance of the machine will be instantiated, it is still slightly better practice to keep working data in the private data structure, rather than a global variable. Move sdw_pin_index into the mc_private structure. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915075611.1619548-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: SOF: ipc4/Intel: Implement split fw libraryMark Brown2023-09-155-7/+60
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: This series implements support for split library loading to comply with the HDA DMA programming sequence recommendation, which is: 1. DSP side DMA programming and GEN bit set to 1 2. host side DMA programming and RUN bit set to 1 The SOF support for library loading is based on this sequence, backwards compatibility with older reference firmware is supported (where only the LOAD_LIBRARY message is supported).
| * | | ASoC: SOF: Intel: hda-loader: Add support for split library loadingPeter Ujfalusi2023-09-151-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a certain sequence needs to be followed when configuring the HDA DMA in host and DSP. The firmware provides a way to handle this two stage sequencing by splitting the library loading into two stage: 1st stage: LOAD_LIBRARY_PREPARE message the lib_id is 0, used to configure the DMA on DSP side 2nd stage: LOAD_LIBRARY message both dma_id and lib_id is valid, used for the actual transfer of the library In case a firmware without support for this two stage loading is used then the second stage message will trigger the loading and the first stage will return with error, which is ignored by the kernel. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Chao Song <chao.song@linux.intel.com> Link: https://lore.kernel.org/r/20230915114018.1701-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: SOF: ipc4: Add new message type: SOF_IPC4_GLB_LOAD_LIBRARY_PREPAREPeter Ujfalusi2023-09-152-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Intel platforms there is a strict order requirement for the DMA programming: DSP side configures the buffer and sets the GEN bit Host side sets the RUN bit. In order to follow this flow, a new global message type has been added to prepare the DSP side of the DMA: host sends LOAD_LIBRARY_PREPARE with the dma_id DSP side sets its buffer and sets the GEN bit Host sets the RUN bit Host sends LOAD_LIBRARY with dma_id and lib_id DSP receives the library data. It is up to the platform code to use the new prepare stage message and how to handle the reply to it from the firmware, which can indicate that the message type is not supported/handled. In this case the kernel should proceed to the LOAD_LIBRARY stage assuming a single stage library loading: host sends LOAD_LIBRARY_PREPARE with the dma_id DSP replies that the message type is not supported/handled Host acknowledges the return code and sets the RUN bit Host sends LOAD_LIBRARY with dma_id and lib_id DSP receives the library data. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Chao Song <chao.song@linux.intel.com> Link: https://lore.kernel.org/r/20230915114018.1701-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: SOF: Intel: hda: Add definition for SDxFIFOS.FIFOS maskPeter Ujfalusi2023-09-152-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FIFOS (FIFO Size) field is in bit 0-15 of the register. Use the defined mask instead of a magic number for the FIFOS value masking in hda_dsp_stream_hw_params(). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Chao Song <chao.song@linux.intel.com> Link: https://lore.kernel.org/r/20230915114018.1701-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: SOF: ipc4: Convert status code 2 and 15 to -EOPNOTSUPPPeter Ujfalusi2023-09-151-0/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The status code 2 and 15 can be translated to -EOPNOTSUPP, so convert them to a meaningful error number. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Chao Song <chao.song@linux.intel.com> Link: https://lore.kernel.org/r/20230915114018.1701-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: cs35l56: Define and export I2C/SPI pm_ops onlyMark Brown2023-09-154-5/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>: These 3 patches update the pm_ops for I2C/SPI so that they are only built and exported if they are needed.
| * | | ASoC: cs35l56: Omit cs35l56_pm_ops_i2c_spi if I2C/SPI not enabledRichard Fitzgerald2023-09-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cs35l56_pm_ops_i2c_spi struct is only needed if either the I2C or SPI modules are selected for building. Otherwise it would be unused bytes, so in that case omit it. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230914150918.14505-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: cs35l56: Use new export macro for dev_pm_opsRichard Fitzgerald2023-09-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pm.h now has macros to create and export the dev_pm_ops struct only if CONFIG_PM is enabled. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230914150918.14505-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: cs35l56: Use pm_ptr()Richard Fitzgerald2023-09-143-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Use pm_ptr() when setting the pointer to the dev_pm_ops so that it will be NULL if CONFIG_PM is disabled. This allows the dev_pm_ops to be compiled out in that case. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230914150918.14505-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: Intel: machine driver updateMark Brown2023-09-1517-560/+1007
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>: Some cleanups from Brent Lu for I2S platforms. And minor additions for RVPs and Chromebooks.
| * | | ASoC: Intel: sof_da7219: use ssp-common module to detect codecBrent Lu2023-09-153-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ssp-common module to detect codec and amplifier type in driver probe function and remove all quirks about amplifier type. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-20-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: sof_da7219: add adl_mx98360_da7219 board configBrent Lu2023-09-152-21/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This configuration supports ADL boards which implement DA7219 on SSP0 and MAX98360A on SSP1. DA7219 uses PLL bypass mode to avoid WCLK locking problem. To use this mode, MCLK frequency must be 12.288 or 24.576MHz. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-19-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: sof_da7219: use maxim-common moduleBrent Lu2023-09-152-120/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use maxim-common module to handle speaker amp DAI link registration. No functional change in this commit. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-18-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: sof_da7219: rename driver file and kernel optionBrent Lu2023-09-153-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the driver file and kernel option to be consistent with other SOF machine drivers. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-17-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: sof_nau8825: use realtek-common moduleBrent Lu2023-09-151-51/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use realtek-common module to support rt1019p speaker amplifier. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-16-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: sof_nau8825: use nuvoton-common moduleBrent Lu2023-09-152-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use nuvoton-common module to support nau8318 speaker amplifier. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-15-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>