linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Shengjiu Wang <shengjiu.wang@gmail.com>
Cc: alsa-devel@alsa-project.org, Xiubo.Lee@gmail.com,
	lgirdwood@gmail.com, Shengjiu Wang <shengjiu.wang@nxp.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linux-sound@vger.kernel.org, tiwai@suse.com,
	nicoleotsuka@gmail.com, vkoul@kernel.org, broonie@kernel.org,
	festevam@gmail.com
Subject: Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support
Date: Fri, 9 Aug 2024 21:20:39 +0200	[thread overview]
Message-ID: <a41029df-a1a3-4540-b28d-55fbfc3dcf1c@linux.intel.com> (raw)
In-Reply-To: <c3b8f7b8-fc5e-4285-bee8-7edd448a405d@perex.cz>



>>> And metadata
>>> ioctl can be called many times which can meet the ratio modifier
>>> requirement (ratio may be drift on the fly)
>>
>> Interesting, that's yet another way of handling the drift with userspace
>> modifying the ratio dynamically. That's different to what I've seen
>> before.
> 
> Note that the "timing" is managed by the user space with this scheme.
> 
>>> And compress API uses codec as the unit for capability query and
>>> parameter setting,  So I think need to define "SND_AUDIOCODEC_SRC'
>>> and 'struct snd_dec_src',  for the 'snd_dec_src' just defined output
>>> format and output rate, channels definition just reuse the
>>> snd_codec.ch_in.
>>
>> The capability query is an interesting point as well, it's not clear how
>> to expose to userspace what this specific implementation can do, while
>> at the same time *requiring* userpace to update the ratio dynamically.
>> For something like this to work, userspace needs to have pre-existing
>> information on how the SRC works.
> 
> Yes, it's about abstraction. The user space wants to push data, read
> data back converted to the target rate and eventually modify the drift
> using a control managing clocks using own way. We can eventually assume,
> that if this control does not exist, the drift cannot be controlled.
> Also, nice thing is that the control has min and max values (range), so
> driver can specify the drift range, too.

This mode of operation would be fine, but if you add the SRC as part of
the processing allowed in a compressed stream, it might be used in a
'regular' real-time pipeline and the arguments  and implementation could
be very different.

In other words, this SRC support looks like an extension of the compress
API for a very narrow usage restricted to the memory-to-memory case
only. I worry a bit about the next steps... Are there going to be other
types of PCM processing like this, and if yes, how would we know if they
are intended to be used for the 'regular' compress API or for the
memory-to-memory scheme?

  reply	other threads:[~2024-08-09 19:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 10:26 [RFC PATCH 0/6] ASoC: fsl: add memory to memory function for ASRC Shengjiu Wang
2024-08-06 10:26 ` [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support Shengjiu Wang
2024-08-06 11:16   ` Pierre-Louis Bossart
2024-08-06 11:39     ` Jeff Brower
2024-08-08  9:17     ` Shengjiu Wang
2024-08-08 11:27       ` Pierre-Louis Bossart
2024-08-08 12:02         ` Jaroslav Kysela
2024-08-08 12:19           ` Pierre-Louis Bossart
2024-08-08 15:51             ` Jaroslav Kysela
2024-08-09  7:19               ` Pierre-Louis Bossart
2024-08-09 10:14                 ` Shengjiu Wang
2024-08-09 12:52                   ` Pierre-Louis Bossart
2024-08-09 14:00                     ` Jaroslav Kysela
2024-08-09 19:20                       ` Pierre-Louis Bossart [this message]
2024-08-12 10:24                       ` Shengjiu Wang
2024-08-12 13:31                         ` Jaroslav Kysela
2024-08-12 13:43                           ` Pierre-Louis Bossart
2024-08-14  2:22                             ` Shengjiu Wang
2024-08-14  9:40                               ` Pierre-Louis Bossart
2024-08-14 11:12                                 ` Shengjiu Wang
2024-08-14 11:58                                   ` Pierre-Louis Bossart
2024-08-14 14:48                                     ` Jaroslav Kysela
2024-08-09 13:51                   ` Jaroslav Kysela
2024-08-06 10:26 ` [RFC PATCH 2/6] ASoC: fsl_asrc: define functions for memory to memory usage Shengjiu Wang
2024-08-06 10:26 ` [RFC PATCH 3/6] ASoC: fsl_easrc: " Shengjiu Wang
2024-08-06 10:26 ` [RFC PATCH 4/6] ASoC: fsl_asrc_m2m: Add memory to memory function Shengjiu Wang
2024-08-06 10:26 ` [RFC PATCH 5/6] ASoC: fsl_asrc: register m2m platform device Shengjiu Wang
2024-08-06 10:26 ` [RFC PATCH 6/6] ASoC: fsl_easrc: " 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=a41029df-a1a3-4540-b28d-55fbfc3dcf1c@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=perex@perex.cz \
    --cc=shengjiu.wang@gmail.com \
    --cc=shengjiu.wang@nxp.com \
    --cc=tiwai@suse.com \
    --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;
as well as URLs for NNTP newsgroup(s).