cron job: media_tree daily build: OK

2016-08-20 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Sun Aug 21 04:00:14 CEST 2016
git branch: test
git hash:   b6aa39228966e0d3f0bc3306be1892f87792903a
gcc version:i686-linux-gcc (GCC) 5.4.0
sparse version: v0.5.0-56-g7647c77
smatch version: v0.5.0-3428-gdfe27cf
host hardware:  x86_64
host os:4.6.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12.23-i686: OK
linux-3.13.11-i686: OK
linux-3.14.9-i686: OK
linux-3.15.2-i686: OK
linux-3.16.7-i686: OK
linux-3.17.8-i686: OK
linux-3.18.7-i686: OK
linux-3.19-i686: OK
linux-4.0-i686: OK
linux-4.1.1-i686: OK
linux-4.2-i686: OK
linux-4.3-i686: OK
linux-4.4-i686: OK
linux-4.5-i686: OK
linux-4.6-i686: OK
linux-4.7-i686: OK
linux-4.8-rc1-i686: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12.23-x86_64: OK
linux-3.13.11-x86_64: OK
linux-3.14.9-x86_64: OK
linux-3.15.2-x86_64: OK
linux-3.16.7-x86_64: OK
linux-3.17.8-x86_64: OK
linux-3.18.7-x86_64: OK
linux-3.19-x86_64: OK
linux-4.0-x86_64: OK
linux-4.1.1-x86_64: OK
linux-4.2-x86_64: OK
linux-4.3-x86_64: OK
linux-4.4-x86_64: OK
linux-4.5-x86_64: OK
linux-4.6-x86_64: OK
linux-4.7-x86_64: OK
linux-4.8-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: WARNINGS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Sunday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.html
--
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


ALSA sound errors when using QV4L2

2016-08-20 Thread Alexandre-Xavier Labonté-Lamoureux
Hi,

When I use qv4l2 and start recording, I get these repetitively printed
in my terminal:

ALSA lib pcm.c:7843:(snd_pcm_recover) overrun occurred
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred

There is skipping in the the sound. I get these error message whatever
device that I use. There must be a bug in the v4l driver that causes
this. I can't use any other software than qv4l2 to test this, because
others will cause my system to freeze (see my previous email). Is it
possible to fix this?

Thanks,
Alexandre-Xavier
--
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


Computer freeze caused by the media drivers?

2016-08-20 Thread Alexandre-Xavier Labonté-Lamoureux
Hi,

I have the latest v4l driver. When I use VLC to open my webcam stream,
it causes the computer to freeze. If I use my August vgb100 or any
other of my USB recording device and disconnect them, the computer
will freeze.

When I say freeze, I mean there is no error message, no keyboard LEDs
flashing, I can move my cursor on the screen, but when I click, it
doesn't do anything. The computer doesn't respond to keyboard keys
(e.g.: CTRL+ALT+F1). I can still head the audio from my Youtube video
at the back that keeps playing. The only thing to do is hard-restart
the computer.

I don't know if it's the media module that causes a freeze. How do I
find the cause? We should fix it. I feel like it's a kernel freeze
caused by this module, but I may not be right.

Thanks,
Alexandre-Xavier
--
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


[PATCH] cobalt: update EDID

2016-08-20 Thread Hans Verkuil
Update the cobalt EDID to EDID version 1.4, fixing various incorrect values
as well (wrong name, product code, various video capabilities).

Signed-off-by: Hans Verkuil 
---
diff --git a/drivers/media/pci/cobalt/cobalt-driver.c 
b/drivers/media/pci/cobalt/cobalt-driver.c
index 476f7f0..18afe36 100644
--- a/drivers/media/pci/cobalt/cobalt-driver.c
+++ b/drivers/media/pci/cobalt/cobalt-driver.c
@@ -60,30 +60,31 @@ MODULE_DESCRIPTION("cobalt driver");
 MODULE_LICENSE("GPL");

 static u8 edid[256] = {
-   0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
-   0x50, 0x21, 0x9C, 0x27, 0x00, 0x00, 0x00, 0x00,
-   0x19, 0x12, 0x01, 0x03, 0x80, 0x00, 0x00, 0x78,
-   0x0E, 0x00, 0xB2, 0xA0, 0x57, 0x49, 0x9B, 0x26,
-   0x10, 0x48, 0x4F, 0x2F, 0xCF, 0x00, 0x31, 0x59,
+   0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+   0x50, 0x21, 0x32, 0x27, 0x00, 0x00, 0x00, 0x00,
+   0x22, 0x1a, 0x01, 0x04, 0xa2, 0x10, 0x09, 0x78,
+   0x1e, 0xee, 0x91, 0xa3, 0x54, 0x4c, 0x99, 0x26,
+   0x0f, 0x50, 0x54, 0x2f, 0xcf, 0x00, 0x31, 0x59,
0x45, 0x59, 0x61, 0x59, 0x81, 0x99, 0x01, 0x01,
-   0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A,
-   0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
-   0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E,
-   0x00, 0x00, 0x00, 0xFD, 0x00, 0x31, 0x55, 0x18,
-   0x5E, 0x11, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20,
-   0x20, 0x20, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x43,
-   0x20, 0x39, 0x30, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
-   0x0A, 0x0A, 0x0A, 0x0A, 0x00, 0x00, 0x00, 0x10,
+   0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3a,
+   0x80, 0x18, 0x71, 0x38, 0x2d, 0x40, 0x58, 0x2c,
+   0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e,
+   0x00, 0x00, 0x00, 0xfd, 0x00, 0x31, 0x55, 0x18,
+   0x5e, 0x11, 0x00, 0x0a, 0x20, 0x20, 0x20, 0x20,
+   0x20, 0x20, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x43,
+   0x6f, 0x62, 0x61, 0x6c, 0x74, 0x0a, 0x20, 0x20,
+   0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x10,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xa2,
+
+   0x02, 0x03, 0x1d, 0xf0, 0x48, 0x90, 0x04, 0x13,
+   0x22, 0x21, 0x11, 0x02, 0x01, 0x23, 0x09, 0x07,
+   0x07, 0x68, 0x03, 0x0c, 0x00, 0x10, 0x00, 0x00,
+   0x22, 0x0f, 0xe2, 0x00, 0xea, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x68,
-   0x02, 0x03, 0x1a, 0xc0, 0x48, 0xa2, 0x10, 0x04,
-   0x02, 0x01, 0x21, 0x14, 0x13, 0x23, 0x09, 0x07,
-   0x07, 0x65, 0x03, 0x0c, 0x00, 0x10, 0x00, 0xe2,
-   0x00, 0x2a, 0x01, 0x1d, 0x00, 0x80, 0x51, 0xd0,
-   0x1c, 0x20, 0x40, 0x80, 0x35, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x1e, 0x8c, 0x0a, 0xd0, 0x8a,
-   0x20, 0xe0, 0x2d, 0x10, 0x10, 0x3e, 0x96, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -91,7 +92,7 @@ static u8 edid[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xea,
 };

 static void cobalt_set_interrupt(struct cobalt *cobalt, bool enable)
--
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: pwc over musb: 100% frame drop (lost) on high resolution stream

2016-08-20 Thread Matwey V. Kornilov
I've just checked 4.8-rc2 - same behaviour.

2016-08-18 16:31 GMT+03:00 Matwey V. Kornilov :
> Any ideas?
>
> 2016-08-04 23:08 GMT+03:00 Matwey V. Kornilov :
>> When DMA is not used, I see the same behavior: lots of zero-length
>> packages received.
>>
>> Can It be related to some kind of USB overflow due to long input data
>> processing with disabled IRQ?
>> When HCD_BC is used then part of processing is postponed and this can
>> explain greater throughput due to better latency.
>>
>> 2016-08-04 22:58 GMT+03:00 Matwey V. Kornilov :
>>> I've just found that in such cases, when DMA actual length is zero,
>>> both cppi41_channel->prog_len and txstate.residue equal 960 at
>>> musb_cppi41 line 225:
>>>
>>> http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/usb/musb/musb_cppi41.c#n225
>>>
>>> 2016-08-04 22:08 GMT+03:00 Matwey V. Kornilov :
 I've just found that dma->actual_len equals to zero in most cases at
 musb_host.c line 1946.
 And this produces zero-length packages.

 http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/usb/musb/musb_host.c#n1946

 Any ideas why?

 2016-08-04 19:57 GMT+03:00 Matwey V. Kornilov :
> I've just found that many packages in URBs have zero actual_length (It
> is a question why).
> Then the following end of frame criteria leads to `frame underflow' 
> message:
>
> if (flen < pdev->vlast_packet_size) {
> /* Shorter packet... end of frame */
> if (pdev->vsync == 2)
> pwc_frame_complete(pdev);
> if (pdev->fill_buf == NULL)
> pdev->fill_buf = 
> pwc_get_next_fill_buf(pdev);
> if (pdev->fill_buf) {
> pdev->fill_buf->filled = 0;
> pdev->vsync = 1;
> }
> }
>
> 2016-08-01 21:16 GMT+03:00 Matwey V. Kornilov :
>> pwc module output with trace=511 is the following:
>>
>> [   24.793109] usbcore: registered new interface driver Philips webcam
>> [   29.276979] pwc: Unsupported pixel format
>> [   29.277055] pwc: pwc_vidioc_fill_fmt() width=640, height=480,
>> bytesperline=640, sizeimage=460800, pixelformat=YU12
>> [   29.277090] pwc: Trying to set format to: width=640 height=480
>> fps=15 format=YU12
>> [   29.277123] pwc: set_video_mode(640x480 @ 30, pixfmt 32315559).
>> [   29.277145] pwc: decode_size = 5.
>> [   29.277180] pwc: frame_size=63120, vframes=15, vsize=5, 
>> vbandlength=526
>> [   29.277204] pwc: Set resolution to 640x480
>> [   29.277225] pwc: pwc_set_video_mode(), return=0
>> [   29.277256] pwc: pwc_vidioc_fill_fmt() width=640, height=480,
>> bytesperline=640, sizeimage=460800, pixelformat=YU12
>> [   29.277306] pwc: ioctl(VIDIOC_G_FMT) return size 640x480
>> [   29.277337] pwc: pwc_vidioc_fill_fmt() width=640, height=480,
>> bytesperline=640, sizeimage=460800, pixelformat=YU12
>> [   29.277449] pwc: set_video_mode(640x480 @ 10, pixfmt 32315559).
>> [   29.277475] pwc: decode_size = 5.
>> [   29.278726] pwc: frame_size=94560, vframes=10, vsize=5, 
>> vbandlength=788
>> [   29.278750] pwc: Set resolution to 640x480
>> [   29.300374] pwc: set_video_mode(640x480 @ 10, pixfmt 32315559).
>> [   29.300420] pwc: decode_size = 5.
>> [   29.441759] pwc: frame_size=94560, vframes=10, vsize=5, 
>> vbandlength=788
>> [   29.441792] pwc: Set resolution to 640x480
>> [   29.441824] pwc: Setting alternate interface 9
>> [   29.455061] pwc: Allocated URB at 0xc9b83600
>> [   29.455850] pwc: Allocated URB at 0xc9b83400
>> [   29.456040] pwc: Allocated URB at 0xc9b83200
>> [   29.456271] pwc: URB 0xc9b83600 submitted.
>> [   29.456310] pwc: URB 0xc9b83400 submitted.
>> [   29.456341] pwc: URB 0xc9b83200 submitted.
>> [   29.456362] pwc: << pwc_isoc_init()
>> [   30.078550] pwc: Frame buffer underflow (20076 bytes); discarded.
>> [   30.170543] pwc: Frame buffer underflow (12428 bytes); discarded.
>> [   30.272538] pwc: Frame buffer underflow (14340 bytes); discarded.
>> [   30.374541] pwc: Frame buffer underflow (16252 bytes); discarded.
>> [   30.476535] pwc: Frame buffer underflow (18164 bytes); discarded.
>> [   30.578532] pwc: Frame buffer underflow (20076 bytes); discarded.
>> [   30.670538] pwc: Frame buffer underflow (12428 bytes); discarded.
>> [   30.772544] pwc: Frame buffer underflow (14340 bytes); discarded.
>> [   30.874547] pwc: Frame buffer underflow (16252 bytes); discarded.
>> [   30.976552] pwc: Frame buffer underflow (18164 bytes); discarded.

[PATCH] RFC: Show frame size widgets (width, height, size and rate)

2016-08-20 Thread Ezequiel Garcia
While using the qv4l2 tool as a quick test for frame rate
setting on tw686x, I found that it has two possible interfaces
for frame size. One interface shows frame width and height,
while the other shows frame size and frame rate.

This patch is probably wrong, but hopefully it makes the
report clear: some devices haven't a frame size discrete
enumeration, but have discrete frame rate. Having a way
to set the frame rate from the qv4l2 tool would be very useful.

Signed-off-by: Ezequiel Garcia 
---
 utils/qv4l2/general-tab.cpp | 14 +-
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/utils/qv4l2/general-tab.cpp b/utils/qv4l2/general-tab.cpp
index c74847935194..0b5126f6c806 100644
--- a/utils/qv4l2/general-tab.cpp
+++ b/utils/qv4l2/general-tab.cpp
@@ -467,11 +467,8 @@ void GeneralTab::inputSection(v4l2_input vin)
return;
 
QWidget *wFrameWH = new QWidget();
-   QWidget *wFrameSR = new QWidget();
QGridLayout *m_wh = new QGridLayout(wFrameWH);
-   QGridLayout *m_sr = new QGridLayout(wFrameSR);
m_grids.append(m_wh);
-   m_grids.append(m_sr);
 
m_wh->addWidget(new QLabel("Frame Width", parentWidget()), 0, 0, 
Qt::AlignLeft);
m_frameWidth = new QSpinBox(parentWidget());
@@ -483,18 +480,17 @@ void GeneralTab::inputSection(v4l2_input vin)
m_wh->addWidget(m_frameHeight, 0, 3, Qt::AlignLeft);
connect(m_frameHeight, SIGNAL(editingFinished()), 
SLOT(frameHeightChanged()));
 
-   m_sr->addWidget(new QLabel("Frame Size", parentWidget()), 0, 0, 
Qt::AlignLeft);
+   m_wh->addWidget(new QLabel("Frame Size", parentWidget()), 1, 0, 
Qt::AlignLeft);
m_frameSize = new QComboBox(parentWidget());
-   m_sr->addWidget(m_frameSize, 0, 1, Qt::AlignLeft);
+   m_wh->addWidget(m_frameSize, 1, 1, Qt::AlignLeft);
connect(m_frameSize, SIGNAL(activated(int)), 
SLOT(frameSizeChanged(int)));
 
-   m_sr->addWidget(new QLabel("Frame Rate", parentWidget()), 0, 2, 
Qt::AlignLeft);
+   m_wh->addWidget(new QLabel("Frame Rate", parentWidget()), 1, 2, 
Qt::AlignLeft);
m_frameInterval = new QComboBox(parentWidget());
-   m_sr->addWidget(m_frameInterval, 0, 3, Qt::AlignLeft);
+   m_wh->addWidget(m_frameInterval, 1, 3, Qt::AlignLeft);
connect(m_frameInterval, SIGNAL(activated(int)), 
SLOT(frameIntervalChanged(int)));
 
m_stackedFrameSettings->addWidget(wFrameWH);
-   m_stackedFrameSettings->addWidget(wFrameSR);
 
QGridLayout::addWidget(m_stackedFrameSettings, m_row, 0, 1, m_cols, 
Qt::AlignVCenter);
m_row++;
@@ -1188,7 +1184,7 @@ void GeneralTab::updateGUIInput(__u32 input)
m_stackedStandards->show();
m_stackedFrequency->hide();
} else  {
-   m_stackedFrameSettings->setCurrentIndex(1);
+   m_stackedFrameSettings->setCurrentIndex(0);
m_stackedFrameSettings->show();
m_stackedStandards->hide();
m_stackedFrequency->hide();
-- 
2.9.0

--
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


[PATCH 2/2] [media] docs-rst: v4l2-drivers book: adjust column margins

2016-08-20 Thread Mauro Carvalho Chehab
A few tables are not properly output on LaTeX format.

Fix them.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/v4l-drivers/cpia2.rst  |   3 +
 Documentation/media/v4l-drivers/si476x.rst | 116 +++--
 2 files changed, 65 insertions(+), 54 deletions(-)

diff --git a/Documentation/media/v4l-drivers/cpia2.rst 
b/Documentation/media/v4l-drivers/cpia2.rst
index 763705c1f50f..b5125016cfcb 100644
--- a/Documentation/media/v4l-drivers/cpia2.rst
+++ b/Documentation/media/v4l-drivers/cpia2.rst
@@ -55,6 +55,9 @@ may be done automatically by your distribution.
 Driver options
 ~~
 
+.. tabularcolumns:: |p{13ex}|L|
+
+
 ==  
 Option Description
 ==  
diff --git a/Documentation/media/v4l-drivers/si476x.rst 
b/Documentation/media/v4l-drivers/si476x.rst
index d5c07bb7524d..677512566f15 100644
--- a/Documentation/media/v4l-drivers/si476x.rst
+++ b/Documentation/media/v4l-drivers/si476x.rst
@@ -31,31 +31,33 @@ The drivers exposes following files:
   information. The contents of the file is binary data of the
   following layout:
 
+  .. tabularcolumns:: |p{7ex}|p{12ex}|L|
+
   =  ==   
-  Offset NameDescription
+  OffsetName Description
   =  ==   
-  0x00   blend_int   Flag, set when stereo separation has
+  0x00  blend_intFlag, set when stereo separation has
  crossed below the blend threshold
-  0x01   hblend_int  Flag, set when HiBlend cutoff
+  0x01  hblend_int   Flag, set when HiBlend cutoff
  frequency is lower than threshold
-  0x02   hicut_int   Flag, set when HiCut cutoff
+  0x02  hicut_intFlag, set when HiCut cutoff
  frequency is lower than threshold
-  0x03   chbw_intFlag, set when channel filter
+  0x03  chbw_int Flag, set when channel filter
  bandwidth is less than threshold
-  0x04   softmute_intFlag indicating that softmute
+  0x04  softmute_int Flag indicating that softmute
  attenuation has increased above
  softmute threshold
   0x05  smute0 - Audio is not soft muted
  1 - Audio is soft muted
-  0x06   smattn  Soft mute attenuation level in dB
-  0x07   chbwChannel filter bandwidth in kHz
-  0x08   hicut   HiCut cutoff frequency in units of
+  0x06  smattn   Soft mute attenuation level in dB
+  0x07  chbw Channel filter bandwidth in kHz
+  0x08  hicutHiCut cutoff frequency in units of
  100Hz
-  0x09   hiblend HiBlend cutoff frequency in units
+  0x09  hiblend  HiBlend cutoff frequency in units
  of 100 Hz
-  0x10   pilot   0 - Stereo pilot is not present
+  0x10  pilot0 - Stereo pilot is not present
  1 - Stereo pilot is present
-  0x11   stblend Stereo blend in %
+  0x11  stblend  Stereo blend in %
   =  ==   
 
 
@@ -63,12 +65,14 @@ The drivers exposes following files:
   This file contains statistics about RDS receptions. It's binary data
   has the following layout:
 
+  .. tabularcolumns:: |p{7ex}|p{12ex}|L|
+
   =  ==   
-  Offset NameDescription
+  OffsetName Description
   =  ==   
-  0x00   expectedNumber of expected RDS blocks
-  0x02   receivedNumber of received RDS blocks
-  0x04   uncorrectable   Number of uncorrectable RDS blocks
+  0x00  expected Number of expected RDS blocks
+  0x02  received Number of received RDS blocks
+  0x04  uncorrectableNumber of uncorrectable RDS blocks
   =  ==   
 
 * /sys/kernel/debug//agc
@@ -77,21 +81,23 @@ The drivers exposes following files:
 
   The layout is:
 
+  .. tabularcolumns:: |p{7ex}|p{12ex}|L|
+
   =  ==   
-  Offset NameDescription
+  OffsetName Description
   =  ==   
-  0x00

[PATCH 1/2] [media] v4l2-dev.rst: adjust table to fit into page

2016-08-20 Thread Mauro Carvalho Chehab
One table here is not being properly displayed on LaTeX
format. Adjust it.

Signed-off-by: Mauro Carvalho Chehab 
---
 Documentation/media/kapi/v4l2-dev.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/media/kapi/v4l2-dev.rst 
b/Documentation/media/kapi/v4l2-dev.rst
index 821b835be3c8..d07258a362d1 100644
--- a/Documentation/media/kapi/v4l2-dev.rst
+++ b/Documentation/media/kapi/v4l2-dev.rst
@@ -262,6 +262,7 @@ file operations.
 
 It is a bitmask and the following bits can be set:
 
+.. tabularcolumns:: |p{5ex}|L|
 
 = 
 Mask  Description
-- 
2.7.4

--
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: [PATCH 1/7] doc-rst: generic way to build only sphinx sub-folders

2016-08-20 Thread Mauro Carvalho Chehab
Em Fri, 19 Aug 2016 17:52:07 +0200
Markus Heiser  escreveu:

> Am 19.08.2016 um 14:49 schrieb Jani Nikula :
> 
> > On Fri, 19 Aug 2016, Markus Heiser  wrote:  
> >> Am 19.08.2016 um 00:35 schrieb Jonathan Corbet :
> >> * the pdf goes to the "latex" folder .. since this is WIP
> >>  and there are different solutions conceivable ... I left
> >>  it open for the first.  
> > 
> > Mea culpa. As I said, I intended my patches as RFC only.  
> 
> I think this is OK for the first. I thought that we first
> let finish Mauro's task on making the media PDF and after
> this we decide how move from the latex folder to a pdf folder
> (one solution see below).

Finished handling all tables. I'm sending the last 2 patches
right now. Now, all tables fit into the page margins. Yet, I
suspect that flat-table extension causes some troubles when cspan
is used for LaTeX. It would be good if Markus could double check them.

There are just two things that won't fit at the margins of the document:

1) included files with long lines. We might put those includes into
a begingroup and use a smaller font, but IMHO the best is to fix the
few cases on them, as those lines are very likely violating the 80 column
limit;

2) kernel-doc output for big arguments.

We have lots of function argument inside several media structs, like
at:
struct v4l2_subdev_core_ops.

one of such arguments is this function:

int (* s_io_pin_config) (struct v4l2_subdev *sd, size_t n,struct 
v4l2_subdev_io_pin_config *pincfg);

When kernel-doc generates the Members description, as the above line is
bigger than 80 columns, it simply truncates its description to:

Members
int (*)(struct v4l2_subdev *sd) log_status callback for 
VIDIOC_LOG_STATUS ioctl handler code.
int (*)(struct v4l2_subdev *sd,size_t n,struct 
v4l2_subdev_io_pin_config *pincfg) s_io_pin_con
...

The LaTeX output for it is:

\textbf{Members}
\begin{description}
\item[{\sphinxcode{int (*)(struct v4l2\_subdev *sd) log\_status}}] 
\leavevmode
callback for \sphinxcode{VIDIOC\_LOG\_STATUS} ioctl handler code.

\item[{\sphinxcode{int (*)(struct v4l2\_subdev *sd, size\_t n,struct 
v4l2\_subdev\_io\_pin\_config *pincfg) s\_io\_pin\_config}}] \leavevmode
configure one or more chip I/O pins for chips that
multiplex different internal signal pads out to IO pins.  This function
takes a pointer to an array of `n' pin configuration entries, one for
each pin being configured.  This function could be called at times
other than just subdevice initialization.

