summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-11-07ASoC: simple-card-utils: remove asoc_simple_convert_fixup()Kuninori Morimoto2-24/+13
No one is using asoc_simple_convert_fixup(), we don't need to export its symbol. This patch removes it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/874jvj8ftp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-04ASoC: amd: fix ACP version typo mistakesyed saba kareem6-183/+183
Pink Sardine is based on ACP6.3 architecture. This patch fixes the typo mistake acp6.2 -> acp6.3 Signed-off-by: syed saba kareem <syed.sabakareem@amd.com> Link: https://lore.kernel.org/r/20221104121001.207992-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-03Modify documentation and machine driver for mt8186_rt1019_rt5682s sound cardMark Brown2-2/+114
Merge series from Ajye Huang <ajye_huang@compal.corp-partner.google.com>: Support selecting between front and rear microphones on some of the MediaTek platforms.
2022-11-03ASoC: Intel: cirrus-common: Make const array uid_strings staticColin Ian King1-1/+1
Don't populate the read-only const array uid_strings on the stack but instead make it static. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221103120624.72583-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-03ASoC: simple-mux: add read functionMaarten Zanders1-0/+9
During initialisation DAPM tries to read the state of the MUX being connected, resulting in this error log: input-mux: ASoC: error at soc_component_read_no_lock on input-mux: -5 Provide a read function which allows DAPM to read the state of the MUX. Signed-off-by: Maarten Zanders <maarten.zanders@mind.be> Link: https://lore.kernel.org/r/20221028191303.166115-1-maarten.zanders@mind.be Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-03ASoC: tlv320aic3x: switch to using gpiod APIDmitry Torokhov1-69/+39
Switch the driver from legacy gpio API that is deprecated to the newer gpiod API that respects line polarities described in ACPI/DT. The driver still tries to support shared reset lines, by first trying to allocate the reset GPIO normally, and then non-exclusively, although the utility of such support is questionable, toggling reset line from one driver/instance will result in all chips being reset, potentially at an inopportune moment. Note that this change depends on commit fbbbcd177a27 ("gpiolib: of: add quirk for locating reset lines with legacy bindings") to translate request for "reset" GPIO to the legacy name "gpio-reset" in case when proper name is not used. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20221102232004.1721864-3-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-03ASoC: tlv320aic3x: remove support for platform dataDmitry Torokhov3-72/+48
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20221102232004.1721864-2-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-03ARM: omap2: n8x0: stop instantiating codec platform dataDmitry Torokhov3-8/+0
As of 0426370b58b2 ("ARM: dts: omap2420-n810: Correct the audio codec (tlv320aic33) node") the DTS properly specifies reset GPIO, and the device name in auxdata lookup table does not even match the one in device tree anymore, so stop instantiating it. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20221102232004.1721864-1-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-03ASoC: mediatek: mt8186-rt5682: Modify machine driver for two DMICs caseAjye Huang1-1/+101
Having two DMICs, a front DMIC and a Rear DMIC, but only host audio input AUX port0 is used for these two Dmics. A "dmic-gpios" property is used for a mixer control to switch the dmic signal source between the Front and Rear Dmic. Refer to this one as an example, commit 3cfbf07c6d27 ("ASoC: qcom: sc7180: Modify machine driver for 2mic") Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20221102125936.2176748-3-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-03ASoC: mediatek: dt-bindings: modify machine bindings for two MICs caseAjye Huang1-1/+13
Add a property "dmic-gpios" for switching between two MICs. Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20221102125936.2176748-2-ajye_huang@compal.corp-partner.google.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-02ASoC: SOF: Intel: hda-codec: fix possible memory leak in hda_codec_device_init()Yang Yingliang1-7/+1
If snd_hdac_device_register() fails, 'codec' and name allocated in dev_set_name() called in snd_hdac_device_init() are leaked. Fix this by calling put_device(), so they can be freed in snd_hda_codec_dev_release() and kobject_cleanup(). Fixes: 829c67319806 ("ASoC: SOF: Intel: Introduce HDA codec init and exit routines") Fixes: dfe66a18780d ("ALSA: hdac_ext: add extended HDA bus") Suggested-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20221021123849.456857-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-02ASoC: Intel: Skylake: fix possible memory leak in skl_codec_device_init()Yang Yingliang1-7/+1
If snd_hdac_device_register() fails, 'codec' and name allocated in dev_set_name() called in snd_hdac_device_init() are leaked. Fix this by calling put_device(), so they can be freed in snd_hda_codec_dev_release() and kobject_cleanup(). Fixes: e4746d94d00c ("ASoC: Intel: Skylake: Introduce HDA codec init and exit routines") Fixes: dfe66a18780d ("ALSA: hdac_ext: add extended HDA bus") Suggested-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221021123849.456857-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-01Add support for MICFIL on i.MX93 platformMark Brown2-0/+14
Merge series from Chancel Liu <chancel.liu@nxp.com>: This patchset supports MICFIL on i.MX93 platform.
2022-11-01ASoC: fsl_micfil: Add support when using eDMAChancel Liu1-0/+4
On i.MX93 platform MICFIL uses eDMA. The maxburst should be set to the number of channels in eDMA multiple FIFO mode. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20221028082750.991822-4-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-01ASoC: fsl_micfil: Add support for i.MX93 platformChancel Liu1-0/+9
Add compatible string and specific soc data to support MICFIL on i.MX93 platform. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20221028082750.991822-3-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-01ASoC: dt-bindings: fsl,micfil: Add compatible string for i.MX93 platformChancel Liu1-0/+1
Add compatible string "fsl,imx93-micfil" for i.MX93 platform Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20221028082750.991822-2-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-01ASoC: cs42xx8-i2c.c: add module device table for ofPeter Bergin3-24/+29
When trying to connect the device with the driver through device-tree it is not working. The of_device_id is defined in cs42xx8.c but is not correctly included in cs42xx8-i2c.c. Move of_device_id table to cs42xx8-i2c.c. Get cs42xx8_driver_data in cs42xx8_i2c_probe() and pass as argument to cs42xx8_probe(). Move error check if no driver data found to cs42xx8_i2c_probe(). Signed-off-by: Peter Bergin <peter@berginkonsult.se> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20221031203723.168177-1-peter@berginkonsult.se Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: SOF: fix compilation issue with readb/writeb helpersPierre-Louis Bossart5-16/+16
Replace them with read8/write8 to avoid compilation issue on ARM. In hindsight this is more consistent with the read64/write64 helpers already used in SOF. Reported-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/alsa-devel/Y1rTFrohLqaiZAy%2F@dev-arch.thelio-3990X/ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20221031195340.249868-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: jz4740-i2s: Remove .set_sysclk() & friendsMark Brown3-50/+2
Merge series from Aidan MacDonald <aidanmacdonald.0x0@gmail.com>: A quick series to get rid of .set_sysclk() from jz4740-i2s. It wasn't used in practice so this shouldn't be troublesome for anyone, and fortunately there aren't any backward compatibility concerns. The actual rationale for removing it, as opposed to fixing the issues of the current DT bindings and implementation, is provided in the dt-bindings patch.
2022-10-31ASoC: SOF: client-probes: Add support for IPC4Mark Brown9-238/+637
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: The probes (the ability of probing the audio data from firmware processing points or to receive stream of debug/trace information) is supported by IPC4 as well, but due to the differences between the two IPC version the low level setup and information we need for probing is different. This series will extend the existing probes support for IPC3 with IPC4 'backend'
2022-10-31ASoC: soc-utils: Remove __exit for snd_soc_util_exit()Chen Zhongjin1-1/+1
snd_soc_util_exit() is called in __init snd_soc_init() for cleanup. Remove the __exit annotation for it to fix the build warning: WARNING: modpost: sound/soc/snd-soc-core.o: section mismatch in reference: init_module (section: .init.text) -> snd_soc_util_exit (section: .exit.text) Fixes: 6ec27c53886c ("ASoC: core: Fix use-after-free in snd_soc_exit()") Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com> Link: https://lore.kernel.org/r/20221031134031.256511-1-chenzhongjin@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client deviceJyri Sarha4-16/+318
Implement IPC operations for IPC4 messaging and add doxygen documentation for the functions. Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221031105141.19037-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: SOF: client: Add sof_client_ipc4_find_module() functionJyri Sarha2-0/+19
Add sof_client_ipc4_find_module() for calling sof_ipc4_find_module_by_uuid() in sof client code. Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221031105141.19037-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: SOF: client: Add sof_client_ipc_set_get_data()Jyri Sarha4-0/+31
No need to duplicate set_get_data msg handling in clients. Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221031105141.19037-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: SOF: probes: Separate IPC3 operations to a separate fileJyri Sarha4-226/+272
Declare an IPC ops struct for probes client device and move IPC3 functions behind it. Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221031105141.19037-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: SOF: probes: Replace [0] union members with DECLARE_FLEX_ARRAY()Jyri Sarha1-2/+3
Replace probes related [0] arrays, all found within unions, with DECLARE_FLEX_ARRAY() declarations. Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221031105141.19037-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: ingenic: Remove unnecessary clocks from schemaAidan MacDonald1-8/+2
The AIC needs only the first two clocks: "aic" is a gate that's used for gating the I2S controller when it's suspended, and "i2s" is the system clock, from which the bit and frame clocks are derived. Both clocks are therefore reasonably part of the AIC and should be passed to the OS. But the "ext" and "pll half" clocks are a little more questionable. It appears these bindings were introduced when the schema was first converted to YAML, but weren't present in the original .txt binding. They are intended to be the possible parent clocks of "i2s". The JZ4770 actually has three parents for its "i2s" clock, named "ext", "pll0", and "pll1" in the Linux driver. The JZ4780 has two parents but it doesn't have a "pll half" clock, instead it has an "i2s_pll" clock which behaves much differently to the actual "pll half" clock found on the JZ4740 & JZ4760. And there are other Ingenic SoCs that share the JZ4780's clock layout, eg, the X1000. Therefore, the bindings aren't really adequate for the JZ4770 and a bit misleading for the JZ4780. Either we should fix the bindings, or remove them entirely. This patch opts to remove the bindings. There is a good case to be made that "ext" and "pll half" don't belong here because they aren't directly used by the AIC. They are only used to set the parent of the "i2s" clock; they have no other effect on the AIC. A good way to think of it is in terms of how the AIC constrains clocks. The AIC can only generate the bit & frame clocks from the system clock in certain ratios. Setting the sample rate effectively constrains the frame clock, which, because of the clock dividers controlled by the AIC, translates to constraints on the "i2s" clock. Nothing in the AIC imposes a direct constraint on the parents of the "i2s" clock, and the AIC does not need to enable or disable the parents directly, so in principle the AIC doesn't need to be aware of the parent clocks at all. The choice of parent clock is still important, but the AIC doesn't have enough information to apply such constraints itself. The sound card does have that information because it knows how the AIC is connected to other components. We need to use other DT mechanisms to communicate those constraints at the sound card level, instead of passing the clocks through to the AIC, and inventing ad-hoc ways to plumb the constraints around behind the scenes. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Acked-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20221028103418.17578-2-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-31ASoC: jz4740-i2s: Remove .set_sysclk()Aidan MacDonald2-42/+0
.set_sysclk() is effectively unused here. No machine drivers use jz4740-i2s; and JZ4740_I2S_CLKSRC_EXT is the only selectable clock source with simple-card, but that is also the default source and has a fixed frequency, so configuring it would be redundant. simple-card ignores -ENOTSUPP error codes when setting the sysclock, so any device trees that do set the sysclock for some reason should still work. It's still possible to configure the clock parent manually in the device tree and control frequency using other simple-card options, so at the end of the day there's no real loss in functionality. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20221028103418.17578-4-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: add multi-port, SAL and MFC supportMark Brown6-228/+489
Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>: This patchset adds support to multi-port connections between AudioReach Modules which is required for sophisticated graphs like ECNS or Speaker Protection. Also as part of ECNS testing new module support for SAL and MFC are added. Tested on SM8450 with ECNS.
2022-10-28ASoC: SOF: Intel: HDA: refactor codec and multi-link suportMark Brown14-228/+438
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Existing HDaudio controllers expose an HDAudio DMA which is used to interface with HDaudio codecs. All other interfaces supported by Intel (SoundWire, SSP, DMIC) rely for data transfers on another GP-DMA managed by the DSP firmware - the HDaudio DMA is only used for memory-to-DSP transfers. New HDaudio extensions will enable the use of this HDaudio DMA for all of SoundWire, SSP, DMIC. These extensions will be backwards-compatible for HDaudio and iDISP codecs, but will require new programming sequences and DAI callbacks for SoundWire, SSP and DMIC. Before we add support for 'extended audio links' and the programming sequences for the DMA, we need to refactor the code. All HDaudio codec support needs to be well identified in a separate file, and likewise all the 'multi-link' handling needs to be better split. This patchset removes a number of 'old' Kconfig dependencies and options, adds helpers with a fallback to remove IS_ENABLED checks in the code and tries to simplify programming sequences when possible. One indirect benefit from this refactoring is that developers can switch with a kernel parameter from HDaudio support to a variant of 'nocodec' support. This proves extremely useful to test on existing Intel RVPs and Up boards, where the same build can be used to check 3 interfaces (HDaudio, SSP, DMIC) by just removing modules, setting the kernel parameter and reloading modules.
2022-10-28ASoC: Intel: avs: PCM power managementMark Brown8-60/+461
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Goal of the series is implementation of suspend/resume operations for a PCM stream along with all the collaterals connected to the subject. Start with splitting avs_dai_fe_hw_free() as ideally we would like to reuse as much of existing code as possible but snd_pcm_lib_free_pages() is not desired part of the function when speaking of suspend operation. The actual implementation of suspend/resume() for component drivers follows. For most scenarios, the PM flow is similar to standard streaming one, except for the part where the position register are being saved and the lack of PCM pages freeing. To reduce code duplication, all avs_dai_suspend_XXX() and avs_dai_resume_XXX() functions reuse their non-PM equivalents. Order of operations is affected by the fact that path binding/unbinding happens only in FE part of the stream. Above essentially unlocks SX+streaming scenarios i.e.: power transitions with an ongoing stream. As some streams are allowed to run in low power state, support is provided for S0iX state. The handlers check ACPI capabilities and the number of active low-power paths before deciding between SX and S0iX flows. The last portion of the patchset is addition of power/clock gating overrides. There is no single set of registers that ensures AudioDSP firmware loads 100% of time on every single configuration. By having them exposed, user can have the loading procedure behavior adjusted for their configuration without having to recompile the kernel.
2022-10-28ASoC: qdsp6: audioreach: add support to enable module commandSrinivas Kandagatla2-1/+44
Add support to enable Module command which is required for logging module to be able to debug. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: add support for MFC ModuleSrinivas Kandagatla2-1/+53
Add support to enable and configure Media Format Converter (MFC) Module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: add support to enable SAL ModuleSrinivas Kandagatla2-0/+88
Add support to Simple Accumulator-Limiter module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-8-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: add support for more port connectionsSrinivas Kandagatla4-39/+144
AudioReach Modules can connect to other modules using source and destination port, and each module in theory can support up to 255 port connections. But in practice this limit is at max 8 ports at a time. So add support for allowing multiple port connections. This support is needed for more detailed graphs like ECNS, speaker protection and so. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: simplify module_list sz calculationSrinivas Kandagatla1-4/+6
Simplify module_list size calculation by doing inside modules loop. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: Simplify handing FE and BE graph connectionsSrinivas Kandagatla5-174/+127
Current AudioReach design of connecting FE and BE graph is very complicated and not reliable. Instead used the virtual damp widgets private data to help identify the modules that needs connection at runtime. Also maintain a inter-graph connection info in the graph info, which can be used to both determine if the graphs are connected and at graph build time. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: update dapm kcontrol private dataSrinivas Kandagatla3-1/+20
Update kcontrol private date to include more information like graph id and module instance id which its connected to. Also maintain this virtual dapm mixer widget in a list so that we could lookup while FE and BE connection are added. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: remove unused connection_listSrinivas Kandagatla1-1/+0
Remove unused connection_list parameter. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: qdsp6: audioreach: topology use idr_alloc_u32Srinivas Kandagatla1-8/+8
SubGraph and Module Instance ids take 32 bits, so use idr_alloc_u32 instead of idr_alloc to able to accommodate valid ranges. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20221027102710.21407-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28Add support for SAI on i.MX93 platformMark Brown3-4/+21
Merge series from Chancel Liu <chancel.liu@nxp.com>: This patchset supports SAI on i.MX93 platform.
2022-10-28ASoC: SOF: introduce new DEBUG_NOCODEC modePierre-Louis Bossart5-3/+84
The existing NOCODEC mode enforces a build-time mutual exclusion with the HDaudio link support, mostly to avoid any dependency on the snd_hdac library and references to HDAudio codec/i915 stuff. This is very useful to track dependencies and test a minimal configuration, but very painful for developers and CI: a recompilation and reinstall of the kernel modules is required. This patch suggests an alternate middle ground where the selection of the machine driver and all codec-related actions are bypassed at run-time, contingent on a kernel module parameter being set. For example setting BIT(10) with 'options snd_sof sof_debug=0x401' is enough to switch from an HDaudio card to a nocodec one. This new DEBUG_NOCODEC mode is not suitable for distributions and end-users. It's not even recommended on all platforms, i.e. the NOCODEC mode is known not to work on specific devices where the BIOS did not configure support for I2S/DMIC interfaces. The usual development devices such as Chromebooks, Up boards and Intel RVP are the only recommended platforms where this mode can be supported. Note that the dynamic switch between HDaudio and nocodec may not always possible depending on hardware layout, pin-mux options, and BIOS settings. The audio subsustems on Intel platforms has to support 4 types of interfaces and pin-mux can be complicated. Reviewers might ask: why didn't we do this earlier? The main reason is that all the codec-related configurations were not cleanly separated out in the sof/intel directory. With all the cleanups done recently, adding this opt-in behavior is relatively straightforward. Tested on UpExtreme (WHL) and UpExtreme i11 (TGL). Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: hda-codec: use GPL-2.0-only licensePierre-Louis Bossart1-11/+8
All the HDAudio codec handling is completely specific to Linux and completely dependency on GPL2.0 code, specifically the snd_hdac_ library. There was no intention to have a dual-license for this code, this was an oversight that needs to be corrected. Update the SPDX and EXPORT_SYMBOL information, no functionality change otherwise. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: hda: clarify Kconfig dependenciesPierre-Louis Bossart2-7/+7
Since we've moved to the same flows for HDaudio and iDISP codecs, we need to be more consistent about dependencies. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: add hda_bus_ml_free helperPierre-Louis Bossart3-3/+18
Add helper matching allocation done in hda_bus_ml_get_capabilities(). No functionality change, just clearer code partitioning. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: hda-mlink: add helpers to suspend/resume linksPierre-Louis Bossart3-26/+35
No functionality change, just move the code in hda-mlink. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: clarify bus_init and bus_exit sequencesPierre-Louis Bossart3-13/+20
The dependencies are on SND_SOC_SOF_HDA_AUDIO_CODEC and the bus_exit sequence should be well identified. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: hda-codec: add helpers to suspend and resume cmd_ioPierre-Louis Bossart3-6/+29
No functionality change, code move to have better split between HDaudio codec management and core parts. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: hda-dsp: clarify dependencies on SND_SOC_SOF_HDAPierre-Louis Bossart1-3/+1
IS_ENABLED is not always in the right places, the codec parts depend on SND_SOC_SOF_HDAUDIO_CODEC Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-28ASoC: SOF: Intel: hda-ctrl: use helper to clear RIRB statusPierre-Louis Bossart1-4/+1
Change to use helper and avoid conditional compilation. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>