All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Vinod Koul <vkoul@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	broonie@kernel.org, perex@perex.cz, tiwai@suse.com,
	lgirdwood@gmail.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, ckeepax@opensource.cirrus.com
Subject: Re: [RFC PATCH v2 0/6] ALSA: compress: add support to change codec profile in gapless playback
Date: Thu, 23 Jul 2020 22:33:57 +0200	[thread overview]
Message-ID: <s5hy2naotsa.wl-tiwai@suse.de> (raw)
In-Reply-To: <20200723155612.GC12965@vkoul-mobl>

On Thu, 23 Jul 2020 17:56:12 +0200,
Vinod Koul wrote:
> 
> On 23-07-20, 15:17, Takashi Iwai wrote:
> > On Thu, 23 Jul 2020 15:05:22 +0200,
> > Vinod Koul wrote:
> > > 
> > > On 23-07-20, 14:38, Takashi Iwai wrote:
> > > > On Tue, 21 Jul 2020 19:00:01 +0200,
> > > > Srinivas Kandagatla wrote:
> > > > > 
> > > > > For gapless playback it is possible that each track can have different
> > > > > codec profile with same decoder, for example we have WMA album,
> > > > > we may have different tracks as WMA v9, WMA v10 and so on
> > > > > Or if DSP's like QDSP have abililty to switch decoders on single stream
> > > > > for each track, then this call could be used to set new codec parameters.
> > > > > 
> > > > > Existing code does not allow to change this profile while doing gapless
> > > > > playback.
> > > > > 
> > > > > This patchset adds new SNDRV_COMPRESS_SET_CODEC_PARAMS IOCTL along with
> > > > > flags in capablity structure to allow userspace to set this new
> > > > > parameters required which switching codec profile, either for gapless
> > > > > or cross fade usecase.
> > > > 
> > > > One idea that came up at the previous audio conference regarding this
> > > > implementation was to just allow SET_PARAMS during the stream is
> > > > running (only if the driver sets the capability) instead of
> > > > introducing yet a new ioctl and an ops.
> > > > Would it make sense?
> > > 
> > > That does sound good but only issue would be that we need to somehow
> > > mark/document that buffer info is useless and would be discarded, how do
> > > we do that?
> > 
> > Yes, the buffer and no_wake_mode can be ignored in the gapless
> > re-setup.  Is your concern only about the documentation?  Or something
> > else needs to be changed significantly?  It's a new scheme in anyway,
> > so the documentation update is required...
> 
> My concern is potential abuse of API down the road, if you feel it is
> okay, I am okay with the proposal

If this can be potentially dangerous, it shouldn't be used, of course.
What kind of scenario could it be?


thanks,

Takashi

WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Vinod Koul <vkoul@kernel.org>
Cc: alsa-devel@alsa-project.org, ckeepax@opensource.cirrus.com,
	linux-kernel@vger.kernel.org, lgirdwood@gmail.com,
	tiwai@suse.com, broonie@kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: [RFC PATCH v2 0/6] ALSA: compress: add support to change codec profile in gapless playback
Date: Thu, 23 Jul 2020 22:33:57 +0200	[thread overview]
Message-ID: <s5hy2naotsa.wl-tiwai@suse.de> (raw)
In-Reply-To: <20200723155612.GC12965@vkoul-mobl>

On Thu, 23 Jul 2020 17:56:12 +0200,
Vinod Koul wrote:
> 
> On 23-07-20, 15:17, Takashi Iwai wrote:
> > On Thu, 23 Jul 2020 15:05:22 +0200,
> > Vinod Koul wrote:
> > > 
> > > On 23-07-20, 14:38, Takashi Iwai wrote:
> > > > On Tue, 21 Jul 2020 19:00:01 +0200,
> > > > Srinivas Kandagatla wrote:
> > > > > 
> > > > > For gapless playback it is possible that each track can have different
> > > > > codec profile with same decoder, for example we have WMA album,
> > > > > we may have different tracks as WMA v9, WMA v10 and so on
> > > > > Or if DSP's like QDSP have abililty to switch decoders on single stream
> > > > > for each track, then this call could be used to set new codec parameters.
> > > > > 
> > > > > Existing code does not allow to change this profile while doing gapless
> > > > > playback.
> > > > > 
> > > > > This patchset adds new SNDRV_COMPRESS_SET_CODEC_PARAMS IOCTL along with
> > > > > flags in capablity structure to allow userspace to set this new
> > > > > parameters required which switching codec profile, either for gapless
> > > > > or cross fade usecase.
> > > > 
> > > > One idea that came up at the previous audio conference regarding this
> > > > implementation was to just allow SET_PARAMS during the stream is
> > > > running (only if the driver sets the capability) instead of
> > > > introducing yet a new ioctl and an ops.
> > > > Would it make sense?
> > > 
> > > That does sound good but only issue would be that we need to somehow
> > > mark/document that buffer info is useless and would be discarded, how do
> > > we do that?
> > 
> > Yes, the buffer and no_wake_mode can be ignored in the gapless
> > re-setup.  Is your concern only about the documentation?  Or something
> > else needs to be changed significantly?  It's a new scheme in anyway,
> > so the documentation update is required...
> 
> My concern is potential abuse of API down the road, if you feel it is
> okay, I am okay with the proposal

