Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20072334rwd; Wed, 28 Jun 2023 19:35:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GH6ClfYMNxdop1vxdANFalKsJqDUJr5cMuH0F3ZT0/yKflNT/l3vgOej+u8nDw20PWz1q X-Received: by 2002:a05:620a:414d:b0:765:4864:b414 with SMTP id k13-20020a05620a414d00b007654864b414mr22911958qko.22.1688006103429; Wed, 28 Jun 2023 19:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688006103; cv=none; d=google.com; s=arc-20160816; b=Jp4zIoeP5JhG9kqLQCiHi00BetmFn9/+vl6HPtWm4ZdBDvLERRv4pFDK04nWsAVulN GHP0TzACGnQR/XpBdzCktNwSyb+/BKpm6/GwIGRaK82QQu1LNh1jAZF67Zpjox5SdCBG /5EJwdn4OcW0gBuVbLRocsRUsj4P/0VxFXnv51k1wwP1ZQGY9Y1atbdZutvs8Q5rqxJN z8Vo5Qe/2mMCaYN/w5PBzdVBXs+QgJHBC8Ck94eCpiie46MGs50aDRIEvwdB6b92ttcr R/xDaGE0uNfPWpfDfMidjHAFDGEoDb1YF0UpbKTdAwsioBW8o8SEq0ayD1zCowqiEOnB CY0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:to:from; bh=mKKtLdKMUYCVmAfgqbMIVzc5rVNT5Z4Ab65Q85wWDv0=; fh=wqCnLC59fNJLqJJs3/NMi5/oD30IP5JQsz1JrCsHxko=; b=gxkcUDc4BmxC5ZCYai0VWj2iptooEuuGSQ1G/M+M+vGm2DKmV5HA+00yvNrH/q7dc/ C1ec5iZy7rmps5DZfAIHjKpiIjNFK4L1rfvPoT2NhBODb3kBFrHwmdZI6rpmtZ781aK7 Dz0qdqrPqLuB3qNRdDXyLerwznxCPHIMJZHlU1bFi/o8d9ZZu/JsUsoA1kTr+v3XznuW tJ8OlynhTxPoYagDjPTh6Lt0dLzHvhq2VE8Sm0xz8Ll+bpgrUiTed/l5WXLgFZVOHZKq EaEGeUYJR5k96VslYw64mpr65k040LOVHYSRzFMgxCC/aG11Ou32vAALTa/GEEMDBrzE ejeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nh4-20020a17090b364400b00262fe4585f3si5909853pjb.150.2023.06.28.19.34.48; Wed, 28 Jun 2023 19:35:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231563AbjF2CQu (ORCPT + 99 others); Wed, 28 Jun 2023 22:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbjF2CQr (ORCPT ); Wed, 28 Jun 2023 22:16:47 -0400 X-Greylist: delayed 373 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 28 Jun 2023 19:16:46 PDT Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 895A710D7; Wed, 28 Jun 2023 19:16:46 -0700 (PDT) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 75EE61A0D8D; Thu, 29 Jun 2023 04:10:32 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3E24D1A0D8C; Thu, 29 Jun 2023 04:10:32 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 7BE20181D0E5; Thu, 29 Jun 2023 10:10:30 +0800 (+08) From: Shengjiu Wang To: tfiga@chromium.org, m.szyprowski@samsung.com, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 0/6] Add audio support in v4l2 framework Date: Thu, 29 Jun 2023 09:37:47 +0800 Message-Id: <1688002673-28493-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 v4l2_audio_format for audio case usage. The created audio device is named "/dev/audioX". And add memory to memory support for two kinds of i.MX ASRC module Shengjiu Wang (6): media: v4l2: Add audio capture and output support ASoC: fsl_asrc: define functions for memory to memory usage ASoC: fsl_easrc: define functions for memory to memory usage ASoC: fsl_asrc: Add memory to memory driver ASoC: fsl_asrc: enable memory to memory function ASoC: fsl_easrc: enable memory to memory function .../media/common/videobuf2/videobuf2-v4l2.c | 4 + drivers/media/v4l2-core/v4l2-dev.c | 17 + drivers/media/v4l2-core/v4l2-ioctl.c | 52 ++ include/media/v4l2-dev.h | 2 + include/media/v4l2-ioctl.h | 34 + include/uapi/linux/videodev2.h | 19 + sound/soc/fsl/Kconfig | 13 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_asrc.c | 175 +++- sound/soc/fsl/fsl_asrc.h | 2 + sound/soc/fsl/fsl_asrc_common.h | 54 ++ sound/soc/fsl/fsl_asrc_m2m.c | 878 ++++++++++++++++++ sound/soc/fsl/fsl_asrc_m2m.h | 48 + sound/soc/fsl/fsl_easrc.c | 255 ++++- sound/soc/fsl/fsl_easrc.h | 6 + 15 files changed, 1557 insertions(+), 4 deletions(-) create mode 100644 sound/soc/fsl/fsl_asrc_m2m.c create mode 100644 sound/soc/fsl/fsl_asrc_m2m.h -- 2.34.1