Re: [PATCH v5] media: video-i2c: add video-i2c driver

2017-01-08 Thread Marek Vasut
On 01/09/2017 06:17 AM, Matt Ranostay wrote:
> Gentle ping on this! :)

Just some high-level feedback ... You should use regmap instead. Also,
calling a driver which is specific to a particular sensor (amg88x) by
generic name (video_i2c) is probably not a good idea.

> Thanks,
> 
> Matt
> 
>> On Dec 23, 2016, at 19:04, Matt Ranostay  wrote:
>>
>> There are several thermal sensors that only have a low-speed bus
>> interface but output valid video data. This patchset enables support
>> for the AMG88xx "Grid-Eye" sensor family.
>>
>> Cc: Attila Kinali 
>> Cc: Marek Vasut 
>> Cc: Luca Barbato 
>> Cc: Laurent Pinchart 
>> Signed-off-by: Matt Ranostay 
>> ---
>> Changes from v1:
>> * correct i2c_polling_remove() operations
>> * fixed delay calcuation in buffer_queue()
>> * add include linux/slab.h
>>
>> Changes from v2:
>> * fix build error due to typo in include of slab.h
>>
>> Changes from v3:
>> * switch data transport to a kthread to avoid to .buf_queue that can't sleep
>> * change naming from i2c-polling to video-i2c
>> * make the driver for single chipset under another uses the driver
>>
>> Changes from v4:
>> * fix wraparound issue with jiffies and schedule_timeout_interruptible() 
>>
>> drivers/media/i2c/Kconfig |   9 +
>> drivers/media/i2c/Makefile|   1 +
>> drivers/media/i2c/video-i2c.c | 569 
>> ++
>> 3 files changed, 579 insertions(+)
>> create mode 100644 drivers/media/i2c/video-i2c.c
>>
>> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
>> index b31fa6fae009..ef84715293a9 100644
>> --- a/drivers/media/i2c/Kconfig
>> +++ b/drivers/media/i2c/Kconfig
>> @@ -768,6 +768,15 @@ config VIDEO_M52790
>>
>> To compile this driver as a module, choose M here: the
>> module will be called m52790.
>> +
>> +config VIDEO_I2C
>> +tristate "I2C transport video support"
>> +depends on VIDEO_V4L2 && I2C
>> +select VIDEOBUF2_VMALLOC
>> +---help---
>> +  Enable the I2C transport video support which supports the
>> +  following:
>> +   * Panasonic AMG88xx Grid-Eye Sensors
>> endmenu
>>
>> menu "Sensors used on soc_camera driver"
>> diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
>> index 92773b2e6225..7c8eeb213c3b 100644
>> --- a/drivers/media/i2c/Makefile
>> +++ b/drivers/media/i2c/Makefile
>> @@ -79,6 +79,7 @@ obj-$(CONFIG_VIDEO_LM3646)+= lm3646.o
>> obj-$(CONFIG_VIDEO_SMIAPP_PLL)+= smiapp-pll.o
>> obj-$(CONFIG_VIDEO_AK881X)+= ak881x.o
>> obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
>> +obj-$(CONFIG_VIDEO_I2C)+= video-i2c.o
>> obj-$(CONFIG_VIDEO_ML86V7667)+= ml86v7667.o
>> obj-$(CONFIG_VIDEO_OV2659)+= ov2659.o
>> obj-$(CONFIG_VIDEO_TC358743)+= tc358743.o
>> diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
>> new file mode 100644
>> index ..9390560bd117
>> --- /dev/null
>> +++ b/drivers/media/i2c/video-i2c.c
>> @@ -0,0 +1,569 @@
>> +/*
>> + * video-i2c.c - Support for I2C transport video devices
>> + *
>> + * Copyright (C) 2016 Matt Ranostay 
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>> + * GNU General Public License for more details.
>> + *
>> + * Supported:
>> + * - Panasonic AMG88xx Grid-Eye Sensors
>> + */
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#define VIDEO_I2C_DRIVER"video-i2c"
>> +#define MAX_BUFFER_SIZE128
>> +
>> +struct video_i2c_chip;
>> +
>> +struct video_i2c_buffer {
>> +struct vb2_v4l2_buffer vb;
>> +struct list_head list;
>> +};
>> +
>> +struct video_i2c_data {
>> +struct i2c_client *client;
>> +const struct video_i2c_chip *chip;
>> +struct mutex lock;
>> +spinlock_t slock;
>> +struct mutex queue_lock;
>> +
>> +struct v4l2_device v4l2_dev;
>> +struct video_device vdev;
>> +struct vb2_queue vb_vidq;
>> +
>> +struct task_struct *kthread_vid_cap;
>> +struct list_head vid_cap_active;
>> +};
>> +
>> +static struct v4l2_fmtdesc amg88xx_format = {
>> +.description = "12-bit Greyscale",
>> +.pixelformat = V4L2_PIX_FMT_Y12,
>> +};
>> +
>> +static struct v4l2_frmsize_discrete amg88xx_size = {
>> +.width = 8,
>> +.height = 8,
>> +};
>> +
>> +struct video_i2c_chip {
>> +/* video dimensions */
>> +struct v4l2_fmtdesc *format;
>> +struct v4l2_frmsize_discrete *size;
>> +
>> +/* max frames per second *

Re: [PATCH v5] media: video-i2c: add video-i2c driver

2017-01-08 Thread Matt Ranostay
Gentle ping on this! :)

Thanks,

Matt

> On Dec 23, 2016, at 19:04, Matt Ranostay  wrote:
> 
> There are several thermal sensors that only have a low-speed bus
> interface but output valid video data. This patchset enables support
> for the AMG88xx "Grid-Eye" sensor family.
> 
> Cc: Attila Kinali 
> Cc: Marek Vasut 
> Cc: Luca Barbato 
> Cc: Laurent Pinchart 
> Signed-off-by: Matt Ranostay 
> ---
> Changes from v1:
> * correct i2c_polling_remove() operations
> * fixed delay calcuation in buffer_queue()
> * add include linux/slab.h
> 
> Changes from v2:
> * fix build error due to typo in include of slab.h
> 
> Changes from v3:
> * switch data transport to a kthread to avoid to .buf_queue that can't sleep
> * change naming from i2c-polling to video-i2c
> * make the driver for single chipset under another uses the driver
> 
> Changes from v4:
> * fix wraparound issue with jiffies and schedule_timeout_interruptible() 
> 
> drivers/media/i2c/Kconfig |   9 +
> drivers/media/i2c/Makefile|   1 +
> drivers/media/i2c/video-i2c.c | 569 ++
> 3 files changed, 579 insertions(+)
> create mode 100644 drivers/media/i2c/video-i2c.c
> 
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index b31fa6fae009..ef84715293a9 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -768,6 +768,15 @@ config VIDEO_M52790
> 
> To compile this driver as a module, choose M here: the
> module will be called m52790.
> +
> +config VIDEO_I2C
> +tristate "I2C transport video support"
> +depends on VIDEO_V4L2 && I2C
> +select VIDEOBUF2_VMALLOC
> +---help---
> +  Enable the I2C transport video support which supports the
> +  following:
> +   * Panasonic AMG88xx Grid-Eye Sensors
> endmenu
> 
> menu "Sensors used on soc_camera driver"
> diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
> index 92773b2e6225..7c8eeb213c3b 100644
> --- a/drivers/media/i2c/Makefile
> +++ b/drivers/media/i2c/Makefile
> @@ -79,6 +79,7 @@ obj-$(CONFIG_VIDEO_LM3646)+= lm3646.o
> obj-$(CONFIG_VIDEO_SMIAPP_PLL)+= smiapp-pll.o
> obj-$(CONFIG_VIDEO_AK881X)+= ak881x.o
> obj-$(CONFIG_VIDEO_IR_I2C)  += ir-kbd-i2c.o
> +obj-$(CONFIG_VIDEO_I2C)+= video-i2c.o
> obj-$(CONFIG_VIDEO_ML86V7667)+= ml86v7667.o
> obj-$(CONFIG_VIDEO_OV2659)+= ov2659.o
> obj-$(CONFIG_VIDEO_TC358743)+= tc358743.o
> diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
> new file mode 100644
> index ..9390560bd117
> --- /dev/null
> +++ b/drivers/media/i2c/video-i2c.c
> @@ -0,0 +1,569 @@
> +/*
> + * video-i2c.c - Support for I2C transport video devices
> + *
> + * Copyright (C) 2016 Matt Ranostay 
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * Supported:
> + * - Panasonic AMG88xx Grid-Eye Sensors
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define VIDEO_I2C_DRIVER"video-i2c"
> +#define MAX_BUFFER_SIZE128
> +
> +struct video_i2c_chip;
> +
> +struct video_i2c_buffer {
> +struct vb2_v4l2_buffer vb;
> +struct list_head list;
> +};
> +
> +struct video_i2c_data {
> +struct i2c_client *client;
> +const struct video_i2c_chip *chip;
> +struct mutex lock;
> +spinlock_t slock;
> +struct mutex queue_lock;
> +
> +struct v4l2_device v4l2_dev;
> +struct video_device vdev;
> +struct vb2_queue vb_vidq;
> +
> +struct task_struct *kthread_vid_cap;
> +struct list_head vid_cap_active;
> +};
> +
> +static struct v4l2_fmtdesc amg88xx_format = {
> +.description = "12-bit Greyscale",
> +.pixelformat = V4L2_PIX_FMT_Y12,
> +};
> +
> +static struct v4l2_frmsize_discrete amg88xx_size = {
> +.width = 8,
> +.height = 8,
> +};
> +
> +struct video_i2c_chip {
> +/* video dimensions */
> +struct v4l2_fmtdesc *format;
> +struct v4l2_frmsize_discrete *size;
> +
> +/* max frames per second */
> +unsigned int max_fps;
> +
> +/* pixel buffer size */
> +unsigned int buffer_size;
> +
> +/* pixel size in bits */
> +unsigned int bpp;
> +
> +/* xfer function */
> +int (*xfer)(struct video_i2c_data *data, char *buf);
> +};
> +
> +static int amg88xx_xfer(struct video_i2c_data *data, char *buf)
> +{
> +struct i2c_client *client = data->client;
> +struct

cron job: media_tree daily build: ERRORS

2017-01-08 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:   Mon Jan  9 05:00:10 CET 2017
media-tree git hash:40eca140c404505c09773d1c6685d818cb55ab1a
media_build git hash:   1606032398b1d79149c1507be2029e1a00d8dff0
v4l-utils git hash: 951c4878a93f4722146f8bc6515a47fba6470bb3
gcc version:i686-linux-gcc (GCC) 6.2.0
sparse version: v0.5.0-3553-g78b2ea6
smatch version: v0.5.0-3553-g78b2ea6
host hardware:  x86_64
host os:4.8.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-arm-pxa: 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: ERRORS
linux-2.6.37.6-i686: ERRORS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: ERRORS
linux-3.0.60-i686: ERRORS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: ERRORS
linux-3.5.7-i686: ERRORS
linux-3.6.11-i686: ERRORS
linux-3.7.4-i686: ERRORS
linux-3.8-i686: ERRORS
linux-3.9.2-i686: ERRORS
linux-3.10.1-i686: ERRORS
linux-3.11.1-i686: ERRORS
linux-3.12.67-i686: ERRORS
linux-3.13.11-i686: ERRORS
linux-3.14.9-i686: ERRORS
linux-3.15.2-i686: ERRORS
linux-3.16.7-i686: ERRORS
linux-3.17.8-i686: ERRORS
linux-3.18.7-i686: ERRORS
linux-3.19-i686: ERRORS
linux-4.0.9-i686: ERRORS
linux-4.1.33-i686: ERRORS
linux-4.2.8-i686: ERRORS
linux-4.3.6-i686: ERRORS
linux-4.4.22-i686: ERRORS
linux-4.5.7-i686: ERRORS
linux-4.6.7-i686: ERRORS
linux-4.7.5-i686: ERRORS
linux-4.8-i686: ERRORS
linux-4.9-i686: ERRORS
linux-2.6.36.4-x86_64: ERRORS
linux-2.6.37.6-x86_64: ERRORS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: ERRORS
linux-3.0.60-x86_64: ERRORS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: ERRORS
linux-3.5.7-x86_64: ERRORS
linux-3.6.11-x86_64: ERRORS
linux-3.7.4-x86_64: ERRORS
linux-3.8-x86_64: ERRORS
linux-3.9.2-x86_64: ERRORS
linux-3.10.1-x86_64: ERRORS
linux-3.11.1-x86_64: ERRORS
linux-3.12.67-x86_64: ERRORS
linux-3.13.11-x86_64: ERRORS
linux-3.14.9-x86_64: ERRORS
linux-3.15.2-x86_64: ERRORS
linux-3.16.7-x86_64: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.7-x86_64: ERRORS
linux-3.19-x86_64: ERRORS
linux-4.0.9-x86_64: ERRORS
linux-4.1.33-x86_64: ERRORS
linux-4.2.8-x86_64: ERRORS
linux-4.3.6-x86_64: ERRORS
linux-4.4.22-x86_64: ERRORS
linux-4.5.7-x86_64: ERRORS
linux-4.6.7-x86_64: ERRORS
linux-4.7.5-x86_64: ERRORS
linux-4.8-x86_64: ERRORS
linux-4.9-x86_64: ERRORS
apps: WARNINGS
spec-git: ERRORS
sparse: WARNINGS

Detailed results are available here:

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

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Monday.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


Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-08 Thread Sean Wang
On Sun, 2017-01-08 at 21:16 +, Sean Young wrote:
> Hi Sean,
> 
> On Fri, Jan 06, 2017 at 03:31:25PM +0800, Sean Wang wrote:
> > On Thu, 2017-01-05 at 17:12 +, Sean Young wrote:
> > > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote:
> > > > +   /* Handle pulse and space until end of message */
> > > > +   for (i = 0 ; i < MTK_CHKDATA_SZ ; i++) {
> > > > +   val = mtk_r32(ir, MTK_CHKDATA_REG(i));
> > > > +   dev_dbg(ir->dev, "@reg%d=0x%08x\n", i, val);
> > > > +
> > > > +   for (j = 0 ; j < 4 ; j++) {
> > > > +   wid = (val & (0xff << j * 8)) >> j * 8;
> > > > +   rawir.pulse = !rawir.pulse;
> > > > +   rawir.duration = wid * (MTK_IR_SAMPLE + 1);
> > > > +   ir_raw_event_store_with_filter(ir->rc, &rawir);
> > > > +
> > > > +   if (MTK_IR_END(wid))
> > > > +   goto end_msg;
> > > > +   }
> > > > +   }
> > > 
> > > If I read this correctly, there is a maximum of 17 * 4 = 68 edges per
> > > IR message. The rc6 mce key 0 (scancode 0x800f0400) is 69 edges, so that
> > > won't work.
> > > 
> > Uh, this is related to hardware limitation. Maximum number hardware
> > holds indeed is only 68 edges as you said :( 
> > 
> > For the case, I will try change the logic into that the whole message 
> > is dropped if no end of message is seen within 68 counts to avoid
> > wasting CPU for decoding. 
> 
> I'm not sure it is worthwhile dropping the IR in that case. The processing
> is minimal and it might be possible that we have just enough IR to decode
> a scancode even if the trailing end of message is missing. Note that
> the call to ir_raw_event_set_idle() will generate an timeout IR event, so
> there will always be an end of message marker.


1)
I agree with you :) The original logic I made already as you pointed out
is sent incomplete IR message to let ir-raw try to decode as possible.