If this can be potentially dangerous, it shouldn't be used, of course.
What kind of scenario could it be?


thanks,

Takashi

  reply	other threads:[~2020-07-23 20:34 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 17:00 [RFC PATCH v2 0/6] ALSA: compress: add support to change codec profile in gapless playback Srinivas Kandagatla
2020-07-21 17:00 ` Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 1/6] ALSA: compress: move codec parameter check to a function Srinivas Kandagatla
2020-07-21 17:00   ` Srinivas Kandagatla
2020-07-21 19:56   ` Pierre-Louis Bossart
2020-07-21 19:56     ` Pierre-Louis Bossart
2020-07-21 17:00 ` [RFC PATCH v2 2/6] ALSA: compress: add new ioctl for setting codec parameters Srinivas Kandagatla
2020-07-21 17:00   ` Srinivas Kandagatla
2020-07-21 20:05   ` Pierre-Louis Bossart
2020-07-21 20:05     ` Pierre-Louis Bossart
2020-07-22  8:59     ` Srinivas Kandagatla
2020-07-22  8:59       ` Srinivas Kandagatla
2020-07-22 15:36       ` Pierre-Louis Bossart
2020-07-22 15:36         ` Pierre-Louis Bossart
2020-07-23  4:47         ` Vinod Koul
2020-07-23  4:47           ` Vinod Koul
2020-07-23 13:17           ` Pierre-Louis Bossart
2020-07-23 13:17             ` Pierre-Louis Bossart
2020-07-21 17:00 ` [RFC PATCH v2 3/6] ALSA: compress: add flags to snd_compr_caps to expose dsp caps Srinivas Kandagatla
2020-07-21 17:00   ` Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 4/6] ASoC: compress: add snd_soc_dai_compr_set_codec_params() Srinivas Kandagatla
2020-07-21 17:00   ` Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 5/6] ALSA: compress: bump the version Srinivas Kandagatla
2020-07-21 17:00   ` Srinivas Kandagatla
2020-07-21 17:00 ` [RFC PATCH v2 6/6] ASoC: q6asm-dai: add support to set_codec_params Srinivas Kandagatla
2020-07-21 17:00   ` Srinivas Kandagatla
2020-07-21 20:09   ` Pierre-Louis Bossart
2020-07-21 20:09     ` Pierre-Louis Bossart
2020-07-22  8:59     ` Srinivas Kandagatla
2020-07-22  8:59       ` Srinivas Kandagatla
2020-07-22 14:04   ` Daniel Baluta
2020-07-22 14:04     ` Daniel Baluta
2020-07-23 12:38 ` [RFC PATCH v2 0/6] ALSA: compress: add support to change codec profile in gapless playback Takashi Iwai
2020-07-23 12:38   ` Takashi Iwai
2020-07-23 13:05   ` Vinod Koul
2020-07-23 13:05     ` Vinod Koul
2020-07-23 13:17     ` Takashi Iwai
2020-07-23 13:17       ` Takashi Iwai
2020-07-23 15:56       ` Vinod Koul
2020-07-23 15:56         ` Vinod Koul
2020-07-23 20:33         ` Takashi Iwai [this message]
2020-07-23 20:33           ` Takashi Iwai
2020-08-06 11:08           ` Vinod Koul
2020-08-06 11:08             ` Vinod Koul
2020-08-06 16:28             ` Takashi Iwai
2020-08-06 16:28               ` Takashi Iwai

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=s5hy2naotsa.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.