summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-03-25ASoC: Intel: sof_rt5682: board id cleanup for cml boardsBrent Lu
Introduce "cml_rt5682_def" for cml boards which implement headphone codec on SSP0 and speaker amplifiers on SSP1. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_nau8825: remove sof_nau8825 board idBrent Lu
Remove sof_nau8825 board id and use adl_nau8825_def instead since SSP port assignment is the same. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_ssp_amp: remove unnecessary idisp HDMI quirkBrent Lu
Remove SOF_NUM_IDISP_HDMI(3) from board quirks since the value is 3 if not defined. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_rt5682: remove unnecessary idisp HDMI quirkBrent Lu
Remove SOF_NUM_IDISP_HDMI(3) from board quirks since the value is 3 if not defined. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_da7219: board id cleanup for rpl boardsBrent Lu
Introduce "rpl_da7219_def" board to reduce the number of rpl board configs. This config could support all boards which implement headphone codec on SSP0 and speaker amplifiers on SSP1. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_da7219: board id cleanup for adl boardsBrent Lu
Introduce "adl_da7219_def" board to reduce the number of jsl board configs. This config could support all boards which implement headphone codec on SSP0 and speaker amplifiers on SSP1. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_da7219: board id cleanup for jsl boardsBrent Lu
Introduce "jsl_da7219_def" board to reduce the number of jsl board configs. This config could support all boards which implement headphone codec on SSP0 and speaker amplifiers on SSP1. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_da7219: add SOF_DA7219_MCLK_EN quirkBrent Lu
PLL bypass mode requires mclk to be present. However, mclk pin is not connected in JSL boards. Here we add the SOF_DA7219_MCLK_EN quirk to improve driver readability. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_da7219: add codec exit functionBrent Lu
Add exit function to headphone codec dai link. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_da7219: use common module for DAI link generationBrent Lu
Use intel_board module to generate DAI link array and update num_links field in snd_soc_card structure. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_ssp_amp: use common module for sof_card_private initializationBrent Lu
Use intel_board module to initialize sof_card_private structure. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_rt5682: use common module for sof_card_private initializationBrent Lu
Use intel_board module to initialize sof_card_private structure Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_nau8825: use common module for sof_card_private initializationBrent Lu
Use intel_board module to initialize sof_card_private structure. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_cs42l42: use common module for sof_card_private initializationBrent Lu
Use intel_board module to initialize sof_card_private structure. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: board_helpers: support sof_card_private initializationBrent Lu
Add a helper function for machine drivers to initialize common part of sof_card_private structure. Also unify the macros of board quirks for the initialization. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_cs42l42: rename BT offload quirkBrent Lu
Rename the quirk in preparation for future changes: common quriks will be defined and handled in board helper module. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_rt5682: support ALC5650 on RPL boardsBrent Lu
This commit supports RPL boards which implement ALC5650 dual I2S interface codec. SSP port usage: HP: SSP0 -> AIF1 SPK: SSP1 -> AIF2 BT: SSP2 -> BT Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_da7219: add rpl_mx98360_da7219 board configBrent Lu
This configuration supports RPL boards which implement DA7219 on SSP0 and MAX98360A on SSP1. DA7219 uses PLL bypass mode to avoid WCLK locking problem. To use this mode, the MCLK frequency must be 12.288 or 24.576MHz in the topology binary. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: board_helpers: change dai link helpers to static functionBrent Lu
Since there is a helper function to generate entire DAI link array, we switch individual dai link helpers to static function. No functional change in this commit. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: sof_ssp_amp: use common module for DAI link generationBrent Lu
Use intel_board module to generate DAI link array and update num_links field in snd_soc_card structure. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: board_helpers: support DAI link ID customizationBrent Lu
Add an new field link_id_overwrite to sof_card_private structure to support machine drivers which DAI link ID is fixed number or discontinue (i.e. no-codec boards). If this field is zero, DAI array index will be used as link ID. Otherwise the value extracted from link_id_overwrite will be used. The field link_id_overwrite is supposed to be initialized by SOF_LINK_IDS macro like following example. ctx->link_id_overwrite = SOF_LINK_IDS(HEADPHONE_BE_ID, \ DMIC01_BE_ID, \ DMIC16K_BE_ID, \ IDISP_HDMI_BE_ID, \ SPK_BE_ID, \ BT_OFFLOAD_BE_ID, \ HDMI_IN_BE_ID) An exception is that, if you use link_order_overwrite to overwrite DAI link order, then you need to use the same order to build link_id_overwrite variable as well. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240325221059.206042-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: dt-bindings: wm8974: Convert to dtschemaKartik Agarwala
Convert WM8974 audio CODEC bindings from text to dtschema. Signed-off-by: Kartik Agarwala <agarwala.kartik@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240325181943.116733-1-agarwala.kartik@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: dt-bindings: fsl-esai: Convert fsl,esai.txt to yamlFrank Li
Convert fsl,esai.txt to yaml. So DTB_CHECK tools can verify dts file about esai part. clock-names 'spba' is optional according to description. So minItems of clocks and clock-names is 3. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://msgid.link/r/20240322145406.2613256-1-Frank.Li@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: mediatek: Assign dummy when codec not specified for a DAI linkAngeloGioacchino Del Regno
MediaTek sound card drivers are checking whether a DAI link is present and used on a board to assign the correct parameters and this is done by checking the codec DAI names at probe time. If no real codec is present, assign the dummy codec to the DAI link to avoid NULL pointer during string comparison. Fixes: 4302187d955f ("ASoC: mediatek: common: add soundcard driver common code") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://msgid.link/r/20240313110147.1267793-5-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: mediatek: Commonize ADDA rate transform functions and enumsAngeloGioacchino Del Regno
Both the enumerations for UL/DL rates, delay data and the functions adda_{dl,ul}_rate_transform were duplicated for each MediaTek SoC dai-adda driver: move the common bits to a new mtk-dai-adda-common file and its header. While at it, also add the "mtk_" prefix to the exported functions. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://msgid.link/r/20240313110147.1267793-4-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()AngeloGioacchino Del Regno
Simplify the probe function by switching error prints to return dev_err_probe(), lowering the lines count; while at it, also beautify some messages and change some others' level from warn to error. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://msgid.link/r/20240313110147.1267793-3-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()AngeloGioacchino Del Regno
Switch from pm_runtime_enable() to devm_pm_runtime_enable(), allowing to remove all gotos from the probe function. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://msgid.link/r/20240313110147.1267793-2-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: fsl: imx-es8328: Switch to using gpiod APIAndy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://msgid.link/r/20240318200804.181516-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: fsl: fsl_ssi: Add dev_err_probe if PCM DMA init failsAlexander Stein
This happens especially if this driver is built-in, but SDMA driver is configured as module. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://msgid.link/r/20240314141642.2943605-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: dt-bindings: wm8776: Convert to dtschemaKartik Agarwala
Convert WM8776 audio CODEC bindings from text to dtschema. Signed-off-by: Kartik Agarwala <agarwala.kartik@gmail.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240317200201.119233-1-agarwala.kartik@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: amd: simplify soundwire dependencies for legacy stackVijendar Mukunda
The CONFIG_SOUNDWIRE_AMD is a user-visible option, it should be never selected by another driver. So replace the extra complexity with a normal Kconfig dependency in SND_SOC_AMD_SOUNDWIRE. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://msgid.link/r/20240322112018.3063344-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: dt-bindings: fsl-audmix: Convert fsl,audmix.txt to yamlFrank Li
Convert fsl,audmix.txt to yaml to let dtb check tools check audmix part. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://msgid.link/r/20240321150401.2464783-1-Frank.Li@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: dmaengine_pcm: Allow passing component name via configTomi Valkeinen
At the moment we cannot instantiate two dmaengine_pcms with the same parent device, as the components will be named the same, leading to conflicts. Add 'name' field to the snd_dmaengine_pcm_config, and use that (if defined) as the component name instead of deriving the component name from the device. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Link: https://msgid.link/r/20240319-xilinx-dp-audio-v2-1-92d6d3a7ca7e@ideasonboard.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: codecs: ES8326: Delete unused REG_SUPPLYZhang Yi
REG_SUPPLY mutes the DAC when switching between HDMI and speaker, so remove it to fix the mute issues Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://msgid.link/r/20240320083012.4282-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: codecs: ES8326: Reducing power consumptionZhang Yi
For lower power consumption during hibernation, the configuration of es8326_suspend and es8326_remove will be adjusted. Adding es8326_i2c_shutdown and es8326_i2c_remove to cover different situations Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://msgid.link/r/20240320083012.4282-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: fsl: imx-rpmsg: Update to correct DT nodeChancel Liu
In order to support register and unregister rpmsg sound card through remoteproc platform device for card to probe is registered in imx-audio-rpmsg. ASoC machine driver no longer can get DT node of ASoC CPU DAI device through parent device. ASoC machine driver can get DT node of ASoC CPU DAI device with rpmsg channel name acquired from platform specific data. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://msgid.link/r/20240311111349.723256-6-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: fsl: fsl_rpmsg: Register CPU DAI with name of rpmsg channelChancel Liu
Each rpmsg sound card sits on one rpmsg channel. Register CPU DAI with name of rpmsg channel so that ASoC machine driver can easily link CPU DAI with rpmsg channel name. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://msgid.link/r/20240311111349.723256-5-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: fsl: Let imx-audio-rpmsg register platform device for cardChancel Liu
Let imx-audio-rpmsg register platform device for card. So that card register and unregister can be controlled by rpmsg driver's register and unregister. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://msgid.link/r/20240311111349.723256-4-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: fsl: imx-audio-rpmsg: Register device with rpmsg channel nameChancel Liu
This rpmsg driver registers device for ASoC platform driver. To align with platform driver use rpmsg channel name to create device. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://msgid.link/r/20240311111349.723256-3-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: fsl: imx-pcm-rpmsg: Register component with rpmsg channel nameChancel Liu
Machine driver uses rpmsg channel name to link this platform component. However if the component is re-registerd card will not find this new created component in snd_soc_try_rebind_card(). Explicitly register this component with rpmsg channel name so that card can always find this component. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://msgid.link/r/20240311111349.723256-2-chancel.liu@nxp.com Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: avs: i2s_test: Remove redundant dapm routesAmadeusz Sławiński
Remove unnecessary widgets and routes as they are created by snd_soc_dapm_connect_dai_link_widgets() automatically. Link: https://lore.kernel.org/all/20230612110958.592674-1-brent.lu@intel.com/ Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240308090502.2136760-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: avs: ssm4567: Board cleanupCezary Rojewski
The card-name suffix and the DP-widgets are an unintended copy-paste from skl_nau88215_ssm4567.c. Both are redundant. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240308090502.2136760-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: avs: ssm4567: Do not ignore route checksCezary Rojewski
A copy-paste from intel/boards/skl_nau88l25_ssm4567.c made the avs's equivalent disable route checks as well. Such behavior is not desired. Fixes: 69ea14efe99b ("ASoC: Intel: avs: Add ssm4567 machine board") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240308090502.2136760-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: topology: Do not ignore route checks when parsing graphsCezary Rojewski
One of the framework responsibilities is to ensure that the enumerated DPCMs are valid i.e.: a valid BE is connected to a valid FE DAI. While the are checks in soc-core.c and soc-pcm.c that verify this, a component driver may attempt to workaround this by loading an invalid graph through the topology file. Be strict and fail topology loading when invalid graph is encountered. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240308090502.2136760-3-cezary.rojewski@intel.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: Intel: Disable route checks for Skylake boardsCezary Rojewski
Topology files that are propagated to the world and utilized by the skylake-driver carry shortcomings in their SectionGraphs. Since commit daa480bde6b3 ("ASoC: soc-core: tidyup for snd_soc_dapm_add_routes()") route checks are no longer permissive. Probe failures for Intel boards have been partially addressed by commit a22ae72b86a4 ("ASoC: soc-core: disable route checks for legacy devices") and its follow up but only skl_nau88l25_ssm4567.c is patched. Fix the problem for the rest of the boards. Link: https://lore.kernel.org/all/20200309192744.18380-1-pierre-louis.bossart@linux.intel.com/ Fixes: daa480bde6b3 ("ASoC: soc-core: tidyup for snd_soc_dapm_add_routes()") Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://msgid.link/r/20240308090502.2136760-2-cezary.rojewski@intel.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: sun8i-codec: Implement jack and accessory detectionArnaud Ferraris
Add support for the jack detection functionality in the A64 variant, which uses a pair of IRQs; and microphone accessory (button) detection, which uses an ADC with an IRQ trigger. IRQs will only be triggered if the JACKDETEN, HMICBIASEN, and MICADCEN bits are set appropriately in the analog codec component (sun50i-codec-analog), but there is no direct software dependency between the two components. Setup ADC so that it samples with period of 16ms, disable smoothing and enable MDATA threshold (should be below idle voltage/HMIC_DATA value). Also enable HMIC_N, which makes sure we get HMIC_N samples after HMIC_DATA crosses the threshold. This allows us to perform steady state detection of HMIC_DATA, by comparing current and previous ADC samples, to detect end of the transient when the user de-presses the button. Otherwise ADC could sample anywhere within the transient, and the driver may mis-issue key-press events for other buttons attached to the resistor ladder. [Ondrej: Almost complete rewrite of the patch, change to use set_jack API. Better de-bounce, fix mic button handling, better interrupt processing.] Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> [Samuel: Decouple from analog codec, fixes] Co-developed-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Samuel Holland <samuel@sholland.org> Co-developed-by: Ondrej Jirman <megi@xff.cz> Signed-off-by: Ondrej Jirman <megi@xff.cz> Link: https://msgid.link/r/20240302140042.1990256-5-megi@xff.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: sun50i-codec-analog: Enable jack detection on startupArnaud Ferraris
This commit adds the necessary setup to enable jack detection on startup as well as the callback function enabling the microphone ADC when headset bias is enabled. The microphone ADC is also disabled in suspend. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com> [Samuel: Moved MICADCEN setup to HBIAS event, added bias hooks] Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Ondřej Jirman <megi@xff.cz> Link: https://msgid.link/r/20240302140042.1990256-4-megi@xff.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: sun8i-codec: Enable bus clock at STANDBY and higher biasSamuel Holland
For codec variants that have a bus clock, that clock must be running to receive interrupts. Since jack and mic accessory detection should work even when no audio is playing, that means the bus clock should be enabled any time the system is on. Accomplish that by tying the bus clock to the runtime PM state, which is then tied to the bias level not being OFF. Since the codec sets idle_bias_on, bias will generally never be OFF. However, we can set suspend_bias_off to maintain the power savings of gating the bus clock during suspend, when we don't expect jack/accessory detection to work. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Ondřej Jirman <megi@xff.cz> Link: https://msgid.link/r/20240302140042.1990256-3-megi@xff.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-25ASoC: sun50i-codec-analog: Move suspend/resume to set_bias_levelSamuel Holland
With idle_bias_on and suspend_bias_off, there are bias level transitions that match the suspend/resume callbacks. However, there are also transitions during probe (OFF => STANDBY) and removal (STANDBY => OFF). By using the set_bias_level hook, the driver can have one copy of code that would otherwise be duplicated between the probe/resume and suspend/remove hooks. Signed-off-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Ondřej Jirman <megi@xff.cz> Link: https://msgid.link/r/20240302140042.1990256-2-megi@xff.cz Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-24Linux 6.9-rc1v6.9-rc1Linus Torvalds