lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230118125226.333214-5-astrid.rost@axis.com>
Date:   Wed, 18 Jan 2023 13:52:26 +0100
From:   Astrid Rost <astrid.rost@...s.com>
To:     Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
CC:     <kernel@...s.com>, <alsa-devel@...a-project.org>,
        <linux-kernel@...r.kernel.org>, Astrid Rost <astrid.rost@...s.com>,
        <devicetree@...r.kernel.org>
Subject: [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs

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 <astrid.rost@...s.com>
---
 .../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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