Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10840806imu; Thu, 6 Dec 2018 07:36:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wi5u1SOpvHFQfr3vmZVP2NbNkf9JeSe6do6ols80zoBSSclDqZPAi6mojKTRAr6zMgFWpd X-Received: by 2002:a62:1f9d:: with SMTP id l29mr28915236pfj.14.1544110564480; Thu, 06 Dec 2018 07:36:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544110564; cv=none; d=google.com; s=arc-20160816; b=LWTBxR+RHG3jN1gy38dA9G78QW5ANszz0AsvqcujDjVetF+1bjRGyfL11369phywzD 0AzGly28MLbOvj8eJKSfwbIJGc3cLSG02fb7hUlMLzvca4j6hLJs1nitudPtRGvYv1uP zTBcokleSKokgJZQTxiA/IeHk/Z3BkubHufjE/4ZX59cGSJxDl1ko2o9DRimS9Kd3wDH W+/9WrWl0O1wX3rKWxjBTz7Olh/o8fs1RGXM/TAGAsx0B22iKboHinIeFt8tpgD64nAw QbVP7PxB67rNhq+h63NGe7P1Uh/ieg7QGgY8qjjaDjoe9tCPRsY003oUe5tET/yOIPBg ek0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=8i/wCgZ8DWWjXOEAMNBtYev5CGm4G02nzGFAnYVvjG4=; b=ycecSjHMDouY7JvBrxAMhUuunmfNlP5TzwhJdyGPPJJGRQ7xNZED4UPjprj5GBpLgg O6f1swzMeGAag8kVF6mpTAz0QnSt/NvFfuNd4LcyhIbmAdgJFAlMDUAXUOuCFIbhvjib icB4ZNsOhsr6ZXutK2bK0vUxLIxFuvO/B5Pqaea2uRDPbVHp8AY9hA0QUd2FnzaBXXF+ mwh0QzoYsD5oQObwxi5Pp8pucm+H7SD19+avcAgYOGquAUe0p1d/ouGGnjaHOJL+F4Qm ht/h4iAFe6OesXCYgubb0LeVs6Vkd+qh+Acr5mwH+E11UvV9UHiXt0aE1ZPfoguH4Gwm v1bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=112gr6qT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si435048plp.294.2018.12.06.07.35.36; Thu, 06 Dec 2018 07:36:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=112gr6qT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725935AbeLFPdQ (ORCPT + 99 others); Thu, 6 Dec 2018 10:33:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:41816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725849AbeLFPdQ (ORCPT ); Thu, 6 Dec 2018 10:33:16 -0500 Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4F68720989; Thu, 6 Dec 2018 15:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544110395; bh=oZay8sKemTn/mmuYoPe+FoNPQnrMLMl+aHG9oz4Mi5M=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=112gr6qTJ96jz/iURdZ2/Wij8t7IWp+iYeqylm5s/s+hcy484GpDBPTLjIyUaSSbW Rqfl6EUrnzaW7UDuoPk4+r0h79RKXQiQhNmuzzqteNne9fJsf/T6ZPy45Rx6bOD8A/ gsZTDhPTIrN+bPf317xouNZgAmQPi9ASDwGffh8M= Subject: Re: [RFC PATCH v8 1/4] media: Media Device Allocator API To: Pavel Machek Cc: mchehab@kernel.org, perex@perex.cz, tiwai@suse.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, shuah References: <20181119085931.GA28607@amd> From: shuah Message-ID: <73c22137-9c7a-75c8-8cd1-3736c63c2d40@kernel.org> Date: Thu, 6 Dec 2018 08:33:14 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181119085931.GA28607@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/19/18 1:59 AM, Pavel Machek wrote: > On Thu 2018-11-01 18:31:30, shuah@kernel.org wrote: >> From: Shuah Khan >> >> Media Device Allocator API to allows multiple drivers share a media device. >> Using this API, drivers can allocate a media device with the shared struct >> device as the key. Once the media device is allocated by a driver, other >> drivers can get a reference to it. The media device is released when all >> the references are released. > > Sounds like a ... bad idea? > > That's what new "media control" framework is for, no? > > Why do you need this? > Pavel > Media control framework doesn't address this problem of ownership of the media device when non-media drivers have to own the pipeline. In this case, snd-usb owns the audio pipeline when an audio application is using the device. Without this work, media drivers won't be able to tell if snd-usb is using the tuner and owns the media pipeline. I am going to clarify this in the commit log. thanks, -- Shuah