[Sound-open-firmware] jack detection via input/event on linux

Jaroslav Kysela perex at perex.cz
Fri Jun 3 17:56:19 CEST 2022


On 03. 06. 22 17:48, Pierre-Louis Bossart wrote:
> [Adding alsa-devel, Mark and Takashi to this thread]
> 
> On 6/3/22 08:33, Jaroslav Kysela wrote:
>> On 03. 06. 22 13:17, hede wrote:
>>> Am 03.06.2022 11:34, schrieb Jaroslav Kysela:
>>>> PA/PW use only ALSA controls at the moment - thus you should define
>>>> JackControl as defined in use-case.h. But it seems that the driver
>>>> does not create or publish the ALSA jack control (I see only
>>>> "iface=CARD,name='HDMI/DP,pcm=2 Jack'" jack controls for HDMI).
>>>>
>>>>                      Jaroslav
>>>
>>> Ah, thank you Jaroslav. That's the hint I was searching for atm.
>>> JackDev vs. JackControl. I had a vague guess on this but now you made it
>>> certain.
>>>
>>> Maybe I should take a look into the driver directly.
>>
>> It seems that many ASoC drivers do not create kctls - the argument pins
>> is zero in the snd_soc_card_jack_new() call. The SND_JACK_HEADSET should
>> be remapped to kctl in sound/soc/intel/boards/sof_rt5682.c, too.
> 
> Did you mean something like the patch below Jaroslav? If yes, most of
> the Chromebook machine drivers are missing this remapping. That would
> also explain why the jack detection didn't work on my GLK test device,
> despite a UCM file that looked good...

Yes, it looks like a way to go. It seems that the drivers were tested only 
with the CRAS audio server. Note that pulseaudio can be run with the user 
permissions only - thus the input devices may not be reachable.

				Thanks,
					Jaroslav

-- 
Jaroslav Kysela <perex at perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


More information about the Sound-open-firmware mailing list