Re: How can I find out what is the driver for device node '/dev/video11'

2014-01-08 Thread m silverstri
Sylwester, Devin,

Thank you.

On Wed, Jan 8, 2014 at 1:19 PM, Sylwester Nawrocki
 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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How can I find out what is the driver for device node '/dev/video11'

2014-01-08 Thread Sylwester Nawrocki

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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How can I find out what is the driver for device node '/dev/video11'

2014-01-08 Thread m silverstri
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
 wrote:
> On Wed, Jan 8, 2014 at 2:03 PM, m silverstri
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How can I find out what is the driver for device node '/dev/video11'

2014-01-08 Thread Devin Heitmueller
On Wed, Jan 8, 2014 at 2:03 PM, m silverstri
 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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How can I find out what is the driver for device node '/dev/video11'

2014-01-08 Thread m silverstri
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
 wrote:
> On Wed, Jan 8, 2014 at 1:50 PM, m silverstri
>  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 majord...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How can I find out what is the driver for device node '/dev/video11'

2014-01-08 Thread Devin Heitmueller
On Wed, Jan 8, 2014 at 1:50 PM, m silverstri
 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 majord...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


How can I find out what is the driver for device node '/dev/video11'

2014-01-08 Thread m silverstri
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html