* How can I find out what is the driver for device node '/dev/video11'
@ 2014-01-08 18:50 m silverstri
2014-01-08 18:56 ` Devin Heitmueller
0 siblings, 1 reply; 7+ messages in thread
From: m silverstri @ 2014-01-08 18:50 UTC (permalink / raw)
To: linux-media
In linux kernel, a device (e.g. codec) can register as a file (e.g.
/dev/video11).
How can I find out from the code which driver is registered as
'/dev/video11'. i.e. what is the driver will be invoked when I
open('/dev/video11', O_RDWR,0) in my user space code?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How can I find out what is the driver for device node '/dev/video11'
2014-01-08 18:50 How can I find out what is the driver for device node '/dev/video11' m silverstri
@ 2014-01-08 18:56 ` Devin Heitmueller
2014-01-08 19:03 ` m silverstri
0 siblings, 1 reply; 7+ messages in thread
From: Devin Heitmueller @ 2014-01-08 18:56 UTC (permalink / raw)
To: m silverstri; +Cc: linux-media
On Wed, Jan 8, 2014 at 1:50 PM, m silverstri
<michael.j.silverstri@gmail.com> wrote:
> In linux kernel, a device (e.g. codec) can register as a file (e.g.
> /dev/video11).
>
> How can I find out from the code which driver is registered as
> '/dev/video11'. i.e. what is the driver will be invoked when I
> open('/dev/video11', O_RDWR,0) in my user space code?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
The QUERYCAP ioctl() will tell you the driver name.
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-querycap.html
Devin
--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How can I find out what is the driver for device node '/dev/video11'
2014-01-08 18:56 ` Devin Heitmueller
@ 2014-01-08 19:03 ` m silverstri
2014-01-08 19:08 ` Devin Heitmueller
0 siblings, 1 reply; 7+ messages in thread
From: m silverstri @ 2014-01-08 19:03 UTC (permalink / raw)
To: Devin Heitmueller; +Cc: linux-media
Thanks. I don't have the a running hardware.
If I can only search within the code space, how can I find out which
driver is for '/dev/video11'?
Is there a config file which I can look it up?
Thank you.
On Wed, Jan 8, 2014 at 10:56 AM, Devin Heitmueller
<dheitmueller@kernellabs.com> wrote:
> On Wed, Jan 8, 2014 at 1:50 PM, m silverstri
> <michael.j.silverstri@gmail.com> wrote:
>> In linux kernel, a device (e.g. codec) can register as a file (e.g.
>> /dev/video11).
>>
>> How can I find out from the code which driver is registered as
>> '/dev/video11'. i.e. what is the driver will be invoked when I
>> open('/dev/video11', O_RDWR,0) in my user space code?
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> The QUERYCAP ioctl() will tell you the driver name.
>
> http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-querycap.html
>
> Devin
>
> --
> Devin J. Heitmueller - Kernel Labs
> http://www.kernellabs.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How can I find out what is the driver for device node '/dev/video11'
2014-01-08 19:03 ` m silverstri
@ 2014-01-08 19:08 ` Devin Heitmueller
2014-01-08 19:15 ` m silverstri
0 siblings, 1 reply; 7+ messages in thread
From: Devin Heitmueller @ 2014-01-08 19:08 UTC (permalink / raw)
To: m silverstri; +Cc: linux-media
On Wed, Jan 8, 2014 at 2:03 PM, m silverstri
<michael.j.silverstri@gmail.com> wrote:
> Thanks. I don't have the a running hardware.
> If I can only search within the code space, how can I find out which
> driver is for '/dev/video11'?
>
> Is there a config file which I can look it up?
If you don't actually have the hardware platform, then determining it
just from the source code is a huge undertaking (unless it's some well
known device which happens to always create it at that offset).
What is the hardware platform, and what is the capture device?
Devin
--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How can I find out what is the driver for device node '/dev/video11'
2014-01-08 19:08 ` Devin Heitmueller
@ 2014-01-08 19:15 ` m silverstri
2014-01-08 21:19 ` Sylwester Nawrocki
0 siblings, 1 reply; 7+ messages in thread
From: m silverstri @ 2014-01-08 19:15 UTC (permalink / raw)
To: Devin Heitmueller; +Cc: linux-media
Thanks.
I am studying android source code.
>From here, it has code which open("/dev/video11", O_RDWR, 0) as
decoding device.
http://androidxref.com/4.4.2_r1/xref/hardware/samsung_slsi/exynos5/libhwjpeg/ExynosJpegBase.cpp
I want to find out which is the corresponding driver code for device
'/dev/video11'.
Thank you very much.
On Wed, Jan 8, 2014 at 11:08 AM, Devin Heitmueller
<dheitmueller@kernellabs.com> wrote:
> On Wed, Jan 8, 2014 at 2:03 PM, m silverstri
> <michael.j.silverstri@gmail.com> wrote:
>> Thanks. I don't have the a running hardware.
>> If I can only search within the code space, how can I find out which
>> driver is for '/dev/video11'?
>>
>> Is there a config file which I can look it up?
>
> If you don't actually have the hardware platform, then determining it
> just from the source code is a huge undertaking (unless it's some well
> known device which happens to always create it at that offset).
>
> What is the hardware platform, and what is the capture device?
>
> Devin
>
> --
> Devin J. Heitmueller - Kernel Labs
> http://www.kernellabs.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How can I find out what is the driver for device node '/dev/video11'
2014-01-08 19:15 ` m silverstri
@ 2014-01-08 21:19 ` Sylwester Nawrocki
2014-01-08 21:43 ` m silverstri
0 siblings, 1 reply; 7+ messages in thread
From: Sylwester Nawrocki @ 2014-01-08 21:19 UTC (permalink / raw)
To: m silverstri; +Cc: Devin Heitmueller, linux-media
On 01/08/2014 08:15 PM, m silverstri wrote:
> Thanks.
>
> I am studying android source code.
> From here, it has code which open("/dev/video11", O_RDWR, 0) as
> decoding device.
>
> http://androidxref.com/4.4.2_r1/xref/hardware/samsung_slsi/exynos5/libhwjpeg/ExynosJpegBase.cpp
What you're looking for might be this proprietary Samsung JPEG codec driver
used in Android.
https://android.googlesource.com/kernel/exynos/+/android-exynos-3.4/drivers/media/video/exynos/jpeg/
If you intend to use mainline kernel you need to consider the s5p-jpeg
driver,
which exposes to user space standard interface without any proprietary
additions
incompatible with the V4L2 spec.
> I want to find out which is the corresponding driver code for device
> '/dev/video11'.
I suspect these numbers are fixed in the Android kernel (they are hard
coded in the user space library as you're pointing out above), which is
a pretty bad practice.
It's better to use VIDIOC_QUERYCAP ioctl to find a video device with
specific name, as Devin suggested. You can also find a video device
exposed by a specific driver through sysfs, as is done in
exynos_v4l2_open_devname() function in this a bit less hacky code:
https://android.googlesource.com/platform/hardware/samsung_slsi/exynos5/+/jb-mr1-release/libv4l2/exynos_v4l2.c
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How can I find out what is the driver for device node '/dev/video11'
2014-01-08 21:19 ` Sylwester Nawrocki
@ 2014-01-08 21:43 ` m silverstri
0 siblings, 0 replies; 7+ messages in thread
From: m silverstri @ 2014-01-08 21:43 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: Devin Heitmueller, linux-media
Sylwester, Devin,
Thank you.
On Wed, Jan 8, 2014 at 1:19 PM, Sylwester Nawrocki
<sylvester.nawrocki@gmail.com> wrote:
> On 01/08/2014 08:15 PM, m silverstri wrote:
>>
>> Thanks.
>>
>> I am studying android source code.
>> From here, it has code which open("/dev/video11", O_RDWR, 0) as
>> decoding device.
>>
>>
>> http://androidxref.com/4.4.2_r1/xref/hardware/samsung_slsi/exynos5/libhwjpeg/ExynosJpegBase.cpp
>
>
> What you're looking for might be this proprietary Samsung JPEG codec driver
> used in Android.
>
> https://android.googlesource.com/kernel/exynos/+/android-exynos-3.4/drivers/media/video/exynos/jpeg/
>
> If you intend to use mainline kernel you need to consider the s5p-jpeg
> driver,
> which exposes to user space standard interface without any proprietary
> additions
> incompatible with the V4L2 spec.
>
>
>> I want to find out which is the corresponding driver code for device
>> '/dev/video11'.
>
>
> I suspect these numbers are fixed in the Android kernel (they are hard
> coded in the user space library as you're pointing out above), which is
> a pretty bad practice.
>
> It's better to use VIDIOC_QUERYCAP ioctl to find a video device with
> specific name, as Devin suggested. You can also find a video device
> exposed by a specific driver through sysfs, as is done in
> exynos_v4l2_open_devname() function in this a bit less hacky code:
>
> https://android.googlesource.com/platform/hardware/samsung_slsi/exynos5/+/jb-mr1-release/libv4l2/exynos_v4l2.c
>
> Thanks,
> Sylwester
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-08 21:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08 18:50 How can I find out what is the driver for device node '/dev/video11' m silverstri
2014-01-08 18:56 ` Devin Heitmueller
2014-01-08 19:03 ` m silverstri
2014-01-08 19:08 ` Devin Heitmueller
2014-01-08 19:15 ` m silverstri
2014-01-08 21:19 ` Sylwester Nawrocki
2014-01-08 21:43 ` m silverstri
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.