All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: Simon Trimmer <simont@opensource.cirrus.com>, <tiwai@suse.com>,
	<linux-sound@vger.kernel.org>, <alsa-devel@alsa-project.org>,
	<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH] ALSA: hda: cs35l56: Perform firmware download in the background
Date: Thu, 02 May 2024 11:52:41 +0200	[thread overview]
Message-ID: <87h6fgk0ba.wl-tiwai@suse.de> (raw)
In-Reply-To: <a9345d24-af36-42b4-9139-0701a0dbe1a3@opensource.cirrus.com>

On Thu, 02 May 2024 11:21:36 +0200,
Richard Fitzgerald wrote:
> 
> On 02/05/2024 08:34, Takashi Iwai wrote:
> > On Wed, 01 May 2024 13:17:55 +0200,
> > Simon Trimmer wrote:
> >> @@ -964,6 +1011,14 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id)
> >>   	mutex_init(&cs35l56->base.irq_lock);
> >>   	dev_set_drvdata(cs35l56->base.dev, cs35l56);
> >>   +	cs35l56->dsp_wq =
> >> create_singlethread_workqueue("cs35l56-dsp");
> >> +	if (!cs35l56->dsp_wq) {
> >> +		ret = -ENOMEM;
> >> +		goto err;
> >> +	}
> > 
> > Do we really need a dedicated workqueue?  In most usages, simple
> > schedule_work*() works fine and is recommended.
> > 
> 
> On a slow I2C bus with 4 amps this work could take over 2 seconds.
> That seems too long to be blocking a global system queue. We use a
> dedicated queue in the ASoC driver.
> 
> Also if we queue work on an ordered (single-threaded) system queue the
> firmware won't be downloaded to multiple amps in parallel, so we don't
> get the best use of the available bus bandwidth.

OK, that sounds like a sensible argument.

But the patch has no call of a queue destructor.  Won't it leak
resources?


thanks,

Takashi

  reply	other threads:[~2024-05-02  9:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 11:17 [PATCH] ALSA: hda: cs35l56: Perform firmware download in the background Simon Trimmer
2024-05-02  7:34 ` Takashi Iwai
2024-05-02  9:21   ` Richard Fitzgerald
2024-05-02  9:52     ` Takashi Iwai [this message]
2024-05-02 10:17       ` Simon Trimmer
2024-05-02 10:25         ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2024-06-18 12:53 Simon Trimmer
2024-06-18 12:59 ` Simon Trimmer

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=87h6fgk0ba.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=rf@opensource.cirrus.com \
    --cc=simont@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    /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.