Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp915575rwb; Thu, 19 Jan 2023 04:29:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXsHcvThRJZVddeqoO8ipvdgTA6qHvjuswBj5WxM1EQ5up5DpAz/etZ/v85XnmTydOmDCDDr X-Received: by 2002:a05:6a20:cb58:b0:af:b909:2b3f with SMTP id hd24-20020a056a20cb5800b000afb9092b3fmr8605388pzb.34.1674131362019; Thu, 19 Jan 2023 04:29:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674131362; cv=none; d=google.com; s=arc-20160816; b=p45BtwTQGC4MT3kh71miqZX6c2sZb31qFwAUJvY3Pwmo9BUVr2UVtE7H6LwuuxSFtp PepWd0ajtyB4NC4oFgt/fjvSQIVs5HLrny08eA6lG8ZgVLe+OQ0V7esH1+vSgrlWjkKY I6gyfwz9fb0Jc0cz9UL1YrAgYir50qpVazT9L4oXKxqtMMbboBU0bKzNd+qEyZFNZeJ+ s/7gKdT8YIsJw+SGeaI0vg+0PhQKOAn4gnbk6mzEHVhACZRzCNIqdPZQxGtXopaPoNt6 Yb1Qnc84sOBrbl/CzYsCyXaNgL3qvtca5U6YwbNeYui0bBLbPlviNsL0ArfyvepsfCrk 8gmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=6Y/7gmhFhCAZgaW8XwXPZJxeQ167TuH5cJsnd9QCY0A=; b=jCp2xEZX6WEtgaKb5w4HhiN6uqNaMdT5sregtAXFgTqXCq6miFdD0uAlcBSWjTbR9V vvmmL/QPz846CitFdv6gwmX18PONru8B+Xv/jCLzdti544iz737fYqzsFPQFLy7jAu8R S6cjQ3jbDtZZrnKvFNG/zVdEatZ8EvuskmM3ifElLUSQMD4jP6VMmv1+NutRCtdpeOfc Zm4IVMiHDokeDjCVQSYzsHbC675vwUmHRzO8kNJ0RrbaW//LnEebhMUQWtV0ROev12oS uNwquUdrFmshX7DXoR0G6g036I7O44+SMO1sNuYNUAZVE5ZH8Z1EfA0LvesbQnlSCGTZ 0IbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vtdvrj5m; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f187-20020a636ac4000000b004a8371132f9si39205569pgc.450.2023.01.19.04.29.16; Thu, 19 Jan 2023 04:29:21 -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 header.i=@linaro.org header.s=google header.b=Vtdvrj5m; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230021AbjASLSO (ORCPT + 44 others); Thu, 19 Jan 2023 06:18:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjASLSM (ORCPT ); Thu, 19 Jan 2023 06:18:12 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A24B6F895 for ; Thu, 19 Jan 2023 03:18:11 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id iv8-20020a05600c548800b003db04a0a46bso2821275wmb.0 for ; Thu, 19 Jan 2023 03:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6Y/7gmhFhCAZgaW8XwXPZJxeQ167TuH5cJsnd9QCY0A=; b=Vtdvrj5mqGL5Qwyz7fZlW2SRUuyTH60A/JM+xN3FUpPJTBLokcSytP/QQ7Ng9YByVa OZseG7rOaETa3ijIc3tqjWwUBC/vHfSDvfyPTaiOoS2bg4iqfVKXERhiOYodXUyFFUmP w8L0aa44TrdKpioA8iBUkjIgat/VZU7sPWwRh7+NyuFPm9syfBtAfzqFVMURZV+0gYNu TYU5zi64UEb0bzXBCczqAloHvFzJROdg9CknZOMhyYm+RTBWCVyyOvqtFCOWJUMZv6KB BtszcMzNvSiNbe9Ubv8m+e7Jpv65KP9a28w7VlmFWUk00wEwzA9ASL81QEvXS6JLq9Wn wBpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6Y/7gmhFhCAZgaW8XwXPZJxeQ167TuH5cJsnd9QCY0A=; b=hckqkS/kQSu9KP1B9Z9rD4K+OfrkOl+6Uo5f/F9bHbS41bW9eMO0JW5L8izMmr8QlJ pFPP/JjjhIeTXHSsDBOYb8ITqmDSwXdN2+FQdG1zuLQjcC0Ndq/J0FNumVJH7DWstMJd g0YyhoQUJBW7ZRc9iU0C5l8i3tIurim21pVsN4UDIKyw8EF/9nd2THC9B+UEabF8nOot Mr76blimWWXhVjhD33zY1ThMjMtitiur4vtZ2C75ta1BXnlY9RxoXgvmqFuktr+4A5Cw 5HcMrwt7azJo8WnpXI8D8bKdwquOvPTn9fMcXKIXDTXR7XEL1gqLK3t2Goa8LtLxeWtP xvuA== X-Gm-Message-State: AFqh2kr5XuMVqw+SVmgcMsvZnLS7nJ+HI2M+CcDKRPwR3jzZ3mbEWDNC fSveTP7RWZR+rfNT7fp+//2YTA== X-Received: by 2002:a05:600c:348f:b0:3db:742:cfe9 with SMTP id a15-20020a05600c348f00b003db0742cfe9mr9501898wmq.34.1674127089348; Thu, 19 Jan 2023 03:18:09 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id l4-20020a05600012c400b002bbb2d43f65sm30424666wrx.14.2023.01.19.03.18.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Jan 2023 03:18:08 -0800 (PST) Message-ID: Date: Thu, 19 Jan 2023 12:18:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs Content-Language: en-US To: Astrid Rost , Mark Brown , Liam Girdwood , Krzysztof Kozlowski , Rob Herring , Kuninori Morimoto Cc: kernel@axis.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20230118125226.333214-1-astrid.rost@axis.com> <20230118125226.333214-5-astrid.rost@axis.com> From: Krzysztof Kozlowski In-Reply-To: <20230118125226.333214-5-astrid.rost@axis.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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 On 18/01/2023 13:52, Astrid Rost wrote: > 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. How a device can have "set_jack"? Isn't this part of code? Are you sure you describe here hardware, not Linux driver behavior? > > 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" Drop quotes. > + 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. Same problems. Additionally, if this is a type of aux-dev, then maybe it should be just added as argument to aux-dev? > > 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 > +#-------------------- No new examples, integrate it into some existing one. > + 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>; > + }; > + }; Best regards, Krzysztof