Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6484257rwb; Wed, 18 Jan 2023 05:54:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXsqh5CiW3hJpwPMnugxtjngTtimkVa/bp8AKz7IWhP/s/N/qEbEoLFici/u/8+ekPeuHXcC X-Received: by 2002:aa7:c14e:0:b0:46d:cead:4eab with SMTP id r14-20020aa7c14e000000b0046dcead4eabmr7118295edp.6.1674050062720; Wed, 18 Jan 2023 05:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674050062; cv=none; d=google.com; s=arc-20160816; b=Vh40agc7ZMU3mUyZYsuRH4f9qAgLHovonLc7T7hWO0x0gIzgfgBDPuJ27e6ouFhQLu B7oh2Fxuh8cJWkdBMBd2C1ZGQ8TnQ6eUHDCi4SHZlsOUvnBR7KwWcnbdaPCdY90VYRZ8 gLB4ZrrlD4GiOClGOgwagqCXMBgAUNIW5VHK1kMip5J1uRZHR98BU5hbOc/cJOPjOHSS QtqQLQE46H5pLoakwsyRQqGk6iMwz0JjiphIHG5DAHGbvfhMtbwV4qNSO2zu0KoORZnC jgUmPz+GzrPNrIqjGOx3ZNc1RcQVnq1QkJPPgBaDs8mkqnJfMK0+IBzrZq2Az3YLqmYr fR4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9tpzvI7fdZDoAPrHN+US7UGk+e/yxtX1rAxxB7G8nrs=; b=VqVMXJKCDkEkubjhrMD+aQZ5F/clDoE4ifKorfPozFxsx5w7p60P56ArCv0XmFsL2p FPgR2XQAViplQCOow+7GuT2aYEF8VGGxSgrx6UYMqUnhCnG4fiXmEfhy2lomxuPOcM5v Hz0o1VzNzldHPGZjPvvdRaYBz9ytzg/4B8t5c6BcOhXOqiuoP5y4kWmmPxaCb1G6Z8pQ GgfN5wTVFLzwkvGaVmtZVdDGsJqUBspUCCWI3RWxZwbn+7XfbBCqi5j2aFKw3B9cPm6x MFnw6RZkPJNAo14ENmeSkxIgq/kL6ToMjiLp+0uYHQU0yaUfZNDE2ND/Nve9DxjJXugA 6dpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=Iy+5CP26; 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=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t2-20020a056402524200b0049a3b06621esi25719731edd.276.2023.01.18.05.54.10; Wed, 18 Jan 2023 05:54:22 -0800 (PST) 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; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=Iy+5CP26; 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=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231447AbjARN02 (ORCPT + 45 others); Wed, 18 Jan 2023 08:26:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231689AbjARNZj (ORCPT ); Wed, 18 Jan 2023 08:25:39 -0500 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBFA59EE09; Wed, 18 Jan 2023 04:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1674046363; x=1705582363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9tpzvI7fdZDoAPrHN+US7UGk+e/yxtX1rAxxB7G8nrs=; b=Iy+5CP26+TNYmwUfX0m5NAr/r09Z11LCCPN4aobXxgHRcPSxR7vic8KZ tYWuvLK71Du6z7TegR/4dE/T3fikMYoTgr0uKmyrpjesCts4H8JC2uBL7 Li8Ba1JrWooLLUsJ+KMcel0TPlWgB5g0N+fn/AujQihFdHfsrVHeTYUUs /NLiUoFH915l91i0X/+nNCY3taUVndjIOH3UBqWcafbJ/tjv79YM+D/cE phw96VsabNtBz08UTAkVPTZJ8hpPWIvu7uZANxGeBoIkodtPzFgTutOFK 8AGsq6XYngTSiCrKruMrprpkZ3xyaUFtX9l0KKeiAamf6iYsu/uJZg2S9 Q==; From: Astrid Rost To: Mark Brown , Liam Girdwood , Krzysztof Kozlowski , Rob Herring , Kuninori Morimoto CC: , , , Astrid Rost , Subject: [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs Date: Wed, 18 Jan 2023 13:52:26 +0100 Message-ID: <20230118125226.333214-5-astrid.rost@axis.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230118125226.333214-1-astrid.rost@axis.com> References: <20230118125226.333214-1-astrid.rost@axis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS 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 Add simple-card,aux-jack-types: Array of snd_jack_type to create jack-input-event for jack devices in aux-devs. If the setting is 0, the supported type of the device is used. A device which has the functions set_jack and get_jack_supported_type counts as jack device. Signed-off-by: Astrid Rost --- .../bindings/sound/simple-card.yaml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml index ed19899bc94b..2635b1c04fc9 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.yaml +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml @@ -199,6 +199,13 @@ properties: maxItems: 1 simple-audio-card,mic-det-gpio: maxItems: 1 + simple-audio-card,aux-jack-types: + $ref: "/schemas/types.yaml#/definitions/uint32-array" + description: | + Array of snd_jack_type to create jack-input-event for jack + devices in aux-devs. If the setting is 0, the supported + type of the device is used. A device which has the functions + set_jack and get_jack_supported_type counts as jack device. patternProperties: "^simple-audio-card,cpu(@[0-9a-f]+)?$": @@ -498,3 +505,31 @@ examples: }; }; }; +#-------------------- +# Add a headphone and a headset mic jack, +# which use an auxiliary jack detector e.g. via i2c. +# The events, which should be enabled are: +# SND_JACK_HEADPHONE = 1 +# SND_JACK_MICROPHONE = 2 +#-------------------- + - | + sound { + compatible = "simple-audio-card"; + simple-audio-card,widgets = + "Headphone", "Headphone Jack", + "Headset Mic", "Headset Mic Jack"; + simple-audio-card,routing = + "Headphone Jack", "HPLEFT", + "Headphone Jack", "HPRIGHT", + "LEFTIN", "Headset Mic", + "RIGHTIN", "Headset Mic"; + simple-audio-card,aux-devs = <&hp_jack>, <&hs_mic_jack>; + simple-audio-card,aux-jack-types = <1 2>; + simple-audio-card,cpu { + sound-dai = <&ssi2>; + }; + simple-audio-card,codec { + sound-dai = <&codec>; + clocks = <&clocks>; + }; + }; -- 2.30.2