Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933144AbcLGW1u (ORCPT ); Wed, 7 Dec 2016 17:27:50 -0500 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:45344 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932173AbcLGW1t (ORCPT ); Wed, 7 Dec 2016 17:27:49 -0500 Date: Thu, 8 Dec 2016 00:27:38 +0200 From: Sakari Ailus To: Shuah Khan Cc: Laurent Pinchart , mchehab@kernel.org, tiwai@suse.com, perex@perex.cz, hans.verkuil@cisco.com, javier@osg.samsung.com, chehabrafael@gmail.com, g.liakhovetski@gmx.de, ONeukum@suse.com, k@oikw.org, daniel@zonque.org, mahasler@gmail.com, clemens@ladisch.de, geliangtang@163.com, vdronov@redhat.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH v6 3/3] sound/usb: Use Media Controller API to share media resources Message-ID: <20161207222738.GY16630@valkosipuli.retiisi.org.uk> References: <69ad05a8-8572-43e7-ef76-7510edd904c6@osg.samsung.com> <2368883.8y0L28vD2m@avalon> <20161207105207.GW16630@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3282 Lines: 80 Hi Shuah, On Wed, Dec 07, 2016 at 01:03:59PM -0700, Shuah Khan wrote: > Hi Sakari, > > On 12/07/2016 03:52 AM, Sakari Ailus wrote: > > Hi Shuah, > > > > On Mon, Dec 05, 2016 at 05:38:23PM -0700, Shuah Khan wrote: > >> On 12/05/2016 04:21 PM, Laurent Pinchart wrote: > >>> Hi Shuah, > >>> > >>> On Monday 05 Dec 2016 15:44:30 Shuah Khan wrote: > >>>> On 11/30/2016 03:01 PM, Shuah Khan wrote: > >>>>> Change ALSA driver to use Media Controller API to share media resources > >>>>> with DVB, and V4L2 drivers on a AU0828 media device. > >>>>> > >>>>> Media Controller specific initialization is done after sound card is > >>>>> registered. ALSA creates Media interface and entity function graph > >>>>> nodes for Control, Mixer, PCM Playback, and PCM Capture devices. > >>>>> > >>>>> snd_usb_hw_params() will call Media Controller enable source handler > >>>>> interface to request the media resource. If resource request is granted, > >>>>> it will release it from snd_usb_hw_free(). If resource is busy, -EBUSY is > >>>>> returned. > >>>>> > >>>>> Media specific cleanup is done in usb_audio_disconnect(). > >>>>> > >>>>> Signed-off-by: Shuah Khan > >>>> > >>>> Hi Takashi, > >>>> > >>>> If you are good with this patch, could you please Ack it, so Mauro > >>>> can pull it into media tree with the other two patches in this series, > >>>> when he is ready to do so. > >>> > >>> I *really* want to address the concerns raised by Sakari before pulling more > >>> code that makes fixing the race conditions more difficult. Please, let's all > >>> work on fixing the core code to build a stable base on which we can build > >>> additional features. V4L2 and MC need teamwork, it's time to give the > >>> subsystem the love it deserves. > >>> > >> > >> Hi Laurent, > >> > >> The issue Sakari brought up is specific to using devm for video_device in > >> omap3 and vsp1. I tried reproducing the problem on two different drivers > >> and couldn't on Linux 4.9-rc7. > >> > >> After sharing that with Sakari, I suggested to Sakari to pull up his patch > >> that removes the devm usage and see if he still needs all the patches in his > >> patch series. He didn't back to me on that. I also requested him to rebase on > > > > Just to see what remains, I made a small hack to test this with omap3isp by > > just replacing the devm_() functions by their plain counterparts. The memory > > is thus never released, for there is no really a proper moment to release it > > --- something which the patchset resolves. The result is here: > > > > > > Did you test this on 4.9-rc7 without any of your other patches? If you > haven't could you please run this test with just the removing devm usage > from omap3isp? > > It would be good to get a baseline on the current with just the not using > devm first and then see what needs fixing. > > Also, could you please send me the complete dmesg. Updated from v4.9-rc6 to rc7 and with increased CONFIG_LOG_BUF_SHIFT. The diff and dmesg are here: -- Regards, Sakari Ailus e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk