[PATCH V4 0/4] update supported sample format

2019-09-24 Thread Shengjiu Wang
This patch serial is to update the supported format for fsl_asrc and fix some format issue. Shengjiu Wang (4): ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width ASoC: fsl_asrc: update supported sample format ASoC: pcm_dmaengine: Extract

[PATCH V4 1/4] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width

2019-09-24 Thread Shengjiu Wang
snd_pcm_format_t is more formal than enum asrc_word_width, which has two property, width and physical width, which is more accurate than enum asrc_word_width. So it is better to use in(out)put_format instead of in(out)put_word_width. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

[PATCH V4 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2019-09-24 Thread Shengjiu Wang
need this feature can call this function. Signed-off-by: Shengjiu Wang --- include/sound/dmaengine_pcm.h | 5 ++ sound/core/pcm_dmaengine.c| 83 +++ sound/soc/soc-generic-dmaengine-pcm.c | 61 ++-- 3 files changed, 94 insertions(+), 55

[PATCH V4 4/4] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-24 Thread Shengjiu Wang
of dma, then update the hw parameters according to the caps. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 4 +-- sound/soc/fsl/fsl_asrc.h | 3 ++ sound/soc/fsl/fsl_asrc_dma.c | 59 +++- 3 files changed, 56 insertions(+), 10 deletions(-) di

[PATCH V5 0/4] update supported sample format

2019-09-25 Thread Shengjiu Wang
This patch serial is to update the supported format for fsl_asrc and fix some format issue. Shengjiu Wang (4): ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width ASoC: fsl_asrc: update supported sample format ASoC: pcm_dmaengine: Extract

[PATCH V5 2/4] ASoC: fsl_asrc: update supported sample format

2019-09-25 Thread Shengjiu Wang
with S24_3LE in supported list and add S8 format in TX supported list Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_asrc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 4d3804a1ea55

[PATCH V5 1/4] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width

2019-09-25 Thread Shengjiu Wang
snd_pcm_format_t is more formal than enum asrc_word_width, which has two property, width and physical width, which is more accurate than enum asrc_word_width. So it is better to use in(out)put_format instead of in(out)put_word_width. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

[PATCH V5 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2019-09-25 Thread Shengjiu Wang
need this feature can call this function. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen --- include/sound/dmaengine_pcm.h | 5 ++ sound/core/pcm_dmaengine.c| 83 +++ sound/soc/soc-generic-dmaengine-pcm.c | 61 ++-- 3 files

[PATCH V5 4/4] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-25 Thread Shengjiu Wang
of dma, then update the hw parameters according to the caps. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 4 +-- sound/soc/fsl/fsl_asrc.h | 3 ++ sound/soc/fsl/fsl_asrc_dma.c | 66 +++- 3 files changed, 63 insertions(+), 10 deletions(-) di

[PATCH V6 0/4] update supported sample format

2019-09-26 Thread Shengjiu Wang
This patch serial is to update the supported format for fsl_asrc and fix some format issue Shengjiu Wang (4): ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width ASoC: fsl_asrc: update supported sample format ASoC: pcm_dmaengine: Extract

[PATCH V6 2/4] ASoC: fsl_asrc: update supported sample format

2019-09-26 Thread Shengjiu Wang
with S24_3LE in supported list and add S8 format in TX supported list Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_asrc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 4d3804a1ea55

[PATCH V6 1/4] ASoC: fsl_asrc: Use in(out)put_format instead of in(out)put_word_width

2019-09-26 Thread Shengjiu Wang
snd_pcm_format_t is more formal than enum asrc_word_width, which has two property, width and physical width, which is more accurate than enum asrc_word_width. So it is better to use in(out)put_format instead of in(out)put_word_width. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen

[PATCH V6 3/4] ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams

2019-09-26 Thread Shengjiu Wang
need this feature can call this function. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen --- include/sound/dmaengine_pcm.h | 5 ++ sound/core/pcm_dmaengine.c| 83 +++ sound/soc/soc-generic-dmaengine-pcm.c | 61 ++-- 3 files

[PATCH V6 4/4] ASoC: fsl_asrc: Fix error with S24_3LE format bitstream in i.MX8

2019-09-26 Thread Shengjiu Wang
of dma, then update the hw parameters according to the caps. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 4 +-- sound/soc/fsl/fsl_asrc.h | 3 ++ sound/soc/fsl/fsl_asrc_dma.c | 64 3 files changed, 62 insertions(+), 9 deletions(-) di

[PATCH] ASoC: fsl_asrc: refine the setting of internal clock divider

2019-10-16 Thread Shengjiu Wang
setting not correct. For non-ideal ratio mode, the clock rate should divide the sample rate with no remainder, and the quotient should be less than 1024. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 40 +++- 1 file changed, 31 insertions(+), 9

[PATCH] ASoC: fsl: imx-pcm-rpmsg: Add SNDRV_PCM_INFO_BATCH flag

2023-09-11 Thread Shengjiu Wang
d on time. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/imx-pcm-rpmsg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c index d63782b8bdef..bb736d45c9e0 100644 --- a/sound/soc/fsl/imx-pcm-rpmsg.c +++ b/sound/soc/fsl/imx-pcm-rpmsg.c

Re: [PATCH] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link

2023-09-12 Thread Shengjiu Wang
On Tue, Sep 12, 2023 at 2:34 PM Chancel Liu wrote: > > i.MX rpmsg sound cards work on codec slave mode. MCLK will be disabled > by CPU DAI driver in hw_free(). Some codec requires MCLK present at > power up/down sequence. So need to set ignore_pmdown_time to power down > codec immediately before M

Re: [PATCH v2] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link

2023-09-13 Thread Shengjiu Wang
ediately before MCLK is turned off. > > Take WM8962 as an example, if MCLK is disabled before DAPM power down > playback stream, FIFO error will arise in WM8962 which will have bad > impact on playback next. > > Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang Best regards Wan

[RFC PATCH v3 0/9] Add audio support in v4l2 framework

2023-09-13 Thread Shengjiu Wang
e memory to memory driver as a platfrom driver and move it to driver/media - move fsl_asrc_common.h to include/sound folder Shengjiu Wang (9): ASoC: fsl_asrc: define functions for memory to memory usage ASoC: fsl_easrc: define functions for memory to memory usage ASoC: fsl_asrc: move fsl_

[RFC PATCH v3 2/9] ASoC: fsl_easrc: define functions for memory to memory usage

2023-09-13 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 226 ++ sound/soc/fsl/fsl_easrc.h | 6 + 2 files changed, 232 insertions

[RFC PATCH v3 1/9] ASoC: fsl_asrc: define functions for memory to memory usage

2023-09-13 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c| 150 sound/soc/fsl/fsl_asrc.h| 2 + sound/soc/fsl/fsl_asrc_common.h | 42 + 3 files changed, 194 insertions(+) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index

[RFC PATCH v3 3/9] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-09-13 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c

[RFC PATCH v3 4/9] ASoC: fsl_asrc: register m2m platform device

2023-09-13 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang --- include/sound/fsl_asrc_common.h | 12 sound/soc/fsl/fsl_asrc.c| 12 2 files changed, 24 insertions(+) diff

[RFC PATCH v3 5/9] ASoC: fsl_easrc: register m2m platform device

2023-09-13 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index f517b407672d..b719d517f9b4 100644 --- a/sound/soc

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

2023-09-13 Thread Shengjiu Wang
V4L2_AUDIO_FMT_LPCM format type for audio. Defined V4L2_CAP_AUDIO_M2M capability type for audio memory to memory case. The created audio device is named "/dev/v4l-audioX". Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/audio-formats.rst | 15 + .../userspace-api/media/v4l/

[RFC PATCH v3 7/9] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-13 Thread Shengjiu Wang
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 user to adjust the ratio. Signed-off-by: Shengjiu

[RFC PATCH v3 8/9] media: audm2m: add virtual driver for audio memory to memory

2023-09-13 Thread Shengjiu Wang
output buffer. Signed-off-by: Shengjiu Wang --- drivers/media/test-drivers/Kconfig | 9 + drivers/media/test-drivers/Makefile | 1 + drivers/media/test-drivers/audm2m.c | 767 3 files changed, 777 insertions(+) create mode 100644 drivers/media/test-drivers/audm2m.c

[RFC PATCH v3 9/9] media: imx-asrc: Add memory to memory driver

2023-09-13 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- drivers/media/platform/nxp/Kconfig| 12 + drivers/media/platform/nxp/Makefile |1 + drivers/media/platform/nxp/imx-asrc.c | 1058 + 3 files changed, 1071 insertions(+) create mode 100644 drivers/media/platform/nxp/imx-asrc.c diff --git

[PATCH] ASoC: imx-audmix: Fix return error with devm_clk_get()

2023-09-14 Thread Shengjiu Wang
ned-off-by: Shengjiu Wang --- sound/soc/fsl/imx-audmix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 0b58df56f4da..aeb81aa61184 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -315,7 +315,7

[PATCH] ASoC: fsl_sai: Don't disable bitclock for i.MX8MP

2023-09-19 Thread Shengjiu Wang
bit clock with transmitter") Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_sai.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 1e4020fae05a..8a9a30dd31e2 100644 --- a/sound/soc/fsl/fsl_sai.c +++

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

2023-09-19 Thread Shengjiu Wang
On Thu, Sep 14, 2023 at 6:17 PM Sakari Ailus wrote: > > Hi Shenjiu, > > Thanks for the update. > > On Thu, Sep 14, 2023 at 01:54:02PM +0800, Shengjiu Wang wrote: > > Audio signal processing has the requirement for memory to > > memory similar as Video. > > >

[RFC PATCH v4 00/11] Add audio support in v4l2 framework

2023-09-20 Thread Shengjiu Wang
n in v4l-utils, pass v4l2-compliance test. changes in v2: - decouple the implementation in v4l2 and ALSA - implement the memory to memory driver as a platfrom driver and move it to driver/media - move fsl_asrc_common.h to include/sound folder Shengjiu Wang (11): ASoC: fsl_asrc: define functions for m

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

2023-09-20 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c| 150 sound/soc/fsl/fsl_asrc.h| 2 + sound/soc/fsl/fsl_asrc_common.h | 42 + 3 files changed, 194 insertions(+) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index

[RFC PATCH v4 02/11] ASoC: fsl_easrc: define functions for memory to memory usage

2023-09-20 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 226 ++ sound/soc/fsl/fsl_easrc.h | 6 + 2 files changed, 232 insertions

[RFC PATCH v4 03/11] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-09-20 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c

[RFC PATCH v4 04/11] ASoC: fsl_asrc: register m2m platform device

2023-09-20 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang --- include/sound/fsl_asrc_common.h | 12 sound/soc/fsl/fsl_asrc.c| 12 2 files changed, 24 insertions(+) diff

[RFC PATCH v4 05/11] ASoC: fsl_easrc: register m2m platform device

2023-09-20 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index f517b407672d..b719d517f9b4 100644 --- a/sound/soc

[RFC PATCH v4 06/11] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-09-20 Thread Shengjiu Wang
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 +++ Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux

[RFC PATCH v4 07/11] media: uapi: Add V4L2_AUDIO_FMT_LPCM fourcc format

2023-09-20 Thread Shengjiu Wang
Linear Pulse-Code Modulation is used to represent audio samples in buffer, the samples for each channel are interleaved. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/audio-formats.rst | 15 + .../media/v4l/pixfmt-aud-lpcm.rst | 61

[RFC PATCH v4 08/11] media: v4l2: Add audio capture and output support

2023-09-20 Thread Shengjiu Wang
device is named "/dev/v4l-audioX". Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/buffer.rst| 6 ++ .../userspace-api/media/v4l/dev-audio.rst | 63 +++ .../userspace-api/media/v4l/devices.rst | 1 + .../media/v4l/vidioc-en

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

2023-09-20 Thread Shengjiu Wang
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 user to adjust the ratio. Signed-off-by: Shengjiu

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

2023-09-20 Thread Shengjiu Wang
output buffer. Signed-off-by: Shengjiu Wang --- drivers/media/test-drivers/Kconfig | 9 + drivers/media/test-drivers/Makefile | 1 + drivers/media/test-drivers/audm2m.c | 767 3 files changed, 777 insertions(+) create mode 100644 drivers/media/test-drivers/audm2m.c

[RFC PATCH v4 11/11] media: imx-asrc: Add memory to memory driver

2023-09-20 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- drivers/media/platform/nxp/Kconfig| 12 + drivers/media/platform/nxp/Makefile |1 + drivers/media/platform/nxp/imx-asrc.c | 1058 + 3 files changed, 1071 insertions(+) create mode 100644 drivers/media/platform/nxp/imx-asrc.c diff --git

[PATCH] ASoC: fsl-asoc-card: use integer type for fll_id and pll_id

2023-09-20 Thread Shengjiu Wang
probe, the output sound frequency is wrong. So change the fll_id and pll_id initial value, still keep machine driver's behavior same as before. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl-asoc-card.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/so

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

2023-09-20 Thread Shengjiu Wang
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 the convert > > ratio of i.MX ASRC module need to be changed

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

2023-09-21 Thread Shengjiu Wang
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 wrote: > >>> The input clock and output clock may no

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

2023-09-21 Thread Shengjiu Wang
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, Shengjiu Wang wrote: > >>> On Wed, Sep 20, 2023 at 6:19 PM Hans Verk

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

2023-09-22 Thread Shengjiu Wang
On Wed, Sep 20, 2023 at 6:12 PM Hans Verkuil wrote: > > 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 memo

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

2023-09-22 Thread Shengjiu Wang
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 21/09/2023 13:13, Shengjiu Wang wrote: > >>> On

[RFC PATCH v5 00/11] Add audio support in v4l2 framework

2023-09-28 Thread Shengjiu Wang
ges in v2: - decouple the implementation in v4l2 and ALSA - implement the memory to memory driver as a platfrom driver and move it to driver/media - move fsl_asrc_common.h to include/sound folder Shengjiu Wang (11): ASoC: fsl_asrc: define functions for memory to memory usage ASoC: fsl_easrc: def

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

2023-09-28 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c| 118 sound/soc/fsl/fsl_asrc.h| 2 + sound/soc/fsl/fsl_asrc_common.h | 35 ++ 3 files changed, 155 insertions(+) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index

[RFC PATCH v5 02/11] ASoC: fsl_easrc: define functions for memory to memory usage

2023-09-28 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 195 ++ sound/soc/fsl/fsl_easrc.h | 6 ++ 2 files changed, 201 insertions

[RFC PATCH v5 03/11] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-09-28 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c

[RFC PATCH v5 04/11] ASoC: fsl_asrc: register m2m platform device

2023-09-28 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang --- include/sound/fsl_asrc_common.h | 23 +++ sound/soc/fsl/fsl_asrc.c| 18 ++ 2 files changed, 41

[RFC PATCH v5 05/11] ASoC: fsl_easrc: register m2m platform device

2023-09-28 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 50aee04e7915..cf1f559e825c 100644 --- a

[RFC PATCH v5 06/11] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-09-28 Thread Shengjiu Wang
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 +++ Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux

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

2023-09-28 Thread Shengjiu Wang
device is named "/dev/v4l-audioX". Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/buffer.rst| 6 ++ .../media/v4l/dev-audio-mem2mem.rst | 71 +++ .../userspace-api/media/v4l/devices.rst | 1 + .../media/v4l/vidioc-en

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

2023-09-28 Thread Shengjiu Wang
Audio rate controls is used for user to configure the audio sample rate to driver. Add V4L2_CID_ASRC_SOURCE_RATE and V4L2_CID_ASRC_DEST_RATE new ID for ASRC rate control. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/common.rst| 1 + .../media/v4l/ext-ctrls-asrc

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

2023-09-28 Thread Shengjiu Wang
ere still use the fourcc format. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/pixfmt-audio.rst | 277 ++ .../userspace-api/media/v4l/pixfmt.rst| 1 + drivers/media/v4l2-core/v4l2-ioctl.c | 51 include/uapi/linux/videodev2.h

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

2023-09-28 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- drivers/media/platform/nxp/Kconfig| 12 + drivers/media/platform/nxp/Makefile |1 + drivers/media/platform/nxp/imx-asrc.c | 1251 + 3 files changed, 1264 insertions(+) create mode 100644 drivers/media/platform/nxp/imx-asrc.c diff --git

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

2023-09-28 Thread Shengjiu Wang
output buffer. Signed-off-by: Shengjiu Wang --- drivers/media/test-drivers/Kconfig | 9 + drivers/media/test-drivers/Makefile | 1 + drivers/media/test-drivers/audm2m.c | 808 3 files changed, 818 insertions(+) create mode 100644 drivers/media/test-drivers/audm2m.c

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

2023-10-07 Thread Shengjiu Wang
Hi On Mon, Oct 2, 2023 at 11:08 PM Mark Brown wrote: > > On Thu, Sep 28, 2023 at 05:00:09PM +0800, Shengjiu Wang wrote: > > > m2m_start_part_one: first part of the start steps > > m2m_start_part_two: second part of the start steps > > m2m_stop_part_on

Re: [PATCH] ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe

2023-10-08 Thread Shengjiu Wang
On Wed, Oct 4, 2023 at 3:12 PM Zhang Shurong wrote: > > The pm_runtime_enable will increase power disable depth. Thus > a pairing decrement is needed on the error handling path to > keep it balanced according to context. We fix it by calling > pm_runtime_disable when error returns. > Please add a

[RFC PATCH v6 00/11] Add audio support in v4l2 framework

2023-10-13 Thread Shengjiu Wang
dio m2m case. - with modification in v4l-utils, pass v4l2-compliance test. changes in v2: - decouple the implementation in v4l2 and ALSA - implement the memory to memory driver as a platfrom driver and move it to driver/media - move fsl_asrc_common.h to include/sound folder Shengjiu Wang (11): AS

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

2023-10-13 Thread Shengjiu Wang
output length according to input length m2m_get_maxburst: burst size for dma m2m_pair_suspend: suspend function of pair, optional. m2m_pair_resume: resume function of pair get_output_fifo_size: get remaining data size in FIFO Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c| 126

[RFC PATCH v6 02/11] ASoC: fsl_easrc: define functions for memory to memory usage

2023-10-13 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 193 ++ sound/soc/fsl/fsl_easrc.h | 4 + 2 files changed, 197 insertions

[RFC PATCH v6 03/11] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-10-13 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c

[RFC PATCH v6 04/11] ASoC: fsl_asrc: register m2m platform device

2023-10-13 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang --- include/sound/fsl_asrc_common.h | 23 +++ sound/soc/fsl/fsl_asrc.c| 18 ++ 2 files changed, 41

[RFC PATCH v6 05/11] ASoC: fsl_easrc: register m2m platform device

2023-10-13 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index dc603bb383e2..8ba6f045f425 100644 --- a

[RFC PATCH v6 06/11] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-10-13 Thread Shengjiu Wang
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 +++ Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux

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

2023-10-13 Thread Shengjiu Wang
device is named "/dev/v4l-audioX". Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/buffer.rst| 6 ++ .../media/v4l/dev-audio-mem2mem.rst | 71 +++ .../userspace-api/media/v4l/devices.rst | 1 + .../media/v4l/vidioc-en

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

2023-10-13 Thread Shengjiu Wang
ere still use the fourcc format. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/pixfmt-audio.rst | 202 ++ .../userspace-api/media/v4l/pixfmt.rst| 1 + drivers/media/v4l2-core/v4l2-ioctl.c | 36 include/uapi/linux/videodev2.h

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

2023-10-13 Thread Shengjiu Wang
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 --- .../userspace-api/media/v4l/common.rst| 1 + .../media/v4l/ext-ctrls-fixed

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

2023-10-13 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- drivers/media/platform/nxp/Kconfig| 12 + drivers/media/platform/nxp/Makefile |1 + drivers/media/platform/nxp/imx-asrc.c | 1248 + 3 files changed, 1261 insertions(+) create mode 100644 drivers/media/platform/nxp/imx-asrc.c diff --git

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

2023-10-13 Thread Shengjiu Wang
output buffer. Signed-off-by: Shengjiu Wang --- drivers/media/test-drivers/Kconfig| 9 + drivers/media/test-drivers/Makefile | 1 + drivers/media/test-drivers/viaudm2m.c | 707 ++ 3 files changed, 717 insertions(+) create mode 100644 drivers/media/test-drivers

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

2023-10-17 Thread Shengjiu Wang
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 driver. > > > > Add V4L2_CID_ASRC_SOURCE_RATE and V4L2_CID

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

2023-10-17 Thread Shengjiu Wang
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 PM Hans Verkuil wrote: > >> > >> Hi Shengjiu, > >> > >> On 13/10/2023 10:31, Shengjiu Wang wrote: > >>

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

2023-10-18 Thread Shengjiu Wang
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 PM Hans Verkuil wrote: > > >> > > >> Hi Shengji

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

2023-10-18 Thread Shengjiu Wang
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 at 9:37 PM Hans Verkuil wrote: > >>> > >>>

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

2023-10-18 Thread Shengjiu Wang
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 Wang wrote: > >>> On Wed, Oct 18, 2023 at 10:27 AM Shengji

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

2023-10-18 Thread Shengjiu Wang
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 > > v4l2 ioctl interface. > > > > User send the out

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

2023-10-18 Thread Shengjiu Wang
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 wrote: > >>> On Wed, Oct 18, 2023 at 3:31 PM Hans Verk

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

2023-10-19 Thread Shengjiu Wang
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 Wang wrote: > >>> On Wed, Oct 18, 2023 at 10:27 AM Shengji

[RFC PATCH v7 00/13] Add audio support in v4l2 framework

2023-10-20 Thread Shengjiu Wang
changes in v2: - decouple the implementation in v4l2 and ALSA - implement the memory to memory driver as a platfrom driver and move it to driver/media - move fsl_asrc_common.h to include/sound folder Shengjiu Wang (13): ASoC: fsl_asrc: define functions for memory to memory usage ASoC: fsl_

[RFC PATCH v7 01/13] ASoC: fsl_asrc: define functions for memory to memory usage

2023-10-20 Thread Shengjiu Wang
output length according to input length m2m_get_maxburst: burst size for dma m2m_pair_suspend: suspend function of pair, optional. m2m_pair_resume: resume function of pair get_output_fifo_size: get remaining data size in FIFO Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- sound/soc/fsl

[RFC PATCH v7 02/13] ASoC: fsl_easrc: define functions for memory to memory usage

2023-10-20 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- sound/soc/fsl/fsl_easrc.c | 214 ++ sound/soc/fsl/fsl_easrc.h | 4 + 2 files

[RFC PATCH v7 03/13] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-10-20 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dm

[RFC PATCH v7 04/13] ASoC: fsl_asrc: register m2m platform device

2023-10-20 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- include/sound/fsl_asrc_common.h | 23 +++ sound/soc/fsl/fsl_asrc.c| 18 ++ 2

[RFC PATCH v7 05/13] ASoC: fsl_easrc: register m2m platform device

2023-10-20 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- sound/soc/fsl/fsl_easrc.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 0b9f3df8efc2

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

2023-10-20 Thread Shengjiu Wang
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 +++ Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux

[RFC PATCH v7 07/13] media: v4l2: Add audio capture and output support

2023-10-20 Thread Shengjiu Wang
device is named "/dev/v4l-audioX". Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/buffer.rst| 6 ++ .../media/v4l/dev-audio-mem2mem.rst | 71 +++ .../userspace-api/media/v4l/devices.rst | 1 + .../media/v4l/vidioc-en

[RFC PATCH v7 08/13] media: uapi: define audio sample format fourcc type

2023-10-20 Thread Shengjiu Wang
ere still use the fourcc format. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/pixfmt-audio.rst | 87 +++ .../userspace-api/media/v4l/pixfmt.rst| 1 + drivers/media/v4l2-core/v4l2-ioctl.c | 13 +++ include/uapi/linux/videodev2.h

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

2023-10-20 Thread Shengjiu Wang
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| 1 + .../media/v4l/ext-ctrls-audio-m2m.rst

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

2023-10-20 Thread Shengjiu Wang
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 ++ .../userspace-api/media/videodev2.h.rst.exceptions | 1 + drivers/media

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

2023-10-20 Thread Shengjiu Wang
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 --- .../media/v4l/ext-ctrls-audio-m2m.rst | 18

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

2023-10-20 Thread Shengjiu Wang
-off-by: Shengjiu Wang --- drivers/media/platform/nxp/Kconfig| 12 + drivers/media/platform/nxp/Makefile |1 + drivers/media/platform/nxp/imx-asrc.c | 1207 + 3 files changed, 1220 insertions(+) create mode 100644 drivers/media/platform/nxp/imx-asrc.c diff --git

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

2023-10-20 Thread Shengjiu Wang
output buffer. Signed-off-by: Shengjiu Wang --- drivers/media/test-drivers/Kconfig | 9 + drivers/media/test-drivers/Makefile | 1 + drivers/media/test-drivers/vim2m_audio.c | 680 +++ 3 files changed, 690 insertions(+) create mode 100644 drivers/media/test-drivers

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

2023-10-26 Thread Shengjiu Wang
On Wed, Oct 25, 2023 at 6:47 PM Hans Verkuil wrote: > > 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 > > V4L

[RFC PATCH v8 01/13] ASoC: fsl_asrc: define functions for memory to memory usage

2023-10-27 Thread Shengjiu Wang
output length according to input length m2m_get_maxburst: burst size for dma m2m_pair_suspend: suspend function of pair, optional. m2m_pair_resume: resume function of pair get_output_fifo_size: get remaining data size in FIFO Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- sound/soc/fsl

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

2023-10-27 Thread Shengjiu Wang
ned V4L2_CAP_AUDIO_M2M capability type for audio m2m case. - with modification in v4l-utils, pass v4l2-compliance test. changes in v2: - decouple the implementation in v4l2 and ALSA - implement the memory to memory driver as a platfrom driver and move it to driver/media - move fsl_asrc_com

<    1   2   3   4   5   6   7   8   >