1. 09 Dec, 2020 2 commits
    • Kuninori Morimoto's avatar
      ASoC: soc-pcm: care trigger rollback · 6374f493
      Kuninori Morimoto authored
      soc_pcm_trigger() calls DAI/Component/Link trigger,
      but some of them might be failed.
      
      	static int soc_pcm_trigger(...)
      	{
      		...
      		switch (cmd) {
      		case SNDRV_PCM_TRIGGER_START:
      		case SNDRV_PCM_TRIGGER_RESUME:
      		case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
      			ret = snd_soc_link_trigger(substream, cmd);
      			if (ret < 0)
      				break;
      
      (*)			ret = snd_soc_pcm_component_trigger(substream, cmd);
      			if (ret < 0)
      				break;
      
      			ret = snd_soc_pcm_dai_trigger(substream, cmd);
      			break;
      		case SNDRV_PCM_TRIGGER_STOP:
      		case SNDRV_PCM_TRIGGER_SUSPEND:
      		case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
      			ret = snd_soc_pcm_dai_trigger(substream, cmd);
      			if (ret < 0)
      				break;
      
      			ret = snd_soc_pcm_component_trigger(substream, cmd);
      			if (ret < 0)
      				break;
      
      			ret = snd_soc_link_trigger(substream, cmd);
      			break;
      		}
      		...
      	}
      
      For example, if soc_pcm_trigger() failed at (*) point,
      we need to rollback previous succeeded trigger.
      
      This patch adds trigger mark for DAI/Component/Link,
      and do STOP if START/RESUME/PAUSE_RELEASE were failed.
      
      Because it need to use new rollback parameter,
      we need to modify DAI/Component/Link trigger functions in the same time.
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87a6uycssd.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      6374f493
    • Kuninori Morimoto's avatar
      ASoC: soc-pcm: remove dpcm_do_trigger() · a9faca15
      Kuninori Morimoto authored
      dpcm_be_dai_trigger() is calling dpcm_do_trigger()
      at each SNDRV_PCM_TRIGGER_xxx (1).
      
      	int dpcm_be_dai_trigger(...)
      	{
      		for_each_dpcm_be(fe, stream, dpcm) {
      (B)			...
      			switch (cmd) {
      			case SNDRV_PCM_TRIGGER_START:
      				...
      (1)				ret = dpcm_do_trigger(...);
      				...
      			case SNDRV_PCM_TRIGGER_RESUME:
      				...
      (1)				ret = dpcm_do_trigger(...);
      				...
      			case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
      				...
      (1)				ret = dpcm_do_trigger(...);
      				...
      			case SNDRV_PCM_TRIGGER_STOP:
      				...
      (1)				ret = dpcm_do_trigger(...);
      				...
      			case SNDRV_PCM_TRIGGER_SUSPEND:
      				...
      (1)				ret = dpcm_do_trigger(...);
      				...
      			case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
      				...
      (1)				ret = dpcm_do_trigger(...);
      				...
      			}
      		}
      	}
      
      But it is just very verbose and duplicated function.
      Because We can indicate dev_dbg() (A) at dpcm_be_dai_trigger() (B).
      And dev_err() (C) is not needed because soc_pcm_trigger() itself
      indicates error message when error.
      
      	static int dpcm_do_trigger(...)
      	{
      		int ret;
      
      (A)		dev_dbg(...);
      
      		ret = soc_pcm_trigger(substream, cmd);
      		if (ret < 0)
      (C)			dev_err(...);
      
      		return ret;
      	}
      
      This patch replace dpcm_do_trigger() to soc_pcm_trigger().
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87blfecssk.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      a9faca15
  2. 08 Dec, 2020 7 commits
  3. 07 Dec, 2020 2 commits
  4. 04 Dec, 2020 11 commits
  5. 03 Dec, 2020 3 commits
  6. 02 Dec, 2020 12 commits
  7. 30 Nov, 2020 3 commits
    • Mark Brown's avatar
      Merge branch 'for-5.10' of... · e5879d98
      Mark Brown authored
      Merge branch 'for-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.11
      e5879d98
    • Mark Brown's avatar
      Merge series "ASoC: SOF: Intel: fix ICL boot sequence" from Kai Vehmanen... · 645be01d
      Mark Brown authored
      Merge series "ASoC: SOF: Intel: fix ICL boot sequence" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:
      
      Series introducing a modified boot sequence for the Intel Ice Lake
      platform. While no bugs are currently open for this, the current
      DSP boot implementation does not follow the full programming sequence.
      
      This patchset is the first instance where SOF driver uses data in
      the extended manifest (part of the firmware binary), to influence
      the boot process. IPC cannot be used to get this information, as it
      is already needed for early boot.
      
      This change is backwards compatible with old firmware versions,
      where extended manifest is not available.
      
      Fred Oh (5):
        ASoC: SOF: ops: add parse_platform_ext_manifest() op
        ASoC: SOF: Intel: hda: define parse_platform_ext_manifest op
        ASoC: SOF: ext_manifest: parse cavs extra config data elem
        ASoC: SOF: ops: modify the signature of stall op
        ASoC: SOF: Intel: hda: add sof_icl_ops for ICL platforms
      
       include/sound/sof/ext_manifest.h   |   1 +
       sound/soc/sof/intel/Makefile       |   2 +-
       sound/soc/sof/intel/apl.c          |   3 +
       sound/soc/sof/intel/cnl.c          |  19 +---
       sound/soc/sof/intel/ext_manifest.h |  35 +++++++
       sound/soc/sof/intel/hda-loader.c   | 100 ++++++++++++++++++++
       sound/soc/sof/intel/hda.h          |  11 +++
       sound/soc/sof/intel/icl.c          | 145 +++++++++++++++++++++++++++++
       sound/soc/sof/intel/tgl.c          |   3 +
       sound/soc/sof/loader.c             |   3 +
       sound/soc/sof/ops.h                |  14 ++-
       sound/soc/sof/sof-pci-dev.c        |   2 +-
       sound/soc/sof/sof-priv.h           |   7 +-
       13 files changed, 324 insertions(+), 21 deletions(-)
       create mode 100644 sound/soc/sof/intel/ext_manifest.h
       create mode 100644 sound/soc/sof/intel/icl.c
      
      --
      2.28.0
      645be01d
    • Mark Brown's avatar
      Merge series "ASoC: tidyup for jack.h" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: · 853c15b1
      Mark Brown authored
      Hi Mark
      
      These are jack.h related tidyup.
      
      Kuninori Morimoto (2):
        ASoC: soc-core: tidyup jack.h
        ASoC: add soc-jack.h
      
       include/sound/soc-jack.h    | 132 ++++++++++++++++++++++++++++++++++++
       include/sound/soc.h         | 122 +--------------------------------
       include/trace/events/asoc.h |   1 +
       sound/soc/soc-core.c        |   1 -
       4 files changed, 134 insertions(+), 122 deletions(-)
       create mode 100644 include/sound/soc-jack.h
      
      --
      2.25.1
      853c15b1