You need to sign in or sign up before continuing.
  1. 10 3月, 2021 1 次提交
  2. 02 3月, 2021 2 次提交
  3. 11 2月, 2021 1 次提交
  4. 08 2月, 2021 3 次提交
  5. 06 2月, 2021 1 次提交
  6. 02 2月, 2021 1 次提交
    • H
      ALSA: jack: implement software jack injection via debugfs · 2d670ea2
      Hui Wang 提交于
      This change adds audio jack injection feature through debugfs, with
      this feature, we could validate alsa userspace changes by injecting
      plugin or plugout events to the non-phantom audio jacks.
      
      With this change, the sound core will build the folders
      $debugfs_mount_dir/sound/cardN if SND_DEBUG and DEBUG_FS are enabled.
      And if users also enable the SND_JACK_INJECTION_DEBUG, the jack
      injection nodes will be built in the folder cardN like below:
      
      $tree $debugfs_mount_dir/sound
      $debugfs_mount_dir/sound
      ├── card0
      │   ├── HDMI_DP_pcm_10_Jack
      │   │   ├── jackin_inject
      │   │   ├── kctl_id
      │   │   ├── mask_bits
      │   │   ├── status
      │   │   ├── sw_inject_enable
      │   │   └── type
      ...
      │   └── HDMI_DP_pcm_9_Jack
      │       ├── jackin_inject
      │       ├── kctl_id
      │       ├── mask_bits
      │       ├── status
      │       ├── sw_inject_enable
      │       └── type
      └── card1
          ├── HDMI_DP_pcm_5_Jack
          │   ├── jackin_inject
          │   ├── kctl_id
          │   ├── mask_bits
          │   ├── status
          │   ├── sw_inject_enable
          │   └── type
          ...
          ├── Headphone_Jack
          │   ├── jackin_inject
          │   ├── kctl_id
          │   ├── mask_bits
          │   ├── status
          │   ├── sw_inject_enable
          │   └── type
          └── Headset_Mic_Jack
              ├── jackin_inject
              ├── kctl_id
              ├── mask_bits
              ├── status
              ├── sw_inject_enable
              └── type
      
      The nodes kctl_id, mask_bits, status and type are read-only, users
      could check jack or jack_kctl's information through them.
      
      The nodes sw_inject_enable and jackin_inject are directly used for
      injection. The sw_inject_enable is read-write, users could check if
      software injection is enabled or not on this jack, and users could
      echo 1 or 0 to enable or disable software injection on this jack. Once
      the injection is enabled, the jack will not change by hardware events
      anymore, once the injection is disabled, the jack will restore the
      last reported hardware events to the jack. The jackin_inject is
      write-only, if the injection is enabled, users could echo 1 or 0 to
      this node to inject plugin or plugout events to this jack.
      
      For the detailed usage information on these nodes, please refer to
      Documentation/sound/designs/jack-injection.rst.
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Reviewed-by: NJaroslav Kysela <perex@perex.cz>
      Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com>
      Signed-off-by: NHui Wang <hui.wang@canonical.com>
      Link: https://lore.kernel.org/r/20210127085639.74954-2-hui.wang@canonical.comSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      2d670ea2
  7. 27 1月, 2021 1 次提交
  8. 23 1月, 2021 1 次提交
    • T
      ALSA: pcm: One more dependency for hw constraints · 23b53d44
      Takashi Iwai 提交于
      The fix for a long-standing USB-audio bug required one more dependency
      variable to be added to the hw constraints.  Unfortunately I didn't
      realize at debugging that the new addition may result in the overflow
      of the dependency array of each snd_pcm_hw_rule (up to three plus a
      sentinel), because USB-audio driver adds one more dependency only for
      a certain device and bus, hence it works as is for many devices.  But
      in a bad case, a simple open always results in -EINVAL (with kernel
      WARNING if CONFIG_SND_DEBUG is set) no matter what is passed.
      
      Since the dependencies are real and unavoidable (USB-audio restricts
      the hw_params per looping over the format/rate/channels combos), the
      only good solution seems to raise the bar for one more dependency for
      snd_pcm_hw_rule -- so does this patch: now the hw constraint
      dependencies can be up to four.
      
      Fixes: 506c203c ("ALSA: usb-audio: Fix hw constraints dependencies")
      Reported-by: NJamie Heilman <jamie@audible.transient.net>
      Link: https://lore.kernel.org/r/20210123155730.22576-1-tiwai@suse.deSigned-off-by: NTakashi Iwai <tiwai@suse.de>
      23b53d44
  9. 21 1月, 2021 2 次提交
  10. 11 1月, 2021 1 次提交
  11. 10 12月, 2020 1 次提交
  12. 09 12月, 2020 1 次提交
    • K
      ASoC: soc-pcm: care trigger rollback · 6374f493
      Kuninori Morimoto 提交于
      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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87a6uycssd.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
      6374f493
  13. 07 12月, 2020 1 次提交
  14. 30 11月, 2020 1 次提交
  15. 28 11月, 2020 3 次提交
  16. 26 11月, 2020 3 次提交
    • K
      ASoC: soc-component: add mark for snd_soc_link_compr_startup/shutdown() · cd7c7d10
      Kuninori Morimoto 提交于
      soc_compr_open() does rollback when failed (A),
      but, it is almost same as soc_compr_free().
      
      	static int soc_compr_open(xxx)
      	{
      		...
      		if (ret < 0)
      			goto xxx_err;
      		...
      		return 0;
      
       ^	machine_err:
       |		...
       |	out:
      (A)		...
       |	pm_err:
       |		...
       v		return ret;
      	}
      
      The difference is
      soc_compr_free()  is for all dai/component/substream,
      rollback          is for succeeded part only.
      
      This kind of duplicated code can be a hotbed of bugs,
      thus, we want to share soc_compr_free() and rollback.
      	1) snd_soc_dai_compr_startup/shutdown()
      	2) snd_soc_component_compr_open/free()
      =>	3) snd_soc_link_compr_startup/shutdown()
      
      This patch is for 3) snd_soc_link_compr_startup/shutdown()
      and adds new cstream mark.
      It will mark cstream when startup() was suceeded.
      If rollback happen *after* that, it will check rollback flag
      and marked cstream.
      
      It cares *previous* startup() only now,
      but we might want to check *whole* marked cstream in the future.
      This patch is using macro so that it can be easily adjust to it.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87k0ui5iwf.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
      cd7c7d10
    • K
      ASoC: soc-component: add mark for snd_soc_component_compr_open/free() · f94ba9ac
      Kuninori Morimoto 提交于
      soc_compr_open() does rollback when failed (A),
      but, it is almost same as soc_compr_free().
      
      	static int soc_compr_open(xxx)
      	{
      		...
      		if (ret < 0)
      			goto xxx_err;
      		...
      		return 0;
      
       ^	machine_err:
       |		...
       |	out:
      (A)		...
       |	pm_err:
       |		...
       v		return ret;
      	}
      
      The difference is
      soc_compr_free()  is for all dai/component/substream,
      rollback          is for succeeded part only.
      
      This kind of duplicated code can be a hotbed of bugs,
      thus, we want to share soc_compr_free() and rollback.
      	1) snd_soc_dai_compr_startup/shutdown()
      =>	2) snd_soc_component_compr_open/free()
      	3) snd_soc_link_compr_startup/shutdown()
      
      This patch is for 2) snd_soc_component_compr_open/free(),
      and adds new cstream mark.
      It will mark cstream when startup() was suceeded.
      If rollback happen *after* that, it will check rollback flag
      and marked cstream.
      
      It cares *previous* startup() only now,
      but we might want to check *whole* marked cstream in the future.
      This patch is using macro so that it can be easily adjust to it.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87lfey5iwk.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
      f94ba9ac
    • K
      ASoC: soc-dai: add mark for snd_soc_dai_compr_startup/shutdown() · 1e6a93cf
      Kuninori Morimoto 提交于
      soc_compr_open() does rollback when failed (A),
      but, it is almost same as soc_compr_free().
      
      	static int soc_compr_open(xxx)
      	{
      		...
      		if (ret < 0)
      			goto xxx_err;
      		...
      		return 0;
      
       ^	machine_err:
       |		...
       |	out:
      (A)		...
       |	pm_err:
       |		...
       v		return ret;
      	}
      
      The difference is
      soc_compr_free()  is for all dai/component/substream,
      rollback          is for succeeded part only.
      
      This kind of duplicated code can be a hotbed of bugs,
      thus, we want to share soc_compr_free() and rollback.
      =>	1) snd_soc_dai_compr_startup/shutdown()
      	2) snd_soc_component_compr_open/free()
      	3) snd_soc_link_compr_startup/shutdown()
      
      This patch is for 1) snd_soc_dai_compr_startup/shutdown(),
      and adds new cstream mark.
      It will mark cstream when startup() was suceeded.
      If rollback happen *after* that, it will check rollback flag
      and marked cstream.
      
      It cares *previous* startup() only now,
      but we might want to check *whole* marked cstream in the future.
      This patch is using macro so that it can be easily adjust to it.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87mtze5iwp.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
      1e6a93cf
  17. 25 11月, 2020 4 次提交
  18. 21 11月, 2020 2 次提交
  19. 20 11月, 2020 2 次提交
  20. 19 11月, 2020 8 次提交