1. 18 May, 2023 14 commits
  2. 17 May, 2023 3 commits
  3. 16 May, 2023 2 commits
  4. 15 May, 2023 21 commits
    • Mark Brown's avatar
      ASoC: SOF: ipc4-topology: Improve the audio format · fc1d62b3
      Mark Brown authored
      Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
      
      Improve the logic to account for the current restrictions in topology while
      making it extensible for future topology modifications.
      
      The current topology definitions assume that input/output formats come in pairs.
      For example even if there's only 1 output format for a module, we add 3 output
      formats to match that of the input format count with the same parameters.
      This is unnecessary but we have to deal with it until the topologies are
      modified. Additionally, choosing the input/output audio format should
      depend only on the pipeline params or the runtime FE hw_params depending
      on where the module is in the pipeline.
      
      This series modifies the logic for selection based on this and removes
      unnecessary dependencies between the input and output formats.
      fc1d62b3
    • Mark Brown's avatar
      ASoC: mediatek: mt8188: revise AFE driver · 25428a9d
      Mark Brown authored
      Merge series from Trevor Wu <trevor.wu@mediatek.com>:
      
      The series of patches consists of four major changes.
      First, remove redundant supply for ADDA DAI dirver. Second, revise ETDM
      control including APLL dynamic switch via DAPM, so APLL can be enabled
      when it is really required. Third, update AFE probe function. Bus
      protection change was dropped at the previous patch because the dependent
      change was not accepted at that time. Finally, correct some binding errors
      and add required clocks.
      25428a9d
    • Mark Brown's avatar
      ASoC: Factor out control notification support · fe0d5b9a
      Mark Brown authored
      Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:
      
      This series introduces and uses a helper for notifying control changes
      to userspace.
      fe0d5b9a
    • Mark Brown's avatar
      ASoC: SOF: Intel/ipc4: Do not reset BE DAI pipeline · 8d7c1a57
      Mark Brown authored
      Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:
      
      Do not reset pipelines during the stop/suspend triggers in the BE DAI
      ops as the BE DAI pipeline needs to be left in the PAUSED state. It should
      only be reset during hw_free. This simplification is already done for
      the FE pipelines and the DAI trigger only toggles the states between
      PAUSED and RUNNING.
      8d7c1a57
    • Mark Brown's avatar
      ASoC: SOF: Intel: hda-dai: prepare LNL support · 3959cd3d
      Mark Brown authored
      Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
      
      The HDAudio support has not changed much since CometLake/2019: the
      code was reshuffled for IPC4 support and we used hdac_hda for external
      and Display Audio codec, but the hda-dai code was only used for
      HDAudio codecs.
      
      In the LunarLake architecture, all endpoints (HDaudio, SSP, DMIC,
      SoundWire) are handled with the HDaudio DMA, which requires us to
      revisit the definitions of HDA_LINK, and remove the mutual exclusion
      between NOCODEC and HDA_LINK: we do want the ability to test SSP/DMIC
      in NOCODEC mode even with an HDA DMA.
      
      This code change exposed a number of issues, with a useless .prepare
      callback, a DAI number mismatch and the need to support SoundWire
      which is handled by a different component in
      drivers/soundwire/intel_ace2.c.
      3959cd3d
    • Mark Brown's avatar
      ASoC: Intel: machine driver updates · 6f599018
      Mark Brown authored
      Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
      
      Several updates for RPL/MTL/LNL, and one fix for SoundWire TGL device.
      6f599018
    • Ranjani Sridharan's avatar
      ASoC: SOF: ipc4-pcm: reset all pipelines during FE DAI hw_free · 225f37b5
      Ranjani Sridharan authored
      Do not reset pipelines during the stop/suspend triggers in the BE DAI
      ops as the BE DAI pipeline needs to be left in the PAUSED state. It should
      only be reset during hw_free. This simplification is already done for
      the FE pipelines and the DAI trigger only toggles the states between
      PAUSED and RUNNING.
      
      But because the FE DAI hw_free is invoked first and all the pipelines are
      freed during this op, we need to make sure that the BE DAI pipeline also
      gets reset before it is freed. So do not skip the pipelines that have the
      skip_during_fe_trigger flag set when resetting pipelines.
      
      Also, because the pipeline state changes are split between the FE and BE
      DAI ops now, protect the BE DAI pipeline state changes with the
      pipeline_state_mutex as well.
      
      Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
      Link: https://lore.kernel.org/r/20230515112022.30297-3-peter.ujfalusi@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      225f37b5
    • Ranjani Sridharan's avatar
      ASoC: SOF: Intel: hda-dai-ops: Split the get_hext_stream() op for IPC4 · 81a5d699
      Ranjani Sridharan authored
      Introduce a separate op implementation for get_hext_stream() for IPC4.
      This op will also be used to set the skip_during_fe_trigger flag for the
      BE DAI pipeline. With this change, we can remove the flag setting in
      sof_ipc4_dai_config() which will further simplify support for
      DMIC/SSP/Soundwire in the LunarLake platform.
      
      Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
      Link: https://lore.kernel.org/r/20230515112022.30297-2-peter.ujfalusi@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      81a5d699
    • Jiapeng Chong's avatar
      ASoC: SOF: Simplify the calculation of variables · d904942a
      Jiapeng Chong authored
      ./sound/soc/sof/pcm.c:372:27-29: WARNING !A || A && B is equivalent to !A || B.
      
      Reported-by: Abaci Robot <abaci@linux.alibaba.com
      Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4938
      Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com
      Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
      Link: https://lore.kernel.org/r/20230512064225.75358-1-jiapeng.chong@linux.alibaba.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      d904942a
    • Peter Ujfalusi's avatar
      ASoC: SOF: ipc4-topology: Use set_get_data() to send LARGE_CONFIG message · 7a975e9b
      Peter Ujfalusi authored
      Instead of open coding the sending of sink format of the copier with
      LARGE_CONFIG_SET message, use the proper function to do so.
      
      Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
      Link: https://lore.kernel.org/r/20230512105642.23437-1-peter.ujfalusi@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      7a975e9b
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: remove mutual exclusion between NOCODEC and HDA_LINK · fdecd4aa
      Pierre-Louis Bossart authored
      The nocodec mode served two purposes so far
      a) generate a test driver for DMIC/SSP without any codec connected
      b) make sure the use of snd_hdac_ libraries was contained
      
      b) is no longer an option for LunarLake, the HDaudio DMA is used for
      DMIC/SSP and the HDA_LINK option needs to be enabled.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-10-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      fdecd4aa
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: hda-dai: use HDA_LINK instead of HDA_AUDIO_CODEC · 746a78c2
      Pierre-Louis Bossart authored
      For LunarLake support, we will have to use HDAudio DMA-based DAIs even
      for SSP/DMIC/SoundWire. That's completely different to the
      HDA_AUDIO_CODEC, the DAI ops deal with DMA configuration and that can
      happen in the absence of any HDAudio codec.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-9-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      746a78c2
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: hda-dai: mark functions as __maybe_unused · b7b71b8c
      Pierre-Louis Bossart authored
      hda_dai_hw_params, hda_dai_trigger(), hda_dai_hw_free are currently
      only used for HDaudio codec support, but will be reused for
      SSP/DMIC/SoundWire in the LunarLake/ACE2.x case. To avoid 'defined but
      not used' errors or added complexity in Kconfig, mark all these
      functions as __maybe_used.
      
      When SSP/DMIC/SoundWire are added, some of these changes may be
      reverted. For now this avoids compilation warnings.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-8-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      b7b71b8c
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: hda-dai: move hda_dai_prepare() code · caf7ad84
      Pierre-Louis Bossart authored
      Before we change the Kconfig support, move code around. No
      functionality change with this commit in isolation.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-7-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      caf7ad84
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: Kconfig: move selection of PROBE_WORK_QUEUE · 2dddff71
      Pierre-Louis Bossart authored
      The probe workqueue is only needed if we have a Display Audio codec.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-6-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      2dddff71
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: clarify initialization when HDA_AUDIO_CODEC is not used · fb0bdfe2
      Pierre-Louis Bossart authored
      For LunarLake support, we need to enable HDA_LINK but we also want the
      ability to remove HDaudio codec support, e.g. for 'nocodec'
      tests. This requires a small change in the bus initialization without
      any codec-specific callbacks provided.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-5-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      fb0bdfe2
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: fix DAI number mismatch · 45f3c2f8
      Pierre-Louis Bossart authored
      The number of DAIs was based on a Kconfig option and the declaration
      on another. Fix before changing the dependencies.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-4-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      45f3c2f8
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: hda-dai: remove use of cpu_dai->component drvdata · de8e2d5d
      Pierre-Louis Bossart authored
      The existing code relies on conversions from cpu_dai to the sdev
      structure pointer based on the cpu_dai component. This works fine for
      HDaudio but will not work for SoundWire DAIs which are registered by a
      different component. That's a problem preventing reuse of the HDaudio
      DMA stream allocation for SoundWire DAIs starting with the LunarLake
      platform.
      
      This patch introduces a set of helpers to perform the conversion, and
      an indirect way of retrieving the sdev pointer based on the
      swidget->comp intermediate pointer.
      
      Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-3-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      de8e2d5d
    • Pierre-Louis Bossart's avatar
      ASoC: SOF: Intel: hda-dai: simplify .prepare callback · 3886518f
      Pierre-Louis Bossart authored
      The code has been cleaned-up multiple times, but while adding the new
      abstractions for DMIC/SSP/SoundWire it appears that we don't really
      need a specific sequence for .prepare, and we can reuse what
      .hw_params already does.
      
      Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com
      Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Reviewed-by: Rander Wang <rander.wang@intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Link: https://lore.kernel.org/r/20230512181702.117483-2-pierre-louis.bossart@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      3886518f
    • Ranjani Sridharan's avatar
      ASoC: SOF: ipc4-topology: Modify input audio format selection logic · 5a56c533
      Ranjani Sridharan authored
      The current selection logic assumes that input and output formats always
      come in pairs in topology. Handle this special case by checking if all
      input formats are the same. And for the case where there are multiple
      supported input audio formats, modify the selection logic to pick the
      audio formats based on the reference params which is either the FE
      hw_params or the pipeline params based on the type of module.
      
      Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
      Link: https://lore.kernel.org/r/20230515103336.16132-10-peter.ujfalusi@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      5a56c533
    • Ranjani Sridharan's avatar
      ASoC: SOF: ipc4-topology: New helper to check if all output formats are the same · f37b702c
      Ranjani Sridharan authored
      Add a helper function to check if all formats are identical.
      
      Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com
      Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com
      Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
      Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com
      Link: https://lore.kernel.org/r/20230515103336.16132-9-peter.ujfalusi@linux.intel.com
      Signed-off-by: Mark Brown <broonie@kernel.org
      f37b702c