It seems that \sphinxcode{} doesn't allow line breaks. Maybe we can
override it via conf.py. I'll play with it and see if I can find a
solution. Yet, this could have side effects on other places.

Any suggestions about how to fix it?

PS.: if you want to see, it is at:
https://mchehab.fedorapeople.org/media.pdf

on page 623.

There is one additional issue on LaTeX output: it numbered the
document on a very different way than on html. Also, it has just one
TOC. This is very bad, because, as we had to manually numerate
figures, their number/names look weird on LaTeX output.

Thanks,
Mauro
--
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


[GIT PULL FOR v4.8] Fixes and updates (mostly cec-related) (v4)

2016-08-20 Thread Hans Verkuil
Hi Mauro,

These are (regression) fixes for 4.8, mostly related to the cec framework.

It fixes some dubious locking code, two typos in cec-funcs.h, a missing reply
for the Record On/Off messages, improves the documentation, adds a TODO line,
adds a flag to explicitly allow fallback to Unregistered, ensures unclaimed
LAs are set to INVALID, prevents broadcast messages from being processed
when they should be ignored, add a IEEE ID check when locating in physical
address location in the EDID and add three missing wrappers for vendor-specific
messages.

The CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK patch changes the default behavior,
so I would like to get that in for 4.8 rather than waiting for 4.9.