2)
I had another question. I found multiple and same IR messages being
received when using SONY remote controller. Should driver needs to
report each message or only one of these to the upper layer ?


> All I wanted to do was point out a limitation in case there is a
> workaround; if there is not then we might as well make do with the IR
> we do have.

I also will leave some words about limitation we had in the comments.

> Thanks
> Sean


--
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: astrometa device driver

2017-01-08 Thread Martin Blumenstingl
On Mon, Jan 9, 2017 at 1:45 AM, Dieter Miosga  wrote:
> Here's the result of the lsusb on the HanfTek 15f4:0135
This USB ID is not registered with the cx231xx driver yet - thus the
driver simply ignores your device.
The basics steps for adding support for your card would be:
1. add new "#define CX231XX_BOARD_..." in cx231xx.h
2. add new entry to cx231xx_boards[] in cx231xx-cards.c with the
correct values (NOTE: has to figure out the correct values, maybe
Antti can give a hint which of the existing boards could be used as
staring point)
3. add a new entry to cx231xx_id_table (with USB vendor/device IDs) in
cx231xx-cards.c
4. add r820t_config to cx231xx-dvb.c (maybe you can even copy the one
from rtl28xxu.c)
5. add mn88473_config to cx231xx-dvb.c (again, copying the one from
rtl28xxu.c may work)
6. add a new case statement to dvb_init in cx231xx-dvb.c and connect
the rt820t_config and mn88473_config (you can probably use the code of
another board and adapt it accordingly)
7. test + bugfix :)


