* [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs
[not found] <20230118125226.333214-1-astrid.rost@axis.com>
@ 2023-01-18 12:52 ` Astrid Rost
2023-01-19 11:18 ` Krzysztof Kozlowski
2023-01-19 16:17 ` Rob Herring
0 siblings, 2 replies; 4+ messages in thread
From: Astrid Rost @ 2023-01-18 12:52 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Rob Herring,
Kuninori Morimoto
Cc: kernel, alsa-devel, linux-kernel, Astrid Rost, devicetree
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@axis.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs
2023-01-18 12:52 ` [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs Astrid Rost
@ 2023-01-19 11:18 ` Krzysztof Kozlowski
2023-01-19 16:00 ` Astrid Rost
2023-01-19 16:17 ` Rob Herring
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-01-19 11:18 UTC (permalink / raw)
To: Astrid Rost, Mark Brown, Liam Girdwood, Krzysztof Kozlowski,
Rob Herring, Kuninori Morimoto
Cc: kernel, alsa-devel, linux-kernel, devicetree
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 <astrid.rost@axis.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"
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs
2023-01-19 11:18 ` Krzysztof Kozlowski
@ 2023-01-19 16:00 ` Astrid Rost
0 siblings, 0 replies; 4+ messages in thread
From: Astrid Rost @ 2023-01-19 16:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Astrid Rost, Mark Brown, Liam Girdwood,
Krzysztof Kozlowski, Rob Herring, Kuninori Morimoto
Cc: kernel, alsa-devel, linux-kernel, devicetree
Hello,
Thank you! Yes this makes things much easier. I will fix it.
Astrid
On 1/19/23 12:18, Krzysztof Kozlowski wrote:
> 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 <astrid.rost@axis.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"
>
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs
2023-01-18 12:52 ` [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs Astrid Rost
2023-01-19 11:18 ` Krzysztof Kozlowski
@ 2023-01-19 16:17 ` Rob Herring
1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2023-01-19 16:17 UTC (permalink / raw)
To: Astrid Rost
Cc: Mark Brown, Liam Girdwood, Krzysztof Kozlowski, Kuninori Morimoto,
kernel, alsa-devel, linux-kernel, devicetree
On Wed, Jan 18, 2023 at 01:52:26PM +0100, 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.
>
> Signed-off-by: Astrid Rost <astrid.rost@axis.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:
Drop 'simple-audio-card,'. That way we can reuse this for the
not-simple cases.
I'm pretty sure we have some vendor specific properties for this
already. Use those for inspiration and to create something which could
replace them.
> + $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.
Sounds like Linux details. How does BSD use this property?
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-19 16:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230118125226.333214-1-astrid.rost@axis.com>
2023-01-18 12:52 ` [PATCH v1 4/4] ASoC: dt-bindings: simple-card: create jack for aux_devs Astrid Rost
2023-01-19 11:18 ` Krzysztof Kozlowski
2023-01-19 16:00 ` Astrid Rost
2023-01-19 16:17 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).