From patchwork Thu Sep 10 05:23:44 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: 11766577 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 0BEF5746 for ; Thu, 10 Sep 2020 05:24:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 76EAB207FB for ; Thu, 10 Sep 2020 05:24:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YSIKLQn8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Hhsh2bxV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76EAB207FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ajTSCu+Ao7GzfU5HsRRYo0+L1PkjN0ursKQ7ojraazs=; b=YSIKLQn8ZFQ0yq+i42xmcFRlaL acdJGDaKNh83S2RTO5jdoswHXh00IUb5gJvkGZ3vbLMjzzYJSI10EbeESy/1nGBVDyGNhgo24DPL1 6wjQNlo+wydDiZ+//o3Inbu96lgACERPl0bYTkxeHJCjbdLPVtCxBS93H8fQ6DsQ+VUfV10oTZLdx UpIaDqci6swno68MvMfJ22CT3uPv9W0b1Lp03pFNLgDGBMMLBFhiyU9q8V9qB0biy6KrGzJKLLfBv yJ6l5efdfc57mGktbld3Rqx2CIAO2Tr5LPmbCKVas32qNdPUMttAgQaO/Ge6BAJIlgHVVoBPprfNP d1a9LeTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGF42-00038X-VJ; Thu, 10 Sep 2020 05:24:07 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGF3y-00036h-6K for linux-rockchip@lists.infradead.org; Thu, 10 Sep 2020 05:24:04 +0000 Received: by mail-pl1-x643.google.com with SMTP id bh1so346699plb.12 for ; Wed, 09 Sep 2020 22:23:59 -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=7svLiscymaKWnrmSH+/5tItXplbBkAtLS63Umu4TPdE=; b=Hhsh2bxV4Or8CULTUAvwBr178gZdx0OqNzPQZVuQALAru6ozgr8fpT759Ok0lPsug5 zx9Z7bzzJtG25wsjB1tRWcHw6X429Mjvx828TrKs6mXV8NcEQOpZkDnzpmIFEalPbQJg 2PVLw2xiD8rfoJvStbp/R2tu1kSAvhB5rh8jw= 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=7svLiscymaKWnrmSH+/5tItXplbBkAtLS63Umu4TPdE=; b=SJVoc4BkrCBZDsglygmdVdrLEO8Qio+TcNbnyA02NJs1vFjfxoO7nB7kntq/pqZIbM Mx1ozaiMd7Tj8NC+48JD7en3LahHPm46U7iBhRFy98kY8v+XC0+w/NeCKIp6BGHGEvdl o/zKPxgjNAnwh8R68iXSar1csgg8hm7Dw31h9t+jP5XyCdJcOkV4p3DJlnofeamfHhDz 6m2IwMtn3mZHrEkDdwRwP9lDWvPQoyGEI4msOYX1tdwi3UWFzIXW7P66wBl+l7lEHZ8y UBHCsafAJ44TXtWGr9ln2/X/gUQLvhKqjDq0fMdbv0Vs6sqpCo1uS7z2QnvkWvyGMfjU qLkw== X-Gm-Message-State: AOAM531WG3gPsE+RsFZPvHQh398N7YcXBtrHYK9V4IBoBS0WMrIdOUQP 99Et6nguf/EVrZlXnswN2r+6Ow== X-Google-Smtp-Source: ABdhPJzMsuHQbv/HPSO541eGjwLrqzhteTkAkNdW0UtyqGCzZyJpwlC086qrl60aF0WceS74rgYSdw== X-Received: by 2002:a17:902:bd48:: with SMTP id b8mr3945861plx.139.1599715438084; Wed, 09 Sep 2020 22:23:58 -0700 (PDT) Received: from localhost ([2401:fa00:1:10:de4a:3eff:fe7d:d39c]) by smtp.gmail.com with ESMTPSA id m14sm4289645pfo.202.2020.09.09.22.23.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Sep 2020 22:23:57 -0700 (PDT) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Subject: [PATCH v8 0/3] Add documentation and machine driver for SC7180 sound card Date: Thu, 10 Sep 2020 13:23:44 +0800 Message-Id: <20200910052347.1790735-1-cychiang@chromium.org> X-Mailer: git-send-email 2.28.0.526.ge36021eeef-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_012402_264710_211954C1 X-CRM114-Status: GOOD ( 16.51 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:643 listed in] [list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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, Jaroslav Kysela , devicetree@vger.kernel.org, tzungbi@chromium.org, 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 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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 defined in sc7180-lpass.h. 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. 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 | 270 ++++++++++++++++++ sound/soc/rockchip/rockchip_max98090.c | 3 +- 10 files changed, 425 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,sc7180.yaml create mode 100644 sound/soc/qcom/sc7180.c