- Oct 04, 2022
-
-
Ajye Huang authored
Follow Intel's design to replace max98360a amp SSP2 reather than SSP1 by judging DMI_OEM_STRING in sof_rt5682_quirk_table struct. And reusing max98357's topology since DAI setting could be leveraged. Signed-off-by:
Ajye Huang <ajye_huang@compal.corp-partner.google.com> Acked-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220324084708.2009375-1-ajye_huang@compal.corp-partner.google.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit fcd1e39c) Conflicts: sound/soc/sof/sof-pci-dev.c BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> Change-Id: Id37efbf77a0572579f6a891de85cbc33cdfed7cf
-
Kai Vehmanen authored
Add back logic to mark all playback streams as L1 compatible. Fixes: 246dd428 ("ASoC: SOF: Intel: make DMI L1 selection more robust") Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220310171651.249385-2-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit a174e72e) Change-Id: Ie4e930cc3f74f66034c7f13c48463094dd228105
-
Pierre-Louis Bossart authored
We've been using a default firmware name for each PCI/ACPI/OF platform for a while. The machine-specific sof_fw_filename is in practice not different from the default, and newer devices don't set this field, so let's remove the redundant definitions. When OEMs modify the base firmware, they can keep the same firmware name but store the file in a separate directory. Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by:
Rander Wang <rander.wang@intel.com> Reviewed-by:
Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220301194903.60859-2-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit a6264056) Conflicts: sound/soc/intel/common/soc-acpi-intel-adl-match.c sound/soc/intel/common/soc-acpi-intel-bxt-match.c sound/soc/intel/common/soc-acpi-intel-cnl-match.c sound/soc/intel/common/soc-acpi-intel-glk-match.c sound/soc/intel/common/soc-acpi-intel-tgl-match.c (mdolke) Merge conflicts were in parts of the code that are not affected by this patch. I resolved them by retaining the original code BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> Change-Id: I5eaf91b8d9e413744142e2b742ebe3c7699259c4
-
Takashi Iwai authored
The recent fix for DPCM locking also covered the loop in dpcm_be_disconnect() with the FE stream lock. This caused an unexpected side effect, thought: calling debugfs_remove_recursive() in the spinlock may lead to lockdep splats as the code there assumes the SOFTIRQ-safe context. For avoiding the problem, this patch changes the disconnection procedure to two phases: at first, the matching entries are removed from the linked list, then the resources are freed outside the lock. Fixes: b7898396 ("ASoC: soc-pcm: Fix and cleanup DPCM locking") Reported-and-tested-by:
Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by:
Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220119155249.26754-3-tiwai@suse.de Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 9f620684) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> Change-Id: I33dfc6d50417b663a510fc0384b863e278d3d1b0
-
Ajit Kumar Pandey authored
When pcm stream is stopped "substream->runtime" pointer will be set to NULL by ALSA core. In case host received an ipc msg from firmware of type IPC_STREAM_POSITION after pcm stream is stopped, there will be kernel NULL pointer exception in ipc_period_elapsed(). This patch fixes it by adding NULL pointer check for "substream->runtime". Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by:
Ajit Kumar Pandey <AjitKumar.Pandey@amd.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211216232422.345164-3-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 182b682b) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> Change-Id: Icae76521ca1c66f5ade25cf26b2eeecaa445a5bf
-
Pierre-Louis Bossart authored
A BE connected to more than one FE, e.g. in a mixer case, can go through the following transitions. play FE1 -> BE state is START pause FE1 -> BE state is PAUSED play FE2 -> BE state is START stop FE2 -> BE state is STOP (see note [1] below) release FE1 -> BE state is START stop FE1 -> BE state is STOP play FE1 -> BE state is START pause FE1 -> BE state is PAUSED play FE2 -> BE state is START release FE1 -> BE state is START stop FE2 -> BE state is START stop FE1 -> BE state is STOP play FE1 -> BE state is START play FE2 -> BE state is START (no change) pause FE1 -> BE state is START (no change) pause FE2 -> BE state is PAUSED release FE1 -> BE state is START release FE2 -> BE state is START (no change) stop FE1 -> BE state is START (no change) stop FE2 -> BE state is STOP The existing code for PAUSE_RELEASE only allows for the case where the BE is paused, which clearly would not work in the sequences above. Extend the allowed states to restart the BE when PAUSE_RELEASE is received, and increase the refcount if the BE is already in START. [1] the existing logic does not move the BE state back to PAUSED when the FE2 is stopped. This patch does not change the logic; it would be painful to keep a history of changes on the FE side, the state machine is already rather complicated with transitions based on the last BE state and the trigger type. Reported-by:
Bard Liao <bard.liao@intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211207173745.15850-7-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 3aa1e96a) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 3aa1e96a) Change-Id: I519d5210a3fc740e2d1e5fcdf0fa6eba60f1bacb
-
Pierre-Louis Bossart authored
On start/pause_release/resume, when more than one FE is connected to the same BE, it's possible that the trigger is sent more than once. This is not desirable, we only want to trigger a BE once, which is straightforward to implement with a refcount. For stop/pause/suspend, the problem is more complicated: the check implemented in snd_soc_dpcm_can_be_free_stop() may fail due to a conceptual deadlock when we trigger the BE before the FE. In this case, the FE states have not yet changed, so there are corner cases where the TRIGGER_STOP is never sent - the dual case of start where multiple triggers might be sent. This patch suggests an unconditional trigger in all cases, without checking the FE states, using a refcount protected by the BE PCM stream lock. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211207173745.15850-6-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 848aedfd) Change-Id: Iee94cae20e002d4451641ed6cd65d129a81dabae
-
Takashi Iwai authored
When more than one FE is connected to a BE, e.g. in a mixing use case, the BE can be triggered multiple times when the FE are opened/started concurrently. This race condition is problematic in the case of SoundWire BE dailinks, and this is not desirable in a general case. This patch relies on the existing BE PCM lock, which takes atomicity into account. The locking model assumes that all interactions start with the FE, so that there is no deadlock between FE and BE locks. Signed-off-by:
Takashi Iwai <tiwai@suse.de> [test, checkpatch fix and clarification of commit message by plbossart] Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211207173745.15850-5-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit b2ae8066) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit b2ae8066) Change-Id: Ide6eea68b3be4a89e000a83fa4888f2825da4c3b
-
Takashi Iwai authored
The existing locking for DPCM has several issues a) a confusing mix of card->mutex and card->pcm_mutex. b) a dpcm_lock spinlock added inconsistently and on paths that could be recursively taken. The use of irqsave/irqrestore was also overkill. The suggested model is: 1) The pcm_mutex is the top-most protection of BE links in the FE. The pcm_mutex is applied always on either the top PCM callbacks or the external call from DAPM, not taken in the internal functions. 2) the FE stream lock is taken in higher levels before invoking dpcm_be_dai_trigger() 3) when adding and deleting a BE, both the pcm_mutex and FE stream lock are taken. Signed-off-by:
Takashi Iwai <tiwai@suse.de> [clarification of commit message by plbossart] Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211207173745.15850-4-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit b7898396) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit b7898396) Change-Id: Ia8231294e532eeb847f104d6a0c51ca9fcf7d526
-
Pierre-Louis Bossart authored
Since the flow for DPCM is based on taking a lock for the FE first, we need to make sure during the connection between a BE and an FE that they both use the same 'atomicity', otherwise we may sleep in atomic context. If the FE is nonatomic, this patch forces the BE to be nonatomic as well. That should have no negative impact since the BE 'inherits' the FE properties. However, if the FE is atomic and the BE is not, then the configuration is flagged as invalid. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> [ removed FE stream lock by tiwai ] Signed-off-by:
Takashi Iwai <tiwai@suse.de> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211207173745.15850-3-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit bbf7d3b1) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit bbf7d3b1) Change-Id: Ia15bac8962f333e8bc2acffb77111875d7a761c8
-
Pierre-Louis Bossart authored
We allocate a structure in dpcm_be_connect(), which may be called in atomic context. Using GFP_KERNEL is not quite right, we have to use GFP_ATOMIC to prevent the allocator from sleeping. Suggested-by:
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211207173745.15850-2-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit d8a9c6e1) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit d8a9c6e1) Change-Id: I2f2c2e4d7c5950fef3fd39f20e8a5c7c748293fc
-
Rikard Falkeborn authored
The only usage of sof_probe_compr_ops is to assign its address to the cops field in the snd_soc_dai_driver struct (in sound/soc/sof/intel/hda-dai.c). Make it const to allow the compiler to put it in read-only memory. Signed-off-by:
Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20211204203220.54712-1-rikard.falkeborn@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit ec247fea) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit ec247fea) Change-Id: I100c6b9b981707a3068fd6b4ab72301451a09d94
-
Pierre-Louis Bossart authored
Explain why JasperLake is exposed in cnl.c instead of icl.c No functionality change. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by:
Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211207193947.71080-8-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 290a7c55) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 290a7c55) Change-Id: I1643790c712aafb229809bf8173455bf7286fb18
-
Pierre-Louis Bossart authored
The existing code does not use the 'host_dma_id', 'link_dma_id', 'host_bps' fields remove them. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@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/20211207193947.71080-7-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 924631df) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 924631df) Change-Id: Id5294d9d7ea3c5cc1432a166292ca34e634b09a5
-
Pierre-Louis Bossart authored
The code inherited from the Skylake driver does not seem to follow any known hardware recommendations. The only two recommended options are a) use DPIB registers if VC1 traffic is not allowed b) use DPIB DDR update if VC1 traffic is used In all of SOF-based updated, VC1 is not supported so we can 'safely' move to using DPIB registers only. This patch keeps the legacy code, in case there was an undocumented issue lost to history, and adds the DPIB DDR update for additional debug. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20211207193947.71080-6-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 288fad2f) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 288fad2f) Change-Id: Ife1e7758b3b44419bb3c2cdf4a2179508edf314b
-
Pierre-Louis Bossart authored
The existing code is inconsistent, we should only enable DPIB if the 'use_posbuf' field is true. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20211207193947.71080-5-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit ae81d8fd) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit ae81d8fd) Change-Id: I0bfa2cdc65971d7cee16c66b95f28e0abd78d236
-
Pierre-Louis Bossart authored
we use 'bus->use_posbuf && bus->posbuf.addr' in hda_dsp_ctrl_init_chip(), use the same for hda_dsp_ctrl_stop_chip() Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20211207193947.71080-4-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 12ce2138) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 12ce2138) Change-Id: Ie12ba9ae203bb4e099021ec7b538957d8e33d1d3
-
Ranjani Sridharan authored
Move the ICL specific ops to icl.c. Also introduce a macro ICL_DSP_HPRO_CORE_ID to define the core that should be powered up when HPRO is enabled. Reviewed-by:
Bard Liao <bard.liao@intel.com> Reviewed-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211207193947.71080-2-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit c697ef86) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit c697ef86) Change-Id: I2620a69412d12cfce5dfe6f70891a6114c64d6cc
-
Ameer Hamza authored
Dereferncing of_id pointer will result in exception in current implementation since of_match_device() will assign it to NULL. Adding NULL check for protection. Signed-off-by:
Ameer Hamza <amhamza.mgc@gmail.com> Link: https://lore.kernel.org/r/20211207142309.222820-1-amhamza.mgc@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit befe3045) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit befe3045) Change-Id: I8e4a32f93835612e42070e31e4b145b83120be72
-
Pierre-Louis Bossart authored
Sparse warnings: sound/soc/intel/boards/sof_maxim_common.c:140:33: error: symbol 'max_98390_dapm_routes' was not declared. Should it be static? sound/soc/intel/boards/sof_maxim_common.c:156:33: error: symbol 'max_98390_tt_dapm_routes' was not declared. Should it be static? Fixes: f316c9d9 ('ASoC: Intel: boards: add max98390 2/4 speakers support') Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211207211700.115319-1-pierre-louis.bossart@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 639cd58b) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> Change-Id: Iaeec0eabbb75c0239d92552b61cb30e527bf12aa
-
Kai Vehmanen authored
Fix following error: sound/soc/sof/intel/hda-codec.c:132:35: error: use of undeclared identifier 'CODEC_PROBE_RETRIES' Found with config: i386-randconfig-r033-20211202 (https://download.01.org/0day-ci/archive/20211203/202112031943.Twg19fWT-lkp@intel.com/config ) Fixes: 046aede2 ("ASoC: SOF: Intel: Retry codec probing if it fails") Reported-by:
kernel test robot <lkp@intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211203154721.923496-1-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 9a83dfcc) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 9a83dfcc) Change-Id: If3e30ab7ff70e7a36f8d4b2bec1f1e04f8c653ff
-
Ameer Hamza authored
Dereferncing of_id pointer will result in exception in current implementation since of_match_device() will assign it to NULL. Adding NULL check for protection. Signed-off-by:
Ameer Hamza <amhamza.mgc@gmail.com> Link: https://lore.kernel.org/r/20211205204200.7852-1-amhamza.mgc@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit c686316e) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit c686316e) Change-Id: Ic4e90c9cee0babc492654b3b8d857d21275b7048
-
Mac Chiang authored
support 2 hw boards. 1. SSP2 connects max98390, 2 speakers. 2. SSP1 connects max98390, 2/4 speakers. 2 or 4 speakers playback add echo reference capture add bt offload support add DMI_OEM_STRING for board variants add ALC5682I-VS support Signed-off-by:
Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com> Signed-off-by:
Mac Chiang <mac.chiang@intel.com> Signed-off-by:
Kieth Tzeng <keith.tzeng@quantatw.com> Signed-off-by:
Brent Lu <brent.lu@intel.com> Acked-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211125030453.4382-1-mac.chiang@intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit f316c9d9) Conflicts: sound/soc/intel/common/soc-acpi-intel-adl-match.c sound/soc/sof/sof-pci-dev.c BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> Change-Id: I3a31b7200547bf0eb96da50fa824c73291aecb9f
-
Rikard Falkeborn authored
These are only assigned to the ops fields in the snd_soc_dai_link struct which is a pointer to const struct snd_soc_ops. Make them const to allow the compiler to put them in read-only memory. Signed-off-by:
Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211127091954.12075-1-rikard.falkeborn@gmail.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 10b155fd) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 10b155fd) Change-Id: Ie569dfd4cf401fa48c2298bf786d11cc2f9ef64e
-
Chris Down authored
On my T14s Gen2 I saw the following: [ 16.057258] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3 [ 16.057261] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4 [ 16.057263] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 5 [...and so on.] It looks like the double newline is a mistake, so remove one. Signed-off-by:
Chris Down <chris@chrisdown.name> Acked-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/YaOS0sBueAfApwOx@chrisdown.name Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 11918cdc) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 11918cdc) Change-Id: Iaba9351305f84d1bff99d2752292bf3c1ce04386
-
Hui Wang authored
On the latest Lenovo Thinkstation laptops, we often experience the speaker failure after rebooting, check the dmesg, we could see: sof-audio-pci-intel-tgl 0000:00:1f.3: codec #0 probe error, ret: -5 The analogue codec on the machine is ALC287, then we designed a testcase to reboot and check the codec probing result repeatedly, we found the analogue codec probing always failed at least once within several minutes to several hours (roughly 1 reboot per min). This issue happens on all laptops of this Thinkstation model, but with legacy HDA driver, we couldn't reproduce this issue on those laptops. And so far, this issue is not reproduced on machines which don't belong to this model. We tried to make the hda_dsp_ctrl_init_chip() same as hda_intel_init_chip() which is the controller init routine in the legacy HDA driver, but it didn't help. We found when issue happens, the resp is -1, and if we let driver re-run send_cmd() and get_response(), it will get the correct response 10ec0287, then driver continues the rest work, finally boot to the desktop and all audio function work well. Here adding codec probing retries to 3 times, it could fix the issue on this Thinkstation model, and it doesn't bring impact to other machines. Reviewed-by:
Bard Liao <bard.liao@intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Hui Wang <hui.wang@canonical.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211130090606.529348-1-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 046aede2) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 046aede2) Change-Id: I84471cb4052846bcea98a2e3c1c38c499be3fc8e
-
Ranjani Sridharan authored
For HDA DAI's the DMA must be paused after the RUN bit is cleared by the host. So, send the DAI_CONFIG IPC with just the SOF_DAI_CONFIG_FLAGS_PAUSE flag set to indicate this to the firmware. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-11-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 69acac56) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 69acac56) Change-Id: I99713ef87ad199b17b9541a243f51b7818472e5f
-
Ranjani Sridharan authored
Some DAI components, such as HDaudio, need to be stopped in two steps a) stop the DAI component b) stop the DAI DMA This patch enables this two-step stop by expanding the DAI_CONFIG IPC flags and split them into 2 parts. The 4 LSB bits indicate when the DAI_CONFIG IPC is sent, ex: hw_params, hw_free or pause. The 4 MSB bits are used as the quirk flags to be used along with the command flags. The quirk flag called SOF_DAI_CONFIG_FLAGS_2_STEP_STOP shall be set along with the HW_PARAMS command flag, i.e. before the pipeline is started so that the stop/pause trigger op in the FW can take the appropriate action to either perform/skip the DMA stop. If set, the DMA stop will be executed when the DAI_CONFIG IPC is sent during hw_free. In the case of pause, DMA pause will be handled when the DAI_CONFIG IPC is sent with the PAUSE command flag. Along with this, modify the signature for the hda_ctrl_dai_widget_setup/ hda_ctrl_dai_widget_free() functions to take additional flags as an argument and modify all users to pass the appropriate quirk flags. Only the HDA DAI's need to pass the SOF_DAI_CONFIG_FLAGS_2_STEP_STOP quirk flag during hw_params to indicate that it supports two-step stop and pause. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-10-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit a0f84dfb) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit a0f84dfb) Conflicts: sound/soc/sof/intel/hda.c Change-Id: Ie52347896100dce12ce372d605faed8fe916a5c1
-
Ranjani Sridharan authored
Even though the order of stopping the DMA and freeing the widget list is not important, align the sequence to match with the stop trigger to avoid confusion. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-9-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 0b639dcd) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 0b639dcd) Change-Id: I0dae46c252fbc04fd0e5394ddbec7b8772969035
-
Ranjani Sridharan authored
Move the check for the prepared flag inside snd_pcm_dsp_pcm_free() to avoid having to check it before every invocation of the function. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-8-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 85d7acd0) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 85d7acd0) Change-Id: I7a074dc492911ff721e71d7629693e5ffb716660
-
Ranjani Sridharan authored
Add a helper function to free PCM in the FW, stop the DMA and free the widget list. These actions are performed both during PCM trigger STOP and when a paused stream is freed during system suspend. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-7-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit d9a72465) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit d9a72465) Change-Id: Ica5034be5614c5fa6173250e05c2fe83d832759c
-
Ranjani Sridharan authored
Paused streams must be stopped and platform hw_free should be invoked during system suspend so they can be restarted properly after system resume. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-6-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 47934e0f) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 47934e0f) Change-Id: I2072c788f5c96fc81b63eaac8f83af01a9407f88
-
Ranjani Sridharan authored
snd_sof_pcm_platform_hw_params() will be called when the stream is restarted with a prepare ioctl. This happens in two cases i.e. when a suspended stream is resumed or when a stream is restarted without intermediate call to sof_pcm_hw_free(). Make sure to call snd_sof_pcm_platform_hw_free() in both these cases to keep it balanced. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-5-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 0dd71a33) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 0dd71a33) Change-Id: I18b7423b408e97692640b31488aa6cd7e9c565c4
-
Ranjani Sridharan authored
The recommended programming sequence for HD-Audio DMA is to reset the stream before coupling the link and host DMA's. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-4-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 4794601a) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 4794601a) Change-Id: Iea9acb68660bf002135df20b75d4c50dc92eff86
-
Ranjani Sridharan authored
Add a helper function to perform stream reset. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-3-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 2b1acedc) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 2b1acedc) Change-Id: I83f007770eeb5d3056bde5c0e5f0e3d33ce00b08
-
Ranjani Sridharan authored
The DAI_CONFIG IPC that is sent during the STOP trigger is used for stopping the DMA in the FW. This must be done after the DMA RUN bit is cleared by the host. So move the call to snd_hdac_ext_link_stream_clear() before hda_link_dai_widget_update() to follow the correct programming sequence for DMA stop for HDA DAIs. Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211125101520.291581-2-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit e14cddc5) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit e14cddc5) Change-Id: I35282a52763273ae8bda4c5b9318525c6ec87957
-
Yang Yingliang authored
The node pointer is returned by of_parse_phandle() with refcount incremented in platform_parse_resource(). Calling of_node_put() to aovid the refcount leak. Reported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20211125071608.3056715-1-yangyingliang@huawei.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit fc6c62cf) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit fc6c62cf) Change-Id: Ib68a303a9293299f14d09c36bccd4d06de082e0a
-
Ranjani Sridharan authored
During system suspend, paused streams do not get suspended. Therefore, we need to explicitly free these PCMs in the DSP and free the associated DAPM widgets so that they can be set up again during resume. Fixes: 5fcdbb2d ("ASoC: SOF: Add support for dynamic pipelines") Signed-off-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by:
Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by:
Bard Liao <bard.liao@intel.com> Reviewed-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211123171606.129350-3-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 96da1740) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 96da1740) Change-Id: I1dc46f807d0a19ddbb11c529f4ee03613f201ace
-
Pierre-Louis Bossart authored
It's not clear why we would walk the list backwards. That makes no difference. Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211123171606.129350-2-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit fb71d03b) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit fb71d03b) Change-Id: I737340e1487cb6f7ef9a7661adf6369b7449f352
-
Pierre-Louis Bossart authored
Older firmware prior to ABI 3.19 has a dependency where the scheduler widgets need to be setup last. Moving the call to sof_widget_setup() before the pipeline_complete() call also helps remove the need for the 'reverse' direction when walking through the widget list - this was only working because of the topology macros but the topology does not require any order. Fixes: 5fcdbb2d ("ASoC: SOF: Add support for dynamic pipelines") Signed-off-by:
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by:
Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211123171606.129350-1-kai.vehmanen@linux.intel.com Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 01429183) BUG=b:218766331 TEST=Test sound cards are listed and audio playback works. Signed-off-by:
Terry Cheong <htcheong@chromium.org> Signed-off-by:
Madhulika Dolke <madhulika.dolke@intel.com> (cherry picked from commit 01429183) Change-Id: Iebe6c56017e47c3bd9af5971f6a39aa392080021
-