Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1356813 > unrolled thread

[PATCH] Add tw5864 driver - cover letter

Started byAndrey Utkin <andrey_utkin@fastmail.com>
First post2016-03-14 03:10 +0100
Last post2016-03-17 09:20 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Add tw5864 driver - cover letter Andrey Utkin <andrey_utkin@fastmail.com> - 2016-03-14 03:10 +0100
    Re: [PATCH] Add tw5864 driver Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-14 03:30 +0100
    Re: [PATCH] Add tw5864 driver Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-14 04:40 +0100
    Re: [PATCH] Add tw5864 driver Leon Romanovsky <leon@leon.nu> - 2016-03-17 09:20 +0100

#1356813 — [PATCH] Add tw5864 driver - cover letter

FromAndrey Utkin <andrey_utkin@fastmail.com>
Date2016-03-14 03:10 +0100
Subject[PATCH] Add tw5864 driver - cover letter
Message-ID<rcq7g-5Io-9@gated-at.bofh.it>
From: Andrey Utkin <andrey.utkin@corp.bluecherry.net>

This is a driver for multimedia devices based on Techwell/Intersil TW5864 chip.

It is basically written from scratch. There was an awful reference driver for
2.6 kernel, which is nearly million lines of code and requires half a dozen
special userspace libraries, and still doesn't quite work. So currently
submitted driver is a product of reverse-engineering and heuristics. tw68
driver was used as code skeleton.

The device advertises many capabilities, but this version of driver only
supports H.264 encoding of captured video channels.

There is one known issue, which reproduces on two of five setups of which I
know: P-frames are distorted, but I-frames are fine. Changing quality and
framerate settings does not affect this. Currently such workaround is used:

v4l2-ctl -d /dev/video$n -c video_gop_size=1

GOP size is set to 1, so that every output frame is I-frame. 
We are regularly contacting manufacturer regarding such issues, but
unfortunately they can do little to help us.


Andrey Utkin (1):
  Add tw5864 driver

 MAINTAINERS                                  |    7 +
 drivers/staging/media/Kconfig                |    2 +
 drivers/staging/media/Makefile               |    1 +
 drivers/staging/media/tw5864/Kconfig         |   11 +
 drivers/staging/media/tw5864/Makefile        |    3 +
 drivers/staging/media/tw5864/tw5864-bs.h     |  154 ++
 drivers/staging/media/tw5864/tw5864-config.c |  359 +++++
 drivers/staging/media/tw5864/tw5864-core.c   |  453 ++++++
 drivers/staging/media/tw5864/tw5864-h264.c   |  183 +++
 drivers/staging/media/tw5864/tw5864-reg.h    | 2200 ++++++++++++++++++++++++++
 drivers/staging/media/tw5864/tw5864-tables.h |  237 +++
 drivers/staging/media/tw5864/tw5864-video.c  | 1364 ++++++++++++++++
 drivers/staging/media/tw5864/tw5864.h        |  280 ++++
 include/linux/pci_ids.h                      |    1 +
 14 files changed, 5255 insertions(+)
 create mode 100644 drivers/staging/media/tw5864/Kconfig
 create mode 100644 drivers/staging/media/tw5864/Makefile
 create mode 100644 drivers/staging/media/tw5864/tw5864-bs.h
 create mode 100644 drivers/staging/media/tw5864/tw5864-config.c
 create mode 100644 drivers/staging/media/tw5864/tw5864-core.c
 create mode 100644 drivers/staging/media/tw5864/tw5864-h264.c
 create mode 100644 drivers/staging/media/tw5864/tw5864-reg.h
 create mode 100644 drivers/staging/media/tw5864/tw5864-tables.h
 create mode 100644 drivers/staging/media/tw5864/tw5864-video.c
 create mode 100644 drivers/staging/media/tw5864/tw5864.h

-- 
2.7.1.380.g0fea050.dirty

[toc] | [next] | [standalone]


#1356836 — Re: [PATCH] Add tw5864 driver

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-03-14 03:30 +0100
SubjectRe: [PATCH] Add tw5864 driver
Message-ID<rcqqB-5Q0-3@gated-at.bofh.it>
In reply to#1356813
On Mon, Mar 14, 2016 at 03:55:14AM +0200, Andrey Utkin wrote:
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -2333,6 +2333,7 @@
>  #define PCI_VENDOR_ID_CAVIUM		0x177d
>  
>  #define PCI_VENDOR_ID_TECHWELL		0x1797
> +#define PCI_DEVICE_ID_TECHWELL_5864	0x5864
>  #define PCI_DEVICE_ID_TECHWELL_6800	0x6800
>  #define PCI_DEVICE_ID_TECHWELL_6801	0x6801
>  #define PCI_DEVICE_ID_TECHWELL_6804	0x6804

Please read the comments at the top of this file for why you don't need
to put any new ids into it.

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1356872 — Re: [PATCH] Add tw5864 driver

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-03-14 04:40 +0100
SubjectRe: [PATCH] Add tw5864 driver
Message-ID<rcrwl-6CX-3@gated-at.bofh.it>
In reply to#1356813
On Mon, Mar 14, 2016 at 03:55:14AM +0200, Andrey Utkin wrote:
> From: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> 
> Support for boards based on Techwell TW5864 chip which provides
> multichannel video & audio grabbing and encoding (H.264, MJPEG,
> ADPCM G.726).
> 
> Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> Tested-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>

Meta-conmment, why add this to drivers/staging/media?  Why can't it just
go into drivers/media/ ?

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1359620 — Re: [PATCH] Add tw5864 driver

FromLeon Romanovsky <leon@leon.nu>
Date2016-03-17 09:20 +0100
SubjectRe: [PATCH] Add tw5864 driver
Message-ID<rdBjY-4LR-5@gated-at.bofh.it>
In reply to#1356813
On Mon, Mar 14, 2016 at 03:55:14AM +0200, Andrey Utkin wrote:
> From: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> 
> Support for boards based on Techwell TW5864 chip which provides
> multichannel video & audio grabbing and encoding (H.264, MJPEG,
> ADPCM G.726).
> 
> Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> Tested-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> ---
>  MAINTAINERS                                  |    7 +
>  drivers/staging/media/Kconfig                |    2 +
>  drivers/staging/media/Makefile               |    1 +
>  drivers/staging/media/tw5864/Kconfig         |   11 +
>  drivers/staging/media/tw5864/Makefile        |    3 +
>  drivers/staging/media/tw5864/tw5864-bs.h     |  154 ++
>  drivers/staging/media/tw5864/tw5864-config.c |  359 +++++
>  drivers/staging/media/tw5864/tw5864-core.c   |  453 ++++++
>  drivers/staging/media/tw5864/tw5864-h264.c   |  183 +++
>  drivers/staging/media/tw5864/tw5864-reg.h    | 2200 ++++++++++++++++++++++++++
>  drivers/staging/media/tw5864/tw5864-tables.h |  237 +++
>  drivers/staging/media/tw5864/tw5864-video.c  | 1364 ++++++++++++++++
>  drivers/staging/media/tw5864/tw5864.h        |  280 ++++
>  include/linux/pci_ids.h                      |    1 +
>  14 files changed, 5255 insertions(+)
>  create mode 100644 drivers/staging/media/tw5864/Kconfig
>  create mode 100644 drivers/staging/media/tw5864/Makefile
>  create mode 100644 drivers/staging/media/tw5864/tw5864-bs.h
>  create mode 100644 drivers/staging/media/tw5864/tw5864-config.c
>  create mode 100644 drivers/staging/media/tw5864/tw5864-core.c
>  create mode 100644 drivers/staging/media/tw5864/tw5864-h264.c
>  create mode 100644 drivers/staging/media/tw5864/tw5864-reg.h
>  create mode 100644 drivers/staging/media/tw5864/tw5864-tables.h
>  create mode 100644 drivers/staging/media/tw5864/tw5864-video.c
>  create mode 100644 drivers/staging/media/tw5864/tw5864.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 409509d..7bb1fa9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11195,6 +11195,13 @@ T:	git git://linuxtv.org/media_tree.git
>  S:	Odd fixes
>  F:	drivers/media/usb/tm6000/
>  
> +TW5864 VIDEO4LINUX DRIVER
> +M:	Bluecherry Maintainers <maintainers@bluecherrydvr.com>

I wonder if this the right thing to do. Generally speaking a maintainer is a
person and not a corporate.

> +M:	Andrey Utkin <andrey.utkin@corp.bluecherry.net>
> +L:	linux-media@vger.kernel.org
> +S:	Supported
> +F:	drivers/staging/media/tw5864/

<snip>

> +
> --- /dev/null
> +++ b/drivers/staging/media/tw5864/tw5864-bs.h
> @@ -0,0 +1,154 @@
> +/*
> + *  TW5864 driver - Exp-Golomb code functions
> + *
> + *  Copyright (C) 2015 Bluecherry, LLC <maintainers@bluecherrydvr.com>
> + *  Author: Andrey Utkin <andrey.utkin@corp.bluecherry.net>

You don't need to state your name here. It is written in git log.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web