mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	mchehab@kernel.org, perex@perex.cz, tiwai@suse.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	alsa-devel@alsa-project.org, shuah <shuah@kernel.org>
Subject: Re: [PATCH v13 2/6] media: change au0828 to use Media Device Allocator API
Date: Fri, 29 Mar 2019 08:14:24 -0600	[thread overview]
Message-ID: <232cd798-4c0a-78d2-5eac-4c2870b4d6eb@kernel.org> (raw)
In-Reply-To: <693a4487-b4dd-b3e0-953e-22c342708f1f@xs4all.nl>

On 3/29/19 2:27 AM, Hans Verkuil wrote:
> On 3/29/19 1:04 AM, Shuah Khan wrote:
>> Media Device Allocator API to allows multiple drivers share a media device.
>> This API solves a very common use-case for media devices where one physical
>> device (an USB stick) provides both audio and video. When such media device
>> exposes a standard USB Audio class, a proprietary Video class, two or more
>> independent drivers will share a single physical USB bridge. In such cases,
>> it is necessary to coordinate access to the shared resource.
>>
>> 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.
>>
>> Change au0828 to use Media Device Allocator API to allocate media device
>> with the parent usb struct device as the key, so it can be shared with the
>> snd_usb_audio driver.
>>
>> Signed-off-by: Shuah Khan <shuah@kernel.org>
>> ---
>>   drivers/media/usb/au0828/Kconfig       |  2 ++
>>   drivers/media/usb/au0828/au0828-core.c | 13 +++++--------
>>   drivers/media/usb/au0828/au0828.h      |  1 +
>>   3 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/media/usb/au0828/Kconfig b/drivers/media/usb/au0828/Kconfig
>> index 65fc067eb864..98de6e24329e 100644
>> --- a/drivers/media/usb/au0828/Kconfig
>> +++ b/drivers/media/usb/au0828/Kconfig
>> @@ -2,6 +2,8 @@
>>   config VIDEO_AU0828
>>   	tristate "Auvitek AU0828 support"
>>   	depends on I2C && INPUT && DVB_CORE && USB && VIDEO_V4L2
>> +	select MEDIA_CONTROLLER
>> +	select MEDIA_CONTROLLER_DVB
> 
> Is it required to select MEDIA_CONTROLLER_DVB? Does something fail to work
> if this is unset?
> 

Need this enabled for dvb driver to use media controller. api.

e.g dvb_register_media_device() does all its media controller code
when MEDIA_CONTROLLER_DVB is enabled.

See drivers/media/dvb-core/dvbdev.c

The config still says experimental:

config MEDIA_CONTROLLER_DVB
         bool "Enable Media controller for DVB (EXPERIMENTAL)"
         depends on MEDIA_CONTROLLER && DVB_CORE
         ---help---
           Enable the media controller API support for DVB.

           This is currently experimental.

Is that still accurate? Should be updated?

thanks,
-- Shuah

  reply	other threads:[~2019-03-29 14:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29  0:04 [PATCH v13 0/6] " Shuah Khan
2019-03-29  0:04 ` [PATCH v13 1/6] media: " Shuah Khan
2019-03-29  8:26   ` Hans Verkuil
2019-03-29  0:04 ` [PATCH v13 2/6] media: change au0828 to use " Shuah Khan
2019-03-29  8:27   ` Hans Verkuil
2019-03-29 14:14     ` shuah [this message]
2019-03-29  0:04 ` [PATCH v13 3/6] media: media.h: Enable ALSA MEDIA_INTF_T* interface types Shuah Khan
2019-03-29  0:04 ` [PATCH v13 4/6] sound/usb: Use Media Controller API to share media resources Shuah Khan
2019-03-29  0:05 ` [PATCH v13 5/6] au0828: fix enable and disable source audio and video inconsistencies Shuah Khan
2019-03-29  0:05 ` [PATCH v13 6/6] selftests: media_dev_allocator api test Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=232cd798-4c0a-78d2-5eac-4c2870b4d6eb@kernel.org \
    --to=shuah@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome