24281bc2bf
ASoC: SOF: Add mt8195 device descriptor
...
Add SOF device and DT descriptor for Mediatek mt8195 platform.
Signed-off-by: YC Hung <yc.hung@mediatek.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211118100749.54628-6-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-18 13:57:40 +00:00
b7f6503830
ASoC: SOF: mediatek: Add fw loader and mt8195 dsp ops to load firmware
...
Add mt8195-loader module with ops callback to load and run firmware
on mt8195 platform.
Signed-off-by: YC Hung <yc.hung@mediatek.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211118100749.54628-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-18 13:57:39 +00:00
b72bfcffcf
ASoC: SOF: topology: Add support for Mediatek AFE DAI
...
Add new sof dai and config to pass topology file configuration
to SOF firmware running on Mediatek platform DSP core.
Add mediatek audio front end(AFE) to the list of supported sof_dais
Signed-off-by: YC Hung <yc.hung@mediatek.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211118100749.54628-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-18 13:57:37 +00:00
e6feefa541
ASoC: SOF: tokens: add token for Mediatek AFE
...
Add the definition for Mediatek audio front end(AFE) tokens,include
AFE sampling rate, channels, and format.
Signed-off-by: YC Hung <yc.hung@mediatek.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211118100749.54628-3-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-18 13:57:36 +00:00
32d7e03d26
ASoC: SOF: mediatek: Add mt8195 hardware support
...
This patch initialize to support SOF on Mediatek mt8195 platform.
MT8195 has four Cortex A78 cores paired with four Cortex A55 cores.
It also has Cadence HiFi-4 DSP single core. There are shared DRAM and
mailbox interrupt between AP and DSP to use for IPC communication.
Signed-off-by: YC Hung <yc.hung@mediatek.com >
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211118100749.54628-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-18 13:57:35 +00:00
b6a5f4f055
ASoC: SOF: Platform updates for AMD and Mediatek
...
Merge series from Daniel Baluta <daniel.baluta@oss.nxp.com >:
This patchseries adds AMD Renoir ACP HW support.
2021-11-17 22:29:46 +00:00
745a8e7cbe
ASoC: SOF: New debug feature: IPC message injector
...
Merge series from Daniel Baluta <daniel.baluta@oss.nxp.com >:
Add a test/debug feature allowing IPC messages to the DSP to be injected
via debugfs.
2021-11-17 22:29:45 +00:00
63eb462623
ASoC: cs42l42: Remove redundant code
...
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com >:
Cleanups and code clarifications for the cs42l42 driver.
2021-11-17 22:29:44 +00:00
5c903f64ce
firmware: cs_dsp: Allow creation of event controls
...
Some firmwares contain controls intended to convey firmware state back
to the host. Whilst more infrastructure will probably be needed for
these in time, as a first step allow creation of the controls, so said
firmwares arn't completely rejected.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-10-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:28 +00:00
f444da38ac
firmware: cs_dsp: Add offset to cs_dsp read/write
...
Provide a mechanism to access only part of a control through the cs_dsp
interface.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-9-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:27 +00:00
b329b3d394
firmware: cs_dsp: Clarify some kernel doc comments
...
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-8-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:26 +00:00
86c6080407
firmware: cs_dsp: Perform NULL check in cs_dsp_coeff_write/read_ctrl
...
Add a NULL check to the cs_dsp_coeff_write/read_ctrl functions. This is
a major convenience for users of the cs_dsp library as it allows the call
to cs_dsp_get_ctl to be inlined with the call to read/write the control
itself.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:25 +00:00
dcee767667
firmware: cs_dsp: Add support for rev 2 coefficient files
...
Add support for the revision 2 coefficient file, this format is
identical to revision 1 and was simply added by accident to some
firmware. However unfortunately many firmwares have leaked into
production using this and as such driver support really needs to
be added for it.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:24 +00:00
40a34ae730
firmware: cs_dsp: Print messages from bin files
...
The coefficient file contains various info strings, and the equivalent
strings are printed from the WMFW file as it is loaded. Add support
for printing these from the coefficient file as well.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:23 +00:00
14055b5a3a
firmware: cs_dsp: Add pre_run callback
...
The code already has a post_run callback, add a matching pre_run
callback to the client_ops that is called before execution is started.
This callback provides a convenient place for the client code to
set DSP controls or hardware that requires configuration before
the DSP core actually starts execution. Note that placing this callback
before cs_dsp_coeff_sync_controls is important to ensure that any
control values are then correctly synced out to the chip.
Co-authored-by: Simon Trimmer <simont@opensource.cirrus.com >
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com >
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:22 +00:00
2925748ead
firmware: cs_dsp: Add version checks on coefficient loading
...
The firmware coefficient files contain version information that is
currently ignored by the cs_dsp code. This information specifies which
version of the firmware the coefficient were generated for. Add a check
into the code which prints a warning in the case the coefficient and
firmware differ in version, in many cases this will be ok but it is not
always, so best to let the user know there is a potential issue.
Co-authored-by: Simon Trimmer <simont@opensource.cirrus.com >
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com >
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:21 +00:00
5065cfabec
firmware: cs_dsp: Add lockdep asserts to interface functions
...
Some of the control functions exposed by the cs_dsp code require the
pwr_lock to be held by the caller. Add lockdep_assert_held calls to
ensure this is done correctly.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:20 +00:00
56717d72f7
ASoC: wm_adsp: Remove the wmfw_add_ctl helper function
...
The helper function wmfw_add_ctl is only called from one place and that
place is a function with only 2 lines of code. Merge the helper function
into the work function to simplify the code.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211117132300.1290-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 22:16:19 +00:00
f063eba3e7
ASoC: SOF: amd: Add support for SOF firmware authentication
...
Add callback to notify PSP after loading firmware on DSP. PSP will
validate the loaded firmware and set qualifier bit to run firmware
on secured AMD systems.
Signed-off-by: Julian Schroeder <Julian.Schroeder@amd.com >
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Curtis Malainey <curtis@malainey.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-14-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:56 +00:00
4627421fb8
ASoC: SOF: amd: Add trace logger support
...
Add trace support and configure trace stream for ACP firmware.
Signed-off-by: Vishnuvardhanrao Ravuapati <vishnuvardhanrao.ravulapati@amd.com >
Signed-off-by: V sujith kumar Reddy <vsreddy@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-13-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:55 +00:00
efb931cdc4
ASoC: SOF: topology: Add support for AMD ACP DAIs
...
Add new sof dais and config to pass topology file configuration
to SOF firmware running on ACP's DSP core. ACP firmware support
I2S_BT, I2S_SP and DMIC controller hence add three new dais to
the list of supported sof_dais
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-12-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:54 +00:00
63fba90fc8
ASoC: amd: acp-config: Remove legacy acpi based machine struct
...
We have moved legacy based machine struct into platform driver to
resolve module dependency with non-SOF ALSA build, hence removed
it from acp-config driver module.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-11-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:53 +00:00
ec25a3b142
ASoC: SOF: amd: Add Renoir PCI driver interface
...
Add PCI driver module to enable sof pci device support for Renoir.
If machine flag set to FLAG_SOF_ONLY_DMIC this pci driver register
platform device for non dsp based I2S platform device. If machine
flag is not enabled for SOF pci probe will return without invoking
sof device probe and registration
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-10-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:52 +00:00
11ddd4e371
ASoC: SOF: amd: Add machine driver dsp ops for Renoir platform
...
Add dsp ops callback to select and register machine driver.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-9-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:51 +00:00
f1bdd8d385
ASoC: amd: Add module to determine ACP configuration
...
ACP hw block configuration differs across various distributions
and hence it's required to register different drivers module for
distributions. For now we support three ACP drivers:
* ACP without SOF use case
* ACP with SOF use case
* ACP with SOF use case for DMIC and non SOF for I2S endpoints
As all above driver registers with common PCI ID for ACP hw block
we need code to determine ACP configuration and auto select driver
module. This patch expose function that return configuration flag
based on dmi checks for a system. ACP driver module probe register
platform device based on such configuration flag to avoid conflict
with other ACP drivers probed for same PCI ID.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-8-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:50 +00:00
e8afccf8fb
ASoC: SOF: amd: Add PCM stream callback for Renoir dai's
...
Add module to support ALSA pcm stream configurations for ACP I2S
and DMIC endpoints
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-7-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:49 +00:00
bda93076d1
ASoC: SOF: amd: Add dai driver dsp ops callback for Renoir
...
Add dsp ops callback to register I2S and DMIC sof dai's with ALSA
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-6-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:48 +00:00
738a2b5e2c
ASoC: SOF: amd: Add IPC support for ACP IP block
...
Add IPC module for generic ACP block and exposed ops callback for
to synchronize SOF IPC message between host and DSP
Signed-off-by: Balakishore Pati <Balakishore.pati@amd.com >
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:47 +00:00
7e51a9e38a
ASoC: SOF: amd: Add fw loader and renoir dsp ops to load firmware
...
Add acp-loader module with ops callback to load and run firmware
on ACP DSP block on Renoir platform.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:46 +00:00
0e44572a28
ASoC: SOF: amd: Add helper callbacks for ACP's DMA configuration
...
ACP DMA is used for loading SOF firmware into DSP memory and data
transfer from system memory to DSP memory. Add helper callbacks to
initialize and configure ACP DMA block for fw loading.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com >
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-3-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:45 +00:00
846aef1d7c
ASoC: SOF: amd: Add Renoir ACP HW support
...
This patch initializes ACP HW block to support SOF on
AMD Renoir platform.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211117093734.17407-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 17:35:44 +00:00
7fabe7fed1
ASoC: stm32: sai: increase channels_max limit
...
The SAI peripheral supports up to 16 channels in TDM mode (8L+8R).
The driver currently supports TDM over two channels.
Increase SAI DAI playback/record channels_max,
to also allow up to 16 channels in TDM mode.
Signed-off-by: Olivier Moysan <olivier.moysan@st.com >
Link: https://lore.kernel.org/r/20211117110031.19345-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:53 +00:00
2f0b1b013b
ASoC: SOF: debug: Add support for IPC message injection
...
In order to stress test the firmware's ability to handle (mis)crafted
IPC messages this patch adds a debugfs interface where a binary file
(message) can be written and the message is sent to the firmware as it is.
Read on the same file will return the reply from the firmware if it is
available as a binary.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.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 >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211116152137.52129-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:51 +00:00
0bd2891bda
ASoC: SOF: intel: Use the generic helper to get the reply
...
Make use of the generic snd_sof_ipc_process_reply() from the core instead
the local implementation.
snd_sof_ipc_process_reply() handles the reply retrieving and the ipc reply
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.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 >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211116152137.52129-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:50 +00:00
18c45f2703
ASoC: SOF: imx: Use the generic helper to get the reply
...
Make use of the generic snd_sof_ipc_process_reply() from the core instead
the local implementation.
snd_sof_ipc_process_reply() handles the reply retrieving and the ipc reply
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.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 >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211116152137.52129-3-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:49 +00:00
8ae77801c8
ASoC: SOF: utils: Add generic function to get the reply for a tx message
...
The code to get the reply for a tx is identical in all but one place:
imx8_get_reply(), imx8m_get_reply(), atom_get_reply(), bdw_get_reply().
hda_dsp_ipc_get_reply() have additional check in place for PROBES and
special handling of PM messages.
Add a generic implementation to the core which can be used as drop in
replacement.
The reply size check is changed to be able to handle cases when the reply
size is not know beforehand (this is the case for PROBES and
DEBUG_MEM_USAGE for example).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.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 >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211116152137.52129-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:48 +00:00
bbf0e1d365
ASoC: cs42l42: Remove redundant pll_divout member
...
Now that struct cs42l42_private has pll_config, the current PLL
configuration can be looked up directly in pll_ratio_table. This
makes the pll_divout member of cs42l42_private redundant since it
was only a copy of the value from pll_ratio_table.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211116163901.45390-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:46 +00:00
3edde6de09
ASoC: cs42l42: Simplify reporting of jack unplug
...
When reporting a jack unplug there's no need to make the reported
flags conditional on which flags were reported during the plug
event. It's perfectly safe to report all flags and buttons as
not-present and let the higher code filter for changes.
There's also no need to make two separate snd_soc_jack_report()
calls for presence flags and button flags. It can all be done in
one report.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211116163901.45390-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:45 +00:00
f2dfbaaa54
ASoC: cs42l42: Remove redundant writes to RS_PLUG/RS_UNPLUG masks
...
The RS_PLUG and RS_UNPLUG interrupt masks are always written as 1 so
those writes are redundant and can be deleted.
This makes it completely clear in the code that only the TS_PLUG and
TS_UNPLUG masks are being changed.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211116163901.45390-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:44 +00:00
976001b10f
ASoC: cs42l42: Remove redundant writes to DETECT_MODE
...
There are multiple places where DETECT_MODE is included in a register
write, but in every case it is written as 0. Removing these redundant
writes makes the code less cluttered and also makes it obvious that
DETECT_MODE is never changed.
A single initialization to 0 is added to cs42l42_setup_hs_type_detect().
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20211116163901.45390-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:43 +00:00
424fe7edbe
ASoC: stm32: i2s: fix 32 bits channel length without mclk
...
Fix divider calculation in the case of 32 bits channel
configuration, when no master clock is used.
Fixes: e4e6ec7b12
("ASoC: stm32: Add I2S driver")
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com >
Link: https://lore.kernel.org/r/20211117104404.3832-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-17 13:04:38 +00:00
7548a391c5
ASoC: SOF: i.MX: simplify Kconfig
...
Follow the Intel example and simplify the Kconfig
a) start from the end-product for 'select' chains
b) use 'depends on' to filter out configurations.
c) use snd-sof-of as a common module without any 'select'
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com >
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com >
Link: https://lore.kernel.org/r/20211116124131.46414-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:59 +00:00
5f55c9693a
ASoC: qcom: sdm845: only setup slim ports once
...
Currently same slim channel map setup for every dai link, which is redundant.
Fix this by adding a flag and conditionally setting these channel maps.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20211116115021.14213-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:58 +00:00
cb04d8cd0b
ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
...
For some reason we ended up using snd_soc_component_write_field
for HPHL and snd_soc_component_update_bits for HPHR, so fix this.
Fixes: af3d54b997
("ASoC: codecs: lpass-rx-macro: add support for lpass rx macro")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20211116114623.11891-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:53 +00:00
006ea27c4e
ASoC: codecs: wcd934x: return error code correctly from hw_params
...
Error returned from wcd934x_slim_set_hw_params() are not passed to upper layer,
this could be misleading to the user which can start sending stream leading
to unnecessary errors.
Fix this by properly returning the errors.
Fixes: a61f3b4f47
("ASoC: wcd934x: add support to wcd9340/wcd9341 codec")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20211116114623.11891-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:52 +00:00
ea157c2ba8
ASoC: codecs: wcd938x: fix volatile register range
...
Interrupt Clear registers WCD938X_INTR_CLEAR_0 - WCD938X_INTR_CLEAR_2
are not marked as volatile. This has resulted in a missing interrupt bug
while performing runtime pm. regcache_sync() during runtime pm resume path
will write to Interrupt clear registers with previous values which basically
clears the pending interrupt and actual interrupt handler never sees this
interrupt.
This issue is more visible with headset plug-in plug-out case compared to
headset button.
Fix this by adding the Interrupt clear registers to volatile range
Fixes: 8d78602aa8
("ASoC: codecs: wcd938x: add basic driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20211116114623.11891-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:51 +00:00
7e567b5ae0
ASoC: topology: Add missing rwsem around snd_ctl_remove() calls
...
snd_ctl_remove() has to be called with card->controls_rwsem held (when
called after the card instantiation). This patch add the missing
rwsem calls around it.
Fixes: 8a9782346d
("ASoC: topology: Add topology core")
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Link: https://lore.kernel.org/r/20211116071812.18109-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:50 +00:00
6712c2e18c
ASoC: qdsp6: q6routing: validate port id before setting up route
...
Validate port id before it starts sending commands to dsp this would
make error handling simpler.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20211116114721.12517-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:49 +00:00
0a270471d6
ASoC: qdsp6: q6adm: improve error reporting
...
reset value for port is -1 so printing an hex would not give us very
useful debug information, so use %d instead.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20211116114721.12517-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:48 +00:00
721a94b435
ASoC: qdsp6: q6asm: fix q6asm_dai_prepare error handling
...
Error handling in q6asm_dai_prepare() seems to be completely broken,
Fix this by handling it properly.
Fixes: 2a9e92d371
("ASoC: qdsp6: q6asm: Add q6asm dai driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20211116114721.12517-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2021-11-16 14:29:45 +00:00