From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v4 0/5] ALSA: jack: Refactoring for jack kctls Date: Wed, 08 Apr 2015 20:55:52 +0200 Message-ID: References: <1428062838-14786-1-git-send-email-yang.jie@intel.com> <5524D6D8.60205@canonical.com> <5524E677.2020803@canonical.com> <552577B3.1060808@canonical.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id E5AAE2606CB for ; Wed, 8 Apr 2015 20:55:52 +0200 (CEST) In-Reply-To: <552577B3.1060808@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: David Henningsson Cc: "broonie@kernel.org" , "alsa-devel@alsa-project.org" , "Girdwood, Liam R" List-Id: alsa-devel@alsa-project.org At Wed, 08 Apr 2015 20:47:15 +0200, David Henningsson wrote: > > > > On 2015-04-08 16:14, Jie, Yang wrote: > >> -----Original Message----- > >> From: Takashi Iwai [mailto:tiwai@suse.de] > >> Sent: Wednesday, April 08, 2015 5:22 PM > >> To: Jie, Yang > >> Cc: David Henningsson; alsa-devel@alsa-project.org; broonie@kernel.org; > >> Girdwood, Liam R > >> Subject: Re: [alsa-devel] [PATCH v4 0/5] ALSA: jack: Refactoring for jack kctls > >> > >> At Wed, 8 Apr 2015 09:18:10 +0000, > >> Jie, Yang wrote: > >>> OK, then it may make life easier. Hi Takashi, you agree with this? > >>> Do we need add those kctls to the HDA codec, or to hda_nid_item? > >> > >> It's been added in the local list to manage the kctls belonging to a codec more > >> easily. But if snd_hda_codec_free() and _reset() can remove them > >> gracefully, there is no big reason to keep tracking there. > >> > > > > I am not sure if snd_hda_codec_free() and _reset() can remove them, with > > removing tracking them in HDA codec in my current patch series. To be more > > simply and safely, I just keep this old tracking ATM, and we can add patch > > to optimize them later if needed, do you agree? > > Is it possible for the snd_jack object to own its kctls, so when > snd_jack_dev_free is called, that would free the kctls too? Or at least > have some kind of flag that would allow snd_jack_free to also delete its > associated kctls? > > (And then snd_hda_codec_reset/free would end up calling snd_jack_dev_free.) Yes, freeing jack table should release the included kctls. We didn't do this in hda_free.c, but it should be done when integrated into jack.c. Takashi