Re: [PATCH] ASoC: cs42l43: Move shutter IRQ handling into a worker thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 30. 07. 24 16:44, Mark Brown wrote:
On Tue, Jul 30, 2024 at 04:13:33PM +0200, Jaroslav Kysela wrote:
On 30. 07. 24 14:33, Takashi Iwai wrote:

OK, now it's clearer.  I think we can change snd_ctl_find_*() rather
to take rwlock instead of rwsem.  It's only a quick look-up, hence
rwlock can work well.

Totally untested patch set is below.

But why the interrupt routine does not use the cached kcontrol pointer? It
looks like a bad driver design when you need to do such name (string based)
lookups from the interrupt routine.

With some of these slower buses it's not immediately obvious that it's
worth the bother of caching - the overhead of doing the lookup is
negligable in the overall context of handling the interrupt.

I don't buy that argument. We should always try to write an optimal code. Every CPU tick counts.

				Jaroslav

--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.





[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux