Skip to contentSkip to conversation

How to add jack GPIOs to audio-graph-cards?

DISCUSSION John Watts 2 participants 2 messages Mar 26, 2024 – Mar 27, 2024

lore
Share & tools
lore

John Watts

author
#0 lore raw

Hi there,

audio-graph-card's device tree schema indicates it supports the following:

- pa-gpios
- hp-det-gpio
- mic-det-gpio

But only implements pa-gpios.

audio-graph-card2 doesn't implement any of these but will still attempts to grab pa-gpios but never use it (possibly a bug?)

When using audio graph cards, how are you intended to add detection GPIOs? Are there future plans to add a jacks { } section of some sort for this?

John.

#1 lore raw

Hi John

Quoted 7 lines

audio-graph-card's device tree schema indicates it supports the following:

- pa-gpios
- hp-det-gpio
- mic-det-gpio

But only implements pa-gpios.

I have never use x-gpio, but it seems below function handling hp-det / mic-det, and ${LINUX}/sound/soc/fsl/fsl-asoc-card.c is only user of it.

	${LINUX}/sound/soc/generic/simple-card-utils.c :: simple_util_init_jack()
Quoted 5 lines

audio-graph-card2 doesn't implement any of these but will still attempts to grab pa-gpios but never use it (possibly a bug?)

When using audio graph cards, how are you intended to add detection GPIOs? Are there future plans to add a jacks { } section of some sort for this?

simple-card / audio-graph-card / audio-graph-card2 are similar, and sharing data setting. But not all features are cross implemented. No special rule exist, but if someone want to use it on, 1st user need to implement it. But he/you can re-use existing function (on -utils.c), or just copy-and-paste is enough (?)

# it seems card2 has "pa-gpios" implement on audio_graph2_parse_of() ?

Thank you for your help !!

Best regards
---
Renesas Electronics
Ph.D. Kuninori Morimoto