All of lore.kernel.org
 help / color / mirror / Atom feed
* HD-Audio: How to reduce driver initializaton time if multiple codecs present on the bus?
@ 2013-11-28 14:57 Lin, Mengdong
  2013-11-28 15:15 ` Takashi Iwai
  2013-11-29  6:30 ` David Henningsson
  0 siblings, 2 replies; 16+ messages in thread
From: Lin, Mengdong @ 2013-11-28 14:57 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org, Takashi Iwai (tiwai@suse.de)

Hi Takashi,

We're trying to reduce the HD-A driver initialization time when more than one codecs are connected to the bus, but are blocked.
Would you please share some advices on this?

Usually, there is one HD-A controller connecting to two codecs: one on-board codec and one integrated display codec.
During initialization, the codecs are created and configured in a serial way.

Creating a codec may cost 6~20ms, and then building controls make cost about 15~30ms.
So I had thought it's helpful to build controls for different codecs in parallel in function snd_hda_build_controls(), as we did in driver suspend/resume.

But the test shows this doesn't work:

(1)     Using a workqueue without WQ_UNBOUND, the work items, which calls snd_hda_codec_build_controls(), are processed one after one

(I think because there is no explicit sleep in the work function). So the total time does not change.



(2)     Using an unbouned work queue for the bus or using separate kthreads for each codec, the work items for different codecs are processed in parallel.

However, the total time is still the sum of two codec as that without parallel.
I think that because snd_hda_codec_read() are used during initialization, the command execution on bus is serialized in the low level.
So even if we parallel initializing two codecs in high level, commands on bus are still processed one by one so the total time cannot reduce.

We're blocked here. Is there any other means to reduce the time?

Thanks
Mengdong

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-12-02 14:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-28 14:57 HD-Audio: How to reduce driver initializaton time if multiple codecs present on the bus? Lin, Mengdong
2013-11-28 15:15 ` Takashi Iwai
2013-11-29  6:30 ` David Henningsson
2013-11-29  6:40   ` Takashi Iwai
2013-11-29  7:31     ` David Henningsson
2013-11-29  7:49       ` Takashi Iwai
2013-11-29  8:05         ` Lin, Mengdong
2013-11-29  8:07           ` Takashi Iwai
2013-12-02  7:23             ` Lin, Mengdong
2013-12-02  8:24               ` Takashi Iwai
2013-12-02  9:48                 ` Lin, Mengdong
2013-12-02  9:52                   ` Takashi Iwai
2013-12-02 10:18                     ` Takashi Iwai
2013-12-02 11:27                       ` Lin, Mengdong
2013-12-02 12:18                         ` Takashi Iwai
2013-12-02 14:25                           ` Takashi Iwai

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.