The cec-compliance test we've been working on is done and merged in v4l-utils.
This means we have 99% coverage (only some CDC HEC tests are missing since
that's rarely used). These patches fix some remaining problems that we've found
while working on this test.

I hope to fix the remaining items from the TODO list for 4.9 so that the
framework can be mainlined soon.

There are three other patches: the mediatek patch adds a missing HAS_DMA
dependency to shut the kbuild robot up, and there are two fixes for the 
pulse8-cec
driver. Many thanks to Pulse-Eight for providing me with the information
necessary for these two patches.

Regards,

Hans

v4: add cec-funcs.h: add missing vendor-specific messages
v3: add cec-edid: check for IEEE identifier
v2: fixing a bug in the "cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag"
patch and adding "cec: set unclaimed addresses to CEC_LOG_ADDR_INVALID".


The following changes since commit b6aa39228966e0d3f0bc3306be1892f87792903a:

  Merge tag 'v4.8-rc1' into patchwork (2016-08-08 07:30:25 -0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git for-v4.8a

for you to fetch changes up to 2f70c1614eb6e03efeb85371f7fc451b2cfe2c6f:

  cec-funcs.h: add missing vendor-specific messages (2016-08-20 12:54:38 +0200)


Hans Verkuil (14):
  cec: rename cec_devnode fhs_lock to just lock
  cec: improve locking
  cec-funcs.h: fix typo: && should be &
  cec-funcs.h: add reply argument for Record On/Off
  cec: improve dqevent documentation
  cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag
  cec: set unclaimed addresses to CEC_LOG_ADDR_INVALID
  cec: add item to TODO
  cec: ignore messages when log_addr_mask == 0
  mtk-vcodec: add HAS_DMA dependency
  pulse8-cec: set correct Signal Free Time
  pulse8-cec: fix error handling
  cec-edid: check for IEEE identifier
  cec-funcs.h: add missing vendor-specific messages

 Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst | 21 +++-
 Documentation/media/uapi/cec/cec-ioc-dqevent.rst  |  8 +++--
 drivers/media/cec-edid.c  |  5 ++-
 drivers/media/platform/Kconfig|  2 +-
 drivers/staging/media/cec/TODO|  1 +
 drivers/staging/media/cec/cec-adap.c  | 23 +
 drivers/staging/media/cec/cec-api.c   | 10 +++---
 drivers/staging/media/cec/cec-core.c  | 27 ---
 drivers/staging/media/pulse8-cec/pulse8-cec.c | 10 +++---
 include/linux/cec-funcs.h | 78 
+--
 include/linux/cec.h   |  5 ++-
 include/media/cec.h   |  2 +-
 12 files changed, 154 insertions(+), 38 deletions(-)
--
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


[PATCH for v4.8] cec-funcs.h: add missing vendor-specific messages

2016-08-20 Thread Hans Verkuil
The cec-funcs.h header was missing support for these three vendor-specific 
messages:

CEC_MSG_VENDOR_COMMAND
CEC_MSG_VENDOR_COMMAND_WITH_ID
CEC_MSG_VENDOR_REMOTE_BUTTON_DOWN

Add wrappers for these messages.

I originally postponed adding these wrappers due to the fact that the argument 
is
just a byte array which cec-ctl couldn't handle at the time, and then I just 
forgot
to add them once the CEC framework was finalized.

It wasn't until an attempt to transmit a vendor specific command was made that I
realized that these wrappers were missing.

Signed-off-by: Hans Verkuil 
---
diff --git a/include/linux/cec-funcs.h b/include/linux/cec-funcs.h
index 8af613e..138bbf7 100644
--- a/include/linux/cec-funcs.h
+++ b/include/linux/cec-funcs.h
@@ -1144,6 +1144,75 @@ static inline void cec_msg_give_device_vendor_id(struct 
cec_msg *msg,
msg->reply = reply ? CEC_MSG_DEVICE_VENDOR_ID : 0;
 }

+static inline void cec_msg_vendor_command(struct cec_msg *msg,
+ __u8 size, const __u8 *vendor_cmd)
+{
+   if (size > 14)
+   size = 14;
+   msg->len = 2 + size;
+   msg->msg[1] = CEC_MSG_VENDOR_COMMAND;
+   memcpy(msg->msg + 2, vendor_cmd, size);
+}
+
+static inline void cec_ops_vendor_command(const struct cec_msg *msg,
+ __u8 *size,
+ const __u8 **vendor_cmd)
+{
+   *size = msg->len - 2;
+
+   if (*size > 14)
+   *size = 14;
+   *vendor_cmd = msg->msg + 2;
+}
+
+static inline void cec_msg_vendor_command_with_id(struct cec_msg *msg,
+ __u32 vendor_id, __u8 size,
+ const __u8 *vendor_cmd)
+{
+   if (size > 11)
+   size = 11;
+   msg->len = 5 + size;
+   msg->msg[1] = CEC_MSG_VENDOR_COMMAND_WITH_ID;
+   msg->msg[2] = vendor_id >> 16;
+   msg->msg[3] = (vendor_id >> 8) & 0xff;
+   msg->msg[4] = vendor_id & 0xff;
+   memcpy(msg->msg + 5, vendor_cmd, size);
+}
+
+static inline void cec_ops_vendor_command_with_id(const struct cec_msg *msg,
+ __u32 *vendor_id,  __u8 *size,
+ const __u8 **vendor_cmd)
+{
+   *size = msg->len - 5;
+
+   if (*size > 11)
+   *size = 11;
+   *vendor_id = (msg->msg[2] << 16) | (msg->msg[3] << 8) | msg->msg[4];
+   *vendor_cmd = msg->msg + 5;
+}
+
+static inline void cec_msg_vendor_remote_button_down(struct cec_msg *msg,
+__u8 size,
+const __u8 *rc_code)
+{
+   if (size > 14)
+   size = 14;
+   msg->len = 2 + size;
+   msg->msg[1] = CEC_MSG_VENDOR_REMOTE_BUTTON_DOWN;
+   memcpy(msg->msg + 2, rc_code, size);
+}
+
+static inline void cec_ops_vendor_remote_button_down(const struct cec_msg *msg,
+__u8 *size,
+const __u8 **rc_code)
+{
+   *size = msg->len - 2;
+
+   if (*size > 14)
+   *size = 14;
+   *rc_code = msg->msg + 2;
+}
+
 static inline void cec_msg_vendor_remote_button_up(struct cec_msg *msg)
 {
msg->len = 2;
--
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


[PATCH v5 1/6] pinctrl: amlogic: gxbb: add the IR remote input pin

2016-08-20 Thread Martin Blumenstingl
This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl 
Reviewed-by: Kevin Hilman 
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c 
b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index cb4d6ad..ff900d1 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -225,6 +225,8 @@ static const unsigned int i2c_sda_ao_pins[] = 
{PIN(GPIOAO_5, 0) };
 static const unsigned int i2c_slave_sck_ao_pins[] = {PIN(GPIOAO_4, 0) };
 static const unsigned int i2c_slave_sda_ao_pins[] = {PIN(GPIOAO_5, 0) };
 
+static const unsigned int remote_input_ao_pins[] = {PIN(GPIOAO_7, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
GPIO_GROUP(GPIOZ_0, EE_OFF),
GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -432,6 +434,7 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
GROUP(i2c_sda_ao,   0,  5),
GROUP(i2c_slave_sck_ao, 0,  2),
GROUP(i2c_slave_sda_ao, 0,  1),
+   GROUP(remote_input_ao,  0,  0),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -521,6 +524,10 @@ static const char * const i2c_slave_ao_groups[] = {
"i2c_slave_sdk_ao", "i2c_slave_sda_ao",
 };
 
+static const char * const remote_input_ao_groups[] = {
+   "remote_input_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
FUNCTION(gpio_periphs),
FUNCTION(emmc),
@@ -537,6 +544,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = 
{
FUNCTION(uart_ao_b),
FUNCTION(i2c_ao),
FUNCTION(i2c_slave_ao),
+   FUNCTION(remote_input_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

--
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


[PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver

2016-08-20 Thread Martin Blumenstingl
Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong 


[0] 
https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi  |  6 +
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi| 14 +++
 drivers/media/rc/meson-ir.c| 29 ++
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c |  8 ++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

--
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


[PATCH v5 0/6] Add Meson 8b / GXBB support to the IR driver

2016-08-20 Thread Martin Blumenstingl
Newer Amlogic platforms (Meson 8b and GXBB) use a slightly different
register layout for their Infrared Remoete Controller. The decoder mode
is now configured in another register. Without the changes to the
meson-ir driver we are simply getting incorrect "durations" reported
from the hardware (because the hardware is not in time measurement aka
software decode mode).

This problem was also noticed by some people trying to use this on an
ODROID-C1 and ODROID-C2 - the workaround there (probably because the
datasheets were not publicy available yet at that time) was to switch
to ir_raw_event_store_edge (which leaves it up to the kernel to measure
the duration of a pulse). See [0] and [1] for the corresponding
patches.

Changes in v5:
- changed pin function and group names to remote_input_ao so they match
  with the datasheet


Tested-by: Neil Armstrong 


[0] 
https://github.com/erdoukki/linux-amlogic-1/commit/969b2e2242fb14a13cb651f9a1cf771b599c958b
[1] http://forum.odroid.com/viewtopic.php?f=135=20504


Martin Blumenstingl (3):
  pinctrl: amlogic: gxbb: add the IR remote input pin
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

Neil Armstrong (3):
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  media: rc: meson-ir: Add support for newer versions of the IR decoder
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

 .../devicetree/bindings/media/meson-ir.txt |  5 +++-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |  6 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi   |  6 +
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi  |  6 +
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi| 14 +++
 drivers/media/rc/meson-ir.c| 29 ++
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c |  8 ++
 7 files changed, 68 insertions(+), 6 deletions(-)

-- 
2.9.3

--
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


[PATCH v5 3/6] dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings

2016-08-20 Thread Martin Blumenstingl
From: Neil Armstrong 

New bindings are needed as the register layout on the newer platforms
is slightly different compared to Meson6b.

Signed-off-by: Neil Armstrong 
Signed-off-by: Martin Blumenstingl 
Acked-by: Rob Herring 
---
 Documentation/devicetree/bindings/media/meson-ir.txt | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt 
b/Documentation/devicetree/bindings/media/meson-ir.txt
index 407848e..e7e3f3c 100644
--- a/Documentation/devicetree/bindings/media/meson-ir.txt
+++ b/Documentation/devicetree/bindings/media/meson-ir.txt
@@ -1,7 +1,10 @@
 * Amlogic Meson IR remote control receiver
 
 Required properties:
- - compatible  : should be "amlogic,meson6-ir"
+ - compatible  : depending on the platform this should be one of:
+ - "amlogic,meson6-ir"
+ - "amlogic,meson8b-ir"
+ - "amlogic,meson-gxbb-ir"
  - reg : physical base address and length of the device registers
  - interrupts  : a single specifier for the interrupt from the device
 
-- 
2.9.3

--
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


[PATCH v5 5/6] ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder

2016-08-20 Thread Martin Blumenstingl
From: Neil Armstrong 

This adds the Infrared Remote Controller node so boards with an IR
remote can simply enable it.

Signed-off-by: Neil Armstrong 
Signed-off-by: Martin Blumenstingl 
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 96f4574..1cdc059 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -226,6 +226,13 @@
clocks = <>;
status = "disabled";
};
+
+   ir: ir@580 {
+   compatible = "amlogic,meson-gxbb-ir";
+   reg = <0x0 0x00580 0x0 0x40>;
+   interrupts = ;
+   status = "disabled";
+   };
};
 
periphs: periphs@c8834000 {
-- 
2.9.3

--
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


[PATCH v5 2/6] ARM64: dts: amlogic: add the input pin for the IR remote

2016-08-20 Thread Martin Blumenstingl
Signed-off-by: Martin Blumenstingl 
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 4f42316..96f4574 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -210,6 +210,13 @@
function = "uart_ao";
};
};
+
+   remote_input_ao_pins: remote_input_ao {
+   mux {
+   groups = "remote_input_ao";
+   function = "remote_input_ao";
+   };
+   };
};
 
uart_AO: serial@4c0 {
-- 
2.9.3

--
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


[PATCH v5 6/6] ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards

2016-08-20 Thread Martin Blumenstingl
Enable the Infrared Remote Controller on boards which have an Infrared
receiver.

Signed-off-by: Martin Blumenstingl 
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 6 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 6 ++
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 6 ++
 3 files changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index cba3ea1..d4823f4 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -161,3 +161,9 @@
vmmc-supply = <>;
vmmcq-sumpply = <>;
 };
+
+ {
+   status = "okay";
+   pinctrl-0 = <_input_ao_pins>;
+   pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
index e118754..4538e5a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
@@ -143,3 +143,9 @@
vmmc-supply = <_3v3>;
vmmcq-sumpply = <_boot>;
 };
+
+ {
+   status = "okay";
+   pinctrl-0 = <_input_ao_pins>;
+   pinctrl-names = "default";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 54bb7c7..560770e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -60,3 +60,9 @@
pinctrl-names = "default";
 
 };
+
+ {
+   status = "okay";
+   pinctrl-0 = <_input_ao_pins>;
+   pinctrl-names = "default";
+};
-- 
2.9.3

--
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


[PATCH v5 4/6] media: rc: meson-ir: Add support for newer versions of the IR decoder

2016-08-20 Thread Martin Blumenstingl
From: Neil Armstrong 

Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of
REG1 to configure the decoder mode. This makes it necessary to
introduce new bindings so the driver knows which register has to be
used.

Signed-off-by: Neil Armstrong 
Signed-off-by: Martin Blumenstingl 
Acked-by: Kevin Hilman 
---
 drivers/media/rc/meson-ir.c | 29 -
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index fcc3b82..003fff0 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -24,6 +24,7 @@
 
 #define DRIVER_NAME"meson-ir"
 
+/* valid on all Meson platforms */
 #define IR_DEC_LDR_ACTIVE  0x00
 #define IR_DEC_LDR_IDLE0x04
 #define IR_DEC_LDR_REPEAT  0x08
@@ -32,12 +33,21 @@
 #define IR_DEC_FRAME   0x14
 #define IR_DEC_STATUS  0x18
 #define IR_DEC_REG10x1c
+/* only available on Meson 8b and newer */
+#define IR_DEC_REG20x20
 
 #define REG0_RATE_MASK (BIT(11) - 1)
 
-#define REG1_MODE_MASK (BIT(7) | BIT(8))
-#define REG1_MODE_NEC  (0 << 7)
-#define REG1_MODE_GENERAL  (2 << 7)
+#define DECODE_MODE_NEC0x0
+#define DECODE_MODE_RAW0x2
+
+/* Meson 6b uses REG1 to configure the mode */
+#define REG1_MODE_MASK GENMASK(8, 7)
+#define REG1_MODE_SHIFT7
+
+/* Meson 8b / GXBB use REG2 to configure the mode */
+#define REG2_MODE_MASK GENMASK(3, 0)
+#define REG2_MODE_SHIFT0
 
 #define REG1_TIME_IV_SHIFT 16
 #define REG1_TIME_IV_MASK  ((BIT(13) - 1) << REG1_TIME_IV_SHIFT)
@@ -158,8 +168,15 @@ static int meson_ir_probe(struct platform_device *pdev)
/* Reset the decoder */
meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, REG1_RESET);
meson_ir_set_mask(ir, IR_DEC_REG1, REG1_RESET, 0);
-   /* Set general operation mode */
-   meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK, REG1_MODE_GENERAL);
+
+   /* Set general operation mode (= raw/software decoding) */
+   if (of_device_is_compatible(node, "amlogic,meson6-ir"))
+   meson_ir_set_mask(ir, IR_DEC_REG1, REG1_MODE_MASK,
+ DECODE_MODE_RAW << REG1_MODE_SHIFT);
+   else
+   meson_ir_set_mask(ir, IR_DEC_REG2, REG2_MODE_MASK,
+ DECODE_MODE_RAW << REG2_MODE_SHIFT);
+
/* Set rate */
meson_ir_set_mask(ir, IR_DEC_REG0, REG0_RATE_MASK, MESON_TRATE - 1);
/* IRQ on rising and falling edges */
@@ -197,6 +214,8 @@ static int meson_ir_remove(struct platform_device *pdev)
 
 static const struct of_device_id meson_ir_match[] = {
{ .compatible = "amlogic,meson6-ir" },
+   { .compatible = "amlogic,meson8b-ir" },
+   { .compatible = "amlogic,meson-gxbb-ir" },
{ },
 };
 
-- 
2.9.3

--
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