regmap for i2c pages

2017-06-01 Thread Tim Harvey
I'm working on a driver for an i2c based media controller device that uses pages. By that I mean there are several pages of 8bit registers and a page-select register that holds the current page. Multiple accesses to the same page can occur without writing to this page register but if you want to ac

[PATCH v7] dw9714: Initial driver for dw9714 VCM

2017-06-01 Thread Rajmohan Mani
DW9714 is a 10 bit DAC, designed for linear control of voice coil motor. This driver creates a V4L2 subdevice and provides control to set the desired focus. Signed-off-by: Rajmohan Mani --- Changes in v7: - Removed DW9714 ACPI hwid from ACPI match table, until the correct ACPI id

Re: [alsa-devel] [PATCH] ALSA: hda - Fix applying MSI dual-codec mobo quirk

2017-06-01 Thread Takashi Iwai
On Thu, 01 Jun 2017 22:58:24 +0200, Takashi Iwai wrote: > > The previous commit [63691587f7b0: ALSA: hda - Apply dual-codec quirk > for MSI Z270-Gaming mobo] attempted to apply the existing dual-codec > quirk for a MSI mobo. But it turned out that this isn't applied > properly due to the MSI-vend

cron job: media_tree daily build: WARNINGS

2017-06-01 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: Fri Jun 2 05:00:19 CEST 2017 media-tree git hash:36bcba973ad478042d1ffc6e89afd92e8bd17030 media_build gi

[PATCH] media: platform: s3c-camif: fix arguments position in function call

2017-06-01 Thread Gustavo A. R. Silva
Hi Sylwester, Here is another patch in case you decide that it is better to apply this one. Thanks -- Gustavo A. R. Silva == Fix the position of the arguments in function call. Addresses-Coverity-ID: 1248800 Addresses-Coverity-ID: 1269141 Signed-off-by: Gustavo A. R. Silva --- drive

Re: [PATCH v7 00/34] i.MX Media Driver

2017-06-01 Thread Steve Longerbeam
Hi Tim, On 06/01/2017 05:25 PM, Tim Harvey wrote: Hi Steve, I've applied adv7180 device-tree config for the Gateworks ventana boards on top of your imx-media-staging-md-v15 github branch but am not able to get it to work. Here's my device-tree patch that adds adv7180 to the GW54xx connected

Re: [PATCH v7 00/34] i.MX Media Driver

2017-06-01 Thread Tim Harvey
On Wed, May 24, 2017 at 5:29 PM, Steve Longerbeam wrote: > In version 7: > > - video-mux: switched to Philipp's latest video-mux driver and updated > bindings docs, that makes use of the mmio-mux framework. > > - mmio-mux: includes Philipp's temporary patch that adds mmio-mux support > to vide

Re: [PATCH v2 24/27] usb: gadget: u_uac1: Kill set_fs() usage

2017-06-01 Thread Greg Kroah-Hartman
On Thu, Jun 01, 2017 at 10:58:47PM +0200, Takashi Iwai wrote: > With the new API to perform the in-kernel buffer copy, we can get rid > of set_fs() usage in this driver, finally. > > Signed-off-by: Takashi Iwai > --- Acked-by: Greg Kroah-Hartman

RE: [PATCH v6 1/1] [media] i2c: add support for OV13858 sensor

2017-06-01 Thread Yang, Hyungwoo
Hi Sakari, I'm so sorry there was huge mistake in testing & submission in v6. I've submitted v7. Thanks, Hyungwoo -Original Message- From: Sakari Ailus [mailto:sakari.ai...@iki.fi] Sent: Thursday, June 1, 2017 1:39 AM To: Yang, Hyungwoo Cc: linux-media@vger.kernel.org; sakari.ai...@li

[PATCH v7 1/1] [media] i2c: add support for OV13858 sensor

2017-06-01 Thread Hyungwoo Yang
This patch adds driver for Omnivision's ov13858 sensor, the driver supports following features: - manual exposure/analog gain - two link frequencies - VBLANK support - test pattern support - media controller support - runtime pm support - supported resolutions + 4224x3136 at 30FPS + 2112x1568

Re: [PATCH] media: platform: s3c-camif: fix function prototype

2017-06-01 Thread Sylwester Nawrocki
On 05/22/2017 11:02 AM, Hans Verkuil wrote: >> --- a/drivers/media/platform/s3c-camif/camif-regs.c >> +++ b/drivers/media/platform/s3c-camif/camif-regs.c >> @@ -58,7 +58,7 @@ void camif_hw_set_test_pattern(struct camif_dev *camif, >> unsigned int pattern) >> } >> >> void camif_hw_set_effect

Re: [PATCH v2 15/27] [media] solo6x10: Convert to the new PCM ops

2017-06-01 Thread Hans Verkuil
On 06/01/2017 10:58 PM, Takashi Iwai wrote: Replace the copy and the silence ops with the new PCM ops. The device supports only 1 channel and 8bit sample, so it's always bytes=frames, and we need no conversion of unit in the callback. Also, it's a capture stream, thus no silence is needed. Signe

[PATCH v2 10/27] ALSA: hdsp: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions. Signed-off-by: Takashi Iwai --- sound/pci/rme9652/hdsp.c | 67 1 file changed, 50 insertions(+), 17 deletions(-) diff --g

[PATCH v2 23/27] ALSA: pcm: Direct in-kernel read/write support

2017-06-01 Thread Takashi Iwai
Now all materials are ready, let's allow the direct in-kernel read/write, i.e. a kernel-space buffer is passed for read or write, instead of the normal user-space buffer. This feature is used by OSS layer and UAC1 driver, for example. The __snd_pcm_lib_xfer() takes in_kernel argument that indicat

[PATCH v2 17/27] ALSA: pcm: Check PCM state by a common helper function

2017-06-01 Thread Takashi Iwai
Signed-off-by: Takashi Iwai --- sound/core/pcm_lib.c | 81 +++- 1 file changed, 29 insertions(+), 52 deletions(-) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 0db8d4e0fca2..e4f5c43b6448 100644 --- a/sound/core/pcm_lib.c +++ b/soun

[PATCH v2 03/27] ALSA: dummy: Convert to new PCM copy ops

2017-06-01 Thread Takashi Iwai
It's a dummy ops, so just replacing it. Signed-off-by: Takashi Iwai --- sound/drivers/dummy.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 172dacd925f5..dd5ed037adf2 100644 --- a/sound/drivers/dummy.

[PATCH v2 02/27] ALSA: pcm: Introduce copy_user, copy_kernel and fill_silence ops

2017-06-01 Thread Takashi Iwai
For supporting the explicit in-kernel copy of PCM buffer data, and also for further code refactoring, three new PCM ops, copy_user, copy_kernel and fill_silence, are introduced. The old copy and silence ops will be deprecated and removed later once when all callers are converted. The copy_kernel

[PATCH v2 15/27] [media] solo6x10: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The device supports only 1 channel and 8bit sample, so it's always bytes=frames, and we need no conversion of unit in the callback. Also, it's a capture stream, thus no silence is needed. Signed-off-by: Takashi Iwai --- drivers/media/pci

[PATCH] ALSA: hda - Fix applying MSI dual-codec mobo quirk

2017-06-01 Thread Takashi Iwai
The previous commit [63691587f7b0: ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo] attempted to apply the existing dual-codec quirk for a MSI mobo. But it turned out that this isn't applied properly due to the MSI-vendor quirk before this entry. I overlooked such two MSI entries just

[PATCH v2 19/27] ALSA: pcm: Call directly the common read/write helpers

2017-06-01 Thread Takashi Iwai
Make snd_pcm_lib_read() and *_write() static inline functions that call the common helper functions directly. This reduces a slight amount of codes, and at the same time, it's a preparation for the further cleanups / fixes. Signed-off-by: Takashi Iwai --- include/sound/pcm.h | 43 +++-

[PATCH v2 14/27] ASoC: blackfin: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. In AC97 and I2S-TDM mode, we need to convert back to frames, but otherwise the conversion is pretty straightforward. Signed-off-by: Takashi Iwai --- sound/soc/blackfin/bf5xx-ac97-pcm.c | 27 +++ sound/soc/blackfin

[PATCH v2 08/27] ALSA: rme96: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Signed-off-by: Takashi Iwai --- sound/pci/rme96.c | 70 ++---

[PATCH v2 04/27] ALSA: es1938: Convert to the new PCM copy ops

2017-06-01 Thread Takashi Iwai
Replace the copy ops with the new copy_user and copy_kernel ops. It's used only for a capture stream (for some hardware workaround), thus we need no silence operation. Signed-off-by: Takashi Iwai --- sound/pci/es1938.c | 33 + 1 file changed, 25 insertions(+), 8 d

[PATCH v2 00/27] Revised full patchset for PCM in-kernel copy support

2017-06-01 Thread Takashi Iwai
Hi, this is a full patchset of what I sent previously, containing the all changes instead of the snippet. The main purpose of this patchset is to eliminate the remaining usages of set_fs(). They are basically used for in-kernel PCM data transfer, and this patch provides the new API functions and

[PATCH v2 12/27] ALSA: sb: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. For avoiding the code redundancy, slightly hackish macros are introduced. Signed-off-by: Takashi Iwai --- sound/isa/sb/emu8000_pcm.c | 190 ++--- 1 file changed, 109 insertions(+), 81 deletions(-)

[PATCH v2 11/27] ALSA: gus: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. For simplifying the code a bit, two local helpers are introduced here: get_bpos() and playback_copy_ack(). Signed-off-by: Takashi Iwai --- sound/isa/gus/gus_pcm.c | 97 ++--- 1 file changed, 59

[PATCH v2 13/27] ALSA: sh: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. Fixed also the user-space buffer copy with the proper copy_from_user*() variant. Signed-off-by: Takashi Iwai --- sound/sh/sh_dac_audio.c | 54 +++-- 1 file changed, 30 insertions(+), 24 deletio

[PATCH v2 24/27] usb: gadget: u_uac1: Kill set_fs() usage

2017-06-01 Thread Takashi Iwai
With the new API to perform the in-kernel buffer copy, we can get rid of set_fs() usage in this driver, finally. Signed-off-by: Takashi Iwai --- drivers/usb/gadget/function/u_uac1.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/gadget/function/u_uac1.c b/

[PATCH v2 05/27] ALSA: nm256: Convert to new PCM copy ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Signed-off-by: Takashi Iwai --- sound/pci/nm256/nm256.c | 57 ---

[PATCH v2 20/27] ALSA: pcm: More unification of PCM transfer codes

2017-06-01 Thread Takashi Iwai
This patch proceeds more abstraction of PCM read/write loop codes. For both interleaved and non-interleaved transfers, the same copy or silence transfer code (which is defined as pcm_transfer_f) is used now. This became possible since we switched to byte size to copy_* and fill_silence ops argume

[PATCH v2 18/27] ALSA: pcm: Shuffle codes

2017-06-01 Thread Takashi Iwai
Just shuffle the codes, without any change otherwise. Signed-off-by: Takashi Iwai --- sound/core/pcm_lib.c | 212 +-- 1 file changed, 106 insertions(+), 106 deletions(-) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index e4f5c43b6448..

[PATCH v2 27/27] ALSA: doc: Update copy_user, copy_kernel and fill_silence PCM ops

2017-06-01 Thread Takashi Iwai
Signed-off-by: Takashi Iwai --- .../sound/kernel-api/writing-an-alsa-driver.rst| 111 ++--- 1 file changed, 76 insertions(+), 35 deletions(-) diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst in

[PATCH v2 22/27] ALSA: pcm: Simplify snd_pcm_playback_silence()

2017-06-01 Thread Takashi Iwai
Use the existing silence helper codes for simplification. Signed-off-by: Takashi Iwai --- sound/core/pcm_lib.c | 50 -- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index f15460eaf8b5..

[PATCH v2 25/27] ALSA: pcm: Kill set_fs() in PCM OSS layer

2017-06-01 Thread Takashi Iwai
This is the last-standing one: kill the set_fs() usage in PCM OSS layer by replacing with the new API functions to deal with the direct in-kernel buffer copying. The code to fill the silence can be replaced even to a one-liner to pass NULL buffer instead of the manual copying. Signed-off-by: Taka

[PATCH v2 26/27] ALSA: pcm: Build OSS writev/readv helpers conditionally

2017-06-01 Thread Takashi Iwai
The snd_pcm_oss_writev3() and snd_pcm_oss_readv3() are used only in io.c with CONFIG_SND_PCM_OSS_PLUGINS=y. Add an ifdef to reduce the build of these functions. Along with it, since they are called always for in-kernel copy, reduce the argument and call snd_pcm_kernel_writev() and *_readv() direc

[PATCH v2 16/27] ALSA: pcm: Drop the old copy and silence ops

2017-06-01 Thread Takashi Iwai
Now that all users of old copy and silence ops have been converted to the new PCM ops, the old stuff can be retired and go away. Signed-off-by: Takashi Iwai --- include/sound/pcm.h | 5 - sound/core/pcm_lib.c | 38 +- sound/soc/soc-pcm.c | 2 -- 3 file

[PATCH v2 07/27] ALSA: rme32: Convert to the new PCM copy ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new ops. The conversion is straightforward with standard helper functions, and now we can drop the bytes <-> frames conversions in callbacks. Signed-off-by: Takashi Iwai --- sound/pci/rme32.c | 65 -

[PATCH v2 06/27] ALSA: korg1212: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. Although we can refactor this messy code, at this time, the changes are kept as small as possible. Let's clean up later. Signed-off-by: Takashi Iwai --- sound/pci/korg1212/korg1212.c | 112 -- 1 f

[PATCH v2 09/27] ALSA: rme9652: Convert to the new PCM ops

2017-06-01 Thread Takashi Iwai
Replace the copy and the silence ops with the new PCM ops. The conversion is straightforward with standard helper functions. Signed-off-by: Takashi Iwai --- sound/pci/rme9652/rme9652.c | 71 ++--- 1 file changed, 54 insertions(+), 17 deletions(-) diff --g

[PATCH v2 21/27] ALSA: pcm: Unify read/write loop

2017-06-01 Thread Takashi Iwai
Both __snd_pcm_lib_read() and __snd_pcm_write() functions have almost the same code to loop over samples. For simplification, this patch unifies both as the single helper, __snd_pcm_lib_xfer(). Other than that, there should be no functional change by this patch. Signed-off-by: Takashi Iwai ---

[PATCH] build: make check_git() give more information in verbose mode

2017-06-01 Thread Vincent McIntyre
While debugging another issue I found this change helpful. Signed-off-by: Vincent McIntyre --- build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build b/build index d7f51c2..4457a73 100755 --- a/build +++ b/build @@ -303,12 +303,13 @@ sub check_git($$) my $cmd =

Re: [PATCH 3/3] [media] intel-ipu3: cio2: Add new MIPI-CSI2 driver

2017-06-01 Thread Sakari Ailus
Hi Yong, On Sat, Apr 29, 2017 at 06:34:36PM -0500, Yong Zhi wrote: ... > +static int cio2_pci_probe(struct pci_dev *pci_dev, > + const struct pci_device_id *id) > +{ > + struct cio2_device *cio2; > + phys_addr_t phys; > + void __iomem *const *iomap; > + int i

[PATCH] small cleanup of build script

2017-06-01 Thread Vincent McIntyre
Introduce a function for better tracing of system() calls While debugging a recent issue I wanted more complete information about the sequencence of events in a series of system("foo") or die("BAR") calls. Adding this helper did that and cleaned things up a little. Signed-off-by: Vincent McIntyre

[PATCH] Small fix to build script

2017-06-01 Thread Vincent McIntyre
Avoid going splat if --depth is not given Commit 6b4a9c5 indroduced the --depth parameter to limit the commit history pulled by when cloning, giving a nice speedup. But in the process it broke running without the --depth parameter. The first invocation of './build --main-git' works fine, but the s

exposure vs. exposure_absolute was Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver

2017-06-01 Thread Pavel Machek
Hi! > > > + /* Auto/manual exposure */ > > > + ctrls->auto_exp = v4l2_ctrl_new_std_menu(hdl, ops, > > > + V4L2_CID_EXPOSURE_AUTO, > > > + V4L2_EXPOSURE_MANUAL, 0, > > > + V4L2

Re: [PATCH v6 1/1] [media] i2c: add support for OV13858 sensor

2017-06-01 Thread Sakari Ailus
Hi Hyungwoo, On Wed, May 31, 2017 at 09:44:10AM -0700, Hyungwoo Yang wrote: > +static int ov13858_probe(struct i2c_client *client, > + const struct i2c_device_id *devid) > +{ > + struct ov13858 *ov13858; > + int ret; > + > + ov13858 = devm_kzalloc(&client->dev, siz

Re: [PATCH v7 16/34] [media] add Omnivision OV5640 sensor driver

2017-06-01 Thread Sakari Ailus
Hi Pavel, On Wed, May 31, 2017 at 09:58:21PM +0200, Pavel Machek wrote: > Hi! > > > +/* min/typical/max system clock (xclk) frequencies */ > > +#define OV5640_XCLK_MIN 600 > > +#define OV5640_XCLK_MAX 2400 > > + > > +/* > > + * FIXME: there is no subdev API to set the MIPI CSI-2 > > + *

Re: [RFC v2 3/3] dt: bindings: Add a binding for referencing EEPROM from camera sensors

2017-06-01 Thread Sakari Ailus
On Wed, May 31, 2017 at 07:37:18PM +0200, Pavel Machek wrote: > Yeah, it would be good to get the corresponding patches to be merged > to v4l-utils... There are also no drivers to make use of this currently --- I certainly don't object using the group_id before better solutions are available. But

[PATCH 2/2] [media] mceusb: drop redundant urb reinitialisation

2017-06-01 Thread Johan Hovold
Drop a since commit e1159cb35712 ("[media] mceusb: remove pointless mce_flush_rx_buffer function") redundant reinitialisation of two urb fields immediately after they have been initialised. Signed-off-by: Johan Hovold --- drivers/media/rc/mceusb.c | 3 --- 1 file changed, 3 deletions(-) diff --

[PATCH 1/2] [media] mceusb: fix memory leaks in error path

2017-06-01 Thread Johan Hovold
Fix urb and transfer-buffer leaks in an urb-submission error path which may be hit when a device is disconnected. Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver") Cc: stable # 2.6.36 Cc: Jarod Wilson Signed-off-by: Johan Hovold --- drivers/media/rc/mceusb.c | 2 ++ 1 file

Re: Null Pointer Dereference in mceusb

2017-06-01 Thread Johan Hovold
[ +CC: media list ] On Wed, May 31, 2017 at 08:25:42PM +0200, Sebastian wrote: > Hi list, > > as kindly suggested by gregkh > (https://bugzilla.kernel.org/show_bug.cgi?id=195943), I am now sending > the mail to this mailing list. > I have set up the latest Ubuntu 17.04 server within a qemu/kvm vi

[PATCH] cx18: Fix a sleep-in-atomic bug in snd_cx18_pcm_hw_free

2017-06-01 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: snd_cx18_pcm_hw_free (acquire the lock by spin_lock_irqsave) vfree --> may sleep To fix it, the "substream->runtime->dma_area" is passed to a temporary value, and mark it NULL when holding the lock. The memory is freed by vfr

[PATCH V2] ivtv: Fix a sleep-in-atomic bug in snd_ivtv_pcm_hw_free

2017-06-01 Thread Jia-Ju Bai
The driver may sleep under a spin lock, and the function call path is: snd_ivtv_pcm_hw_free (acquire the lock by spin_lock_irqsave) vfree --> may sleep To fix it, the "substream->runtime->dma_area" is passed to a temporary value, and mark it NULL when holding the lock. The memory is freed by vfr