Regards,
Martin
--
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: astrometa device driver

2017-01-08 Thread Dieter Miosga

I already tried to load the appropriate drivers.
The device is _not_ recognized with the cx231xx, r820t, mn88473 drivers 
as well


Many thanks ahead
Dieter

On 01/08/17 18:03, Martin Blumenstingl wrote:

Hello Dieter,

(I CC'ed the linux-media mailing list so other users can look this up
when they run into the same problem)

On Sun, Jan 8, 2017 at 7:27 PM, Dieter Miosga  wrote:

Happy 2017!

One of the parts that were placed under my imaginary Christmas tree was an
Astrometa Hybrid TV DVB-T/T2/C/FM/AV USB 2.0 stick with
Conexant CX23102

that should be supported through the cx231xx driver


Rafael Micro R828D

supported by the r820t driver


Panasonic MN88473

supported by the mn88473 driver


It was not recognized by the latest kernel versions 4.8-4.10.
If I can ever help you to integrate this device in your work,
I would be happy!

can you show us the USB vendor/device ID of this device (please run
"lsusb -vv" and paste the whole block which belongs to your device)?

it seems that the required card definition is missing in
drivers/media/usb/cx231xx/cx231xx-cards.c along with some code that
connects the tuner and demodulator in
drivers/media/usb/cx231xx/cx231xx-dvb.c (there may be more TODOs: for
example fiddling with GPIOs, but if you're lucky this is not required)


Regards,
Martin



--
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 1/2] staging:media:s5p-cec:exynos_hdmi_cecctrl.c Fixed Alignment should match open parenthesis

2017-01-08 Thread Scott Matheina
Fixed Checkpatch check "Alignment should match open parenthesis"

Signed-off-by: Scott Matheina 
---
 drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c 
b/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c
index ce95e0f..f2b24a4 100644
--- a/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c
+++ b/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c
@@ -186,13 +186,13 @@ u32 s5p_cec_get_status(struct s5p_cec_dev *cec)
 void s5p_clr_pending_tx(struct s5p_cec_dev *cec)
 {
writeb(S5P_CEC_IRQ_TX_DONE | S5P_CEC_IRQ_TX_ERROR,
-   cec->reg + S5P_CEC_IRQ_CLEAR);
+  cec->reg + S5P_CEC_IRQ_CLEAR);
 }
 
 void s5p_clr_pending_rx(struct s5p_cec_dev *cec)
 {
writeb(S5P_CEC_IRQ_RX_DONE | S5P_CEC_IRQ_RX_ERROR,
-   cec->reg + S5P_CEC_IRQ_CLEAR);
+  cec->reg + S5P_CEC_IRQ_CLEAR);
 }
 
 void s5p_cec_get_rx_buf(struct s5p_cec_dev *cec, u32 size, u8 *buffer)
-- 
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


[PATCH 2/2] staging/media/s5p-cec/exynos_hdmi_cecctrl.c Fixed blank line before closing brace '}'

