From patchwork Fri Sep 11 17:47:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng-yi Chiang X-Patchwork-Id: 11771237 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED07159D for ; Fri, 11 Sep 2020 17:48:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CAF3F21D79 for ; Fri, 11 Sep 2020 17:48:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="hZLjnPgn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lF42bRcP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAF3F21D79 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 271C3166A; Fri, 11 Sep 2020 19:47:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 271C3166A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599846495; bh=m9qj6OgqiYGDXR6Cid54j813sfxp/0roNUVeTtUFrUk=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=hZLjnPgnGFEe7v4rQY6cKbRM/HmVagk9wvwim+Y2Y1OKyoMD4tFr1KWqaa/EpW2BO sZQ6Wqv0dbaObMBuDxVvpktyGbKcNCU6jVBOwO7vXwdQq4scqquzaSlV9pBN4GVgIz /Ln/mmoXKMD0cAPZODB1Z7KpynCOespQ9IFgkuQA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 721B8F80227; Fri, 11 Sep 2020 19:47:31 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7426AF80240; Fri, 11 Sep 2020 19:47:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F3470F800E9 for ; Fri, 11 Sep 2020 19:47:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F3470F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lF42bRcP" Received: by mail-pg1-x544.google.com with SMTP id j34so7150639pgi.7 for ; Fri, 11 Sep 2020 10:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CgMtX/bQdS+iljLhW5Xz3FoT/kLLfD7hEC/fOvVMJlE=; b=lF42bRcPysLjAz+4XpAo+NifmoYEPSBJzRIvemjHfGghsYHgR1QoV/gvIesYoL6itg fP82ZaiRVqJwao1iq3lLyvojkrdgQL4zeKJ0zjStTVlrHIvIY1mXMYowjT05Z+o2GJhC uSVPB7TOLIEkNXActRv3e8S3wyfIiHvKTLTuI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CgMtX/bQdS+iljLhW5Xz3FoT/kLLfD7hEC/fOvVMJlE=; b=BrgFjucWsJjxsJ2bC2R7GVAuyODtMaQu8xE0AOfBufeFZ9xzCja/fuQDXjtlgcbl33 +DomwlWM63nhGZfCxRlkbPbtQlcJqwxDpP7gU2DJA5YfPGgTukuY5RXApkgGd5mepMDP RVRd5WbFTY5YGSSq+zcplkTfL68dv4alwbGfmHvzxQgkzdOP3nMwcLEh8btaDgoyqYHC zTjDi0OGhF/9ra7r4hxkjC34ZEc0Leb21JjKgnaOGbTtt6/zogtrPfTZARmNcaCzI6Bz b6froEs8NSNEGrckTDfWSlwqqrXhTQLN2jeTSr1uJmgte4Z7i13gr+UsOQ/+NHSsT8cc opyQ== X-Gm-Message-State: AOAM533znlljKF0ccr7d7/vmhqe5ba2oDsbDBfJc20jr5/FTDX0Z1ZeB flVRDFKdmE1XWtiXpk5mRHB2sQ== X-Google-Smtp-Source: ABdhPJxNtBdyzMkYndGvJzc/+tnBt6ycOD7P1IyvK0XKGbemUwW2lU1PpHqixxbAgdo+QItKKfXxZA== X-Received: by 2002:a17:902:8f88:b029:d0:cc03:3ba with SMTP id z8-20020a1709028f88b02900d0cc0303bamr3297714plo.40.1599846434800; Fri, 11 Sep 2020 10:47:14 -0700 (PDT) Received: from localhost ([2401:fa00:1:10:de4a:3eff:fe7d:d39c]) by smtp.gmail.com with ESMTPSA id v13sm2349434pjr.12.2020.09.11.10.47.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Sep 2020 10:47:13 -0700 (PDT) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Subject: [PATCH v10 0/3] Add documentation and machine driver for SC7180 sound card Date: Sat, 12 Sep 2020 01:47:02 +0800 Message-Id: <20200911174705.759011-1-cychiang@chromium.org> X-Mailer: git-send-email 2.28.0.618.gf4bc123cb7-goog MIME-Version: 1.0 Cc: Taniya Das , alsa-devel@alsa-project.org, Banajit Goswami , Heiko Stuebner , Liam Girdwood , Rohit kumar , Cheng-Yi Chiang , Patrick Lai , linux-rockchip@lists.infradead.org, Andy Gross , dgreid@chromium.org, devicetree@vger.kernel.org, tzungbi@chromium.org, Srinivasa Rao , Stephan Gerhold , linux-arm-msm@vger.kernel.org, Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, dianders@chromium.org, Takashi Iwai , Mark Brown , Srini Kandagatla X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Note: - The machine driver patch is made by the collaboration of Cheng-Yi Chiang Rohit kumar Ajit Pandey But Ajit has left codeaurora. - This patch series needs HDMI DAI name SC7180_LPASS_DP defined in sc7180-lpass.h. It will be posted in the newer patchset of https://patchwork.kernel.org/patch/11745565/ Changes from v1 to v2: - Ducumentation: Addressed all suggestions from Doug. - Machine driver: - Fix comment style for license. - Sort includes. - Remove sc7180_snd_hw_params. - Remove sc7180_dai_init and use aux device instead for headset jack registration. - Statically define format for Primary MI2S. - Atomic is not a concern because there is mutex in card to make sure startup and shutdown happen sequentially. - Fix missing return -EINVAL in startup. - Use static sound card. - Use devm_kzalloc to avoid kfree. Changes from v2 to v3: - Ducumentation: Addressed suggestions from Srini. - Machine driver: - Reuse qcom_snd_parse_of to parse properties. - Remove playback-only and capture-only. - Misc fixes to address comments. Changes from v3 to v4: - Ducumentation: Addressed suggestions from Rob. - Remove definition of dai. - Use 'sound-dai: true' for sound-dai schema. - Add reg property to pass 'make dt_binding_check' check although reg is not used in the driver. - Machine driver: - Add Reviewed-by: Tzung-Bi Shih Changes from v4 to v5: - Documentation: Addressed suggestions from Rob. - Add definition for "#address-cells" and "#size-cells". - Add additionalProperties: false - Add required properties. Changes from v5 to v6: - Documentation: Addressed suggestions from Rob. - Drop contains in compatible strings. - Only allow dai-link@[0-9] - Remove reg ref since it has a type definition already. Changes from v6 to v7 - Documentation: - Add headset-jack and hdmi-jack to specify the codec responsible for jack detection. - HDMI codec driver: - Use component set_jack ops instead of exporting hdmi_codec_set_jack_detect. - Machine driver: - Removed aux device following Stephan's suggestion. - Use headset-jack and hdmi-jack to specify the codec responsible for jack detection. - Add support for HDMI(actually DP) playback. Changes from v7 to v8 - Documentation: - Remove headset-jack and hdmi-jack. - Machine driver: - Let machine driver decide whether there is a jack on the DAI. Changes from v8 to v9 - hdmi-codec driver: - Fixed the naming. - Machine driver: - Fixed unused fields. - Moved snd_soc_card_set_drvdata - Keep the naming of HDMI as dai name until v5 of lpass-hdmi patches. Changes from v9 to v10 - Documentation: - Let compatible string be more specific for board configuration to allow for future changes. - Machine driver: - Fixed unused include and macro. - Add temporary macro SC7180_LPASS_DP for future change in sc7180-lpass.h. - Let sound card be dynamically allocated. - Change compatible string accordingly. Ajit Pandey (1): ASoC: qcom: sc7180: Add machine driver for sound card registration Cheng-Yi Chiang (2): ASoC: hdmi-codec: Use set_jack ops to set jack ASoC: qcom: dt-bindings: Add sc7180 machine bindings .../bindings/sound/qcom,sc7180.yaml | 130 +++++++++ include/sound/hdmi-codec.h | 3 - sound/soc/codecs/hdmi-codec.c | 12 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 5 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 5 +- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 5 +- sound/soc/qcom/Kconfig | 12 + sound/soc/qcom/Makefile | 2 + sound/soc/qcom/sc7180.c | 266 ++++++++++++++++++ sound/soc/rockchip/rockchip_max98090.c | 3 +- 10 files changed, 421 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,sc7180.yaml create mode 100644 sound/soc/qcom/sc7180.c