[RFC PATCH v2 0/4] Add support for detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

continuing discussion from [1] I've redone detection code to use
snd_pcm_prepare() to configure FW. However I have some concerns and
would like to clear up if we should keep working on this solution or
perhaps after all this is not the best way to do this?

My main concern is that if we decide to go this way we should really
implement something more advanced than what is currently done in patch 4.

FW pipelines need to follow specific state transition order:
CREATE -> RESET -> PAUSE -> RUNNING -> PAUSE -> RESET -> DELETE
so if we put pipeline into running state in prepare callback, and we
want to call prepare again (which as far as I know is allowed by ALSA
API), we need to pause pipeline first before resetting, pausing and
running it again to enable detection.

Additionally our FW uses pipelines and we group them on kernel side
under "paths" - assigned to FE and BE widgets. In reality we want to
have part of path (some pipelines) active, so we shouldn't represent
whole state of underlying pipelines by only setting path state.

Patch 1 is cleanup, which I will send separately when I have
confirmation from validation team that it doesn't break anything.
Patch 2-4 add support for starting detection using snd_pcm_prepare().

[1] https://lore.kernel.org/linux-sound/0c620aa7-ddad-42ae-b82f-91c4aaf80c83@xxxxxxxxxxxxxxx/T/#t

Amadeusz Sławiński (4):
  ASoC: Intel: avs: Simplify pipeline management
  ASoC: Intel: avs: Separate path state from pipeline state
  ASoC: Intel: avs: Run detecting paths during prepare
  ASoC: Intel: avs: Pause detecting pipeline before reset

 sound/soc/intel/avs/path.c     | 29 +++++++++++------
 sound/soc/intel/avs/path.h     |  9 ++++++
 sound/soc/intel/avs/pcm.c      | 57 ++++++++++++++++------------------
 sound/soc/intel/avs/topology.h |  1 +
 4 files changed, 55 insertions(+), 41 deletions(-)

-- 
2.34.1





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux