Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-14 Thread Jaroslav Kysela
On 14. 08. 24 13:58, Pierre-Louis Bossart wrote: On 8/14/24 13:12, Shengjiu Wang wrote: On Wed, Aug 14, 2024 at 5:40 PM Pierre-Louis Bossart wrote: Yes, to go further, I think we can use SND_AUDIOCODEC_PCM, then the SRC type will be dropped. sounds good. But my understanding of the co

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-14 Thread Pierre-Louis Bossart
On 8/14/24 13:12, Shengjiu Wang wrote: > On Wed, Aug 14, 2024 at 5:40 PM Pierre-Louis Bossart > wrote: >> >> >>> Yes, to go further, I think we can use SND_AUDIOCODEC_PCM, then >>> the SRC type will be dropped. >> >> sounds good. >> >>> But my understanding of the control means the .set_metadat

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-14 Thread Shengjiu Wang
On Wed, Aug 14, 2024 at 5:40 PM Pierre-Louis Bossart wrote: > > > > Yes, to go further, I think we can use SND_AUDIOCODEC_PCM, then > > the SRC type will be dropped. > > sounds good. > > > But my understanding of the control means the .set_metadata() API, right? > > As I said, the output rate, out

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-14 Thread Pierre-Louis Bossart
> Yes, to go further, I think we can use SND_AUDIOCODEC_PCM, then > the SRC type will be dropped. sounds good. > But my understanding of the control means the .set_metadata() API, right? > As I said, the output rate, output format, and ratio modifier are applied to > the instances of ASRC, whi

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-13 Thread Shengjiu Wang
On Mon, Aug 12, 2024 at 9:44 PM Pierre-Louis Bossart wrote: > > > > On 8/12/24 15:31, Jaroslav Kysela wrote: > > On 12. 08. 24 12:24, Shengjiu Wang wrote: > >> On Fri, Aug 9, 2024 at 10:01 PM Jaroslav Kysela wrote: > >>> > >>> On 09. 08. 24 14:52, Pierre-Louis Bossart wrote: > >>> > > And met

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-12 Thread Pierre-Louis Bossart
On 8/12/24 15:31, Jaroslav Kysela wrote: > On 12. 08. 24 12:24, Shengjiu Wang wrote: >> On Fri, Aug 9, 2024 at 10:01 PM Jaroslav Kysela wrote: >>> >>> On 09. 08. 24 14:52, Pierre-Louis Bossart wrote: >>> > And metadata > ioctl can be called many times which can meet the ratio modifier >

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-12 Thread Jaroslav Kysela
On 12. 08. 24 12:24, Shengjiu Wang wrote: On Fri, Aug 9, 2024 at 10:01 PM Jaroslav Kysela wrote: On 09. 08. 24 14:52, Pierre-Louis Bossart wrote: 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 ye

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-12 Thread Shengjiu Wang
On Fri, Aug 9, 2024 at 10:01 PM Jaroslav Kysela wrote: > > On 09. 08. 24 14:52, Pierre-Louis Bossart wrote: > > >> 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 hand

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-09 Thread Pierre-Louis Bossart
>>> 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. >

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-09 Thread Jaroslav Kysela
On 09. 08. 24 14:52, Pierre-Louis Bossart wrote: 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

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-09 Thread Jaroslav Kysela
On 09. 08. 24 12:14, Shengjiu Wang wrote: On Fri, Aug 9, 2024 at 3:25 PM Pierre-Louis Bossart wrote: Then there's the issue of parameters, we chose to only add parameters for standard encoders/decoders. Post-processing is highly specific and the parameter definitions varies from one implemen

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-09 Thread Pierre-Louis Bossart
> Why I use the metadata ioctl is because the ALSA controls are binding > to the sound card. What I want is the controls can be bound to > snd_compr_stream, because the ASRC compress sound card can > support multi instances ( the ASRC can support multi conversion in > parallel). The ALSA contr

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-09 Thread Shengjiu Wang
On Fri, Aug 9, 2024 at 3:25 PM Pierre-Louis Bossart wrote: > > > Then there's the issue of parameters, we chose to only add parameters > for standard encoders/decoders. Post-processing is highly specific and > the parameter definitions varies from one implementation to another - > >

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-09 Thread Pierre-Louis Bossart
Then there's the issue of parameters, we chose to only add parameters for standard encoders/decoders. Post-processing is highly specific and the parameter definitions varies from one implementation to another - and usually parameters are handled in an opaque way with binary >>

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-08 Thread Jaroslav Kysela
On 08. 08. 24 14:19, Pierre-Louis Bossart wrote: files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/ sound/compress_offload.h index 98772b0cbcb7..8b2b72f94e26 100644 --- a/include/uapi/sound/compress_offload.h +++ b/include/uapi/so

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-08 Thread Pierre-Louis Bossart
files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/ > sound/compress_offload.h > index 98772b0cbcb7..8b2b72f94e26 100644 > --- a/include/uapi/sound/compress_offload.h > +++ b/include/uapi/sound/compress_offlo

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-08 Thread Jaroslav Kysela
On 08. 08. 24 13:27, Pierre-Louis Bossart wrote: On 8/8/24 11:17, Shengjiu Wang wrote: On Tue, Aug 6, 2024 at 7:25 PM Pierre-Louis Bossart wrote: On 8/6/24 12:26, Shengjiu Wang wrote: Add Sample Rate Converter(SRC) codec support, define the output format and rate for SRC. Signed-off-by:

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-08 Thread Pierre-Louis Bossart
On 8/8/24 11:17, Shengjiu Wang wrote: > On Tue, Aug 6, 2024 at 7:25 PM Pierre-Louis Bossart > wrote: >> >> >> >> On 8/6/24 12:26, Shengjiu Wang wrote: >>> Add Sample Rate Converter(SRC) codec support, define the output >>> format and rate for SRC. >>> >>> Signed-off-by: Shengjiu Wang >>> --- >

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-08 Thread Shengjiu Wang
On Tue, Aug 6, 2024 at 7:25 PM Pierre-Louis Bossart wrote: > > > > On 8/6/24 12:26, Shengjiu Wang wrote: > > Add Sample Rate Converter(SRC) codec support, define the output > > format and rate for SRC. > > > > Signed-off-by: Shengjiu Wang > > --- > > include/uapi/sound/compress_offload.h | 2 ++

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-06 Thread Jeff Brower
All- "The sample rate converter is not an encoder ..." Indeed, an encoder creates a compressed bitstream from audio data (typically linear PCM samples), normally for transmission of some type. A sample rate converter generates audio data from audio data, and is normally applied prior to an

Re: [RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-06 Thread Pierre-Louis Bossart
On 8/6/24 12:26, Shengjiu Wang wrote: > Add Sample Rate Converter(SRC) codec support, define the output > format and rate for SRC. > > Signed-off-by: Shengjiu Wang > --- > include/uapi/sound/compress_offload.h | 2 ++ > include/uapi/sound/compress_params.h | 9 - > 2 files changed, 1

[RFC PATCH 1/6] ALSA: compress: add Sample Rate Converter codec support

2024-08-06 Thread Shengjiu Wang
Add Sample Rate Converter(SRC) codec support, define the output format and rate for SRC. Signed-off-by: Shengjiu Wang --- include/uapi/sound/compress_offload.h | 2 ++ include/uapi/sound/compress_params.h | 9 - 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi