Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-15 Thread Hans Verkuil
Hi Jaroslav, On 5/13/24 13:56, Jaroslav Kysela wrote: > On 09. 05. 24 13:13, Jaroslav Kysela wrote: >> On 09. 05. 24 12:44, Shengjiu Wang wrote: > mem2mem is just like the decoder in the compress pipeline. which is > one of the components in the pipeline. I was thinking of

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-05-08 Thread Hans Verkuil
On 06/05/2024 10:49, Shengjiu Wang wrote: > On Fri, May 3, 2024 at 4:42 PM Mauro Carvalho Chehab > wrote: >> >> Em Fri, 3 May 2024 10:47:19 +0900 >> Mark Brown escreveu: >> >>> On Thu, May 02, 2024 at 10:26:43AM +0100, Mauro Carvalho Chehab wrote: Mauro Carvalho Chehab escreveu: >>> >

Re: [PATCH v15 00/16] Add audio support in v4l2 framework

2024-04-30 Thread Hans Verkuil
On 30/04/2024 10:21, Sebastian Fricke wrote: > Hey Shengjiu, > > first of all thanks for all of this work and I am very sorry for only > emerging this late into the series, I sadly didn't notice it earlier. > > I would like to voice a few concerns about the general idea of adding > Audio support

Re: [PATCH 8/9] drivers/media/*: Convert from tasklet to BH workqueue

2024-04-24 Thread Hans Verkuil
On 27/03/2024 17:03, Allen Pais wrote: > The only generic interface to execute asynchronously in the BH context is > tasklet; however, it's marked deprecated and has some design flaws. To > replace tasklets, BH workqueue support was recently added. A BH workqueue > behaves similarly to regular

Re: [PATCH v14 00/16] Add audio support in v4l2 framework

2024-03-19 Thread Hans Verkuil
On 19/03/2024 4:14 am, Shengjiu Wang wrote: > On Tue, Mar 19, 2024 at 10:24 AM Shengjiu Wang > wrote: >> >> On Mon, Mar 18, 2024 at 11:56 PM Hans Verkuil wrote: >>> >>> Hi Shengjiu, >>> >>> I was about to prepare a pull request for this whe

Re: [PATCH v14 00/16] Add audio support in v4l2 framework

2024-03-18 Thread Hans Verkuil
document style > - separate V4L2_AUDIO_FMT_LPCM and V4L2_CAP_AUDIO_M2M in separate commit > > changes in v3: > - Modify documents for adding audio m2m support > - Add audio virtual m2m driver > - Defined V4L2_AUDIO_FMT_LPCM format type for audio. > - Defined V4L2_CAP_AUDIO_M2M

Re: [PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-03-08 Thread Hans Verkuil
On 08/03/2024 2:52 pm, Shengjiu Wang wrote: > On Fri, Mar 8, 2024 at 8:06 PM Hans Verkuil wrote: >> >> On 08/03/2024 12:52 pm, Shengjiu Wang wrote: >>> On Fri, Mar 8, 2024 at 3:34 PM Hans Verkuil wrote: >>>> >>>> Hi Shengjiu, >>>> &g

Re: [PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-03-08 Thread Hans Verkuil
On 08/03/2024 12:52 pm, Shengjiu Wang wrote: > On Fri, Mar 8, 2024 at 3:34 PM Hans Verkuil wrote: >> >> Hi Shengjiu, >> >> After thinking it over I think this patch can be improved: >> >> On 26/02/2024 9:28 am, Shengjiu Wang wrote: >>>

Re: [PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-03-07 Thread Hans Verkuil
Hi Shengjiu, After thinking it over I think this patch can be improved: On 26/02/2024 9:28 am, Shengjiu Wang wrote: > The audio sample format definition is from alsa, > the header file is include/uapi/sound/asound.h, but > don't include this header file directly, because in > user space, there

Re: [PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-02-27 Thread Hans Verkuil
On 27/02/2024 04:44, Shengjiu Wang wrote: > On Mon, Feb 26, 2024 at 9:55 PM Nicolas Dufresne wrote: >> >> Le lundi 26 février 2024 à 16:28 +0800, Shengjiu Wang a écrit : >>> The audio sample format definition is from alsa, >>> the header file is include/uapi/sound/asound.h, but >>> don't include

Re: [PATCH v12 08/15] media: uapi: Define audio sample format fourcc type

2024-02-23 Thread Hans Verkuil
On 22/02/2024 04:50, Shengjiu Wang wrote: > On Wed, Feb 21, 2024 at 7:10 PM Hans Verkuil wrote: >> >> On 19/02/2024 13:56, Mauro Carvalho Chehab wrote: >>> Em Mon, 19 Feb 2024 12:05:02 +0800 >>> Shengjiu Wang escreveu: >>> >>>> Hi Mauro &g

Re: [PATCH v12 07/15] media: v4l2: Add audio capture and output support

2024-02-21 Thread Hans Verkuil
On 21/02/2024 11:11, Shengjiu Wang wrote: > On Wed, Feb 21, 2024 at 12:30 PM Tomasz Figa wrote: >> >> On Sat, Feb 17, 2024 at 6:42 PM Mauro Carvalho Chehab >> wrote: >>> >>> Em Thu, 18 Jan 2024 20:32:00 +0800 >>> Shengjiu Wang escreveu: >>> Audio signal processing has the requirement for

Re: [PATCH v12 07/15] media: v4l2: Add audio capture and output support

2024-02-21 Thread Hans Verkuil
On 17/02/2024 10:42, Mauro Carvalho Chehab wrote: > Em Thu, 18 Jan 2024 20:32:00 +0800 > Shengjiu Wang escreveu: > >> Audio signal processing has the requirement for memory to >> memory similar as Video. >> >> This patch is to add this support in v4l2 framework, defined >> new buffer type

Re: [PATCH v12 08/15] media: uapi: Define audio sample format fourcc type

2024-02-21 Thread Hans Verkuil
On 19/02/2024 13:56, Mauro Carvalho Chehab wrote: > Em Mon, 19 Feb 2024 12:05:02 +0800 > Shengjiu Wang escreveu: > >> Hi Mauro >> >> On Sat, Feb 17, 2024 at 5:19 PM Mauro Carvalho Chehab >> wrote: >>> >>> Em Thu, 18 Jan 2024 20:32:01 +0800 >>> Shengjiu Wang escreveu: >>> The audio

Re: [PATCH v11 15/15] media: vim2m-audio: add virtual driver for audio memory to memory

2024-01-17 Thread Hans Verkuil
On 18/01/2024 07:13, Shengjiu Wang wrote: > On Wed, Jan 17, 2024 at 6:32 PM Hans Verkuil wrote: >> >> On 22/11/2023 08:23, Shengjiu Wang wrote: >>> Audio memory to memory virtual driver use video memory to memory >>> virtual driver vim2m.c as example. The m

Re: [PATCH v11 15/15] media: vim2m-audio: add virtual driver for audio memory to memory

2024-01-17 Thread Hans Verkuil
On 22/11/2023 08:23, Shengjiu Wang wrote: > Audio memory to memory virtual driver use video memory to memory > virtual driver vim2m.c as example. The main difference is > device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. > > The device_run function is a dummy function,

Re: [PATCH v11 14/15] media: imx-asrc: Add memory to memory driver

2024-01-17 Thread Hans Verkuil
Some small comments: On 22/11/2023 08:23, Shengjiu Wang wrote: > Implement the ASRC memory to memory function using > the v4l2 framework, user can use this function with > v4l2 ioctl interface. > > User send the output and capture buffer to driver and > driver store the converted data to the

Re: [PATCH v11 13/15] media: vivid: add fixed point test controls

2024-01-17 Thread Hans Verkuil
On 22/11/2023 08:23, Shengjiu Wang wrote: > Add fixed point test controls, one is for Q4.16 format > another one is for Q63 format. > > Signed-off-by: Shengjiu Wang > --- > drivers/media/test-drivers/vivid/vivid-core.h | 2 ++ > .../media/test-drivers/vivid/vivid-ctrls.c| 26

Re: [PATCH v11 12/15] media: uapi: Add an entity type for audio resampler

2024-01-17 Thread Hans Verkuil
Some small comments: On 22/11/2023 08:23, Shengjiu Wang wrote: > Add and document a media entity type for audio resampler. for -> for an > It is MEDIA_ENT_F_PROC_AUDIO_RESAMPLER. > > Signed-off-by: Shengjiu Wang > --- > Documentation/userspace-api/media/mediactl/media-types.rst | 6 ++ >

Re: [PATCH v11 10/15] media: uapi: Add audio rate controls support

2024-01-17 Thread Hans Verkuil
Hi Shengjiu, Some small comments below: On 22/11/2023 08:23, Shengjiu Wang wrote: > Add V4L2_CID_M2M_AUDIO_SOURCE_RATE and V4L2_CID_M2M_AUDIO_DEST_RATE > new IDs for rate control. > > Add V4L2_CID_M2M_AUDIO_SOURCE_RATE_OFFSET and > V4L2_CID_M2M_AUDIO_DEST_RATE_OFFSET for clock drift. > >

Re: [PATCH v11 00/15] Add audio support in v4l2 framework

2023-12-06 Thread Hans Verkuil
Hi Shengjiu, On 22/11/2023 08:23, Shengjiu Wang wrote: > Audio signal processing also has the requirement for memory to > memory similar as Video. > > This asrc memory to memory (memory ->asrc->memory) case is a non > real time use case. > > User fills the input buffer to the asrc module, after

Re: [PATCH v10 00/14] Add audio support in v4l2 framework

2023-11-21 Thread Hans Verkuil
On 11/21/23 11:03, Shengjiu Wang wrote: > On Tue, Nov 21, 2023 at 5:22 PM Hans Verkuil wrote: >> >> On 21/11/2023 08:37, Shengjiu Wang wrote: >>> Audio signal processing also has the requirement for memory to >>> memory similar as Video. >>> >>>

Re: [PATCH v10 00/14] Add audio support in v4l2 framework

2023-11-21 Thread Hans Verkuil
On 21/11/2023 08:37, Shengjiu Wang wrote: > Audio signal processing also has the requirement for memory to > memory similar as Video. > > This asrc memory to memory (memory ->asrc->memory) case is a non > real time use case. > > User fills the input buffer to the asrc module, after conversion,

Re: [PATCH v10 13/14] media: imx-asrc: Add memory to memory driver

2023-11-21 Thread Hans Verkuil
On 21/11/2023 08:37, Shengjiu Wang wrote: > Implement the ASRC memory to memory function using > the v4l2 framework, user can use this function with > v4l2 ioctl interface. > > User send the output and capture buffer to driver and > driver store the converted data to the capture buffer. > > This

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-17 Thread Hans Verkuil
On 17/11/2023 14:07, Sakari Ailus wrote: > Hi Hans, > > Thank you for the patch. > > On Fri, Nov 17, 2023 at 01:07:44PM +0100, Hans Verkuil wrote: >> Here is an RFC patch adding support for 'fraction_bits'. It's lacking >> documentation, but it can be used for testing.

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-17 Thread Hans Verkuil
s for your patch series. If it does, then I can clean this up. Regards, Hans Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ctrls-api.c | 1 + drivers/media/v4l2-core/v4l2-ctrls-core.c | 72 +++ include/media/v4l2-ctrls.h| 7 ++- in

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-16 Thread Hans Verkuil
ed, Nov 15, 2023 at 12:19:31PM +0100, Hans Verkuil wrote: >>> On 11/15/23 11:55, Laurent Pinchart wrote: >>>> On Wed, Nov 15, 2023 at 09:09:42AM +0100, Hans Verkuil wrote: >>>>> On 13/11/2023 13:44, Laurent Pinchart wrote: >>>>>> On Mon, Nov 13

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-15 Thread Hans Verkuil
On 11/15/23 11:55, Laurent Pinchart wrote: > Hi Hans, > > On Wed, Nov 15, 2023 at 09:09:42AM +0100, Hans Verkuil wrote: >> On 13/11/2023 13:44, Laurent Pinchart wrote: >>> On Mon, Nov 13, 2023 at 01:05:12PM +0100, Hans Verkuil wrote: >>>> On 13/11/2023 12:43,

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-15 Thread Hans Verkuil
On 15/11/2023 09:45, Tomasz Figa wrote: > On Wed, Nov 15, 2023 at 5:09 PM Hans Verkuil wrote: >> >> Hi Laurent, >> >> On 13/11/2023 13:44, Laurent Pinchart wrote: >>> Hi Hans, >>> >>> On Mon, Nov 13, 2023 at 01:05:12PM +0100, Hans Verkuil w

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-15 Thread Hans Verkuil
On 10/11/2023 06:48, Shengjiu Wang wrote: > Fixed point controls are used by the user to configure > a fixed point value in 64bits, which Q31.32 format. > > Signed-off-by: Shengjiu Wang > --- > .../userspace-api/media/v4l/vidioc-g-ext-ctrls.rst | 13 +++-- >

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-15 Thread Hans Verkuil
Hi Laurent, On 13/11/2023 13:44, Laurent Pinchart wrote: > Hi Hans, > > On Mon, Nov 13, 2023 at 01:05:12PM +0100, Hans Verkuil wrote: >> On 13/11/2023 12:43, Laurent Pinchart wrote: >>> On Mon, Nov 13, 2023 at 11:28:51AM +, Sakari Ailus wrote: >>>> On M

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-13 Thread Hans Verkuil
On 13/11/2023 12:43, Laurent Pinchart wrote: > On Mon, Nov 13, 2023 at 11:28:51AM +, Sakari Ailus wrote: >> Hi Hans, >> >> On Mon, Nov 13, 2023 at 12:24:14PM +0100, Hans Verkuil wrote: >>> On 13/11/2023 12:07, Laurent Pinchart wrote: >>>> On Mon, Nov

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-13 Thread Hans Verkuil
On 13/11/2023 12:07, Laurent Pinchart wrote: > On Mon, Nov 13, 2023 at 11:56:49AM +0100, Hans Verkuil wrote: >> On 13/11/2023 11:42, Laurent Pinchart wrote: >>> On Mon, Nov 13, 2023 at 11:29:09AM +0100, Hans Verkuil wrote: >>>> Hi Shengjiu, >>>> >

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-13 Thread Hans Verkuil
On 13/11/2023 11:42, Laurent Pinchart wrote: > On Mon, Nov 13, 2023 at 11:29:09AM +0100, Hans Verkuil wrote: >> Hi Shengjiu, >> >> On 10/11/2023 06:48, Shengjiu Wang wrote: >>> Fixed point controls are used by the user to configure >>> a fixed poi

Re: [PATCH v9 10/15] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-11-13 Thread Hans Verkuil
Hi Shengjiu, On 10/11/2023 06:48, Shengjiu Wang wrote: > Fixed point controls are used by the user to configure > a fixed point value in 64bits, which Q31.32 format. > > Signed-off-by: Shengjiu Wang This patch adds a new control type. This is something that also needs to be tested by

Re: [PATCH v9 07/15] media: v4l2: Add audio capture and output support

2023-11-13 Thread Hans Verkuil
Hi Shengjiu, On 10/11/2023 06:48, Shengjiu Wang wrote: > Audio signal processing has the requirement for memory to > memory similar as Video. > > This patch is to add this support in v4l2 framework, defined > new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and > V4L2_BUF_TYPE_AUDIO_OUTPUT, defined

Re: [PATCH v9 14/15] media: imx-asrc: Add memory to memory driver

2023-11-10 Thread Hans Verkuil
On 10/11/2023 06:48, Shengjiu Wang wrote: > Implement the ASRC memory to memory function using > the v4l2 framework, user can use this function with > v4l2 ioctl interface. > > User send the output and capture buffer to driver and > driver store the converted data to the capture buffer. > > This

[RFC PATCH] v4l-utils: add support for v4l-audioX devices

2023-11-07 Thread Hans Verkuil
with that until vim2m-audio uses the media controller. Signed-off-by: Hans Verkuil --- diff --git a/contrib/test/test-media b/contrib/test/test-media index afe20760..c2a71b89 100755 --- a/contrib/test/test-media +++ b/contrib/test/test-media @@ -7,6 +7,7 @@ vidtv=0 vivid=0 vim2m=0 +vim2m_audio=0 vimc

Re: [RFC PATCH v8 13/13] media: vim2m_audio: add virtual driver for audio memory to memory

2023-11-07 Thread Hans Verkuil
On 06/11/2023 14:58, Hans Verkuil wrote: > On 27/10/2023 12:35, Shengjiu Wang wrote: >> Audio memory to memory virtual driver use video memory to memory >> virtual driver vim2m.c as example. The main difference is >> device type is VFL_TYPE_AUDIO and device cap type

Re: [RFC PATCH v8 13/13] media: vim2m_audio: add virtual driver for audio memory to memory

2023-11-06 Thread Hans Verkuil
On 27/10/2023 12:35, Shengjiu Wang wrote: > Audio memory to memory virtual driver use video memory to memory > virtual driver vim2m.c as example. The main difference is > device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. > > The device_run function is a dummy function,

Re: [RFC PATCH v8 00/13] Add audio support in v4l2 framework

2023-11-01 Thread Hans Verkuil
On 01/11/2023 12:05, Shengjiu Wang wrote: > On Mon, Oct 30, 2023 at 9:56 AM Shengjiu Wang wrote: >> >> On Fri, Oct 27, 2023 at 7:18 PM Hans Verkuil wrote: >>> >>> Hi Shengjiu, >>> >>> Is there a reason why this series is still marked RFC? &

Re: [RFC PATCH v8 00/13] Add audio support in v4l2 framework

2023-10-27 Thread Hans Verkuil
Hi Shengjiu, Is there a reason why this series is still marked RFC? Just wondering about that. Regards, Hans On 27/10/2023 12:35, Shengjiu Wang wrote: > Audio signal processing also has the requirement for memory to > memory similar as Video. > > This asrc memory to memory (memory

Re: [RFC PATCH v7 12/13] media: imx-asrc: Add memory to memory driver

2023-10-25 Thread Hans Verkuil
On 20/10/2023 11:30, Shengjiu Wang wrote: > Implement the ASRC memory to memory function using > the v4l2 framework, user can use this function with > v4l2 ioctl interface. > > User send the output and capture buffer to driver and > driver store the converted data to the capture buffer. > > This

Re: [RFC PATCH v7 11/13] media: uapi: Add audio rate controls support

2023-10-25 Thread Hans Verkuil
On 20/10/2023 11:30, Shengjiu Wang wrote: > Add V4L2_CID_M2M_AUDIO_SOURCE_RATE and V4L2_CID_M2M_AUDIO_DEST_RATE > new IDs for rate control. > > Add V4L2_CID_M2M_AUDIO_SOURCE_RATE_OFFSET and > V4L2_CID_M2M_AUDIO_DEST_RATE_OFFSET for clock drift. > > Signed-off-by: Shengjiu Wang > --- >

Re: [RFC PATCH v7 10/13] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-10-25 Thread Hans Verkuil
On 20/10/2023 11:30, Shengjiu Wang wrote: > Fixed point controls are used by the user to configure > a fixed point value in 64bits, which Q31.32 format. > > Signed-off-by: Shengjiu Wang > --- > Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst | 6 ++ >

Re: [RFC PATCH v7 09/13] media: uapi: Add V4L2_CTRL_CLASS_M2M_AUDIO

2023-10-25 Thread Hans Verkuil
On 20/10/2023 11:30, Shengjiu Wang wrote: > The Audio M2M class includes controls for audio memory-to-memory > use cases. The controls can be used for audio codecs, audio > preprocessing, audio postprocessing. > > Signed-off-by: Shengjiu Wang > --- > .../userspace-api/media/v4l/common.rst

Re: [RFC PATCH v7 06/13] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-10-25 Thread Hans Verkuil
On 20/10/2023 11:30, Shengjiu Wang wrote: > V4L2_CAP_AUDIO_M2M is similar to V4L2_CAP_VIDEO_M2M flag. > > It is used for audio memory to memory case. > > Signed-off-by: Shengjiu Wang > --- > Documentation/userspace-api/media/v4l/vidioc-querycap.rst| 3 +++ >

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-19 Thread Hans Verkuil
On 19/10/2023 12:44, Shengjiu Wang wrote: > On Wed, Oct 18, 2023 at 3:58 PM Hans Verkuil wrote: >> >> On 18/10/2023 09:40, Shengjiu Wang wrote: >>> On Wed, Oct 18, 2023 at 3:31 PM Hans Verkuil wrote: >>>> >>>> On 18/10/2023 09:23, Shengjiu Wa

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-18 Thread Hans Verkuil
On 18/10/2023 15:50, Shengjiu Wang wrote: > On Wed, Oct 18, 2023 at 9:09 PM Hans Verkuil wrote: >> >> On 18/10/2023 14:52, Shengjiu Wang wrote: >>> On Wed, Oct 18, 2023 at 3:58 PM Hans Verkuil wrote: >>>> >>>> On 18/10/2023 09:40, Shengjiu Wang w

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-18 Thread Hans Verkuil
On 18/10/2023 14:52, Shengjiu Wang wrote: > On Wed, Oct 18, 2023 at 3:58 PM Hans Verkuil wrote: >> >> On 18/10/2023 09:40, Shengjiu Wang wrote: >>> On Wed, Oct 18, 2023 at 3:31 PM Hans Verkuil wrote: >>>> >>>> On 18/10/2023 09:23, Shengjiu Wa

Re: [RFC PATCH v6 10/11] media: imx-asrc: Add memory to memory driver

2023-10-18 Thread Hans Verkuil
On 18/10/2023 14:53, Shengjiu Wang wrote: > On Mon, Oct 16, 2023 at 10:01 PM Hans Verkuil wrote: >> >> On 13/10/2023 10:31, Shengjiu Wang wrote: >>> Implement the ASRC memory to memory function using >>> the v4l2 framework, user can use this function with >&

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-18 Thread Hans Verkuil
On 18/10/2023 09:40, Shengjiu Wang wrote: > On Wed, Oct 18, 2023 at 3:31 PM Hans Verkuil wrote: >> >> On 18/10/2023 09:23, Shengjiu Wang wrote: >>> On Wed, Oct 18, 2023 at 10:27 AM Shengjiu Wang >>> wrote: >>>> >>>> On Tue, Oct 17, 2023

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-18 Thread Hans Verkuil
On 18/10/2023 09:23, Shengjiu Wang wrote: > On Wed, Oct 18, 2023 at 10:27 AM Shengjiu Wang > wrote: >> >> On Tue, Oct 17, 2023 at 9:37 PM Hans Verkuil wrote: >>> >>> On 17/10/2023 15:11, Shengjiu Wang wrote: >>>> On Mon, Oct 16, 2023 at 9:16

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-17 Thread Hans Verkuil
On 17/10/2023 15:11, Shengjiu Wang wrote: > On Mon, Oct 16, 2023 at 9:16 PM Hans Verkuil wrote: >> >> Hi Shengjiu, >> >> On 13/10/2023 10:31, Shengjiu Wang wrote: >>> Fixed point controls are used by the user to configure >>> the audio sample rate to

Re: [RFC PATCH v6 11/11] media: viaudm2m: add virtual driver for audio memory to memory

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > Audio memory to memory virtual driver use video memory to memory > virtual driver vim2m.c as example. The main difference is > device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. > > The device_run function is a dummy function,

Re: [RFC PATCH v6 10/11] media: imx-asrc: Add memory to memory driver

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > Implement the ASRC memory to memory function using > the v4l2 framework, user can use this function with > v4l2 ioctl interface. > > User send the output and capture buffer to driver and > driver store the converted data to the capture buffer. > > This

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-16 Thread Hans Verkuil
Hi Shengjiu, On 13/10/2023 10:31, Shengjiu Wang wrote: > Fixed point controls are used by the user to configure > the audio sample rate to driver. > > Add V4L2_CID_ASRC_SOURCE_RATE and V4L2_CID_ASRC_DEST_RATE > new IDs for ASRC rate control. > > Signed-off-by: Shengjiu Wang > --- >

Re: [RFC PATCH v6 08/11] media: uapi: define audio sample format fourcc type

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > The audio sample format definition is from alsa, > the header file is include/uapi/sound/asound.h, but > don't include this header file directly, because in > user space, there is another copy in alsa-lib. > There will be conflict in userspace for

Re: [RFC PATCH v6 07/11] media: v4l2: Add audio capture and output support

2023-10-16 Thread Hans Verkuil
On 13/10/2023 10:31, Shengjiu Wang wrote: > Audio signal processing has the requirement for memory to > memory similar as Video. > > This patch is to add this support in v4l2 framework, defined > new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and > V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format

Re: [RFC PATCH v5 11/11] media: audm2m: add virtual driver for audio memory to memory

2023-10-09 Thread Hans Verkuil
On 28/09/2023 11:00, Shengjiu Wang wrote: > Audio memory to memory virtual driver use video memory to memory > virtual driver vim2m.c as example. The main difference is > device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. > > The device_run function is a dummy function,

Re: [RFC PATCH v5 09/11] media: uapi: define audio sample format fourcc type

2023-10-09 Thread Hans Verkuil
Hi Shengjiu, On 28/09/2023 11:00, Shengjiu Wang wrote: > The audio sample format definition is from alsa, > the header file is include/uapi/sound/asound.h, but > don't include this header file directly, because in > user space, there is another copy in alsa-lib. > There will be conflict in

Re: [RFC PATCH v5 08/11] media: uapi: Add audio rate controls support

2023-10-09 Thread Hans Verkuil
On 28/09/2023 11:00, Shengjiu Wang wrote: > Audio rate controls is used for user to configure is -> are for -> by the > the audio sample rate to driver. > > Add V4L2_CID_ASRC_SOURCE_RATE and V4L2_CID_ASRC_DEST_RATE > new ID for ASRC rate control. ID -> IDs > > Signed-off-by: Shengjiu Wang >

Re: [RFC PATCH v5 07/11] media: v4l2: Add audio capture and output support

2023-10-09 Thread Hans Verkuil
On 28/09/2023 11:00, Shengjiu Wang wrote: > Audio signal processing has the requirement for memory to > memory similar as Video. > > This patch is to add this support in v4l2 framework, defined > new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and > V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-22 Thread Hans Verkuil
On 22/09/2023 12:52, Shengjiu Wang wrote: > On Fri, Sep 22, 2023 at 4:54 PM Hans Verkuil wrote: >> >> Hi Shengjiu, >> >> On 22/09/2023 04:51, Shengjiu Wang wrote: >>> On Thu, Sep 21, 2023 at 10:09 PM Hans Verkuil wrote: >>>> >>>> On

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-22 Thread Hans Verkuil
Hi Shengjiu, On 22/09/2023 04:51, Shengjiu Wang wrote: > On Thu, Sep 21, 2023 at 10:09 PM Hans Verkuil wrote: >> >> On 21/09/2023 13:13, Shengjiu Wang wrote: >>> On Thu, Sep 21, 2023 at 3:11 PM Hans Verkuil wrote: >>>> >>>> On 21/09/2023 08:55,

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-21 Thread Hans Verkuil
On 21/09/2023 13:13, Shengjiu Wang wrote: > On Thu, Sep 21, 2023 at 3:11 PM Hans Verkuil wrote: >> >> On 21/09/2023 08:55, Shengjiu Wang wrote: >>> On Wed, Sep 20, 2023 at 6:19 PM Hans Verkuil wrote: >>>> >>>> On 20/09/2023 11:32, Shengjiu Wang w

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-21 Thread Hans Verkuil
On 21/09/2023 08:55, Shengjiu Wang wrote: > On Wed, Sep 20, 2023 at 6:19 PM Hans Verkuil wrote: >> >> On 20/09/2023 11:32, Shengjiu Wang wrote: >>> The input clock and output clock may not be the accurate >>> rate as the sample rate, there is some drift, so t

Re: [RFC PATCH v4 01/11] ASoC: fsl_asrc: define functions for memory to memory usage

2023-09-20 Thread Hans Verkuil
On 20/09/2023 11:32, Shengjiu Wang wrote: > ASRC can be used on memory to memory case, define several > functions for m2m usage. > > m2m_start_part_one: first part of the start steps > m2m_start_part_two: second part of the start steps > m2m_stop_part_one: first part of stop steps >

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-20 Thread Hans Verkuil
On 20/09/2023 11:32, Shengjiu Wang wrote: > The input clock and output clock may not be the accurate > rate as the sample rate, there is some drift, so the convert > ratio of i.MX ASRC module need to be changed according to > actual clock rate. > > Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control for

Re: [RFC PATCH v3 6/9] media: v4l2: Add audio capture and output support

2023-09-20 Thread Hans Verkuil
Hi Shengjiu, I just noticed you posted a v4, but I expect that my comments below are still valid... On 14/09/2023 07:54, Shengjiu Wang wrote: > Audio signal processing has the requirement for memory to > memory similar as Video. > > This patch is to add this support in v4l2 framework, defined

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-25 Thread Hans Verkuil
On 25/08/2023 15:54, Takashi Iwai wrote: > On Fri, 25 Aug 2023 05:46:43 +0200, > Shengjiu Wang wrote: >> >> On Fri, Aug 25, 2023 at 4:21 AM Mark Brown wrote: >>> >>> On Thu, Aug 24, 2023 at 07:03:09PM +0200, Takashi Iwai wrote: Shengjiu Wang wrote: >>> > But there are several issues:

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-04 Thread Hans Verkuil
On 04/08/2023 14:19, Shengjiu Wang wrote: > On Wed, Aug 2, 2023 at 8:28 PM Hans Verkuil wrote: >> >> On 02/08/2023 14:02, Shengjiu Wang wrote: >>> On Wed, Aug 2, 2023 at 7:22 PM Takashi Iwai wrote: >>>> >>>> On Wed, 02 Aug 2023 09:32:37 +0

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-02 Thread Hans Verkuil
On 02/08/2023 14:02, Shengjiu Wang wrote: > On Wed, Aug 2, 2023 at 7:22 PM Takashi Iwai wrote: >> >> On Wed, 02 Aug 2023 09:32:37 +0200, >> Hans Verkuil wrote: >>> >>> Hi all, >>> >>> On 25/07/2023 08:12, Shengjiu Wang wrote: &g

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-02 Thread Hans Verkuil
Hi all, On 25/07/2023 08:12, Shengjiu Wang wrote: > Audio signal processing has the requirement for memory to > memory similar as Video. > > This patch is to add this support in v4l2 framework, defined > new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and > V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new

Re: [PATCH v4 11/18] media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

2023-07-18 Thread Hans Verkuil
up all occurrences of FBINFO_DEFAULT, the token will be removed. > > v2: > * fix commit message (Miguel) > > Signed-off-by: Thomas Zimmermann > Acked-by: Sam Ravnborg > Cc: Andy Walls > Cc: Mauro Carvalho Chehab > Cc: Hans Verkuil > --- > drivers/media/pc

Re: [PATCH 1/6] media: v4l2: Add audio capture and output support

2023-07-03 Thread Hans Verkuil
On 03/07/2023 14:53, Mark Brown wrote: > On Mon, Jul 03, 2023 at 02:07:10PM +0200, Takashi Iwai wrote: >> Shengjiu Wang wrote: > >>> There is no such memory to memory interface defined in ALSA.  Seems >>> ALSA is not designed for M2M cases. > >> There is no restriction to implement

Re: [PATCH 1/6] media: v4l2: Add audio capture and output support

2023-07-03 Thread Hans Verkuil
On 03/07/2023 11:54, Shengjiu Wang wrote: > Hi Sakari > > On Fri, Jun 30, 2023 at 6:05 PM Sakari Ailus > wrote: > > Hi Shengjiu, > > On Thu, Jun 29, 2023 at 09:37:48AM +0800, Shengjiu Wang wrote: > > Audio signal processing has the requirement for memory

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-29 Thread Hans Verkuil
On 29/11/2022 09:48, David Hildenbrand wrote: > On 28.11.22 23:59, Andrew Morton wrote: >> On Mon, 28 Nov 2022 09:18:47 +0100 David Hildenbrand >> wrote: >> Less chances of things going wrong that way. Just mention in the v2 cover letter that the first patch was added to make

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-28 Thread Hans Verkuil
On 28/11/2022 09:18, David Hildenbrand wrote: > On 28.11.22 09:17, Hans Verkuil wrote: >> Hi David, >> >> On 27/11/2022 11:35, David Hildenbrand wrote: >>> On 16.11.22 11:26, David Hildenbrand wrote: >>>> FOLL_FORCE is really only for ptrace access. Acc

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-28 Thread Hans Verkuil
ble"). Let's just remove it. >> >> Once the read-only buffer issue has been resolved, FOLL_WRITE could >> again be set depending on the DMA direction. >> >> Cc: Hans Verkuil >> Cc: Marek Szyprowski >> Cc: Tomasz Figa >> Cc: Marek Sz

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
On 23/11/2022 14:26, Hans Verkuil wrote: > Hi David, Tomasz, > > On 16/11/2022 11:26, David Hildenbrand wrote: >> FOLL_FORCE is really only for ptrace access. According to commit >> 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are always >&

Re: [PATCH mm-unstable v1 16/20] mm/frame-vector: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
gacy leftover as it predates > commit 707947247e95 ("media: videobuf2-vmalloc: get_userptr: buffers are > always writable"). Let's just remove it. > > Once the read-only buffer issue has been resolved, FOLL_WRITE could > again be set depending on the DMA direction. > >

Re: [PATCH mm-unstable v1 15/20] media: pci/ivtv: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
reason to allow arbitrary drivers to R/O pin pages in a PROT_NONE > VMA. Most probably, FOLL_FORCE usage is just some legacy leftover. I'm pretty sure about that as well, so: Acked-by: Hans Verkuil Regards, Hans > > Cc: Andy Walls > Cc: Mauro Carvalho Chehab > Si

Re: [PATCH mm-unstable v1 13/20] media: videobuf-dma-sg: remove FOLL_FORCE usage

2022-11-23 Thread Hans Verkuil
; > Cc: Mauro Carvalho Chehab > Signed-off-by: David Hildenbrand Acked-by: Hans Verkuil Looks good! Hans > --- > drivers/media/v4l2-core/videobuf-dma-sg.c | 14 +- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/drivers/media/v4l2-

Re: [RESEND PATCH v2 8/9] media: fsl-viu: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-12 Thread Hans Verkuil
an be converted to a "const" version for const-safety and > consistency among architectures. > > Signed-off-by: Krzysztof Kozlowski Acked-by: Hans Verkuil Regards, Hans > --- > drivers/media/platform/fsl-viu.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 13/18] media/v4l2-core: pin_longterm_pages (FOLL_PIN) and put_user_page() conversion

2019-11-10 Thread Hans Verkuil
age() call over to > put_user_pages_dirty_lock(). > > Reviewed-by: Ira Weiny > Cc: Mauro Carvalho Chehab > Signed-off-by: John Hubbard Acked-by: Hans Verkuil Looks good, thanks! Hans > --- > drivers/media/v4l2-core/videobuf-dma-sg.c | 13 + > 1 fil

Re: [PATCH v2 04/18] media/v4l2-core: set pages dirty upon releasing DMA buffers

2019-11-10 Thread Hans Verkuil
without any set_page_dirty*() call. > > Fix the problem, by calling set_page_dirty_lock() if the CPU pages > were potentially receiving data from the device. > > Cc: Mauro Carvalho Chehab > Signed-off-by: John Hubbard Acked-by: Hans Verkuil Looks good, thanks! Hans > --- &g

Re: [PATCH] media: fsl-viu: Use proper check for presence of {out,in}_be32()

2019-01-18 Thread Hans Verkuil
gt;> above checks work. >> >> Fixes: 29d750686331a1a9 ("media: fsl-viu: allow building it with >> COMPILE_TEST") >> Signed-off-by: Geert Uytterhoeven > > Reviewed-by: Hans Verkuil > > Should this go through the media tree or powerpc tree? Eith

Re: [RFC] mm: Replace all open encodings for NUMA_NO_NODE

2018-11-12 Thread Hans Verkuil
On 11/12/2018 03:41 AM, Anshuman Khandual wrote: > At present there are multiple places where invalid node number is encoded > as -1. Even though implicitly understood it is always better to have macros > in there. Replace these open encodings for an invalid node number with the > global macro

Re: [PATCH] media: fsl-viu: Use proper check for presence of {out,in}_be32()

2018-06-15 Thread Hans Verkuil
a9 ("media: fsl-viu: allow building it with > COMPILE_TEST") > Signed-off-by: Geert Uytterhoeven Reviewed-by: Hans Verkuil Should this go through the media tree or powerpc tree? Either way works for me. Regards, Hans > --- > Compile-tested on m68k, microblaze,

Re: [PATCH 19/51] DMA-API: media: dt3155v4l: replace dma_set_mask()+dma_set_coherent_mask() with new helper

2013-10-04 Thread Hans Verkuil
On 09/19/2013 11:44 PM, Russell King wrote: Replace the following sequence: dma_set_mask(dev, mask); dma_set_coherent_mask(dev, mask); with a call to the new helper dma_set_mask_and_coherent(). Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk Acked-by: Hans Verkuil