All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@nxp.com>
To: "vkoul@kernel.org" <vkoul@kernel.org>
Cc: "S.j. Wang" <shengjiu.wang@nxp.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"liam.r.girdwood@intel.com" <liam.r.girdwood@intel.com>
Subject: Re: [PATCH tinycompress] cplay: Stop playback stream at the end
Date: Wed, 27 Jun 2018 11:15:15 +0000	[thread overview]
Message-ID: <1530098114.2102.36.camel@nxp.com> (raw)
In-Reply-To: <20180627102424.GH22377@vkoul-mobl>

On Mi, 2018-06-27 at 15:54 +0530, Vinod wrote:
> On 27-06-18, 10:48, Daniel Baluta wrote:
> > 
> > Each compress_start should have a corresponding compress_stop
> > at the end.
> > 
> > Also, this gives user a change to cleanup resources that might
> > have been allocated in compress_start.
> I think the assumptions are not quite correct here, resources should
> be
> allocated in .open and cleanup in .free for driver callback.
> 
> > 
> > 
> > Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
> > ---
> > I'm implementing codec library dynamic loading at runtime and I'm
> > exploring
> > using:
> > 	* SNDRV_COMPRESS_START -> to load the library
> > 	* SNDRV_COMPRESS_STOP  -> to unload the library
> > 
> > This might not be the best idea becasue for example loading
> > the library might introduce some delays, anyhow i still think
> > this that compress_stop is correct thing to add at the end of
> > playback.
> I think you should tie the library load to much earlier in path. Not
> in
> start.
> 
> Also, we invoke drain and hence there is no need of stop

Got your point here. 

Perhaps,

 - use .hw_params to load the codec library.
 - add .hw_free (as Liam suggested in a separate email) to unload the      codec library.

Thanks we can drop this patch then.

Daniel.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2018-06-27 11:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27  7:48 [PATCH tinycompress] cplay: Stop playback stream at the end Daniel Baluta
2018-06-27 10:24 ` Vinod
2018-06-27 11:15   ` Daniel Baluta [this message]
2018-06-27 11:51     ` Vinod

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=1530098114.2102.36.camel@nxp.com \
    --to=daniel.baluta@nxp.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=shengjiu.wang@nxp.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.