2017-01-08 Thread Scott Matheina
Fixed checkpatch check blank line before closing brace '}'

Signed-off-by: Scott Matheina 
---
 drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c 
b/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c
index f2b24a4..1edf667 100644
--- a/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c
+++ b/drivers/staging/media/s5p-cec/exynos_hdmi_cecctrl.c
@@ -87,7 +87,6 @@ void s5p_cec_mask_tx_interrupts(struct s5p_cec_dev *cec)
reg |= S5P_CEC_IRQ_TX_DONE;
reg |= S5P_CEC_IRQ_TX_ERROR;
writeb(reg, cec->reg + S5P_CEC_IRQ_MASK);
-
 }
 
 void s5p_cec_unmask_tx_interrupts(struct s5p_cec_dev *cec)
-- 
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 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-08 Thread Sean Young
Hi Sean,

On Fri, Jan 06, 2017 at 03:31:25PM +0800, Sean Wang wrote:
> On Thu, 2017-01-05 at 17:12 +, Sean Young wrote:
> > On Fri, Jan 06, 2017 at 12:06:24AM +0800, sean.w...@mediatek.com wrote:
> > > + /* Handle pulse and space until end of message */
> > > + for (i = 0 ; i < MTK_CHKDATA_SZ ; i++) {
> > > + val = mtk_r32(ir, MTK_CHKDATA_REG(i));
> > > + dev_dbg(ir->dev, "@reg%d=0x%08x\n", i, val);
> > > +
> > > + for (j = 0 ; j < 4 ; j++) {
> > > + wid = (val & (0xff << j * 8)) >> j * 8;
> > > + rawir.pulse = !rawir.pulse;
> > > + rawir.duration = wid * (MTK_IR_SAMPLE + 1);
> > > + ir_raw_event_store_with_filter(ir->rc, &rawir);
> > > +
> > > + if (MTK_IR_END(wid))
> > > + goto end_msg;
> > > + }
> > > + }
> > 
> > If I read this correctly, there is a maximum of 17 * 4 = 68 edges per
> > IR message. The rc6 mce key 0 (scancode 0x800f0400) is 69 edges, so that
> > won't work.
> > 
> Uh, this is related to hardware limitation. Maximum number hardware
> holds indeed is only 68 edges as you said :( 
> 
> For the case, I will try change the logic into that the whole message 
> is dropped if no end of message is seen within 68 counts to avoid
> wasting CPU for decoding. 

I'm not sure it is worthwhile dropping the IR in that case. The processing
is minimal and it might be possible that we have just enough IR to decode
a scancode even if the trailing end of message is missing. Note that
the call to ir_raw_event_set_idle() will generate an timeout IR event, so
there will always be an end of message marker.

All I wanted to do was point out a limitation in case there is a
workaround; if there is not then we might as well make do with the IR
we do have.

Thanks
Sean
--
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: astrometa device driver

2017-01-08 Thread Martin Blumenstingl
Hello Dieter,

(I CC'ed the linux-media mailing list so other users can look this up
when they run into the same problem)

On Sun, Jan 8, 2017 at 7:27 PM, Dieter Miosga  wrote:
> Happy 2017!
>
> One of the parts that were placed under my imaginary Christmas tree was an
> Astrometa Hybrid TV DVB-T/T2/C/FM/AV USB 2.0 stick with
> Conexant CX23102
that should be supported through the cx231xx driver

> Rafael Micro R828D
supported by the r820t driver

> Panasonic MN88473
supported by the mn88473 driver

> It was not recognized by the latest kernel versions 4.8-4.10.
> If I can ever help you to integrate this device in your work,
> I would be happy!
can you show us the USB vendor/device ID of this device (please run
"lsusb -vv" and paste the whole block which belongs to your device)?

it seems that the required card definition is missing in
drivers/media/usb/cx231xx/cx231xx-cards.c along with some code that
connects the tuner and demodulator in
drivers/media/usb/cx231xx/cx231xx-dvb.c (there may be more TODOs: for
example fiddling with GPIOs, but if you're lucky this is not required)


Regards,
Martin
--
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] solo6x10: use designated initializers

2017-01-08 Thread Andrey Utkin
On Fri, Jan 06, 2017 at 01:21:10PM -0800, Kees Cook wrote:
> > Since `ops` is static, what about this?
> > For the variant given below, you have my signoff.
> >
> >> --- a/drivers/media/pci/solo6x10/solo6x10-g723.c
> >> +++ b/drivers/media/pci/solo6x10/solo6x10-g723.c
> >> @@ -350,7 +350,7 @@ static int solo_snd_pcm_init(struct solo_dev *solo_dev)
> >>
> >>  int solo_g723_init(struct solo_dev *solo_dev)
> >>  {
> >> - static struct snd_device_ops ops = { NULL };
> >> + static struct snd_device_ops ops;
> 
> Ah! Yes, thanks. That works fine too. :) Can this be const as well?

No, it can't be const, it's used as parameter for snd_device_new() which
takes "struct snd_device_ops *".
--
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