Re: [PATCH] ALSA: hda - Don't register a cb func if it is registered already

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

 



Dne 30. 09. 20 v 7:51 Hui Wang napsal(a):
> If the caller of enable_callback_mst() passes a cb func, the callee
> function will malloc memory and link this cb func to the list
> unconditionally. This will introduce problem if caller is in the
> hda_codec_ops.init() since the init() will be repeatedly called in the
> codec rt_resume().
> 
> So far, the patch_hdmi.c and patch_ca0132.c call enable_callback_mst()
> in the hda_codec_ops.init().

Won't be better to handle this double invocation at the callback call time? I
believe that some refcounting and pointing to one allocated callback structure
for all instances is better.

					Jaroslav

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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux