8 Jan
2022
8 Jan
'22
2:57 p.m.
Hi,
(X) int asoc_simple_init_jack(...) { ... if (gpio_is_valid(det)) { ...
snd_soc_card_jack_new(...); snd_soc_jack_add_gpios(...); for_each_card_components(card, component)
(Y) snd_soc_component_set_jack(component, ...); } ... }
So for the case of cpcap codec on motorola mapphones this dosent help, because we dont have a gpio to sense plug state, thus no gpio in dts and thus gpio_is_valid will return false, therefore, no jack.
Moving
sjack->pin.pin = pin_name; sjack->pin.mask = mask;
snd_soc_card_jack_new(card, pin_name, mask, &sjack->jack, &sjack->pin, 1);
and
for_each_card_components(card, component) snd_soc_component_set_jack(component, &sjack->jack, NULL);
outside of the if block should make this work, at least cpcap gets the jack then.
--
Carl Philipp Klemm philipp@uvos.xyz carl@uvos.xyz