Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>, linux-sound@vger.kernel.org
Cc: "Takashi Iwai" <tiwai@suse.de>, "Mark Brown" <broonie@kernel.org>,
	"Shengjiu Wang" <shengjiu.wang@gmail.com>,
	"Nicolas Dufresne" <nicolas@ndufresne.ca>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Vinod Koul" <vkoul@kernel.org>
Subject: Re: [PATCH v3] ALSA: compress_offload: introduce passthrough operation mode
Date: Tue, 25 Jun 2024 08:06:09 +0200	[thread overview]
Message-ID: <7fb00353-08f2-4fad-b05e-cdf4b6451cbe@linux.intel.com> (raw)
In-Reply-To: <51462bc7-d9da-4e2d-9244-a59184c4d8ed@perex.cz>




>> I honestly find the state machine confusing, it looks like in the SETUP
>> stage tasks can be added/removed dynamically, but I am not sure if it's
>> a real use case? Most pipeline management add a bunch of processing,
>> then go in the 'run' mode. Adding/removing stuff on a running pipeline
>> is really painful and not super useful, is it?
> 
> This I/O mechanism tries to be "universal". As opposite to the standard
> streaming APIs, those tasks may be individual (without any state
> handling among multiple tasks). In this case, the "stop" in the middle
> makes sense. Also, it may make sense for real-time operation (remove
> altered/old data and feed new).

I must be missing something on the data flow then. I was assuming that
the data generated in the output buffer of one task was used as the
input buffer of the next task. If that were true, stopping a task in the
middle will essentially starve the tasks downstream, no?

If the tasks are handled as completely independent entities, what usages
would this design allow for?

Also I don't fully get the initial/final stages of processing. It seems
that the host needs to feed data to the first task in the chain, then
start it. That's fine for playback, but how would this be used if we
wanted to e.g. enable an ASRC on captured data coming from an audio
interface?

It's similar for the final stages on the playback, the memory model is
fine, but at some point the audio data will have to be fed to a regular
audio interface, and that point seems to have been overlooked, or I
missed it entirely.

In the existing "compress" framework, that connection to audio
interfaces is typically left as an exercise for the DSP engineers, and
typically requires the presence of sample-rate conversion and mixer. But
for a memory-to-memory model what is the direction to tie the input or
output buffers to the rest of the audio subsystem?

I forget btw that some processing consumes audio data but does not
generate anything in the output buffer, for example when analyzing
captured data to signal specific patterns or triggers (vad, hot wording,
presence detection, etc).

  reply	other threads:[~2024-06-25  6:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 16:49 [PATCH v3] ALSA: compress_offload: introduce passthrough operation mode Jaroslav Kysela
2024-06-24  7:13 ` Pierre-Louis Bossart
2024-06-24 15:58   ` Jaroslav Kysela
2024-06-25  6:06     ` Pierre-Louis Bossart [this message]
2024-06-25 11:48       ` Jaroslav Kysela
2024-06-25 12:36         ` Pierre-Louis Bossart
2024-06-25 13:00           ` Jaroslav Kysela
2024-06-25 13:48             ` Pierre-Louis Bossart
2024-06-24 13:19 ` Takashi Iwai
2024-06-24 13:59   ` Jaroslav Kysela
2024-06-25  1:58 ` Shengjiu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7fb00353-08f2-4fad-b05e-cdf4b6451cbe@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=perex@perex.cz \
    --cc=shengjiu.wang@gmail.com \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox